When to label a philosopher as either a western philosopher or an eastern philosopher?

Question: The criterion that determines a person who is professionally trained in philosophy and does philosophical research,  to be either a western or eastern philosopher is not clear to me. Suppose, we have a person from Asia(which is traditionally associated with eastern philosophy), who knows nothing about eastern philosophy(and perhaps rejects it) and works on analytic philosophy, developing on the ideas of Hume, Wittgenstein and Russel, do we call him(or her) a western philosopher or an eastern philosopher?
Comment: This is one of those vague delineations that have clear cases and borderline cases, in which it is pointless to press the distinction. First, it is unclear whether to look at the birthplace/nationality, or at the tradition in which the philosopher works. Even if it is the latter, such determinations are, at times, controversial. Is [Amartya Sen](https://en.wikipedia.org/wiki/Amartya_Sen) Western or Oriental? How about [Karl Jung](https://en.wikipedia.org/wiki/Carl_Jung)? How many grains make a heap? Who knows, and more importantly, who cares.
Comment: I try to avoid labeling people, because it encourages splitting (black & white, all-or-nothing thinking). https://en.wikipedia.org/wiki/Splitting_(psychology) Eastern / Western indicates specific cultural traditions and languages involved (language significantly affects ideation and thought processes, and their expression), although one can find many similarities between them.
Comment: If you use Russell's definition then a 'Western' philosopher is someone who refuses to study mysticism, while an Eastern philosopher is someone who studies all of philosophy. Thus 'Eastern' usually means merely that they lived in the East, while 'Western' usually denotes a person who takes a particular approach to philosophy. These words can be highly misleading and are used in various ways, but this seems a common useage. .
Answer: If you work in Eastern philosophy, you're an Eastern philosopher. If you work in Western philosophy, you're a Western philosopher. It doesn't have anything to do with your identity, although it obviously once did. Jaegwon Kim, for instance, is Korean and considered a Western philosopher. Alan Watts, on the other hand, was British and considered an Eastern philosopher (not sure if he was really a philosopher, but this isn't my area and he's the only one I could think of).


Connected apps in salesforce

Question: Can someone explain the connected apps concept with a basic example or provide me some links where I can find them? I need to connect to another salesforce org from my dev org and retrieve all the classes of the other org and display the list in a  visualforce page in my dev org.
Answer: A "Connected App" is an application that can connect to salesforce.com over Identity and Data APIs. Connected Apps use the standard OAuth 2.0 protocol to authenticate, provide Single Sign-On, and acquire access tokens for use with Salesforce APIs.
The information you enter to create a connected app is divided into these parts:

Basic Information
API (Enable OAuth Settings)
Web App Settings
Custom Connected App Handler
Mobile App Settings
Canvas App Settings

So when you want to integrate your app with other Salesforce org you will use OAuth, saving your app gives you two new values that the app uses to communicate with Salesforce.
Consumer Key: A value used by the consumer to identify itself to Salesforce. Referred to as client_id in OAuth 2.0.
Consumer Secret: A secret used by the consumer to establish ownership of the consumer key. Referred to as client_secret in OAuth 2.0.
This is exactly same when you integrate any API (Twitter, facebook)
Once you get these values you need to follow below steps

Get access token from ("https://yourInstance.salesforce.com/services/oauth2/token")
Call Salesforce API using access token received in step 1.

You can read more about API integration from https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart.htm

Connected apps in salesforce


Keynote keyboard shortcut to navigate between objects on a slide

Question: If I am typing in the Title box and I want to keep my hands on the keyboard, is there a shortcut for me to navigate to the next text box or bulleted list (or whatever) on the screen without having to use my mouse?
Answer: You can navigate between text boxes on keynote without using your mouse and only keyboard by using the tab key. This has its limitation as it does not let you edit existing text but instead replace the text with what you begin texting. The process is as follows:

New Slide
Press Tab (bounding box highlights for the text box)
Start Typing (finish text)
Press Escape
Press Tab (continuing pressing to cycle)


Writing direct proofs

Question: Let $x$, $y$ be elements of $\mathbb{Z}$. Prove if $17\mid(2x+3y)$ then $17\mid(9x+5y)$.  Can someone give advice as to what method of proof should I use for this implication? Or simply what steps to take?
Comment: For a direct proof of the statement $p \rightarrow q$, you should assume that $p$ is true, and then arrive at $q$.  In this case, you want to show that $17 \mid (2x + 3y) \implies 17 \mid (9x + 5y)$.  So, you start by assuming that $17 \mid (2x + 3y)$ or that $\exists t \in \mathbb{Z}$ such that $2x + 3y = 17t$.  Then you want to show that $\exists s \in \mathbb{Z}$ such that $(9x + 5y) = 17s$.  If you can write $9x + 5y = 17k + (2x + 3y)l$, then you're done as the sum of two multiples of $17$ is again a multiple of $17&.  I hope this comment, along with Don's answer resolves your question.
Answer: So $\,\exists\;k\in\Bbb Z\,\;\;s.t.\;\;\;2x+3y=17k\,$:
$$9x+5y=17x-8x+17y-12y=17(x+y)-4(2x+3y)=17\left(x+y-4k\right)\Longrightarrow$$
$$\Longrightarrow17\mid (9x+5y)$$
Comment: I feel like the user is asking for help on writing the proof. I assume this means they are relatively new to proof writing. If that is the case, then this answer has so many bad habits that need to be addressed. First off, there is no clear assumption written. Next, it has excessive use of symbols (e.g. never use $\Rightarrow$ in writing a proof!). Lastly, it lacks words to help the reader parse what is being said. Sure it is a correct answer, but I hope the user doesn't imitate this style of writing it up in the future.
Comment: What you feel is something personal, and perhaps it'd be a good idea not to talk about bad habits of others lest someone else would mention some of your own.  I think you missed completely the whole point of the answer. It is supposed to give guiding lines to the OP, just as he asked. It's up to him to come up with the complete proof after seeing the above. Your comment on the very mathematical and widely used symbol $\,\Longrightarrow\,$ lacks, again, understanding of the sketchy nature of the answer, just as your mentioning the lack of words. Remember: this is not a journal paper.
Comment: Wow. Actually, there are a lot of very accepted standards for what constitutes good mathematical writing and what constitutes bad. The things I pointed out are not merely my opinion. Maybe you should add that this is just a sketch to your answer. I reiterate that the difference between good and bad proof writing is very difficult for new students to grasp. I'm not saying you personally have these bad habits, only that some people do have them even when writing a "full/formal" proof. I don't see what's wrong with making sure the OP doesn't mimic them when doing their own write up.
Comment: I don't need to add anything of that kind to a college/university level student: it should be obvious (or else...). The things you so rudely pointed out *are your opinion too*, which perhaps may be shared by some other people, but I don't think you were appointed to be anyone else's speaker. Perhaps before you dare to write such a thing about somebody else's answer it'd be a good idea to surf around the site for a while and read other answers. There are all kinds: more sketchy than mine, very detailed, incomplete, complete...Everybody has his own style and you don't get to decide what's better
Comment: Maybe we should just eliminate all introduction to proof classes at all universities, because you seem to think all college level students magically know how to write good proofs. I've taught these classes and seen people turn in literally exactly what you wrote as a "proof." In what sense was what I wrote rude? I pointed out common mistakes that people make in introductory proof classes, which based on the tone of the question it seems this person is in.
Answer: I would write the equations in $\mathbb{Z}_{17}$, which is a field, because $17$ is prime, so linear algebra applies:
$$ 2x+3y=0 $$
is a linear equation of two variables, and you seek to prove that it implies
$$ 9x+5y=0 $$
which means they're linearly dependent. Two equations are linearly dependent if and only if one is a multiple of the other - and this should be easy to prove.
Edit: Since you asked about proof strategy, I'd like to emphasize that this is not some random trick; the condition $p|x$ is not very nice to work with algebraically, but because $\mathbb{Z}_p$ is a field, the equivalent statement $x\equiv 0\mod p$ (I omitted the $\mod 17$ and the $\equiv$ above to make it look more like familiar algebra) is much simpler and better, because you can multiply, add and create linear spaces over $\mathbb{Z}_p$ that behave (in many ways) like real numbers.
Comment: @JavaMan Good point, but the field and the linear algebra are not needed if he knows how to multiply modulo, the only important part is that the second equation is a multiple of the first $\mod 17$. The reduction to linear algebra appeals more to the "proof strategy" part of the question.
Comment: Indeed, the vantage point of viewing $\mathbb{Z}_{17}$ as a field and knowing "linear algebra holds in a field" is not needed for this problem, and hence my comment.  Algebraically manipulating equations in $\mathbb{Z}_{p}$ still does not elucidate the proof strategy, however, since the OP may still not what a field is.  As you stated, the biggest component here is noticing that $9x + 5y = 17(x+y) - 4(2x + 3y)$.
Comment: Thinking of $\mathbb{Z}_{17}$ as a field is surely a good way to go about this, but it is not clear that the OP knows what a field is.  This type of question would (most likely) arrive in a discrete math class before one would have knowledge of fields.
Answer: Given $17 | 2x + 3y$ then $17 | (17x + 17y) - 4(2x + 3y)$ which says $17|9x + 5y$.
Comment: using the basic rules of divisibility: that 17|17M for any M including M=x+y. and If 17|A and 17|B then 17|A-B.
Answer: $\rm\begin{eqnarray}{\bf Hint}\ \ \  a\ (cx\!+\!dy)\!\!\!\!\!\!&\ - &\rm\! c\ (ax\!+\!by)\ \ =\ \ (ad\!-\!bc)y \\
\rm thus\ \ \ \  p\mid cx\!+\!dy \!\!\!\!&\iff&\rm\!\!\! p\mid ax\!+\!by\ \ if\ \ p\mid ad\!-\!bc,\,\ p\nmid a,c,\,\ p\ prime \end{eqnarray}$

Writing direct proofs


Eclipse with powerpc-linux-gcc possible?

Question: I program a embedded Linux on a separate target. For that I use Eclipse as a editor and the powerpc-linux-gcc.
That's a bit uncomfortable.
Is it possible to use a  powerpc-linux-gcc in Eclipse?
Answer: Yes, but you want to install (via Help -> install new software -> from all available sources -> Mobile and device development) C/C++ cross compiler support and possibly C/C++ GDB hardware debugging.
When you start new project, selecet C or C++ project, then Executable, then "empty project" (or something else) and then make sure, in to selecet "Cross gcc" in right listbox. Press Next button until the page with cross compiler prefix and path shows. There you need to enter prefix (powerpc-linux- in your case) and you can also select your compiler's directory (if you have not added it to path).
When you have project set up this way, selected toolchain is used to build. You can alse set up "GDB hardware debugging" session to debug your application remotely.


Algorithm to find common tangent to any two conics

Question: I've read a lot of questions and answers here regarding finding common tangents to conics. Almost all of them deal separately with parabolas, circles or ellipses. Do we have any general algorithm which can be used to find the common tangents to any two conics of same type irrespective of whether it's a parabola, ellipse, hyperbola or a circle?
Answer: If the two given conics in $x,y$ are given by the three by three matrices $M$ and $N$, the dual conics are given by the adjugate matrices (which up to a scalar are the inverses $M^{-1}$ and $N^{-1}$ when they are invertible).
The dual conics in $X,Y$ intersect in at most four points $(X_i,Y_i)$. And the correspondence $X_ix+Y_iy+1=0$ give the common tangent lines.
Added:
Duality
In projective geometry there's the concept of duality: two lines have a common point is dual to two points have a common line. This extends to curves in that a line is the points on it has the dual concept that a point has the lines through it.
Now this extends to nonlinear curves by a point on a curve having a tangent picking out one line of the lines through the point. The collection of tangent lines to a curve then is a dual curve.
A common tangent to two curves then is exactly an intersection point of the dual curves.
As it happens, for conics, this is as straightforward as inverting the matrices associated to them. The only complication being that some matrices are not invertible and the process still works with the adjugate matrices then.
Example

The conics in the image are
$$x^2+2xy-y^2+3x+3y+3=0,2x^2+2xy-2y^2-8x+4y+2=0$$
which through $a_ix^2+2h_ixy+b_iy^2+2g_ix+2f_iy+c_i=0$ have matrices
$$\begin{pmatrix} a_i&h_i&g_i\\h_i&b_i&f_i\\g_i&f_i&c_i\end{pmatrix},i=1,2$$
or
$$M=\begin{pmatrix} 1&1&\frac32\\1&-1&\frac32\\\frac32&\frac32&3\end{pmatrix},N=\begin{pmatrix} 2&1&-4\\1&-2&2\\-4&2&2\end{pmatrix}$$
The dual conics are then
$$-\frac{21}{4}x^2-\frac32xy+\frac34y^2+6x-2=0,-8x^2-20xy-12y^2-12x-16y-5=0$$
from the adjugate matrices
$$\begin{pmatrix} +\begin{vmatrix}b_i&f_i\\f_i&c_i\end{vmatrix}&-\begin{vmatrix}h_i&f_i\\g_i&c_i\end{vmatrix}&+\begin{vmatrix}h_i&b_i\\g_i&f_i\end{vmatrix}\\-\begin{vmatrix}h_i&g_i\\f_i&c_i\end{vmatrix}&+\begin{vmatrix}a_i&g_i\\g_i&c_i\end{vmatrix}&-\begin{vmatrix}a_i&h_i\\g_i&f_i\end{vmatrix}\\+\begin{vmatrix}h_i&g_i\\b_i&f_i\end{vmatrix}&-\begin{vmatrix}a_i&g_i\\h_i&f_i\end{vmatrix}&+\begin{vmatrix}a_i&h_i\\h_i&b_i\end{vmatrix}\end{pmatrix}.$$
Now you can get the intersections from wolfram alpha
or Maxima
<code>solve([-21/4 *x^2-3/2 *x*y+3/4 *y^2+6*x-2,-8*x^2-20*x*y-12*y^2-12*x-16*y-5],[x,y]);
[[x = 0.180395566181265, y = - 1.037735255240134],
 [x = 0.3091137649277184, y = - 0.6697463463799764],
 [x = 1.468166586883676, y = - 1.389356814701378],
 [x = 2.787004998077662, y = - 3.732949087415946]]
</code>
And the common tangent lines are $$\begin{align}0.180395566181265x-1.037735255240134y+1&=0\\0.3091137649277184x-0.6697463463799764y+1&=0\\1.468166586883676x-1.389356814701378y+1&=0\\2.787004998077662x-3.732949087415946y+1&=0\end{align}$$
Links
See wikipedia for how to put duality in coordinates and then set $z=1$ to get the usual $x,y$-plane.
Also see this which for me was the first google search hit for dual conic.
Comment: Thank you for answering - But, I am sorry to say that this answer is way beyond my level as I need to learn about dual conics (could guess it's about two conics), adjugate matrix (know only adjoint matrix). I think this answer is helpful for others who are aware of this concept (due to the upvote(s)). I'll learn them and then try to understand this. Is there any simple method to find the common tangents without invoking advanced (to a grade 11 student) mathematics? If yes kindly specify.
Comment: @Priya: Would it help if I wrote it out with a concrete example?
Comment: I am not sure as I need to learn these concepts (these are not in our syllabus). If you could explain it with an example, no problem, please proceed. I'll do my best to understand your answer, as I wish to know at least one method to find common tangents to any two conics. Thank you.
Comment: @Priya: What about this edit?
Comment: Thank you very much for the edit. This method seems very interesting. I've some doubts in the example: (1) Why do we need to compute "maxima" when we are asked to find the intersection points of the dual conics? (2) In the big matrix with determinants as its elements (I think it's the adjugate matrix), where should $i$ be $1$ and where must it be $2$? If possible, kindly suggest me good resources so that I could learn about dual conics in detail.
Comment: Maxima like wolframalpha is software. The $i=1$ matrix or $M$ has adjugate with $i=1$, and $i=2$ or $N$ has adjugate with $i=2$. I'll give sources later.


Where to start reading Berserk manga if I've seen the anime?

Question: Title basically says all. I've seen the anime and want to start the manga (but skip over the common part). From where should I start?
Comment: I would think this would be completely dependent on whether the OP saw the entire run of the anime, or just a portion of it, even assuming that this particular manga and anime can be synced up. (unless it really does qualify as general reference). Since I believe it would be too broad if reopened, and the OP hasn't been seen for 1.5 years at this point, voting to leave closed.
Answer: wikipedia entry for berserk

The first thirteen volumes of the manga are covered, including the first arc (Black Swordsman). Though the manga storyline remains largely intact, many changes were made with the modification or elimination of characters, some of the series' most violent and brutal scenes, and material that would have extended the storyline beyond the planned run of the anime series. Themes of friendship and ambition are more developed and emphasized than those of causality and the supernatural, all of which were made with the approval of series creator Kentarō Miura.

That being said you might still want to read said first 13 volumes, there are many scenes skipped in the anime.


Can I have two different kinds of user in spree?

Question: I need to build an e-store. I am thinking of using spree gem instead of building everything from scratch but I have not used spree before. One of my requirements is to have two kinds of user and app should be able to show and apply prices based on that user. For eg. if a user is a wholesale buyer app should display lower price and if user is normal user it should show different price. Can this be readily done in spree?
Answer: I worked on a project that used Spree and required extensive customization. Spree allows you to customize almost anything, though some customization is harder than others.
Spree does allow you to have multiple types of users quite easily. In fact, it doesn't assume much of anything about your user model. You can use the Devise gem or create your own user model. In either case, let's say you add a boolean called is_wholesale to your user model. Alternatively, you could use Spree's built-in roles functionality (see this link for more information).
The trickier part of your question is how exactly wholesale pricing works. If wholesale buyers get a fixed percentage discount off of retail prices (e.g., 20% off each item), then implementing this feature with Spree is quite easy. Just create a custom promotion (see this guide) with a fixed discount percentage and only make it available to your users with the is_wholesale boolean or correct Spree role. You could also customize the Spree product and category views to show the discounted price to wholesale buyers.
That said, if you want each product to truly have two prices (not just a fixed discount percentage), things get a lot more complicated. My experience (though of course I haven't tried it), is that would require mucking around with a lot of different Spree internals (e.g., the Spree product model, cart items, admin interface) and will lead to a lot of hair-pulling.
Comment: Thank you for enlightening on this. I can see that they have something called spree_auth_devise. I will try out and get back on this.


Unknown error has occurred. The form template has been published to the server but it can only be opened in InfoPath Filler

Question: I have gotten this error before and to fix it, I created a new external list and new form. But when going back in and editing the new form, it doesn't even publish and keeps giving me this error. I tried creating a new external list and form again, but it still keeps giving me the same error. I also tried the recommended sharepoint solution to add the Desktop feature, but my computer already has it installed. I am not locked out of my account either.
Answer: How did you edit the new form?
I can publish the form successfully via SharePoint Designer->Edit external list->Design Forms in InfoPath under Actions tab->Item.
Reference: How to: Customize External List Forms Using Microsoft InfoPath


AES GCM iv/nonce length under 12 bytes in java

Question: I'm developping an Swift app that communicate with a Java legacy backend using AES GCM, my biggest problem is that Java let you use a 8 bytes iv/nonce (and the legacy code is written with 8 bytes nonce). You can't do that in swift, it result in error.
I can't find in javadoc what happen to nonce too short, i guess they transform it (hash maybe ?)
Do you have any idea besides upgrading the legacy code ?
Comment: Does this answer your question? [AES-GCM recommended IV size: Why 12 bytes?](https://crypto.stackexchange.com/questions/41601/aes-gcm-recommended-iv-size-why-12-bytes) Additional GHASH calculations and hard security analysis.
Answer: Does the legacy code convert the 8 byte nonce into a 12 byte nonce (say, by concatenating 32 fixed bits)?  Or, does it use it directly into GCM (computing the GHASH of the 8 byte nonce)?
If the legacy code converts the 8 byte nonce into a 12 byte nonce, it's pretty obvious (just have the Swift app convert the 8 byte nonce in the same way).
If it uses the little-used facility of GCM to handle nonce sizes other than 12 bytes, well, there is no way to generate a 12 byte nonce that will do the same thing.
Here's why: in GCM, the nonce is used to select the initial 16 byte counter.  With a 12 byte nonce, it generates that counter by taking the 12 bytes, and sticking fixed 00 00 00 01 bytes at the end; that is, whenever you use a 12 byte nonce, the last 4 bytes of the counter will always be those values.
On the other hand, if you use any other nonce size (say, 8 bytes), GCM sends the IV (and its length) through an internal GHASH operation, which generates a 16 byte value.  For an 8 byte nonce, this GHASH operation consists of appending the 8 bytes 00 00 00 00 00 00 00 40 to the nonce, and then multiplying the result (in $GF(2^{128}$) with the secret value $H$.  Now, those 16 bytes will likely not have a 00 00 00 01 pattern at the end, and so the transform that GCM produces will likely be not representable by a 12 byte nonce.
Now, there is one dim possibility; if the legacy code were to always generate nonces that, after a GHASH, had a 00 00 00 01 pattern at the end, well, you could cobble something together.  However, the effort to do that is likely more than the effort to support 12 byte nonces in the legacy code, and in addition, because GHASH is a keyed operation, you would have to be careful to not leak anything - transmitting the 8 byte nonces that work would leak, and so you would need to do something other than that.
Comment: Yeah the java code use it without transforming it's length, and I was hoping that the nonce transformation was more "predictable". Thx for your responce, I guess I'm going to upgrade the legacy code.


A question about formalized theories that may be both consistent and w-consistent

Question: Let T be a first order set theory formalized in the language L(ZF) of ZF, which has "membership"
and "=" as its only atomic predicates. For each positive integer n, let P(n) be the sentence which
expresses that "there exists a set having exactly n elements". P(n) can be formalized in L(ZF) and
is an axiom of T for each positive integer n. Note that L(ZF) does not need to contain any terms
that are constants for this to be possible. Now let Q be the sentence stating that "there exists
a finite set (in Tarski's sense of finite) which can be mapped onto every non-empty set". Q is
also an axiom of T that can be formalized in L(ZF) and should be consistent with every finite
collection of sentences of the form P(n). However with infinitely many axioms it would seem
appropriate to call T at least a w-inconsistent theory. But could T still be consistent? The
answer is not clear to me since it would depend upon what other axioms T has. T must have some
other axioms (such as the axiom of pairing) in order to define the mapping of one set onto
another as the sentence Q describes. We must be careful that these additional axioms are not
inconsistent with Q. We should probably not want a power set axiom, for example. But, with a
proper choice of the new axioms could we end up with a consistent T? If so, T would be an
example of a consistent but w-inconsistent formalized theory whose language need contain no
constants and no formulae of the form N(x) intended to be interpreted as "x is a positive integer".
Comment: Tarski finiteness is somewhat of an ambiguous term. One definition is equivalent to finiteness as we think about it, and the other one requires the use of the axiom of choice in order to be equivalent to finiteness.
Answer: If we replace your axiom $Q$ by the stronger-seeming assertion
$Q^+$ that asserts: "there is a largest set, which contains all
other sets as subsets, but which is Tarski finite", then the
corresponding theory $T$, asserting every $P(n)$ and also $Q^+$,
is consistent, but not $\omega$-consistent.
To see this, simply consider the ultrapower model $M=\Pi \langle
V_m,{\in}\rangle/U$, where $U$ is a nonprincipal ultrafilter on
$\mathbb{N}$ and $V_m$ consists of the sets of rank less than $m$
in the von Nuemann hierarchy, defined by iterating the power set
via $V_0=\emptyset$ and $V_{m+1}=P(V_m)$. Each statement $P(n)$ is
true in all but finitely many $V_m$, and hence true in $M$.
Similarly, each $V_{m+1}$ satisfies $Q^+$, since the object $V_m$
is largest in $V_{m+1}$ and Tarski finite there, and so $Q^+$ also
is true in $M$.
Alternatively, one could consider $V_N$ for nonstandard $N$ inside
a nonstandard model of finite set theory $\text{ZFC}^{\neg\infty}$.
These models furthermore satisfy some nice axioms, such as
extensionality, union, foundation, axiom of choice, collection,
replacement, separation, pairing restricted to sets of non-maximal
rank, power set restricted to sets of non-maximal rank and induction
on the von Neumann natural numbers. And so one can place all these axioms
also into $T$.
This theory, however, is clearly not $\omega$-consistent.
Comment: Thanks, Joel, for a very complete answer. Your axiom Q+ accomplishes everything that axiom Q does, while avoiding
the problem of some additional axioms being possibly needed
to define mappings. Nothing new would seem to be needed to
express that a set is finite in the sense of Tarski. So, if
the only axioms of T are axiom Q+ and an infinite collection
of sentences of the form P(n), T may be one of the simplest
possible examples of a formalized theory that is both consistent
and w-inconsistent.


Why is $\sin(xy)/y$ continuous?

Question: Me and my mates are crunching this question for a while now.
While we know that $\sin(xy)$ is continuous , $1 / y $ as the other part of the function clearly has a continuity gap at $y = 0 $, though the function can be continued at $y = 0$ with $f(x,0) = 0 $- why is that?
We tried some things but are not getting to the important step that proves the matter.
Answer: Recall that for $z$ real, $|sin (z)| \leq |z|$.
Comment: No, you aren't missing anything - this demonstrates that the limit as $(x,y)\rightarrow (0,0)$ of $sin(xy)/y$ is $0$, meaning if you define the function to be $0$ at $(0,0)$ it's continuous.
Comment: So that means: $sin(xy)/y$ $\leq$ $|sin(xy)|/|y|$ $\leq$ $|xy|/|y|$ $=$ $|x|$ ... that means we can ignore y at 0 completley but I guess I am missing something crutial again here ...
Comment: Right, I confused the conclusion that y is irrelevant in this case, but actually x is irrelevant to remove the singularity, so for any x we can replace f(x,0) with 0 to continue the function. Thanks.
Comment: No worries. The idea is that due to that inequality for sine, $sin(xy)$ behaves similarly to $xy$ near the origin, so the function as a whole behaves like $x$.
Answer: I suppose the question is why the function is continuous for $x,y$ in $\mathbb{R}$ ...
The function is obviously continuous in every $(x,y)$, where $x$ and $y$ are non-zero.
Let's study the $3$ cases, when $x=0$, $y=0$, and $(x,y)=(0,0)$
1.Let $x$ be any non-zero Real number:
$\frac{\sin(xy)}{y} = \frac{\sin(xy)}{xy}x \to  1\times x$ when $y\to0$, so the function is continous and the limit is $x$

Let y be any non-zero Real number:
$\frac{\sin(xy)}{y} = 0$ when $x=0$, obvious continuous
When $(x,y)\to(0,0)$, from $1$ and $2$ above, the function has a limit, $0$.
Answer: You can replace $f(x, 0) = x$. Let's fix $x = a\neq 0$. Then the function essentially becomes $g(y) = \frac{\sin (ay)}{y}$. To figure out the limit for "$g(0)$", we can substitute $z = ay$:
$$
\lim_{y \to 0}f(a, y) = \lim_{z \to 0}\frac{\sin z}{z/a} = a\cdot\lim_{z \to 0}\frac{\sin z}{z} = a
$$
For $x = 0$, we have that $f(0, y) = 0$ for non-zero $y$, so $f(0, 0) = 0$ is a natural extension at the origin as well.
Answer: This seems to be wrong if the question is whether the function
$$
f:\mathbb{R}^2 \to \mathbb{R}:(x,y) \mapsto \frac{\sin(xy)}{y},
$$
extended by $0$ where $y=0$ is continuous. Take any point $(a,0)$. Then $(a,1/n)$ is a sequence that converges to this point, so by continuity $f(a,1/n)$ should converge to $f(a,0)=0$. However
$$
\frac{\sin(a/n)}{1/n}=\frac{\sin(a/n)}{a/n} \cdot a \to a,
$$
so if anywhere, it can only be continuous in the origin.
Answer: The expression
$$f(x,y):={\sin(xy)\over y}$$
is at face value undefined when $y=0$, but wait: When $y\ne 0$ one has the identity
$${\sin(xy)\over y}=\int_0^x\cos(t\>y)\ dt\ .$$
Here the right side is obviously a continuous function of $x$ and $y$ in all of ${\mathbb R}^2$. It follows that the given $f$ can be extended continuously to the full plane in a unique way.

Why is $\sin(xy)/y$ continuous?


Preposition in for emphasis

Question: Hi I usually use "at" to inform about a place I am, but can I say "I will be in the school at 8:15 a.m." , thus I want to emphasise that at the time I will be inside a school, indoors. not running to, not going upstairs or opening doors, I will be in the school ready to study?
Answer: You are correct that at 8:15 am means that you will be doing whatever it is that is described.  However, "in the school" does not at all imply that you will be ready to study. You would need to say:

I will be in the school ready to study at 8:15am.

other prepositions work as well for this:

I will be at the school ready to study by 8:15am.

The latter implies you might be early. So at implies more precision, but not readiness.  Technically the first sentence could say "at the school" and be correct, but it would just sound weird to use "at" twice in once sentence.
Answer: You can, but I don't think it has much emphatic effect. It suggests that you will be in the building, but it doesn't suggest that you will be ready to learn. In fact, it only emphasises physical location, so you could be "opening doors or running upstairs" but still be "in" school.

Students must be in school by 8:15 am (provided you are inside the building you are okay)

There is an idiom: "at your desk"

Students must be at their desks by 8:15 am (you must be at school and sitting down in the classroom. You must not be going upstairs etc)

Preposition in for emphasis


Can I use LOS on Samsung S4 Mini GT-I9195I?

Question: I have successfully installed Lineage OS on Samsung S4 Mini GT-I9195, but now I got a GT-I9195I which should be a more advanced model with better CPU. I can't find any reliable informations, if this model is also suitable for Lineage.
Comment: Usually the "plus", "+", "VE" or "Value Edition" are not really upgraded versions but variants that are cheaper for Samsung to manufacture. In case of i9195i you get more CPU cores but each core is a slower than the cores of i9195. Most software not being able to scale up to 4 cores makes the i9195i probably slower in real world.
Answer: serranoveltexx (GT-i9195i, 4G single-SIM, SD410; the "ve" stands for "value edition") is not a part of the official LOS build roster, and likely won't be due to the lower popularity.
There are unofficial builds available at XDA-Developers: 14.1, 15.0. Note that you need the packages for your specific variant (marks "ve").
Comment: i9195i seems to work fine with PixelExperience builds. Make sure to install TWRP 3.3.x or later or install will fail. For more info: https://forum.xda-developers.com/galaxy-s4-mini/development/rom-pixel-experience-t3870945


perl: unobtrusively write to IO::Handle opened by TAP::Formatter::HTML

Question: While executing actions on a web page using Test::WWW::Selenium, my perl program writes TAP testcase output to a html report created and updated by TAP::Harness.
My Selenium client must log into some password protected web pages, and this is unavoidable. So the password shows up in the TAP output.
ok 1 - open, /homepage-with-loginform.html, true
ok 2 - type, id_username, JoeSixp
ok 3 - type, id_password, secrIt
...

To remove the password from the HTML output, I have come up with the function below, but it does not work.
Can anyony help out?
I created  the formater object with
my $fmt = TAP::Formatter::HTML->new;
my $harness = TAP::Harness->new( { formatter => $fmt, merge => 1 } );
$harness->test_args( [ "--browser=$browser", "--config=$h{config}" ] );
my $agg     = $harness->runtests(@tests);

#remove passwords from HTML report
remove_password( \%h, $fmt ); # %h is an options hash
 ...

sub remove_password {

    # remove password from HTML report

    my ( $h, $fmt ) = @_;

    my $passwd = $h->{password} ||  "xxx-xxx";
    my $outhtml = ${ $fmt->html() };

    #from the TAP::Harness perldoc
    #html() - This is a reference to the scalar containing the html generated on the last test run.
    #Useful if you have "verbosity" set to silent, and have not provided a custom "output_fh" to write the report to.

    note("replacing password with xxx-xxx in html file");

    $fmt->html(\$outhtml); # does not work
    $outhtml =~ s/$passwd/xxxxxx/msg; # works

    {
        local $/ = undef;
        my $fh = $fmt->output_fh(); #An IO::Handle filehandle for printing the HTML report to.
        if ( $fh->opened){
             #
                     # ??? HOW DO I unobtrusively truncate the file here?
             #
             print $fh $outhtml;  # writes back censored HTML output

        }
    }

}

I think that this is not a  simple "how do I truncate a file using perl" question.
The file is already opened by some library code, and the code should work on unix and windows.
the program should continue working with $fh , I dont want to open and close it myself, as it might confuse the TAP::Formatter::HTML module and it might stop working properly.
Update
#this gets the job done but it is kind of brutal
my $outf = $h->{outfile};
if ( $fh->opened){
  $fh->close();
   open $fh, ">", $outf or die "cannnot open '$outf' for truncating and writing:$!";
   print $fh $outhtml;
  close $fh;
}

Answer: Hmm... one possible but simplistic approach would be to override the description method from TAP::Parser::Result::Test (I am pretty sure it should be done via a subclass but too erly in the morning to figure out the Right Way).
Something along the lines of the following draft:
# Original: sub description { shift->{description} }
*TAP::Parser::Result::Test::description = sub {
     my $description = shift->{description};
     $description =~ s/type, id_password, .*$/type, id_password, XXX_PASSWORD_REMOVED_XXX/;
     return $description;
 };

Comment: interesting ... maybe I'll try this experiment later


How much time does homeschooling consume?

Question: Assuming home schooling would be the only education for my child - how much time per day should I commit teaching him? And how much time should kid work on his own ("homework")
Comment: My wife says that while it takes some time, for the child it takes significantly less time than public school.  There is still some time required for preparation even if you are using one of the (nice) prepackaged curriculum sets.  My wife (homeschooling mom, also former high-school science teacher) attributes this to the parent knowing the kid, being able to communicate effectively, being able enforce both attention and behavior, and being able to detect deception.  Teachers are usually spread 35 to 1, so they have to be 35x better than the parent to be barely equal to one parent.
Comment: My mom ran it similar to regular school. She structured the day from 8:30am to about 2 or 2:30pm which was designated "school" time. Most chunks of time were a specific subject, followed by exercises on the subject. In regards to how much time it would take on your part, basically all the time. My mom had to sit next to us to get us to do the work. Homework, well we didn't do too much homework. We didn't really need to; usually it was finished by 2:30 or 3pm.
Comment: Welcome to Parenting! Is there a specific age in mind, or are you considering the entire academic career path?
Comment: It's anecdotal, but a friend of mine who home-schools says it takes about 1 or 2 hours a day to cover the same academic material that they cover in school.
Comment: @Erica I haven't had any age in mind. That's good question. I believe needed time is grows with kid's age, doesn't it?
Comment: @FilipBartuzi, my experience is that the time needed shrinks with age.  Pre-calculus for me consisted of a textbook, a CD of lectures and self-grading quizzes, and occasional checks on how I was doing; my younger brother's arithmetic lessons involved hours of one-on-one instruction.  I'll see if I can dig up my old time-tracking worksheets to put some numbers on it.
Answer: It depends.
It depends on the curriculum you choose or the curriculum you make up (obviously using a pre-made curriculum will cost you less time.) It depends on whether your child needs more or less help with a lesson or subject. It depends on how well your child works independently. It depends on what you want your child to learn (it takes more time to teach your child to think critically than to regurgitate facts.) It depends on your style of teaching (are you hands on or hands off?) It depends on how many subjects you want to teach (my kids started learning Latin in the third grade. Obviously this took more time than friends who were not teaching languages at this age.) It depends on the grade (the early elementary grades take very little time; the older the child gets, the more time it takes. By high school, it was more than a full-time job.) It depends on how many kids you're teaching at the same time. It depends if you intend to teach year-round or only for 9 months (most homeschoolers I know/knew taught year round with more frequent breaks throughout the year or a half-schedule in summer.)
It depends on so many factors that it is for all intents and purposes primarily opinion based.
For my kids, homeschool started at 8:30 and finished at noon for grades K-2, with the most time given to my reading stories and teaching them to read. From third grade on, add 30-45 minutes/day for each year, more if you're teaching more than the basics.
Not all of that time is spent teaching/sitting with the student. But you have to be available. In the advanced grades, you will need to teach something you might not know yourself. In this case, you need to learn the subject yourself first, or use tutors, co-ops, etc. It all takes time.
Edited to add: My kids didn't have "homework" in the lower grades. They did have occasional projects they had to organize and work on independently. In the more advanced elementary grades, they got homework in some subjects (not the majority). In high school, they had homework in most subjects.
Answer: There are many different styles of homeschooling, and many different learning styles of children.  Highly independent children who follow a radical unschooling approach may require hardly any direct input from their parents.  I've also known very intense homeschoolers who spend crazy amounts of time on direct instruction with children they felt were behind, upwards of 8 hours daily.  You can take as much time or as little time as your family needs to meet your educational objectives.
The homeschooling families I know (mostly elementary age) tend to do around 2 hours of direct parent interaction and around 2 hours of independent work, depending on the child.  On weekends or holidays when I'm home to help with a special project or field trip, it can go a lot longer, but that's because we're having fun.
Comment: I find your comment puzzling.  Which is the norm, then?  To take more time or to take less time than your family needs?
Comment: "You can take as much time or as little time as your family needs." I think this is not the norm (or helpful advice) for most homeschoolers. If you live in a state that requires submission of goals and objectives, outside review, mandated subjects, testing, etc., you can't get away with 'as little time as your family needs.'
Comment: "You *can* take as much or as little..." implies (to me) that the amount of time you spend is totally your choice. My point is that that's rarely the case. There are mandates in different states that guarantee you will waste a lot of time (something I doubt your family needs.) If it means something different, perhaps you can elaborate a bit.
Comment: @Karl: I can't upvote the comment enough.


Simple random Sampling with replacement (SRSWR)

Question: If a simple random sample (with replacement) of size $n$ is drawn from a population of size $N$, where $N \leq n$. Then what is the probability that all the population units (items) are present in the sample?
Comment: This is solved using inclusion-exclusion. Let $A_i$ be the event that the $i$-th number is not drawn. You seek $1-P(A_1 \cup \cdots \cup A_N)$. You can turn the grand union into a set of intersections using the rules for accounting for intersections.  I solved a similar problem recently here at Cross Validated recently. https://stats.stackexchange.com/questions/389032/inclusion-exclusion-with-identical-sets-that-become-distinct If you follow the general form of the solution but use statistics appropriate for your specific problem, you will find the answer.
Answer: This problem is a special case of the classical occupancy problem.  If you conduct simple random sampling with replacement, choosing $n$ objects from a population of $N$, then the number $K$ of sampled items has a classical occupancy distribution with probability mass function:
$$\mathbb{P}(K=k|N,n) = \frac{(N)_k \cdot S(n,k)}{N^n}
\quad \quad \quad \text{for all } 1 \leqslant k \leqslant \min(N,n),$$
where $(N)_k = N(N-1)(N-2) \cdots (N-k+1)$ are the falling factorials and $S(n,k)$ are the Stirling numbers of the second kind.  The properties of this distribution are well-known (see e.g., O'Neill 2020).  In your particular problem you are dealing with the case where $N \leqslant n$ seeking the probability that all population objects are sampled, which is:
$$\mathbb{P}(K=N|N,n) = \frac{N! \cdot S(n,N)}{N^n}.$$
These values can easily be calculated for values of $n$ and $N$ that are not too large.  For large values the occupancy distribution can be approximated by the normal density, with accuracy shown in the cited paper.
Answer: Comment:  You may want to check your analytic answer (approximately)
against a simulation to make sure you have done the combinatorial analysis correctly.
Here is a simulation for $n = 12$ and $N = 25.$ You might think of it as a kind of 'reversal' of the famous birthday problem. Birth months equally likely. Room of 25 students. What is the probability all 12 months are represented? The answer is about $18\%.$
<code>set.seed(2019);  pop = 1:12;  N = 25
x = replicate( 10^6, length(unique(sample(pop, N, repl=T))) )
mean(x);  mean(x == 12);  2*sd(x == 12)/1000
[1] 10.63755       # aprx E(X)
[1] 0.181771       # aprx P(X = 12)
[1] 0.0007713117   # 95% margin of sim error for P(X = 12)

table(x)/10^6
n
       6        7        8        9       10       11       12
0.000029 0.000944 0.014487 0.097603 0.301636 0.403530 0.181771
</code>
With a million iterations, you can expect two, maybe three, place accuracy.
Also, if you consider the the number $N$ required on average
to see all $n$ objects in the population, then you have
the much studied 'coupon collecting' problem.


Pi-4 with fans and ribbon cable

Question: New to this. I bought a pi-4 kit. It has dual heatsink fans that get connected to pin 4 and 6. however, I want to do other projects and need to connect a ribbon cable to it. how can i do that while still having the fans connected?
Answer: Take a ribbon cable, remove some 3 mm of the plastic coating of the wires leading to pin #4 and #6. Then, cut off the plug of the cable leading to the fan, separate the last 10 mm of this cable's wires, and remove the last 3 mm of the coating. Then, solder these two wires to the corresponding wires of the ribbon cable. Finally, secure the soldering joint you've just made with electrical tape.
Answer: Consider other 5V and ground pins on the board, like pin 2 for 5V, pin 9 for ground.
If all the V+/ground pins are used up, you may try to extend the pins. There are multiple ways. One of the simplest way is to connect the pin to a breadboard, such that you will have a few extra holes to connect to the same pin.
Beware not to connect too many devices. You may overload the Pi.

Pi-4 with fans and ribbon cable


How to easily reorder rows in excel with drag and drop or move-up or move-down?

Question: I have to do some manual reordering or rows in Excel and cut/paste is too hard to use. I'm looking for something that would enable me to use drag'n'drop or to add some buttons to move-up/down move-top/bottom.
Answer:
Select the row/column.
Move your mouse cursor to the row/column's boundary so that you see the four-way-arrow cursor (or hand cursor on a Mac).
Press Shift on your keyboard, then click and drag the row/column.

The Shift key shifts the row/column instead of overwriting the target row/column.
Comment: On mac, for step two you want to move your mouse cursor so that you see the hand icon, not the four-way-arrow cursor.
Comment: I have Excel 2013 and it seems the default behavior now when you move a row after seeing four-way-arrow cursor is shifting behavior. Pressing SHIFT actual replaces destination row
Comment: I have Office365 (so I think I have whatever is latest version of Excel at time of post - I can't find a proper version number anywhere). Selecting ANY group of cells (not just rows/columns), moving to border to get 4-way arrow, and dragging moves data around - leaving an empty hole behind. Dropping it warns on overwrite. Shift+dragging attempts to reorder rows or columns, but only if full row/column selected. "Full" = all of some rectangular area - not necessarily full spreadsheet. // Confusion: must hover over boundary of data cells, not the row number or column letter - that resizes.
Comment: Does anyone know of a shortcut to get this "4-way arrow" - keyboard shortcut, or a macro / Visual Basic (or whatever the new macro language is called)?  I find it really hard to do this precisely with a mouse, let alone on a touchscreen or with a pen.  Ideally I would like to have a "thumb" to drag rows and columns around like this.
Comment: Does anyone know how to do this Google Sheets?
Comment: In Google Spreadsheet you can easily drag and drop rows and columns just selecting them and dragging from the number/letter.
Comment: kok made one awesome answer and was never seen again!  Who was that masked man?
Comment: As @Korayem commented above, pressing SHIFT actually defaults to overwrite-mode on my environment (Office 365 ProPlus). Left-clicking the four-way-arrow (without SHIFT) actually does the row moving without overwriting.
Comment: Unfortunately Excel does not allow this when the row/column to be moved contains a merged cell. It does not matter if the destination place would contain the same merged cell.
Comment: SHUT UP AND TAKE MY UP VOTE!
Comment: Wow, this does work. At first I didn't think it did because there's a very tiny spot you have to have your mouse. On a Mac, your mouse has to be (for a row) right on the line. Too far left and you'll be over the row number, too right right and you'll be over the cell. But just on the line the pointer will change into a hand.
Answer: This is still a cut/paste method, but is the simplest way I can think of.
4-click solution: (eg. move row 8 above row 5)

Right click row number (eg. row 8), click Cut (or T)
Right click row number (eg. row 5), click Insert Cut Cells (or E)

Note: This also works for moving multiple rows.
Comment: This is a mouse-only solution without drag-and-drop, so that it is good at moving rows to further position which need scrolling. Otherwise, [@kok's answer](http://superuser.com/a/314526/43356) is more elegant.
Comment: thanks, also this still worked for me, kok's is better but iitially a bit longer to understand and one has to see the boundary button although its not necesarilly harder, one has to get used to it
Answer: For snobs like me who want to use keyboard only:

Select the cells you want to move (rows or columns, or any rectangle of cells, but the selection must be contiguous)
Press Ctrl+x (Ctrl+c would let you make two copies.)
Move to or select the cell immediately after where you want to move the content (below it, or to the right.)  This cell will not move.
Press Ctrl++.  This will shift cells down or to the right.  (Ctrl+v would overwrite cells instead.)

On the Mac, all of these shortcuts work the same with either Ctrl or ⌘.
Comment: Neither the `Shift + mouse-drag` solution from @kok, nor this technique, will work with a discontinuous selection.  Even if you select a contiguous region with separate Ctrl-clicks, Excel will get confused, so you must either Shift-click or drag to select the region to cut.
Comment: Step 4: `Ctrl` + `Shift` + `+` worked for me. And also, Step 3: selection must be equal column selection as coped for it to shift down or right.
Answer: Add the following macros to your Personal Macro Workbook and assign them shortcut keys. The behaviour mimics Sublime Text's Swap Line Up & Swap Line Down.
Sub move_rows_down()
    Dim rOriginalSelection As Range
    Set rOriginalSelection = Selection.EntireRow
    With rOriginalSelection
        .Select
        .Cut
        .Offset(rOriginalSelection.rows.Count + 1, 0).Select
    End With
    Selection.Insert
    rOriginalSelection.Select
End Sub

Sub move_rows_up()
    Dim rOriginalSelection As Range
    Set rOriginalSelection = Selection.EntireRow
    With rOriginalSelection
        .Select
        .Cut
        .Offset(-1, 0).Select
    End With
    Selection.Insert
    rOriginalSelection.Select
End Sub

Answer: In dealing with similar cases in the past, where I could not just sort by a row, I found way to generate a column with a formula result that was something I could sort on.
I found a more direct answer to your question from this site:

Microsoft Word has a feature which Excel is lacking. Jon's method
  involves moving the data to Word, employing the Word command and then
  pasting the data back to Excel. Follow these steps.

Copy the relevant chunk of rows and columns out of your speadsheet. It is best to note the size of the range, e.g., 118 rows x 5 columns
Paste the data into a Microsoft Word document, where it automatically becomes a table and retains all your formatting.
In Word, use the little-known SHIFT-ALT-UP-ARROW and SHIFT-ALT-DOWN-ARROW to very speedily slide rows (or selected chunks
  of rows) up and down at will. Select one or more rows. You can select
  the entire row or just a portion of the row as shown here.

Hit Shift+Alt+UpArrow several times in order to quickly slide the rows
  up into position.

When you have sequenced the rows as you like, paste them back into Excel, making sure you overwrite the exact same size chunk you copied.
Comment: Sweet!   I do wish there was a way to do this in Excel or OneNote. // (Excel does special mouse drags, as noted above, but I lack mouse.coordination for this.) // It is unfortunate that one gives up other Excel goodness, like table sorting by column values, to get this word goodness
Answer: In Mac, use Command + Shift while dragging. I suppose that in windows it should be Win + Shift.
Answer: Try:
Shift + Space bar or mouse click on the line number to select the line
Ctrl + X to cut
Mouse click where you want it.
Ctrl + V to paste it
Comment: incorrect answer. this will **replace** instead of **reorder**
Answer: A slight improvement on @wilson's answer:
Right click row number (eg. row 8), hit "t"
Right click row number (eg. row 5), hit "e"
Mixing use of the mouse and keyboard really speeds it up for me.
Answer: Here is a sub that also works for columns;  it combines the functionality for all four directions:
Sub MoveRowsOrColumns(direction As String)
    Dim rOriginalSelection As Range

    Select Case direction
    Case "up", "down"
        Set rOriginalSelection = Selection.EntireRow
    Case "left", "right"
        Set rOriginalSelection = Selection.EntireColumn
    Case Else
        Debug.Assert False
    End Select

    With rOriginalSelection
        .Select
        .Cut
        Select Case direction
        Case "up"
            .Offset(-1, 0).Select
        Case "down"
            .Offset(rOriginalSelection.Rows.Count + 1, 0).Select
        Case "left"
            .Offset(0, -1).Select
        Case "right"
            .Offset(0, rOriginalSelection.Columns.Count + 1).Select
        End Select
    End With
    Selection.Insert
    rOriginalSelection.Select
End Sub

Answer: This is the easiest one I found. Can't really drag and drop:
For example to move row 3 before row 2:

right click on row 3 (on the number 3 at left) and select Cut
right click on row 2 (on the number 2) and select Insert Cut Cells


If I change ecu and ignition with the keys wil engine start or will need coding or change pump.ldv van with transit engine ECU and immobiliser

Question: If I change ECU and ignition with keys will engine start or will need coding or change and fuel pump . it's ldv convoy 2004 with transit engine ECU and immobiliser
Answer: I believe for the 04 Transits (mk6?) the immobilizer is in the ECU. So long as the ecu and key are matched then that should satisfy the immobilizer. I believe there is some coding between the ecu and the module on fuel pump tho that may prevent the engine from running if not matched. You may need to move that as well or code the ecu for the one on your LDV. Make sure to research this before just taking my word on it though, I have no first hand experience on these. My reply is just based off memory reading about it in international repair forums.
Comment: Thanks.Locksmiths said the same,it MAYBE need to code the pump to the new ECU, which still leaves me with 50 % chance.i can by ECU and ignition with keys for150£ on eBay.but if I have to mess with the pump it will go in the bushes and will be used as spares.


When we talk about colour, can we say 'it is in pink'?

Question: When we talk about colour, can we say 'it is in pink'?
"In' in the sentences is necessary? OR it has different meaning?
Comment: When you are talking about the colors something comes ***in***,you can say, "Does it come in pink?" ( Is pink one of the colors available)  But if you're talking about what color that apple is, it is ***not*** "This apple is in red"
Answer: Yes, you can speak about colors that way, but only in certain contexts, where a verb plus in would be relevant to the object being described. For example, we're familiar with the idea of letters being set in a font, so an expression like the following sounds natural:
Joe:  What did you think of the code editor?
Moe:  I liked it. The keywords were in pink, and the globals in a kind of dark teal. Not your usual scheme at all.
Other verbs that you can use include painted, illuminated, dressed and so on, and they don't have to be present explicitly so long as the reader can infer their presence.
Coach (to players): We'll do a scrimmage. Yesterday's starters in black. Everyone else in pink.
Travel reporter: They did one of those French light and sound things. Greek buildings in blue. Romans in red. Anything after the 1300's they just left black.


What kind of green flower is this?

Question:

Plant has probably never blossomed. I suppose it was not very expensive to buy. Thank you for any hints.
Answer: This plant has a few names and is sold under variations of it. You might find it called Dracaena demerensis, Dracaena "Compacta", D. fragrans 'Compacta.
Plant relationships have only gotten more complicated with dna analysis and the only sure thing is that is a Dracaena.
I notice yours has the brown tips characteristic of over watering or using water with chlorine or fluoride in it.
This plant grows slowly and not does not require fertilizer on a regular basis. The flowers are insignificant.  Pests are few, weakened plants can get mealy bug.  More light and less water are recommended for indoor cultivation.
Comment: Thank you for advice. I thought it is something else seeing wikipedia page. It had long stem, there. But I googled  "Dracaena deremensis"

https://www.ceskestavby.cz/rostliny/dracinec-dracaena-deremensis/

and it is quite similar, and they also write here that different varieties have just green leaves (Janet Craig) or with white stripes. Our plant is year or so old, so it is quite small, now. In the link they write it grows slowly and can reach 120-150 cm, which is quite surprising.

Plant is not watered with chlorine water, but maybe it is too less watered.
Comment: Our guess at home was it is something like bromelia
https://en.wikipedia.org/wiki/Bromelia
but we are pure amateurs.

What kind of green flower is this?


My glasses seem to be polarizing the light when they want. What is happening?

Question: When I put the glasses on and I look at my computer monitor and I turn in a certain angle everything becomes black. When I do it on my laptop screen though I need a different angle. Finally when I look at other stuff (not the light emitting screens) nothing changes no matter the angle I turn. Although I know the basic physics of polarization I don't understand why light is not polarized when I look at other stuff than my screens.
Comment: LCD screens have polarizing filters built into them, the rest of your "stuff" doesn't.
Comment: Light from the blue sky is polarized, however depending on the angle and time of day.
Comment: Can you clarify whether you're wearing polarizing sunglasses here?
Comment: Hi. I am not sure, if I turn at a certain angle light is completely blocked so there must be some polarizer in the glasses but they were not advertised us such.
Answer: There are two general classes of polarization. Plane polarization where the electric field
is in a plane.  Glare reducing sun glasses use plane polarizers because reflections of water and other smooth surfaces are polarized due to Fresnel's laws of reflection.  The second type of polarization is circular or more generally elliptical polarization. The plane of polarization cork screws in two modes either left handed or right handed.  Stereoscopic movies now usually use this type of polarization so that head tilt won't affect viewing.
Comment: Don't think this really addresses the question.


Using CiviCRM to track number of signatures collected for ballot initiative

Question: Anyone have any advice how I might keep track of how many signatures are gathered through our volunteer tabling and events to qualify a ballot measure?  We need to collect 5000 wet signatures for a ballot initiative and are using CiviVolunteer running on Wordpress to track all the events we are tabling at and get our volunteers to staff them. I am looking for a way to report and track the outcome of each event by entering the total number of wet signatures gathered so we have a running total in the system.
Answer: You can add a custom field to the Event - then you can enter the numbers for each event in to that field. Then you should be able to spit out a Report based on Events.
If you don't want the field showing on the event info page, then set custom field not to be 'is public'
Comment: I did this and it showed up on the event public form. I went to settings for custom field and unchecked Is this field public? Now I see it on the backend but not on the public form. Works perfect. @petednz thanks for the suggestion.
Comment: i added that helpful advice to the Answer - perhaps you can 'accept' it now?


Figure of merit for scientific performance?

Question: It is becoming increasingly important to keep track of performance, do scientists have a good figure of merit to measure their performance?
Comment: One reason may be poor English which makes it difficult to understand your question.
Comment: For a downvote, the criteria are "This question does not show any research effort; it is unclear or not useful". The original version was unclear. The edited version is slightly better, although "figure of merit" is still a bit confusing. That aside, there is also the matter of what effort you've already made to answer your own question before posting it here. That is currently lacking.
Comment: "The lack of research" is valid issue. Have you read about pros/cons of H-index? have you searched for "tenure hiring criteria"? there are many attempt at quantifying research performance.
Comment: If anyone is down voting this question is constructive knowing, why?
Comment: I see your point. I tried to improve my question .
Comment: The lack of research to answer the question is because as you can seeing the answer below , it is unclear if there is a good indicator to measure scientific performance .
Answer: There is no single measurable criteria by which one can easily evaluate the researcher performance.
Some quasi-efficient metrics include:

publications - but it is relatively easy to produce a large number of low-quality papers (salami slicing, guest authorship, incremental research, unnecessary duplication of studies, paid-for publications, etc)
publications in top-quality journals - better, but leads to massive bias towards well-funded groups and neglects good research from low-funded countries, individuals and research areas. Some very excellent researchers may decide not to go through peer-review system and publish their results only on preprint platforms like arXiv
publications and citations (e.g. h-index) - better, but can be manipulated through excessive publishing and self-citations

There are other metrics, but none is perfect. Generally speaking, research is about the study of unknown, and you can't put a good KPI for this sort of activity, because you can't reliably measure what you don't know.
Answer: Since this is an academic forum, the top of the heap, elite scientists measure their own performance through their students performance and success.
More generally, esp for non teaching academics, see Dmitry's answer.
Answer: The h-index is the most common metric, but as this article shows, it can have counterintuitive behavior. Therefore, there is no good KPI for scientific careers.
Comment: Welcome to Academia.SE. Please note that our format is Q&A answers should ideally stand alone, or at least have minimal dependence on other answers. I've made some edits to try to achieve this while preserving your reference.


Looking for a java code generation library

Question: What is/are "good" java code generation libs?
I found a generation part in JaxMe, but it's poor and old.
I like to generate java code through java code. So basically use a lib to tell that it has to generate a certain concrete class or interface with X fields, Y methods, etc.. that are then written to the file system..
I know that frameworks use them, but can't find a standalone lib..
- Ed
Comment: If your program knows the name of a class it wants to generate, and the name and content of all the members,  why on earth do you need a code generator?  Won't a print statement to an output stream be enough?  Interesting code generators have to add something by themselves to be useful.
Comment: The info you talk about isn't known beforehand and even if it's know, you are talking about a mass of info that changes every year due to law changes...
Example: an xbrl/xsd that you want to use to generate code and the corresponding validations...
Comment: Duplicate of http://stackoverflow.com/questions/121324/a-java-api-to-generate-java-source-files
Answer: There are several libraries with various capabilities and ease of use:

Javassist
Apache BCEL
ASM
cglib

You will probably have to take a look at the API of each one to determine which one is more suitable for your purposes.
Comment: These all (except maybe cglib) seem to be byte-code-editing tools, not source code generators...
Comment: Thanks for the feedback, but like already mentioned these are mainly byte code generators, and I am talking about source code generators. I notice that there isn't a mature stand-alone source code generator project, but mostly sub project like codemodel and apache JaxMe... which often are "old"
Comment: @edbras: I thought you where asking about bytecode generation, since that is what most people mean when talking about code generation in Java. In general, code generators are intended to allow the use of higher-level abstractions. What would that abstraction be in your case, considering the output is already Java *source* code?
Comment: Sorry for not being clear.
Example usage: xbrl/xsd file that I use to generate code including validations (maxOccurs/minOccurs/fractionDigits, etc..). I read this and then generate source code, currently using the apache JaxMe subproject to generate source code
Answer: Maybe you should be interested in cglib?
Answer: I like ASM the best. It uses a visitor pattern that can be a little confusing at first when you are generating code; but once you grasp it, it's really clean and easy.
Answer: I've had a look into this a little while back as well and had a pretty hard time finding anything useful. The most promising candidate I found was actually built right into the compiler:
Java annotation processing (APT)
They recently included APT with javac, so it's always available.
I haven't really had too much time yet to look into it, but at first glance, it seems infinitely powerful (generate/modify source code or byte code, throw errors, warnings, ...) but it could be a bit complex to wrap your head around. There might be some good tutorials out there, but I don't have a specific link for you at the moment.
Comment: Annotation processing sounds pretty amazing, until you get down to actually trying to use it. Last time I checked, you had to jump through an incredible amount of hoops to e.g. get the current source file and you *still* need to mess with your build system to use it... sometimes I just miss the C preprocessor...


What are the advantages and disadvantages of using a embedded sql database?

Question: What are the advantages and disadvantages of using an embedded SQL database instead of MySQL server? I am a web developer and I'm planning to develop an application for the shop, without investing my time to learn the Desktop application I wanna convert my web app to work as a desktop while embedding application server and database.
I was wondering if there is anything I should know about before moving forward.
I like the zero configuration and management part of embedded databases, but what are some disadvantages?
Answer: Embedded SQL engine has a great advantage if your application can't or shouldn't connect to the server over the net and you can't setup the local SQL server on the LAN. Then you can use the embedded engine that allows you to use the same SQL code in absence of the client-server environment. Also the advantage of the embedded engine that you'll get all the advantages of the RDBMS like complex search with a SQL code and ACIDity of data. That is the reason SQLite is used by browsers, for example.
If the single instance of application is working with the single instance of the DB and vice versa, and the RDBMS is more suitable/familiar than other data storages then embedded SQL definitely is an option.


Problem with `notify-send`

Question: I have been working in a script to change audio output when you (dis)connect am HDMI screen/TV. Basically it uses UDEV to check any change in the connection and acts accordingly.
Everything works fine except one thing: I can't use notify-send to warn about the change. I use the following code (output is just a wrapper to subprocess.check_output):
output("sudo -u {0} notify-send \"{1}\" \"{2}\"".format(user, title, message))

but I don get any notification at all.
What is really odd is that if I run hdmi_sound_toggle (as a normal user or with sudo) everything works just fine!
So what could be the problem here? There is any better way to present a notification than with notify-send?
Comment: Have you tried sticking a notify-send in the script that just says "hi" or something simple? Just to see if it can be called properly from the script. Perhaps the formatting is off.
Answer: The notify-send has trouble putting notifications on a user's screen when called from a script run by root or another user.
You should use:
output("export DISPLAY=:0; sudo -u {0} notify-send \"{1}\" \"{2}\"".format(user, title, message))

So, use:
export DISPLAY=:0

Normally a user is on display :0, but to be sure, you can find which display a user is on using who command as follow:
who | grep -m1 ^username.*\( | awk '{print $5}' | sed 's/[(|)]//g'

This worked for me in this script.
See also: Can I launch a graphical program on another user's desktop as root?
Comment: `who | grep -m1 ^username.*\( | awk '{print $5}' | sed 's/[(|)]//g'` works well but it's a little bit unreliable. Because it doesn't take into account that user name is followed by whitespaces in `who`'s output. So it will be better to use `who | grep -m1 ^username[[:blank:]].*\( | awk '{print $5}' | sed 's/[(|)]//g'`.
Answer: I was researching a consistent way to notify all X users (as root) and my research (looking at a bunch of places on the net) indicated that although it was possible to use notify-send in this way, it required scripting to find DBUS session info and/or DISPLAY's in use and/or Xauthority file names and locations, and even then sometimes people still couldn't get it to work. In summary, trying to bend notify-send to your will to enable broadcasting to X users will prove to be unreliable (particularly if you upgrade or change distro at some point in the future).
However... on my system the wall command worked like a charm and is incredibly simple to use. The only downside is that it also broadcasts the message to all text terminals/consoles as well. If you don't mind that, then wall might be a better and more reliable option. Note: the user invoking wall must be root.
Answer: Radu's answer does not seem to work for me on 16.04. Rather than try to fight the DISPLAY problem which seems to change with different releases, I go about this in a slightly different manner. I create a single script that is called in two ways. A udev rule calls the script, sending some kind of output to a named pipe. Upon login, the script is also started in a service mode. Here it listens to the pipe and runs the desired GUI command.
As an example, I like to receive notifications of USB storage devices as they are attached, and in particular, I like to know what the path of the device is and its serial number (that may seem strange but I have good reasons). Here's the script I use to accomplish this.
#!/bin/bash
# script name: usb-notify.sh
# This script needs to be called at logon with "service" parameter
# This script needs to be called by udev on USB insertion with no parameter

pipe="/tmp/usb-notifications"
if [ "$1" == "service" ]; then
    # create the named pipe that will help us trigger events from udev
    rm "$pipe"
    mkfifo "$pipe"

    # This outer while loop ensures that we can process multiple triggers
    while true
    do
        # This inner while loop reads individual trigger events
        while read info
        do
            # run some GUI command. Here, I'm running notify-send
            notify-send "USB Inserted" "$(echo -e $info)"
        done < "$pipe"
    done
else
    # Here's where udev triggers our event. If you don't need to pass any arguments
    # you  could just as easily pass an empty line as a trigger for the service.
    [ -e "$pipe" ] && echo "Device: $DEVNAME\\\nSN: $ID_SERIAL_SHORT" > "$pipe"
fi

This script then needs to be called in two ways.
First, a udev rule needs to be created to call this script. This can be done with the following command (obviously you should change this to watch whatever device should be triggering your script):
echo 'ACTION=="add",KERNEL=="sd?",RUN+="[path-to-script]/usb-notify.sh"' | sudo tee -a /etc/udev/rules.d/80-USB.rules

Second, you need to call this script with the "service" parameter on login. So, open the "Startup Applications" program and add an entry that runs "[path-to-your-script]/usb-notify.sh service"
This script can be modified to run pretty much any GUI application on udev events. If you don't want other users to be able to watch your pipe, you should probably set restrictive permissions on it.
Answer: Do you need to call it with sudo? That might solve the problem.
Alternatively, I found I needed DISPLAY=:0 and XAUTHORITY=/home/<user_name>/.Xauthority set for it to work when running as root (from a systemd service in this case - set with Environment=...).
Answer: You can use pynotify instead of a shell command. It's quite simple and is installed by default in Ubuntu. A quick sample:
import pynotify

pynotify.init("Name")
n = pynotify.Notification("Name", "This is a notification")
n.show()

Comment: Did you try running this from root? I get `Error: The connection is closed` on `n.show()`
Comment: No, not really.

Problem with `notify-send`


Smoothing rectified voltage

Question: I am developing a circuit to convert 230VAC to 12VDC. I ran into the problem that my smoothing capacitor for the full wave rectifier is pretty huge. The load is estimated to be around 500mA and therefore the capacitor needs a capacitance of several mF.
My circuit consists of: transformer 230 - > 12 and a full wave rectifier.
 Is there a better circuit for such an application? Desired voltage ripple is no more than 0.2V.
Comment: @schgab Note that transformers are rated in RMS voltage, so rectifying 12VAC will give you \$\sqrt{2} \cdot 12V -2V_F\$
Comment: i did mean milli. Rectifying 12v yields an output of around 11v dc. And simulating it in ltspice and calculating the capacitor by hand shows the same result needing a huge cap.
Comment: Did you really mean "milliFarads"? Or µF? Just from looking at similar supplies I'd guess you'd probably need at most 100 µF. And keep in mind that if your transfomer secondary puts out 12 VAC then it will rectify to about 16 VDC.
Answer: You can rectify and filter the voltage to a somewhat higher voltage, with a smaller capacitor and correspondingly higher ripple, then use a regulator to reduce the ripple. That is probably the most common approach.
If you don't need the voltage regulated, another possible circuit is a capacitance multiplier. Again, you throw away some power in an active device to reduce the ripple, but in this case you're not stabilizing the output voltage against changes in input voltage or load current.
But a few thousand uF electrolytic capacitor is not very large (for example, 18mm diameter x 20mm tall for 4700uF/16V) compared to the power transformer you would need, so I don't see why there would be an issue.
Even with a regulator or capacitance multiplier you will need a capacitor of fairly large size because it has to store enough energy to supply 0.5A during the relatively long period between AC peaks.
If you have a 12VAC transformer you would get about 16VDC out assuming a full-wave rectifier, and the transformer would need to be rated at about 13VA or 800mA. A 4700uF capacitor would yield 0.01s * 0.5A/4.7mF = 1Vp-p ripple, assuming a 50Hz mains.
If you added a linear regulator  you'd get 12V with a couple watts dissipation in the regulator at 0.5A (so a heat sink). That might not be enough to guarantee it wouldn't drop out and start passing the ripple under worst-case conditions, depending on the dropout voltage of the regulator and your specification for mains tolerance, you'd have to do a careful design to be sure. A switching regulator could run much cooler, but that means more complexity and another much smaller filter capacitor.
Finally, what most modern electronics does is rectify the mains, use a capacitor of similar physical volume to a 2200uF or so capacitor, but much less capacitance and rated for perhaps 400VDC. The mains is rectified and filtered, and chopped at tens of kHz, passed through a much smaller and lighter transformer, and regulated with a closed-loop feedback scheme. The amount of material required is much less, the mass and volume is much smaller, efficiency is high, and regulation can be pretty good (and  you can add a small linear regulator after it to further reduce it). The noise can be a problem in a few applications, but in most it's almost ideal.
Comment: Okay, but beware that designing an offline switcher is at least an order of magnitude more challenging and potentially hazardous, even if you copy a circuit out of Power Integrations or some other supplier of SMPS chips. Just buy a 12V wall-wart from a reputable manufacturer and be done with it.
Comment: I think my best approach is to go with the rectify the mains. Thank you for this great answer!
Comment: Strongly recommend not messing around with mains voltages unless you really understand what's going on, at the very least from a safety perspective.  Unless it isn't physically possible for humans to touch your output line, you should have some form of galvanic isolation in the loop.  Your converter could let through pulses of line voltage if it enters a fault state(and you have to have a lot of specific education and put a certain amount of effort in to reasonably think it won't) or fails.  Use fuse(s) and try to build something that fails(burns out) safely.

Smoothing rectified voltage


Left clicking adds a mirror modifier

Question: I feel as if someone had messed with auto-correct on my phone, and now I can't do anything. Basically, I don't know how this happened, but the left click button only adds mirror modifiers to objects. It does not move the 3d cursor. Every time I click to the left it says "Add Modifier" and it has the mirror as the selected one. Can anyone help me with this?
Comment: What does LMB show for its default in user prefs? Have you by chance changed any hotkeys?
Comment: for testing purposes, try resetting to factory settings. The command is in the file menu. Check if the issue persists. most likely you accidentally messed up your keymap somewhere, which can be fixed rather easily.
Answer: There seems to be a keymap added to your system (most likely accidentally), which calls the add modifier operator, and its default is the mirror one. Go to your User Preferences -> Input section, and search for 'modifier' in the 'Name" field:

If you find a keymap like the one in 'nicely drawn' brackets in the screenshot, remove it by clicking the X button (marked with the arrow).
More interesting is actually how you got there. I did it like this: I clicked the 'add modifier' command in the Spacebar menu. The Properties Panel one works of course as well. When the menu pops up, I RMB clicked on the Mirror Item, which brings up another menu. I chose 'Add Shortcut', and simply LMB clicked in there. And the damage was done  :)
However, it's not exactly what you have, as my version automatically adds a Mirror, it does not open the menu any more. I had to manually clear the 'Type' field in the Keybinding (see screenshot, bottom right) to have exactly your behavior. Maybe now you can remember how you achieved it? Just played with keymaps maybe?
Answer: I have found a solution for the "Object Mode Left clicking adds a mirror modifier" problem in Blender 3.0.1.
The solution is; Go to Preferences, in the Keymap section search for name "add" and find an "Object Mode" under "add modifier". Then remove the list by clicking the "x" button and have a nice day :)

Left clicking adds a mirror modifier


Random meaning of 結ぶ

Question: 結ぶ means to connect, tie, or bind things together, either physically or metaphorically.  And then it has the seemingly random phrase [実]{み}を結ぶ meaning "to bear fruit".  How does this meaning derive from the "tie/bind" meaning of 結ぶ and the 結 character in general?
Comment: See the [ties](http://i.stack.imgur.com/bH5KL.jpg)?
Comment: @YangMuye:  Sure, if you use grapes.  What about apples, oranges, etc.?
Answer: I checked an Old Chinese corpus.
The Kanji 結 was used in the sense of to form an abstract relationship about 2500 years ago, as in 結怨, 結親, 結好, etc.
It could also be used intransitively, like 怨結, 恩結, 気結, 冤結, etc., which sound like to clump/condense/congeal, but it only applied to abstract emotions.
It acquired the meaning to bear no later than 400 AD. It not only applied to fruits (結果, 結実, 結子), but also buds (結葩), roots (結根), and plants (結篠). Meanwhile, I also found 結 was widely used for all kinds of things, such as 結霜 (frost) , 結氷 (ice), 結营 (building), 結党 (organization), 結謀 (plan), 結縁, etc.
In addition, Buddhist was largely introduced in China during that period. Coincidentally, 結果 and 結縁 were used a lot in Buddhist scriptures. Also, Chinese changed dramatically during 200-600 AD.
In conclusion, I do not see a direct relation between ties and stems. The derivation seems to be:

to tie/braid -> to form/to be formed -> to make/to complete.

You may want to ask experts in the Chinese Language Stack Exchange for an authoritative answer.
As for the Japanese word むすぶ, I do not know what its original meaning is and how it finally became the current meaning.

According to 学研全訳古語辞典, it means 結ぶ can mean 形作る or 形を成す.

[一]自動詞バ行四段活用
(霧・露・霜・水・泡などが)できる。生じる。形をなす。固まる。
  出典方丈記 「淀(よど)みに浮かぶうたかたは、かつ消えかつむすびて、久しくとどまりたる例(ためし)なし」
[二]他動詞バ行四段活用
④(物を)作る。構える。編んで作る。組み立てる。
  出典方丈記 「六十(むそぢ)の露消えがたに及びて、更に末葉(すゑば)の宿りをむすべることあり」
⑤(状態・形を)かたちづくる。生じさせる。構成する。
  出典徒然草 一三〇 「始め興宴(きようえん)よりおこりて、長き恨みをむすぶ類(たぐひ)多し」

方丈記 and 徒然草 were written in about 1200 AD and 1300 AD. Since 訓読 had already existed before those books were written, literate people must have used むすぶ to translate 結 for quite a long time. I did not see this meaning used in 古事記 and 万葉集.
Comment: 精選版 日本国語大辞典 ties these meanings together.  Under 一 `離れているものをからみ合わせてつなげる` they have 一② `手の指をからませたりして形を作る。`, and in this section they have 一②イ `(掬)両手のひらを一つに組み合わせる。特に、その手で水をすくうのをいう。 万葉集 1142 「命を幸くよけむと石走る垂水の水を結(むすび)て飲みつ` and 一②ロ `仏教で、手指でさまざまな形をつくる。「印を結ぶ」の形で用いられる。` and 一②ハ `両手で飯をおさえて、握り飯をつくる。` Then for 二 they have the generalized meaning `まとめて形にする。また、完成させたり、結束をつけたりする。`, earliest cite from 源氏物語 (around 1000 AD), `明石「旅衣うらかなしさにあかしかね草の枕は夢もむすばず」`
Answer: I think the meaning is derived from the tie between stems and fruit, also in the case of apples or oranges. Fruit is born from stems, so there are necessarily some ties between them, regardless of whether the ties are apparent or not.
You can use 実を結ぶ ( or more formally 結実する ) not only in a physical sense but also in a metaphorical sense "to have a successful result", as is the case in English phrase "to bear fruit."
I think this expression is also derived from the "ties" between cause and effect.
Answer: Regarding the Japanese word musubu (as opposed to the kanji 結, which Yang Muye does an excellent job of explaining), I must side with naruto on this one.  The underlying idea does not appear to be the tying, so much as the knot: something that comes together as a result of some process -- be it tying string, or growing a nodule, or coalescing from the void.  One can musubu a dream, or a flower, or a fruit or nut, or a conclusion or result.
After poking around over a several days in search of information on the etymology of this term, I cannot find as much as I'd like.  むすぶ does appear in at least these five places in the Man'yōshū dating from roughly 347 - 759 CE, suggesting that this word has been around for pretty much the entirety of the history of the Japanese language (where "history" == "written record").  Here's a summary of my findings.

These two pages state that 結{むす}ぶ is related to 産{むす}霊{ひ}, the Shinto life force as described on the Japanese Wikipedia.  According to Shogakukan, this むすひ also manifested as むすび and even as むすぶ.
This page on the Kyoto Sangyo University website makes a similar case that 結{むす}ぶ is related to 産{む}す to produce.
This author makes the case that the initial む in terms like 結{むす}ぶ and 睦{むつ}む has to do with coming together, and argues that this む is also found in 棟{むね} roof, peak of a roof from the idea of support beams coming together at the peak of a roof.
This page discusses the etymology of むすぶ, but the author's arguments seem a bit far-fetched (particularly his digression on ゆ), and his background and proclivities appear to lie in philosophy and idle musing rather than in researching and building a position from established facts.  Despite this, he does touch upon the theory that むすぶ might be related to むす to produce, variously spelled 生す or 産す and the root of everyday terms like 娘{むすめ} (from 生{む}す + 女{め}) and 息子{むすこ} (from 生{む}す + 子{こ}).
Exploring the possibility of 結{むす}ぶ as a compound of 生す + some element ぶ, ぶ appears as an auxiliary verb meaning to be like; to become like, more commonly encountered in modern Japanese as the suffix びる in terms like 大人{おとな}びる to be mature, to be grown up.  However, Shogakukan does not mention ぶ attaching to verbs, and in general, auxiliary verbs that suffix verbs only attach to the 連用形{れんようけい}, suggesting むしぶ instead.  I did find some suggestions that ぶ might have attached to the 連体形{れんたいけい} ending in -u, possibly as in classical 欠{あく}ぶ to yawn (perhaps 開{あ}く to open + ぶ), 煤{すす}ぶ to become smoky, sooty, dirty (from 煤{す}す of same meaning + ぶ), 連{つる}ぶ to line up (from 連{つ}る + ぶ, though this is 下二段{しもにだん}), or 睦{むつ}ぶ to be or become friendly (though 睦{むつ} is not very verb-like; then again, it does appear to be related to terms like 共{むた} together or 貴{むち} [honorific]).

Although the etymological evidence that I can find is only circumstantial, semantically speaking, 結{むす}ぶ does appear to have more of an emphasis on coming together, coalescing, producing than is suggested by the common English gloss of to tie.  From that perspective, the meaning in 実を結ぶ is less of a strange outlier and more of a natural semantic fit.
Answer: 類語例解辞典 says 結ぶ in 実を結ぶ is "まとめて形にする、完成させる".
http://dictionary.goo.ne.jp/leaf/thsrs/1221/m0u/

また、「実を結ぶ」「焦点を結ぶ」「夢を結ぶ」のように、まとめて形にする、完成させる意もある。

この意味の英語だと integrate という単語が tie/bond とも似た意味があるように思います。
EDIT
I do not believe this "結ぶ" is "binding a fruit with a branch or a stem". When I say "実を結ぶ", I imagine a fruit which grows by itself to be mature, but I don't imagine the tree attached to the fruit.
Here are some (Japanese) examples where 「結ぶ」 is apparently not related to "binding".

おむすび riceball
結【むす】びの一番【いちばん】 the last match of the day, the concluding match of the day (in Sumo)
結びの言葉【ことば】 closing address (in ceremony)
結果【けっか】 result
結末【けつまつ】 ending (of a story)
結論【けつろん】 conclusion

Seeing those examples, I think 結 and 結ぶ also mean "to integrate into its final form," or "to wrap up something."
I think 「焦点を結ぶ」 and 「夢を結ぶ」 can be understood in this way, too.
Comment: All of those examples *are* metaphorically binding, or tying something together.  `おむすび`:  the rice is tied up by the seaweed; `結びの一番・言葉`:  concluding ("wrapping up") the match/address. `結果・結末・結論`:  wrapping up the efforts/story/logic (resp.).
Comment: You're right, all these examples stand somewhere in "bind - gather - wrap - integrate" spectrum of "結ぶ". And if you can grasp the sense of "binding" in all my examples, let's think of 実を結ぶ in the same way; it's indeed "wrap up the effort/energy/nutrient and integrate it into a fruit."

Random meaning of 結ぶ


Gayatri mantra mudras?

Question: How to do Mudras before chanting Gayatri mantra?
This Quora post gives mantra to unlock Gayatri mantra.
This Facebook image describes 24 Mudras to be done next
As well as instructions /mantras written in Sanskrit
But Can someone transcribe & translate the mantras to English, roman characters? I can't read Sanskrit script.
Comment: Visit http://www.awgp.org/spiritual_wisdom/gayatri/activation_of_internal_power_centres_by_gayatri_sadhan
Answer: In the Gayatri Mantra Upashana practicing 24 Mudras (hand postures) have been prescribed. The names of the Mudras can be found in the following passage from the Devi Bhagavatam's 11th Book's chapter 16:

Gâyatrî has seven S'iras (heads); Vyâkaranam (Grammar) is one; S'iksâ
  is the second (that Amga of the Veda, the science which teaches the
  proper pronunciation of words and laws of euphony); Kalpa is the third
  (the Vedânga which lays down the ritual and prescribes rules for
  ceremonial and sacrificial acts); Nirukta is the fourth (the Vedânga
  that contains glossarial explanation of obscure words, especially
  those occurring in the Vedas); Jyotish or astronomy is the fifth;
  Itahâsa (history) and Purânas is the sixth head; and Upanisadas is the
  seventh head. Agni (fire) is the mouth of Gâyatrî; Rudra is the S'ikhâ
  (the chief part); Her gotra (lineage) is Sâmkhyâyana; Visnu is the
  heart of Gâyatrî and Brahmâ is the armour of Gâyatrî. Think of this
  Mahes'varî Gâyatrî in the middle of the Solar Orb. Meditating on the
  Gâyatrî Devî as above, the devotee should shew the following
  twenty-four Mudrâs (signs by the fingers, etc., in religious worship)
  for the satisfaction of the Devî :-- (1) Sanmukh; (2) Sampût; (3)
  Vitata (4) Vistrita; (5) Dvîmukha; (6) Trimukha; (7) Chaturmukha; (8)
  Panchamukha; (9) Sanmukha; (10) Adhomukha; (11) Vyâpaka; (12) Anjali;
  (13) S'akata (14) Yamapâs'a; (15) fingers intertwined end to end; (16)
  Vilamba (17) Mustika; (18) Matsya; (19) Kûrma; (20) Varâha; (21)
  Simhâkrânta; (22) Mahâkrânta; (23) Mudgara; (24) Pallava. Next make
  japam once only of one hundred syllabled Gâyatrî. Thus twenty-four
  syllabled Sâvitrî, "Jâtavedase sunavâma, etc.," forty-four syllabled
  mantra; and the thirty two syllabled mantra, "Tryamvakam Jajâmahe,
  etc." These three mantras united make up one hundred lettered Gâyatrî.

UPDATE:
This Youtube video describes how to do the 24 Mudras very well. The video also gives the names of all the Mudras in the correct order which is already given in my answer.
Comment: @Aoi.T_015 See the video I hv added in the answer. You can learn the Mudras from it.
Comment: Yes, please................
Comment: @Aoi.T_015 since This has provided an answer and it is satisfactory it would be nice if you could press the tick (✔), below the voting arrows. It lets other users know that this answer is correct and satisfies the question the most. You will also get additional reputation if you accept.

Gayatri mantra mudras?