Etymology of the expression "to entertain an idea"

Question: The expression to entertain an idea/thought/etc. has perplexed me for a while now. Given the meaning of the verb entertain, I find it quite weird for it to be used in such a way. So, how did this come to be?
Comment: [Etymonline  has it the opposite](https://www.etymonline.com/search?q=entertain) , that the meaning as "consider" was a little before the usage as "amuse".
Comment: 'Entertain an idea' is certainly not a phrasal verb by any of the various definitions in use. It might qualify as an idiom now (a well-known usage, but involving a now unusual sense of a word). As @Cascabel says, it is a verbo-nominal idiom / fixed expression.  But Etymon answers the question of etymology.
Comment: It seems understandable in a metaphorical sense. You entertain a guest rather than slamming the door in their face. Here, the idea is the same as the guest. In other words, the idea is welcomed and paid attention to.
Comment: The research should accompany the question (Etymon being a standard reference), and the question switched to 'How did the modern usage of 'entertain' arise?' (assuming Etymon doesn't answer this).
Comment: ..I don't think this is actually a "phrasal verb", more like a verb-noun collocation.
Comment: user240918 Good – but the title needs correcting also.
Comment: @EdwinAshworth - Etymonline just sets a date of usage, but it doesn't really explain how the sense come into usage.
Answer: In earlier senses, the word entertain can refer to supporting or maintaining something (Oxford English Dictionary, "entertain, v.," I), to holding things together (II), or to receiving or admitting something (III). Many kinds of things can be received or admitted: hosts entertain guests, for instance. Ideas and requests can also be entertained, as def. 9b (grouped under III) suggests:

b. To give consideration to (an idea, request, etc.); to think about, contemplate.
1583   B. Melbancke Philotimus (new ed.) 201   I straightlie inhibit you for your better thriuing, neuer once to enterteine one thoughte of Aurelia.
1605   Bp. J. Hall Medit. & Vowes II. §53   But I will suspect a nouell opinion of vntrueth; and not entertaine it, vnlesse [etc.].
1665   R. Boyle Occas. Refl. ii. xi. sig. P7v   Who thinks it not time to entertain thoughts of Death.

Ideas, thoughts, and opinions could all be entertained, that is, considered or contemplated. For instance, in The Secretaries Studie (Thomas Gainsford, 1616; link to 1652 edition), where the speaker describes their own constancy against entertaining a thought of changing their mind:

for why should you giue me any cause of suspition, when a warrant is sealed of our happinesse; or assume to your selfe a counterfeit libertie of trying my patience, when you know i will pul out mine owne heart, before it shall entertain a thought of alteration

The way we most often use entertain now, meaning to engage or amuse (IV), is related to these other three meanings, but they all emerge as distinct meanings fairly early (in the sixteenth century). Taking its literal Middle French meaning entretenir (entre- ~ among, -tenir ~ hold), each modern meaning is only a couple of steps away from holding something. So it's likely that III and IV distinguish themselves at this early moment in time by the kind of object they take; entertaining someone came to refer to holding them in a state of amusement or engagement. Entertaining an abstraction came to refer to holding it in one's thought.
Comment: Good answer. This is unrelated to the subject matter, but I am curious: Where did the last refrence come from? I found the last part of it very interesting; "when you know i [sic] will pul out mine owne heart, before it shall entertain a thought of alteration".
Comment: It came from *The Secretaries Studie*, which I linked to. The context is one lover chastising another for not addressing her with a lavish enough title. All of this is in a book that offers models for composing in various genres like amorous letters and thank you letters.
Comment: Of course, I had a brain malfunction I guess, and thought it was referring to the lines of text above it. I am sure to check it out.


Ideal Gas Equation Extreme Case

Question: I have recently learned about the Ideal Gas Equation and I have this doubt.....suppose I am in a closed container filled with a gas of fixed volume and definite amount of moles. I am assuming myself as a point mass, not having any effect on the gas and just observing the process taking place. What if I increase the temperature to higher and higher values until infinity ? Would there be an infinite amount of pressure on me as well ? I tried doing this by taking initial pressure as 0 and then realized the final pressure would also be zero. I realize that I might be mixing up misunderstood notions and sound crazy but help would be appreciated !
Comment: Pressure is exerted on macroscopic objects such as the wall of the container. The particles do not experience pressure but instead experience collisions with other particles, at some frequency and with some average kinetic energy of the particles involved.
Comment: @KarstenTheis but doesn't that mean that the collisions a particle will face will increase linearly as pressure exerted on outside increases..................?
Comment: The only two things that increase collisions are higher particle speeds (higher temperature) and higher particle concentration (governed by n and V). A change in outside pressure, if it compresses the gas, will decrease V while keeping n constant, so that will indeed increase the number of collisions.
Answer: Yes, of course. Rearrange the ideal gas law into the form $$\frac{P}{T} = \frac{nR}{V}.$$ Since by construction the volume and number of moles is fixed, the right-hand side of the equation is constant, so the pressure increases linearly with the temperature in your situation.
Comment: $n$ is the amount of substance, not  "*number of moles* or "*amount of moles*".
Comment: Sure, but you may want to add that the volume would have to be infinite (or the density zero) for the pressure to be zero at a finite T.
Comment: @andselisk, in this case it must be the number of moles because the ideal gas constant $R$ is represented on a molar basis.
Comment: @a-cyclohexane-molecule "*Number of moles*" shouldn't be used at all. Not only this term doesn't make sense semantically, but also [IUPAC explicitly recommends against applying it](https://iupac.org/wp-content/uploads/2019/05/IUPAC-GB3-2012-2ndPrinting-PDFsearchable.pdf#page=18).
Comment: @andselisk, thank you for the link and information. I disagree that 'number of moles' does not make semantic sense---it is certainly logically accurate in the sense that 'amount of substance measured in moles' is the 'number of moles of substance', but you do make a good point that it is now against current convention.

Ideal Gas Equation Extreme Case


designer workflow

Question: can we open sharepoint workflows in sharepoint designer ?i was asked this question in interview , I said yes but frankly speaking I have doubt on the question itself .Can someone explain me?
Comment: Which workflows you are talking about? We have SharePoint Designer workflows, Custom workflows, nintex workflows, K2 workflows in SharePoint.
Comment: Interview questions are not supposed to be asked here. try this forum http://meta.sharepoint.stackexchange.com/.. To answer your question, if workflow is created in designer. then yes.. you can edit it.. but not the workflow created in Visual studio
Comment: 1.what is list,reusable,site workflow?also 3state ,approval,feedback,signature
Answer: The general rule is SharePoint workflows can only be opened with SharePoint Designer if the workflow was originally built with SharePoint Designer. This applies to both SharePoint 2010 and SharePoint 2013 platform workflows.#
Those workflows that are not built in SharePoint Designer, such as those built with Visual Studio, Nintex, K2, etc. - although most of these workflow solutions are built on top of SharePoint's built-in workflow platform - can not be opened and changed in SharePoint Designer.

designer workflow


Are MMORPG servers and clients usually developed in isolation?

Question: As with the title, are they usually developed together in a custom engine, or are they mostly developed independantly of each other? e.g. the server and client as completely different projects that would just share the engine as a DLL or something?
Answer: It's fair to say that for the sort of authoritative server / pure client which nearly all MMORPGs use for unavoidable security reasons, the server is typically developed with the specific purpose of serving that specific data which the client engine needs to consume in order to function.
This works much the same for highly visual business applications, which at some point early in development, if not right at the start, split out the business logic and develop that as the backend. This development process tends to be highly parallel with much ongoing feedback between client & server devs (can occur rapidly early on, if the same dev works on both). You can generally rest assured that though there may be shared components, the two projects will be kept as distinct source repositories, at the very least. Git submodules are often used for shared components.
Besides security concerns, remember that games are quite complex both design-wise and technically, and are usually on tight development budgets; we generally do not have the resource to make a server so generalised that it could be used with multiple clients; highly generalised code penalises us in terms of code comprehension (thus maintainability) and performance. It's a rare case to see multiple front-ends / clients for the same server.
(Dwarf Fortress is one such case, probably this was possible because the vast majority of its code was anyway non-rendering code, since its base renderer is very simple, the process of separating that out was probably fairly trivial and could have been done quite late into the project's lifetime).
Answer: This is too context-dependent.
Some MMORPG games that I had a chance to look at in terms of source code preferred to develop the server and the client as separate codebases. Some of them didn't even share any code between the two. If it was a custom engine I too would probably prefer them to be separate.
But if you are using an already established game engine for your client (such as Unity or Unreal), you might as well use the engine in headless mode for your server too, just for the sake of development speed.
Answer: Warning: Sweeping generalizations will be made here.
Client and server development (for the most part) is written in languages suitable to the task. The client will (most likely) be C++, C#, or mobile native. The server will again most likely be written in a "web-friendly" language. You will not write your server in C++ when Java, Python, Ruby, Go, Node, C#(?) are available and come with lots of APIs for web/cloud services like load balancers, databases, API gateways, serverless functions.
The important part is that the server and client are doing very different jobs. They have particular anxieties. You can always throw more or larger hardware at a server problem - very hard to do that on the client!
You can share (note: can and not will) the DTO's (Data Transfer Objects). This is incredibly natural if you are using the same language on the front and backend. This is what I do with C# and Unity and C# with NancyFX on the server. Both share a single classlib containing all our DTO's.
But again, I've seen just as many folks write their own DTO's in Java while the client folks write theirs in Swift or Kotlin.
I've also seen generators where you write the DTO's once in your own DSL, and your own tool/preprocess-step generates the DTO in the correct language for client and server.
There is no "right way" because every situation is different. Maybe you just can't hire any C# backend developers, and now your backend is in Java because you only have Java devs available (this has happened to me at LEAST once, I'm a Unity & C# fanboy after all).
Whatever you choose to do, make sure it works for your situation and your team.
Answer: The answer is, it depends. My MMO is a separate development stack. My client is developed in Unity, and my server is .NET so they necessarily must be developed separately.
However, Unity for example allows for developing server code and client code right alongside each other. When you are done you end up compiling both the client and the server, OR each instance is both client and server and you tell it which it is.


Can I reduce heavy whipping cream for a sauce a day ahead of use?

Question: Can this be done the day before using it for a sauce?  Because of a time crunch, I was wondering if I could reduce the heavy whipping cream the day before I make the actual sauce?
Answer: The only issue with reducing cream and then cooling it, is when you then reheat it you'll likely find the sauce will split leaving a layer of fat floating on the top. This is easily fixed by adding a touch more cream during the reheating process.
It's how we deal with white wine cream sauce at work.


Physical explanation of spin-orbit interaction in many-electron atoms & nuclei

Question: The electron of a hydrogen atom or any hydrogenic ion sees an internal magnetic field $\vec{B}_{\rm int}$ due to the proton or the nucleus in relative motion w.r.t the electron. The spin magnetic moment $\vec{\mu}_s$ of the electron couples to $\vec{B}_{\rm int}$ to give rise to an interaction of the form $f(r)\vec{S}\cdot\vec{L}$. However, spin-orbit interaction also exists in complicated many-electron atoms as well as in the nuclei. How can I explain someone the physical picture of the origin of this interaction in these situations?
Answer: A moving electron, or other spinning particle, appears to have an electric dipole moment as well as a magnetic one. This experiences the potential of the nucleus, other electrons or charged particles.
Comment: It is about any particle with a magnetic dipole moment.
Comment: Is your answer about many-electron atoms?
Answer: As long as there is finite $L$ for the electron then there is a magnetic field felt by it. The origin of the interaction (magnetic field) is the same as before. The orbital angular momentum and the coulomb potential. Only that now $l$ may no longer be a good quantum number and we might have to use a different basis (if the electron-electron interaction is at least if the order of the spin-orbit coupling).


Can I claim my father's patent?

Question: My father was granted a GB patent on an invention in 1983. The patent ceased through non-payment of renewal fee in 1989.
Can I claim this patent and how would I go about it?
Comment: Can you clarify what you mean by "claim this patent". Are you trying to enforce it against someone?
Answer: The patent term in GB is 20 years now. There is no way this patent can be revived as even if the fees had been paid it would have lapsed years ago.
I am not from the UK but a quick search turns up no shorter terms in 1983. I am certain however the term wasn't longer then.
Comment: As much as I agree with your answer, it doesn't quite answer the question. For one, can someone own an expired patent? If so what steps does he need to do to acquire it.
Comment: I don't know whether someone can own an expired patent, but a patent is a property right like any other. From the question I'm assuming the father is deceased. So the ownership of the patent would depend on how the father's assets were distributed.
Answer: A patent is not an ordinary property - it is a negative right that during the term of the patent, you can prevent others from practicing the invention disclosed.
Once the term is over, the right does not exist and the 'property' vanishes.
So after the term is over, there is no way that anybody can claim that property.
Ashok
Comment: I fear I must disagree. A patent **is** property. [35 USC 261](https://www.law.cornell.edu/uscode/text/35/261): "Subject to the provisions of this title, patents shall have the attributes of personal property." Moreover, rights still exist after its expiry for infringement that occurs pre-expiry (for at least 6 years: [35 USC 286](https://www.law.cornell.edu/uscode/text/35/286)). The ownership of an expired patent can in principle be of quite some value.
Answer: Patents are personal property (Patents Act 1977 (UK) s 30(1)). On the owner's death, ownership will therefore pass according to the laws of the jurisdiction in which the owner's estate is administered.
However, the patent is now long expired. Moreover, because any offences infringement while it was validly occured far longer than six years ago (Limitation Act 1980 (England/Wales)), there are likely no rights remaining attached to the patent, in any case.

Can I claim my father's patent?


What are the differences between sd of population divided by sqrt of sample size and sd of sample divided by sqrt of sample size?

Question: What are the differences between the standard deviation of a population divided by the square root of the sample size and the standard deviation of a sample divided by the square root of the sample size? Are they both called standard error?
Comment: @utobi That looks like an answer to me!
Comment: Welcome to Cross Validated! Do you mean $\dfrac{\sigma}{\sqrt n}$ vs $\dfrac{s}{\sqrt n}?$
Comment: They are both measures of standard error for the population average and the difference between them is in the population variance being known or unknown. In the former case, we can use $\sigma/sqrt{n}$, and in the latter, we can use $s/\sqrt{n}$.
Comment: @Dave thanks for the remark! Jin, I expanded my comment into an answer.
Comment: @Dave Thank you so much!
Answer: Yes, they are both measures of standard error for the population average, i.e. they can be considered as measures of standard deviation for the sampling distribution of the sample average.
More precisely, consider an independent random sample $X_1,\ldots, X_n$ with $E(X_i) = \mu$ and $\text{var}(X_i) = \sigma^2$, both assumed to be finite. Then the sample average $\bar X = n^{-1}\sum_i X_i$ has expectation
$$E(\bar X) = \mu$$
and variance
$$
\text{var}(\bar X) = \frac{\sigma^2}{n}.
$$
Thus $\sigma/\sqrt{n}$ is really the standard deviation of $\bar X$. Assuming the sample is large enough, we can invoke Central Limit Theorem to obtain the asymptotic pivot
\begin{align*}
\frac{\sqrt{n}(\bar{X}-\mu)}{\sigma^2}\, \,\dot\sim\,\, N(0, 1), \tag{*}
\end{align*}
where $\dot\sim$ is to be read approximately distributed as. If the population variance is known, we can use (*) to build a confidence interval for $\mu$
of approximate level $1-\alpha$
$$\bar X \pm z_{1-\alpha/2}\sqrt{\frac{\sigma^2}{n}}.$$
However, such an interval is not usable if $\sigma^2$ is unknown. But, since $S^2 = (n-1)^{-1} \sum_i (X_i-\bar X)^2$ is an unbiased estimator for $\sigma^2$, then we can think of replacing the unknown $\sigma^2$ by its unbiased estimate $S^2$, giving thus the alternative interval
$$
\bar X \pm z_{1-\alpha/2}\sqrt{\frac{S^2}{n}}.
$$
Thus, $\frac{S^2}{n}$ is a replacemnt of $\frac{\sigma^2}{n}$ when the population variance is unknown.
Comment: Thanks a lot! It's really helpful!
Comment: @Jin if you find my answer helpful, please consider upvoting and accepting it be clicking on the tick mark.


Second power play when only ten fielders are present

Question: In a T20 match, if a fielding side has only ten players present on the field (either through injury or breaks, without bringing in a substitute), how many players can field outside the 30 yard circle after six overs?
Answer: We can't tell you because this isn't specified in the Laws of Cricket; you will need to refer to the specific playing conditions for the precise tournament(s) that you are interested in.
That said, we can look at (say) the playing conditions for the 2022 Men's T20 World Cup:

28.7.4 During the Powerplay overs only two fielders shall be permitted outside this fielding restriction area at the instant of delivery.
28.7.5 During the non Powerplay overs, no more than 5 fielders shall be permitted outside the fielding restriction

That seems pretty clear to me.


Code to get java code complexity

Question: I have Java function as input and want to get it's order for example O( n )
I search in the internet very hard but didn't find any thing can help me, is there any algorithms or package may help me.
Comment: basically you look at the loops and nested loops. if you write out what its doing in pseudocode it would help. also so many std algorithms have known complexity eg sorting or whatever, it may just fit into an existing algorithm. so, "need more info"
Answer: No. There's no algorithm to analyze the asymptotic complexity of a piece of code given as input. Being able to do that would tell you whether the code halted and that's undecidable.
Comment: However, there might be an algorithm which works in many useful cases, for example when the functions are "primitive recursive" or with known complexity.

Code to get java code complexity


How do you encourage your organization to move from Java to Scala?

Question: Has anybody's organization started the migration from Java to Scala? If yes, how do you do that? What can I do to encourage my colleagues to do the same?
Comment: Perhaps you should explain why
Comment: please add scala and migration to the tag if you have authority to do so
Comment: You need enough in-house knowledge to ensure a "high-enough" bus factor.
Answer: Probably the easiest way is to first use Scala only for testing. In this case, you might even not have to tell your boss :-) If he asks, tell him "that's just my private test case, it's so much easier and faster to use Scala for it". Once you (and your organization) has enough experience with Scala you can start using it for the 'real' code.
Comment: These were my thoughts, exactly, for C#-to-F# migration.
Answer: From the companies perspective it is better to stay with Java if there is no distinct advantage that they will get by migrating to Scala. It is easier for them to hire Java programmers to build and maintain the application. You might just leave after implementing everything in Scala :-) No offenses :-)
Comment: Plain Java is here to stay.  Scala may or may not.  It is too early to tell.
Comment: "It is easier to hire Java developers" is probably true.  But hiring the ones who are "easy to hire" may not be the cheapest way to complete your project.
Answer: Have your boss read experiences like this:

I'm currently doing most of my things in Scala right now. (I should
  mention that I think that Scala is the
  best thing since the invention of the
  wheel some time ago. :-D )
In my humble opinion it is the only
  language which truly allows people to
  choose the best approach to a task
  without some unnecessary divide
  between (more) object-oriented and
  (more) functional approaches.
Looking at the languages which
  claimed something like this before, I
  can basically see two competing
  language design camps:

The ones from the object-oriented side which saw that functional
  programming gained some traction
  lately and thought "Well, we don't
  really understand that functional
  thingie, but let's add some fancy
  syntactical sugar to our language, so
  we can claim it is functional too!"
  (examples: Java, Python)
Then the ones from the functional side, who thought "Well, our
  functional approach is far superior to
  anything else and that object-oriented
  nonsense is annoying, but let's put
  some additional keywords into our
  language, that will make our language
  escape academia for sure!" (examples:
  F#, OCaml)

Scala's designers unified many
  approaches coming from both sides and
  created some well-designed language,
  which is - in my humble opinion - the
  biggest difference to other languages,
  which decided to take the
  "Frankenstein" approach to programming
  language design.
Having done only smaller things with Lift yet and only superficial
  experience with Rails and Django, I
  have to admit that most of the time
  when I wondered why something in Lift
  worked differently from what I
  expected, this was due to the fact
  that my expectations were flawed and
  Lift's approach superior.
Lift is certainly no "easy
  introduction to Scala" but learning
  how Lift works was almost as rewarding
  as learning Scala before it.
The ability to have a "clean" view
  without any logic in it is a great
  improvement to other frameworks which
  claimed the same, but fell short of
  it. Scala's XML literal support makes
  it possible to verify the
  well-formedness of your response: The
  compiler will prove at compile time
  that you only emit well-formed XML to
  a client.
Lift is viable technology and at the moment the only real approach if
  you want to build web applications
  which look, feel and behave like
  "real" desktop applications without
  writing insane amounts of code
  yourself.

[ Source ]
Answer: Over the past two years we've progressed a fair way along this journey at guardian.co.uk - our Open Platform is built on Scala, our core CMS (originally in Java) is gradually incorporating more Scala (we're soon moving from Maven to SBT for our build) and it's been a wonderful experience - really invigorating our devs, some of whom were becoming a bit jaded with Java :)
I'd encourage you to read these two articles about our transition, and maybe use them as supporting evidence with your pointy-haired:
http://skillsmatter.com/podcast/home/how-we-moved-from-java-to-scala
http://www.infoq.com/articles/guardian_scala
Some quick tips:

Start by writing your tests in Scala - that way you can get familiar with the language, increase your confidence in it, and not have to conquer any fears you might have about adding the runtime to your production servers straight away.
Don't ask for permission to try new technologies. Better to ask for forgiveness if you have to :-)
Comment: +1! for "Don't ask for permission to try new technologies. Better to ask for forgiveness if you have to :-)"
Answer: This question dove-tails in another question. That is for what kinds or projects does migrating to Scala provide added value? I do Java day my day job, but dream about the day I can use Scala "in anger".
A couple answers to my own question:

Problems for which Actor based concurrency would provide great benefit (Akka)
Web applications than have data pushed to them via COMET (Lift)

Any other insights or better yet experiences?
Answer: I'm writing tests for my Java apps in Scala and agree that it's a good place to start. My test coverage is better because it's quicker and easier to write them (also since I get to use Scala, I willingly focus on writing tests more).
I've also started doing prototypes and throwaway POCs in Scala pretty much exclusively. I try to make managers and supervisors as aware as possible that I used Scala for these one-offs and emphasize that I was able to get something up and running quickly because of Scala. We needed (well, kind of needed) a web app to track our holiday party white elephant game - 1.5 hours with Scalatra and MongoDB and my entire department is seeing this app and asking about it. Let's face it, you'll never get anywhere describing to managers how much more expressive the language is or that its concurrency model is so much better. But if you show them you can get more done more quickly, you gain ground.
But I think the biggest piece is getting developers excited about Scala. I'm sure we all work with developer who don't actively keep up with new technology, and sometimes it's hard to get those folks excited about doing anything new (why, I really don't understand). Showing those folks some benefits of Scala (try the REPL) is key. If you get enough developers buzzing about the same benefits of productivity, then you're far more likely to get Scala officially adopted in your organization.
Spreading the word and getting that grassroots effort rolling is my key goal in 2011. We shall see how it pans out, because I can't wait for the day I get to use Scala for the bulk of my work.
Answer: I'm wondering why choose one or the other? Why decide to throw Java out the door and go Scala all the way?
There is no such thing as the perfect tool for the job. There's no reason to throw expertise in one language out the door completely and replace it with another.
I wouldn't want to work (anymore) at a company that focusses on one language or environment, tbh. It's better to know many things and pick the right tool for the job.
Next to that, it's hard if not impossible to get your organization to switch over to Scala completely. Instead, I'd try to get some projects (or even parts of projects) done in Scala, instead of going for the all-or-nothing approach. You could, for example, opt to test your Java code with Specs2, which has a pretty nice syntax compared to plain old JUnit - and it's not complex, confusing and hard Scala code and paradigms either, just syntactic sugar around defining behavior of your application.
Answer: A good way is to demonstrate two versions of the same program. By doing that you can  show to your colleagues (in practice) Scala's Expressiveness. Doing the same thing for other problems (XML, concurrency, etc.) can demonstrate the benefits of using Scala instead of Java for tackling specific problems.
Of course don't expect the migration to happen in one day. There are many problems that you might underestimate: The learning curve, the existing codebase, etc.


What is the origin of the term "involution" used in Hamiltonian mechanics

Question: We say that two dynamical variables $f$ and $g$ are in involution if their Poisson bracket vanishes, i.e., $\{f,g\}=0$. Why is it called involution?
Answer: An involution is, according to the OED, "A function or transformation that is equal to its inverse."
Whittaker discusses involution systems in his A Treatise on the Analytic Dynamics of Particles and Rigid Bodies p. 322:

147. Invoultion systems.
Let $(u_1,, u_2 , …, u_r)$ denote $r$ functions of $n$ independent variables $$(q_1, q_2 , …, q_n , p_1, …, p_n);$$if it is possible to express all the Poisson-brackets $(u_i,u_k)$ as functions of $(u_1,u_2,…,u_r)$, the functions $(u_1,u_2,…,u_r)$ are said to form a function-group*. Any function of $(u_1,u_2,…,u_r)$ belongs to this group.
If the quantities $(u_i,u_k)$ are all zero, the functions $(u_1,u_2,…,u_r)$ are said to be in involution, or to form an involution-system.
*Lie, Math. Ann. VIII. (1875). p. 215.


What are the recommended steps to take before selling an iPhone?

Question: I "lost" my iPhone at work, could not find it anywhere. I reported it lost, and got another through the insurance. A month later, I found it hiding in a file in one my desk drawers. The phone is just less than a year old, in near new condition, and it seems a waste to discard it. What has to be done to be able to sell it to someone who needs a working phone?
Comment: Please change the title of your post because the current one is not related to the question you're asking.
Answer: In terms of privacy - unlink your AppleID account and just go to Settings > General > Reset. Clean everything (Reset All Settings & Erease All Content and Settings) and you're ready to sell / give your phone.


How to determine Number of neuron in hidden layer for classification

Question: I used Iris dataset for classification with 3 layer Neural Network
I decided to use :
3 neurons for input since it has 3 features,
3 neurons for output since it has 3 classes and
In the hidden layer
what is the best number of neurons to do classification in this case?
Answer: There is not a clear a answer for this question. You should try and evaluated how the models performs testing diffferents configurations. But, basically, the next two premises are followed:

More neurons per layer --> more complex model, and probably you will
obtain better accuracy.
More hidden layers --> more complex model, and again, probably you
will obtain better accuracy.
WARNING Both approaches increase the chance of overfitting by increasing the complexity of model. You need to carefully evaluate them through statistically robust model selection procedures e.g. cross-validation

Be aware that incrementing the complexity of the model will increase the computational process and , as mentioned, be careful with overfitting.
I recommend try a small number of neurons first, and then, try to increase step by step seeing if some improvement is achieved in the model.
Answer: And to automate the evaluations, you can use a tool like, Keras Tuner https://keras-team.github.io/keras-tuner/
From their docs, an example setup would look like this.
The min-max value for the units is where you would tune it for your case.
<code>from tensorflow import keras
from tensorflow.keras import layers
from kerastuner.tuners import RandomSearch

def build_model(hp):
    model = keras.Sequential()
    model.add(layers.Dense(units=hp.Int('units',
                                        min_value=32,
                                        max_value=512,
                                        step=32),
                           activation='relu'))
    model.add(layers.Dense(10, activation='softmax'))
    model.compile(
        optimizer=keras.optimizers.Adam(
            hp.Choice('learning_rate',
                      values=[1e-2, 1e-3, 1e-4])),
        loss='sparse_categorical_crossentropy',
        metrics=['accuracy'])
    return model
</code>


Pygame with strange variable issues - a couple variables are increasing for unknown reason

Question: I am having a really strange problem with Pygame, and it's got me stumped for the last few (OK, more like 5) hours. There are free programs out there for making photo mosaics, but ever since my early days tinkering with VB5, I've wanted to write my own version. You know how that is. I have all kinds of cool parts written for loading source images, finding color averages and everything. But here I'm stuck and confused. So very stuck and confused.
This part of the program converts a 'target image' (the one that will be made up of small source images) to smaller blocks of color that other source images will try to match and then replace eventually. But for some reason, the size of the blocks keeps increasing with every iteration. I've tried so many different things that I've had to go through the script and delete out a bunch of things and add a couple more comments before posting.
The target img is a 1280x800 random google image, but any other picture should work just the same. Watch as the Y size of the blit increases with every block going down, and the X size increases as new rows are made. I hard coded in a set size for the solid color rectangle (2 pixels across, much smaller than I'll use), but for whatever reason this keeps increasing. The first row of blits is so small right now that it's hard to see. That quickly changes.
**Here's the link to what I am the image I'm using (http://www.travelimg.org/wallpapers/2012/01/iceland-golden-falls-druffix-europe-golden-falls-golden-falls-iceland-natur-waterfall-waterfalls-800x1280.jpg), but any other pic/size renamed to target.jpg should do the same.
If anyone can point me in the right direction it would be much appreciated. I want to cover this whole source pic in nice 12x12 blocks of solid color to start with. I can't figure out what is changing these block sizes as it goes.
<code>import pygame
import os
from time import sleep

okformats = ['png','jpg','bmp','pcx','tif','lbm','pbm','pgm','ppm','xpm']

targetimg = 'C:\\Python27\\mosaic\\target.jpg'

if targetimg[-3:] not in okformats:
    print 'That format is unsupported, get ready for some errors...'
else:
    print 'Loading...'

pygame.init()
screen = pygame.display.set_mode((100,100)) #picked a size just to start it out
clock = pygame.time.Clock() #possibly not needed in this script

targetpic = pygame.image.load(targetimg).convert()

targetrect = targetpic.get_rect()  #returns something like [0,0,1280,800]
targetsize = targetrect[2:]
targetw = targetrect[2]
targeth = targetrect[3]

numpicsx = 100 #number of pictures that make up the width
sourceratio = 1  #testing with square pics for now
picxsize = targetw/numpicsx
numpicsy = targeth/(picxsize*sourceratio)
picysize = targeth/numpicsy

print 'Blitting target image'
screen = pygame.display.set_mode(targetsize)
screen.fill((255,255,255)) #set to white in case of transparency
screen.blit(targetpic,(0,0))

#update screen
pygame.display.update()
pygame.display.flip()
clock.tick(30)

SLOWDOWN = .1  #temp slow down to watch it

print numpicsx #here are some print statements just to show all the starting values are correct
print numpicsy
print '---'
print picxsize
print picysize

sleep(1)

for x in xrange(numpicsx):

    for y in xrange(numpicsy):
    currentrect = [x*picxsize,y*picysize,x*picxsize+picxsize,y*picysize+picysize]

    avgc = pygame.transform.average_color((targetpic), currentrect) #average color
    avgc = avgc[:3]  #drops out the alpha if there is one

    pygame.draw.rect(screen, avgc, currentrect)
    #pygame.draw.rect(screen, avgc, (currentrect[0],currentrect[1],currentrect[0]+2,currentrect[1]+2))  #hard coded 2s (rather than 12s in this case) to help pin point the problem

    pygame.display.update()
    pygame.display.flip()
    clock.tick(30) #probably not needed

    sleep(SLOWDOWN)

print 'Done./nSleeping then quitting...'
sleep(3)

pygame.quit()
</code>
Answer: A friend of mine took a look at my code and showed me the problem.  I was thinking that the rect format for drawing was (x1,y1,x2,y2), but it's actually (x,y,width,height).  This is the new line:
currentrect = [x*picxsize,y*picysize,picxsize,picysize]
I also dropped the clock.tick(30) lines to speed it all up.


Calculating the distribution of the minimum of two exponential functions

Question: Suppose X and Y are two independent exponential random variables with rates $\alpha$ and $\beta$ respectively. I know the following equality to be true but I don't know why it's true: $\mathbb{P}(Y \ge X, X > x) = \int_x^\infty \alpha e^{-\alpha t}\mathbb{P}(Y\ge t)dt$.
So if someone could explain this to me step-by-step, it would be much appreciated. I understand that the first part of the integrand comes from the pdf of $X$ and the second part comes from wanting $Y\ge X$ but I don't understand why they are multiplied since $\{Y \ge X\} \text{ and } \{X > x\}$ are dependent.
Answer: Let $Z = \min\{X,Y\}$. Then
$$
P(Z\le z) = 1 - P(Z\ge z) = 1- P(X\ge z)P(Y\ge z) = 1 - e^{-\alpha z}e^{-\beta z} = 1 - e^{-(\alpha+\beta) z}.
$$
So $Z\sim\text{Exp}(\alpha+\beta)$.
The inequality follows from the law of total probability:
$$
P(Y>X;X>x) = \int_{0}^{\infty}P(Y>X;X>x|X=t)f_X(t)dt = \int_{x}^{\infty}P(Y>X|X=t)f_X(t)dt = \int_{x}^{\infty}P(Y>t)f_X(t)dt = \int_{x}^{\infty}\alpha e^{-\alpha t}P(Y>X)dt.
$$
Comment: How can you have X=t when X is a continuous random variable?
Comment: Sorry, I was still busy editing it. Now it is correct.
Comment: X=t is still there though?
Comment: Yes, but now it is given that $X=t$. It is true that $P(X=t)=0$ for all $t$, however, now we calculate $P(Y>X;X>x)$ given that we know that $X=t$.
Comment: But if you expanded that expression using the definition of conditional probability, you'd be dividing by 0 right?
Comment: No, that is only if you'd expand it as for discrete random variables. Have a look at http://en.wikipedia.org/wiki/Conditional_probability_distribution;)


Login as www-data on Debian

Question: I have a Debian Lenny server running Apache 2.2. I run PHP using Apache's fcgi mod. PHP runs as user www-data (the default) because it's what Apache runs as and there is only one site on the server so I don't see any reason (feel free to correct me) to have the FastCGI instance run as a different user.
I chown the ownership of all my PHP files to www-data:www-data so that PHP has no problem modifying and writing data as needed (everything is chmod 755).
I recently got a new text editor I want to use to edit PHP on my desktop that will download files via SFTP and re-upload them when I hit save (transparently w/o me noticing). I use Vim server-side but for complex edits this seems easier.
My new desktop editor needs to log in as user www-data so it can write files onto the server. I have tried to passwd www-data setting up a password (and removing the "!" from /etc/shadow) but I am still unable to log in via SSH. What else do I need to do to be able to log in as user www-data?
Thanks.
Answer: Nevermind,
That's all you need to do!
I forgot to reload my ssh server because I restrict who can log in.
Hope the above is useful to someone!

Login as www-data on Debian


Advantage of using Swing over AWT

Question: Why is Swing preferred over AWT?
Which Swing component could be used for playing a video on it?
Answer: AWT is older than Swing and supports only a limited set of components. Otherwise you have to write your own such as tables/data grids for example (typically, you will have to write your own video player, good luck !). Swing is more "modern" as Sun engineers learned from their AWT mistakes and made something better, albeit more complex. Both Swing and AWT are event-based so if you know event-driven programming you will be at home. The learning curve is a bit steeper with Swing because of the larger number of available classes, though by practicing a bit with tutorials you should quickly be fine.
Check out this IBM presentation on SWT, Swing & AWT, it really is a good read. Also AWT vs Swing.
As to how you can play video on Java: https://stackoverflow.com/questions/4569490/how-to-play-video-in-java-using-swing
Answer: AWT components are essentially a thin layer on top of native OS GUI controls. To draw for example a checkbox, AWT components were calling underlying OS. Such approach caused two problems:

the same app had a bit different GUI behaviour under different OS
overcoming known differences caused AWT code to be bloated and IIRC a bit buggy

Because of this connection between AWT component and underlying OS control AWT controls were called "heavyweight". In contrast Swing offers, so called "lightweight" controls. They are purely Java, have no dependency on underlying OS and basically "draw themselves" using Java2D primitives (pixels, lines, brushes and so on). This approach has several advantages but what is most important -- it fixes AWT outstanding problems mentioned above.
As for Swing component for video playing, I don't think there is one, at least among standard Swing components. You may want to google for one, as it probably is already written. You can also look at JMF API, but I think you'd have to code a few bits yourself before you can display video.
Answer: 1) AWT is prehistorical FrameWork and is strong based on Windows OS
2) Swing is GUI FrameWork based on AWT, all JComponent inherits or implemetns part of usefull methods from ATW Components, sure if exist,
3) Swing implements a few of new JComponents, for example JTable, best from comparison table here
4) for video and multimedia are there lots of Custom API, (never use that) but I think that based on AWT Canvas
5) since as of the JDK 6 update 12 and JDK7 build 19 releases, promiss that you can mixing AWT and Swing Components, but don't suggest to do that, Components are painter in the Container correctly, but still there exist same difference betweens heavyweight and lightweight components as before, and you have to calculate with that

Advantage of using Swing over AWT


The camera lens on iPod touch 5th gen

Question: My iPhone 6 camera protrudes slightly and so does my iPod touch 5th gen, but I don't worry about scratching my iPhone camera because I know it's coated in sapphire. Is the iPod touch protruding camera also sapphire? Or is it just the same glass as the screen?
Answer: The iPod touch 5 is older then the iPhone 6 (released with the iPhone 5) so no, it does not have a sapphire coating. However, it generally is durable enough for most things before it scratches.
Comment: Isn't iPhone 5 camera also made of sapphire lens?
Comment: @Moist No. The sapphire lens were new, beginning with the iPhone 6.

The camera lens on iPod touch 5th gen


Study the convergence of $ \int_{3}^{+\infty} \sin\left(\frac{1}{x}\right)- \tan\left(\frac{1}{x}\right)\, dx $

Question: I have to study the convergence of $$ \int_{3}^{+\infty} \sin\left(\frac{1}{x}\right)- \tan\left(\frac{1}{x}\right)\, dx  .$$ A friend of mine suggest me to use Taylor development, but I don't understand how this can show that the integral converge. Can someone help me?
Answer: For large $x$ or equivalently small $\frac{1}{x}$ we have $\sin\frac{1}{x}\approx\frac{1}{x}-\frac{1}{6x^3}$ and $\tan\frac{1}{x}\approx\frac{1}{x}+\frac{1}{3x^3}$ so $\sin\frac{1}{x}-\tan\frac{1}{x}\approx-\frac{1}{2x^3}$, which has a finite integral on $\int_3^\infty dx$.
Answer: Both functions are continuous on the interval. Let $u=1/x$ and $du = -u^2dx$.
$$-\int_{1/3}^{0^+} \frac{\sin\left(u\right)- \tan\left(u\right)}{u^2}\, du  $$
The question is the improper limit at $u=0$. Expand the functions in their Taylor series, keeping terms up to third order.
$$\int_{0^+}^{1/3} \frac{u - u + \mathcal{O}(u^3)}{u^2}\, du = \int_{0^+}^{1/3} \mathcal{O}(u)\,du < \infty$$
The integrand is of order $u$ and higher, so the integral is finite.


How to create desktop shortcuts for folders in Ubuntu 20.04

Question: How can you create desktop shortcuts for folders in Ubuntu 20.04? I can't see the "Make link" button when I right-click on it.
Comment: Right click a folder. Select "Star".  Then when you need to go there quickly use any Nautilus window and click "Starred" on the left menu. It will show you your favorites.
Answer: Took a while to figure it out. But try these four easy steps.

Search for a program called "Files" and open it twice.To open the second window, right click the Files icon and choose "New Window".You should now have two windows open showing your home directory in both of them.

...
In the first window, head to your Desktop.
...
In the second window, go to the directory that has the folder that you want to create a shortcut with.Below, my Desktop is to the left and the folder that I want to copy to the desktop is to the right. (Movies)
...
Two ways to do this from here...

In the second window (Movies), while holding down the Shift and Ctrl key together, click, drag and drop the folder into the first window. (your Desktop window)OR
Just hold down the alt key only and then click, drag and drop the folder into the Desktop window.
The only difference between the two is that the first choice will create the shortcut link automatically. [Ctrl + shift]The second choice will bring up a menu and you click on 'Create Link'. [alt only, no shift]
Done. You should now see the shortcut to that folder on your Desktop.
Comment: Much more helpful than the accepted answer. Thanks!
Comment: It's 2021 and we can't create a shortcut easily in Ubuntu. This is crazy !
Comment: its work for me, thanks !
Comment: Works fine. Thanks
Answer: I managed to create the Link to folder. Select a folder for which you want to create the link. Hold Alt (left Alt in my case) button and drag this folder to Desktop or any other location you want. I had two File Manager windows side by side. After you complete you action a dialog window will appear with actions to select from:
"Make link",
"Move" or "Copy".
Select the "Make link" and you done. Good luck.
Answer: In Ubuntu 20.04, a (rather new) Gnome Shell extension "Desktop Icons" manages the desktop instead of the file manager, Nautilus. The extension still is limited and offers basic functionality. Another current limitation is that you cannot yet drag and drop from Files to the Desktop and vice versa.
For now, create your desktop items in the File Manager, in the Desktop folder. You can place your links there. They will appear on the desktop, and there you can move them to the place you want.
When working with program launchers, they will appear in first instance as white text icons on the desktop. To make them functional, right-click the icon on the desktop and select "Allow launching".
Comment: How can I add a link to a folder from a separate partition to the desktop?
Comment: Same method if you can write on the separate partition. Then move the link where you want it (and eventually rename it). If you do not have write permissions: Hold Ctrl+Shift pressed and drag to the target location.
Comment: Sorry. I don't know how to make a link!
Comment: Still you referred to the "Make link" option in your question? That is one way to make links, using the "Make link" option in the right-click menu. That option needs to be enabled in the options: the option is not there by default.
Comment: Wow... Just "wow". Ubuntu 20 and this is still not implemented. It's small things like this that all together make Linux unusable.


conditions for uniqueness of a quasi linear pde?

Question: I'm studying the problem $u_x+u_t=x(1-u^2), u=g\in \mathcal{C}^1(\Omega)$ at $\partial\Omega$ , $g$ bounded, where $\Omega$ is $\{(x,t)\in\mathbb{R}^2|t>0\}$. I found the solution, but I don't know how to prove the uniqueness of this solution. The usual technic of taking two different solutions and proving that the difference of them is zero, doesn't work here, because the pde is not linear :(
Answer: You should examine the argument that led to finding $u$, to see if anything there might have a uniqueness statement. Presumably, you used the method of characteristics, in which case the argument goes like this:

Fix $x_0\in \mathbb R$ and consider the restriction of $u$ to the line $x=x_0+t$, call it $v(t)=u(x_0+t,t)$.
Observe that $v'(t)=(x_0+t)(1-v^2)$. This is a separable ODE you can solve, with the initial condition $v(0)=g(x_0)$.
Furthermore, the solution is unique by the Picard theorem: the right hand side of the ODE is a continuously differentiable function, therefore locally Lipschitz.
It follows that $u$ is uniquely determined on the characteristic line $x=x_0+t$. Since $x_0$ was arbitrary, $u$ is unique.


Ground bus for sub panel?

Question: I am replacing an old fuse box in our (detached) garage with a modern breaker panel. What I've discovered is that the breaker boxes I can get from Home Depot have a neutral bus in them, but no ground bus. Am I just supposed to buy a ground bus and screw it into the bottom of the box? How does it make sense for a sub panel to have a neutral bus but no ground bus?
Comment: A straight replacement of an existing subpanel that was installed when a separate ground and neutral was not required and without a ground wire (or metal conduit) back to the main panel is usually grandfathered. So if the manufacturer can sell it without a ground bar and save $0.50, they will. That being said, ground bars are readily available so it is not a big deal.
Comment: Also, make sure you get a bigger subpanel than you need - ideally you should have several open spaces for future use so you don't have to replace it with the next upgrade. You can even use a "main" panel as a subpanel as long as you remove the neutral/ground bond - the price (due to bundled "free" breakers) is often very attractive.
Comment: Are you buying main breaker or main lug panels? Which brand/product line are you looking at even?
Comment: It's a Siemens EQ 125 panel.
Answer: Yes, in any modern subpanel, you will need ground and neutral separate. Note that many older subpanels installed before a separate ground was required from main panel to subpanel did not have that ground wire and therefore had ground and neutral together in the panel. When that's the case, you don't need a separate ground bar because grounds can go on the neutral bar. That being said, even if not required (i.e., even if grandfathered), a separate ground wire is a good idea, and if you install one then you should definitely have a separate ground bar (and no neutral/ground bond) in the subpanel. If you increase the capacity compared to the previous fuse panel then you will need a new feeder cable from the main panel anyway, which will include a ground wire.
A few additional key things:
Detached garage
Generally speaking, when you have a subpanel in a detached building you need to have a disconnect and ground rods. As I understand it there are some exceptions, such as when the two buildings are physically detached but connected by a covered walkway (gross oversimplification, but I am pretty sure the rule is something like that). So what you call "detached" may not have these requirements. That being said, a disconnect is really easy if you use a "main" panel instead of a "sub" panel, as you have a main breaker. That is convenient for doing any work on the panel, as well as a required safety feature.
Load Calculation
If you are adding more electric things to the garage, such as electric vehicle charging, then you should do a load calculation. Actually two load calculations - one on the main panel/utility service (to determine how much power you can send to the garage) and another on the garage (to determine how much you can use for big loads such as EVSE or welding or other things).
Big Panel
Do not be confused by "circuits vs. spaces". A panel might say "8 spaces/16 circuits", but that depends on using 1/2-size breakers. Those 1/2-size breakers are not available with GFCI or AFCI, and almost every circuit in a garage will require GFCI. A big main panel can be well worth the cost compared to a small sub panel. For example, in a quick search on Home Depot, I found a main panel with extras for $90, including 100A main breaker, 20 spaces, 1 20A breaker (use that for a receptacle circuit with a GFCI/receptacle) and 1 double 30A breaker (perfect for EVSE, which doesn't need GFCI/breaker) and a ground bar.
Keep in mind that you can feed a 100A panel from a 60A breaker in your main panel, as long as you do a proper load calculation to show that 60A is sufficient.
Comment: This was a retrofit - the garage had a fusebox and I replaced it with a modern sub-panel. The feed from the house was 4 wires, so no problem having a separate ground bus. It just struck me as odd that the box didn't come with one.
Answer: The detached garage requires a "disconnect switch" and several things qualify.

All the breakers can be the disconnect if you can turn them off with 6 hand movements. (feel free to use handle-ties here including 3-phase handle-ties if your panel isn't Homeline!)
A panel with a main breaker can be chosen (they're cheap) and then the main breaker counts as the disconnect, even though it's utterly useless as a breaker.

However, if you buy a panel with a main breaker, they will assume you are using it as a main panel, which does not require a separate ground bar.  So they won't give you one.   They are easily purchased as accessories, and they are cheap. The panel label will list models designed to fit on the pre-tapped screw holes and nubs on the panel now.
If you buy a main-lug panel, the manufacturer ought to guess it'll be used as a subpanel, but some manufacturers refuse to throw in the accessory ground bars because they're cheap.  That's whatcha get for buying cheap.

Ground bus for sub panel?


When does 'number' become 'quantity'?

Question: Numbers themselves are simply conceptual objects, but when does number become a quantity? Is the 'cardinality' of a set a 'quantity'? it is a count but we represent it with just a number that we simply state, is the true 'quantity' actually '5 elements'? in the set, or is the cardinal number itself a quantity? We will say that the cardinality of the set [1,2,3,4,5] is 5 but is this a quantity itself or an associated mathematical object? As numbers can be continuous, ordinals, cardinals and have many uses.
Comment: In Eulid's [Elements](http://aleph0.clarku.edu/~djoyce/elements/bookV/bookV.html#defs) we have *numbers* (natural ones) and *magnitudes*: they are distinct. The first clear understanding that we can use numbers (and *real* ones) to measure **every** magnitude is due to [Stevin](https://en.wikipedia.org/wiki/Simon_Stevin#Decimal_fractions).
Comment: Not precisely sure what you're asking/suggesting, but my interpretation would be that a 'quantity' is a number plus 'physical units', e.g., 5 is a number whereas 5kilograms is a quantity. Of course, the units needn't be quite so physical as kilograms. 5 loaves-of-bread would also be a quantity.
Comment: @eigengrau  essentially this, if we have just a number, it can't be a quantity, so associating the number '5' with a sets number of elements then the '5' itself cant be a quantity.
Comment: Is this a more general question about how can formal mathematical concepts are *used* outside their syntactical/purely formal nature? Using them for quantities being one case.
Comment: A number is a specific instance of value. A quantity is any value.
Comment: @RodolfoAP I'm a little bit confused by this, could you explain a little more?
Comment: @user37577 please see my answer.
Answer: The problem here is etymological, not metaphysical (logical/mathematical).
Quanti-(from quantus) -ty(suffix meaning state of) takes any value, the etymological meaning is "a state of accounting", that is, some state within a universe (e.g. a set of numbers). Number is a specific instance of value, e.g. 3.
So, it can be said that quantity means "number of" (there you have both terms). Then, mathematically, numbers are not associated with units, but quantities do. E.g. volume is a thermodynamic quantity, which corresponds to the number of....
q={n, u}
Notice that a number can correspond to a quantity but a quantity can't correspond to a number.
∀q∃n(n∈R) but not ∀n∃q.
Also notice that the fact that for all quantity there is a number..., does not imply necessarily that the number is known: the quantity of stars in the universe. The reference is to the object, not to its knowledge.
UPDATES, to @user37577 additional questions, introducing "value":

Values are subjective appreciations. That is, the  appreciation every subject grants to the object which holds it.
So, values are subjective. I will not pay 5 dollars for a Justin Bieber signed record, but many would do it.
I've said "number can be value". A number is an arithmetic value, which is not the same as the quantitative value. Arithmetically, 100 is not the same as 1, but 100 cents have the same commercial value of 1 dollar.
Although arithmetic values are also subjective, they can be considered objective, since we all agree on its arithmetic value. They don't exist outside of our heads: numbers would not exist if humans would have never appeared. So, they are subjective. What we call objective is usually "subjectively shared".
Comment: So number is an instance of value because every number is a value? Or because every number has the property of value? A number can be associated to a quantity? So we can say for any quantity at a particular time there's an associated value but for a particular value, there does not exist necessarily a quantity for that value.
Comment: Number: _written symbol or figure of arithmetic value_ (most common use). So, yes. Number can be "value". "An instance of value" is to remark the feature in the ontological sense. Your last phrase: correct, because, for example, 100 concepts (a qty.) is not the same as _100_ (a number, which is a single concept, that can be part of multiple quantities to provide different senses). Units matter.
Comment: so in essence a quantity is a property to be associated with a number (we may even add a unit as part of this 'association') to say cardinal number = 5 is just associating '5' with the number of elements in the set.

When does 'number' become 'quantity'?


Are these max-capacitor ratings (for a bridge rectifier) too conservative?

Question: I'm looking at the Diotec BxxC2300-1500 datasheet (where xx is the max RMS voltage), and I'm a little miffed by the following table, which I've not seen in other manufacturers' similar datasheets:

It seems a little odd that the max capacitance would depend on the max RMS (and equivalently blocking) voltage of the device. Are they assuming that the capacitor is charged to the max voltage the rectifier can output? Because otherwise it doesn't jibe with how other manufacturers present such data or with my practical experience of (ab)using the run-of-the mill DB156 (or even DB107) rectifiers with a 4700uF cap, but at 12V; I've not seen any failures running that for years.

EDIT: I wanted to write this a comment to Olin's answer, but it turned out a bit too long: every bridge rectifier factory from Bulgaria to China makes something like those bridge rectifiers (and even more certainly the DB series). In the datasheets of such generics you can at best read "For capacitive load, derate current by 20%." and nothing more. Either those generics' datasheets are very skimpy of capacitive-load limitations, or this one is very conservative.
Also compare with Vishay's way (fig. 1) of presenting such info, where the derating factor depends on the I(peak)/I(average) ratio but not on the max RMS of the device. For such devices (including Diotec's), IFSM(max peak) and I(average) are the same for an entire series, i.e. they don't depend on max rms.

So I strongly doubt there's something special about Diotec diodes that imposes the dependency on max rms seen in the table, and I think there has to be some calculation that applies to any such device behind that table.
Answer: If that's what the datasheet says, then that's what the restrictions are.  If you don't like those restrictions, use a different device.
The max capacitance together with a series resistance is probably to limit inrush current when first connected.


How is the second-order covariant derivative of a scalar computed?

Question: What is second-order covariant derivative $$\nabla_i\nabla_jf(r)$$ in terms of $r,\theta, g(r)$ and partial derivative, given that the metric takes the form $$ds^2=dr^2+g(r)d\theta^2$$ and $f$ is a scalar function of $r$?
For Cartesians, I know that the covariant derivatives reduce to partial derivatives. However, since this is in polar coordinates...
Answer: The covariant derivative of a scalar is just its gradient because scalars don't depend on your basis vectors:
$$\nabla_j f=\partial_jf$$
Now it's a dual vector, so the next covariant derivative will depend on the connection. Assuming the Levi-Civita connection, i.e. the Christoffel symbols, the covariant derivative will be:
$$\nabla_i \nabla_j f=\nabla_i \partial_jf=\partial_i \partial_j f-\partial_k f~\Gamma^{k}_{ij}$$
Comment: Thank you very much, elfmotat. I have a further question: isn't the Levi-Civita connection built into e definition of the covariant derivative? Is an extra assumption required? -- I may have got something confused. Thanks again!
Comment: In GR the connection is assumed to be torsion-free, so the Levi-Civita connection is all that is discussed in most introductory texbooks. Other connections are possible though, and the covariant derivative depends on the type of connection. If you're just learning GR then you don't really need to worry about any of that though.


Is it possible to control a 4 wire Bipolar stepper motor with a PWM signal?

Question: I am trying to control a 4 wire bipolar stepper with a PWM signal being output from a VEX  cortex controller. I am planning on using 4  bipolar NEMA 17 12v steppers to drive a small remote controlled robot. (https://www.sparkfun.com/products/9238)
I have found equipment to convert a 3 wire PWM signal to a (unipolar) 5-8 wire stepper output ( http://store.cunningturtle.com/collections/frontpage/products/radio-controlled-stepper-kit ), but nothing for 4 wire bipolar steppers. I am wondering if I would be better off looking for new motors or is there a way to control these motors easily with this controller.
Comment: First, you need to decide if you're using bipolar or unipolar steppers. In the title you mention bipolar and in the text you mention both bipolar and unipolar. The two types steppers require different drive circuits. Also, it is not clear what you mean by '3 wire PWM signal'
Comment: I have no preference as to which type of stepper I use. Both types appear to be suitable as far as moving the robot is concerned. It is just a matter of which is easier to control (and how I would go about controlling it) I would be interested in knowing how to control both types of steppers in this situation. When I say "3 wire PWM signal" I am referring to a standard hobby servo input which uses 1 ground wire, 1 power wire and 1 PWM signal wire to control speed and direction.
Comment: The controller you link is designed to control a unipolar motor, but the motor you link is a bipolar motor. Unfortunately, there is no easy way to make them work together. There are stepper motors that can be wired as either bipolar or unipolar. They will have 6 or 8 wires. I'd say your options are to find a different motor OR a different controller. Unless you're planning to build your own controller, this looks like a shopping question and is out of scope for this forum.
Answer: You may need to build your own controller unless you can get the proper drive outputs from your controller.  Generally, stepper motors are driven with step and direction signals as they allow very precise control over which direction the motor is rotating and precisely how far it turns.  If you can't get access to the coil center taps, then you're probably going to have to either find a different motor or roll your own controller.  It would not be very difficult to get an Arduino to read in the PWM pulses and drive a stepper or two with a motor driver shield.


Do lens gel holders exist?

Question: I own a Nikon D80 with Tamron 18-200mm lens. I'm looking to experiment with using colored gels like these Rosco ones but am not sure what type of holder I could use to hold the gel in place (I've tried rubber bands and tape, neither quite work), or if one even exists. Every time I search gel holders, I get lighting gel holders. Can anyone tell me what and where I can search?
Comment: @inkista The huge variety of available colors might be one. Cost is likely another.
Comment: Is there a reason you want to use gels instead of screw-on filters?
Comment: @inkista Caleb is right, as well as because I am in theatre and have tons on hand.
Answer: Look at gel filter holders made by Lee.
http://www.leefilters.com/index.php/camera-directory/camera-dir-list/category/gelsnap-filter-holder
Answer: You could go the DIY route very inexpensively. In solar photography, a common solar filter is a mylar film, similar in thickness and flexibility to filter gels. Many people create their own solar filter holders. Examples to give you some ideas:

$10 DIY Solar Filter for DSLR Camera
The author cut up a cardboard folder into two 4" × 4" squares and a cylindrical tube that slides over the lens. Both of the 4" squares had a hole cut in the center of them matching the diameter of the cylinder, and one of the squares was glued to the tube. He sandwiched the thin film filter between the two squares, using clear (Scotch) tape to hold the squares together.
Mounting a thin film solar filter
This author's design has the benefit of stacking very flat when not in use. He used several pieces of 5mm thick foam core board (polystyrene foam board sandwiched between sheets of stout paper). He created a mounting flange by stacking and gluing two small squares a couple centimeters larger than the lens's outer diameter, and an additional larger sheet of about 4" square or more. A hole the size of the lens diameter is cut into the stack. He uses a rubber band on the end of the lens to provide a friction fit for the flange to slide over. An additional 2 large squares, with a large hole cut in each of them, are used to sandwich the filter sheet, held together with double-sided tape. The mounted filter is held to the large square on the flange with binder clips.
Note: This is the method he uses for telescope filters. To mount a thin film filter to a camera lens, he still mounts the filter between 2 sheets of foamcore board. But he attaches the filter to a Cokin square holder, which is mounted as normal to the lens. However, the telescope method will work for camera lenses as well.
How to make your own objective solar filter for your camera, telescope, spotting scope or binocular
This method, from AstroSolar.com, is basically the same as the first method: using stiff cardboard, make a cylindrical sleeve to slide over the lens. Attach a large flange sheet of cardboard to the cylinder, and use another sheet of cardboard to sandwich the filter film between it and the flange.

Personally, I would probably use a step-up ring to match my largest lens filter thread, stepping up a large amount. I would glue thick sturdy card stock or foam core board to the step-up ring to make a mounting flange, and use the technique of sandwiching the filter film between 2 squares of card stock or foamcore board, and use binder clips to attach the mounted filter to the flange board.
Comment: I think this answer could be improved by including the major concepts from the links to maintain its usefulness even in case of link rot.
Comment: @null: I *think* I addressed your comment. I'd like to go back and add some diagrams, but I am positively *crap* with even MS Paint.

Do lens gel holders exist?


Does The Earth appear to orbit the ISS from its point of view?

Question: Does the International Space Station orbit the Earth with one side constantly facing the Earth? Or does it look more like the Earth is orbiting the ISS from its perspective?
Answer: Yes.  Under any normal operating mode today, the station rotates at the rate of once per orbit so that a particular part of the station always points at the earth.  This is almost identical to the way the moon orbits the earth.
But this is not something that has to happen.  During assembly, there were times when the station did not rotate.  So if there were an observer on the station, they would see the earth move all the way around the station.
This ISS attitudes page from NASA has some animations of these attitudes.
Answer: Once it goes into orbit, it will remain in the same attitude, what I mean is the cupola the astronauts  look out of always looks "down," was far as  I know. I don't think the ISS  has any spin, so it should stay in the same position.

The International Space Station orbits about 354 kilometers (220 miles) above the Earth and travels at approximately  27,700 km/hr (17,211 mph), so it takes about 92 minutes to circle the Earth once. For this reason, every 45 minutes the astronauts on-board see a sunrise or a sunset, with a total of 15 – 16 of each every 24 hours.

Actually, if the astronauts see the maximum number of sunrises possible, then it must effectively point down, but I will try to answer James's point about a slight spin if I can find an orbital illustration.
I would imagine, no matter what their physical senses say, the astronauts will see the earth as if from a very high flying plane, which some, or most , are used to anyway.
It would take a large amount of fuel to move the ISS, and to kill the AM, so the loading craft would do as much of the manoeuvring as possible.
ISS Manoeuvres

No more million-dollar maneuvers. When the space station must rotate for operations such as docking of resupply vehicles, it uses thrusters that run on propellant costing nearly $10,000 per pound. This demonstration successfully rotated the station 90 and 180 degrees without propellant, saving more than 1 million dollars worth of propellant on the 180-degree maneuver. The new technology uses gyroscopes, or spinning momentum-storage devices powered by solar energy, to maneuver along special attitude trajectories. It will substantially reduce propellant use and contamination of solar arrays and loads. With this technology, long-duration space exploration missions can carry less propellant and more provisions.
Comment: I was under the impression that if the ISS didn't rotate constantly, it would actually not stay in the same orientation relative to Earth, and so it has a slight spin to keep it seemingly static?
Comment: That is the impression I got as well, that if you make a time-lapse video looking out the window you see the whole Earth seemingly "turning before your eyes". But this would only be possible if the ISS were to constantly be turning as well, right?
Comment: That is a magnificent picture. To use that as the example, while looking out that window will an astronaut always see the Earth?
Comment: I would say yes, afaik the astronauts definitely asked for it to be put it,  (cabin fever) even though it's possibly a safety hazard, and I know the Apollo astronauts nearly had fights over looking out the tiny, dirty, little windows they had. I think that cupola always points down,  but I know they can see straight out as well, not sure about straight up though. The main proviso is to keep the solar panels as effective as possible, plus don't use fuel you don't need to in needless rotations.
Comment: @JamesThorpe You could be correct, nothing immediate jumps ups out at me from Google and possibly it has slight spin  for both solar panels and observing instruments effectiveness . I will update the answer if  I find anything


How to use Ordinary Least Square (OLS) & Geographically Weighted Regression (GWR)?

Question: I have managed to join the data set(xl. file) with a shapefile. I want to run these models, OLS and GWR in Arcmap, my problem is, I'm bit confuse about these fields, "Input Feature Class", "Output Feature Class", and "Input Features"?, what do I need to do in order to achieve this task?
Comment: Would you be able to edit your Question so that it provides a lot more details about what you have researched/tried and where you are stuck, please?
Answer: This is clearly defined and explained in the Help.
ArcGIS 10.2 GWR Help
ArcGIS 10.2 OLS Help


Auxiliary input status and Auxiliary input / output supported OBD2 PID

Question: I want to know what does Auxiliary input status (PID 1E) and Auxiliary input / output supported (PID 65) OBD2 PID mean. Do they tell me whether my car is in the Aux mode (while I am listening to the radio)?
Case 1: I am sitting in the car, listening to the radio. Key is in the Aux mode. Will I get any readings on hitting these PIDs?
Case 2: I am driving my car, listening to the radio. Will I get any readings now? Key is not in Aux mode now obviously.
Answer: From the Wikipedia page on OBD-II PIDs. PID 1E designates if the Power Transfer Output (PTO) is active or not. PID 65 is the sister PID to 1E designating if 1E means anything, supported or not.
A PTO is a device that attaches to an engine/transmission that does other work besides driving the vehicle forward. For example a dump truck commonly had a hydraulic pump that engages with a lever on the transmission to drive the hydraulic ram for the dump bed. Another example is that bucket trucks sometimes called cherry pickers will have a hydraulic pump in the belts of the engine to operate the bucket.
Comment: vini_i Is there any PID/ alternate way to detect if car is in Aux mode. (Not car manufacturer specific)
Comment: @SoumyaSen Not that i'm aware of. Generic OBD was only meant to give emissions and control system related PIDs. These were given for the purposes of diagnosing and repairing vehicles. In this scenario the computer does not need to know the position of the ignition switch.


What is a recommended approach on Power BI designer files management

Question: We are a team of several people. We all build queries and generate reports which we later publish to app.powerbi.com.
We are looking for the best approach to collaborate with each other. There could be some shared queries, we need to see and modify each others reports and data.
What is the recommended approach? Should there be just one common pbix file or multiple? Should there be some common shared folder in the network?
Answer: Using a network share (a shared folder, SharePoint, OneDrive, Dropbox) is advised. The biggest issue is with query sources that look at the file system. Recommend you factor your queries so they have a single Source query that you can modify if it's machine specific, then use the 'reference' feature in the query view to reference that for any derivative queries. For common data, you can use a shared onedrive folder (if you're using files).  When you upload your reports to PowerBI.com, create a group and ensure your team members are in the group.  HTH.
Answer: pbix files are not really designed for shared development so use some sort of version control system.   This will allow you to save your changes regularly so that if someone else picks up the file to work on it will be up to date.   The VC allows you to easily roll back if need be so you don't have to be shy about committing changes.   Inevitably you will end up treading on each others toes at some point but VC will help in sorting things out.
Dropbox is a good shared folder for teams and easy to setup.   For a free alternative you could use gitHub although that is a little more difficult to use.
Personally, as a Visual Studio user I save my Power BI files under a solution folder so that it is in the same place as related database scripts, app code etc.   Visual Studio detects any changes made to the file and then version controls via Team Services.


Decomposition group of a prime ideal and root of polynomials

Question: Let $f(x)$ be a monic irreducible polynomial with integer coefficient.
Let $K$ be the splitting field of $f$ and $\alpha$ one of its roots.
Let $p$ a prime number such that $p$ does not divide $disc(f)$ and suppose that $f$ has a root mod $p$. Then there exists a prime $P$ of $K$ over $p$ such that the decomposition group $G(P)\leq G(K|Q)$ is contained in $G(K|Q(\alpha))$.
Why this is true?
Comment: Since $K$ is a field the only (prime) ideals are the zero ideal and $K$ itself. Maybe you meant $P$ to be a prime ideal of the ring of integers of $K$, or a prime ideal of the ring of integers of $\Bbb{Q}(\alpha)$?
Comment: @Nimda, I may be wrong, but I believe that it is "standard" abuse of language to refer to non-zero prime ideals of the ring of integers of $K$ as "primes of $K$". What else could it mean?
Comment: I think that this is because the existence of that zero of $f$ modulo $p$ implies that at the level of $\Bbb{Q}(\alpha)$ there will be (at least) one prime ideal $\mathfrak{p}$ above $p$ such that $f(\mathfrak{p}|p)=1$. Then any prime of $K$ lying above $\mathfrak{p}$ should have this property, because $f$ is multiplicative in a tower of extensions.
Comment: I am confused (I'm new to this subject) because of the following example. Take $\alpha$ a root of $f=x^3-3$. Then $(5)$ is the product of $(5, \alpha+3)$ and $(5, \alpha^2+2\alpha-1)$ with norms $5$ and $25$ respectively.
Comment: @Marbor: If there are five prime ideals, each with decomposition group of order two, then $\Bbb{Q}(\alpha)$ cannot be the splitting field, because it is a degree five extension (assuming that $f$ is irreducible).
Comment: @Marbor Except if I'm wrong in your example $f=(\alpha-1)(\alpha^2 +1)(\alpha^2-\alpha-1)\pmod 3$. Giving rise to three prime ideals with norm $3$,$9$ and $9$. Moreover, modulo an error of mine, the Galois Goup of K over $\Bbb{Q}$ is the dihedral group of degree 10.
Answer: $F$ is a separable extension of $Q$. Take $p$ relatively prime with
the conductor of $Z[\alpha]$, that is the ideal $\{y \in O_F \ |
\ y O_F\subseteq Z[\alpha]\}$. Notice that this ideal measure how
far $Z[\alpha]$ is from $O_F$ (that is not monogenic in general).
Then by Neukirch, Jürgen, Algebraic Number Theory, pag. 47, we have
that, since $f$ has a root $\bmod p$ and then a linear factor, there
is a prime $\mathcal{P}$ over $p$ in $F$ such that ${\rm
f}(\mathcal{P}|p)=1$. Thus, for any $\mathfrak{p}$ over
$\mathcal{P}$ in $K$, we have
$f(\mathfrak{p}|p)=f(\mathfrak{p}|\mathcal{P})$.
If $p$ does not divide the discriminant of $K$, then $p$ doesn't
ramify, so that $e(\mathfrak{p}|p)=1$. Then
$e(\mathfrak{p}|\mathcal{P})=1$.
Now, since $K$ is Galois both over $F$ and $Q$, the order of the
decomposition group
$$\# D_{K|F}(\mathfrak{p})=e(\mathfrak{p}|\mathcal{P})f(\mathfrak{p}|\mathcal{P})=f(\mathfrak{p}|\mathcal{P})=f(\mathfrak{p}|p)=e(\mathfrak{p}|p)f(\mathfrak{p}|p)
=\# D_{K|Q}(\mathfrak{p})$$ and then
$$ D_{K|Q}(\mathfrak{p})=D_{K|F}(\mathfrak{p}) \leq G(K|F).$$
The only problem is now to prove that if $p$ does not divide
$disc(f)$ then it is relatively prime with the conductor of
$Z[\alpha]$ and does not divide the discriminant of $K$.
For this see Lang, Algebraic Number Theory, III.3.
Comment: @JyrkiLahtonen thanks for the hint. Here is my answer. Is it correct?


Is visa required to travel to Switzerland on a soon-expiring Ukrainian Passport with Spanish Residence Card?

Question: We are travelling from 16-19 June and one of us is a Ukrainian citizen, whose Ukrainian passport expires on 14 September of the same year (2015). She also has a Spanish Student Card and Residence Card that doesn't expire until Sept 2016.  Does she need a visa?  Or to renew her passport before we travel?
Comment: You are travelling where? From Spain to Switzerland and back? Or are you leaving and/or entering the Schengen area?
Answer: Your friend does not need a visa to enter Switzerland, thanks to her Spanish residence card. I am not even sure she could get one and it would not help the passport issue.
If crossing an external border, then the passport expiration date could be a problem. The Schengen Borders Code now requires from third-country nationals that

(a) they are in possession of a valid travel document entitling the holder to cross the border satisfying the following criteria:
(i) its validity shall extend at least three months after the intended date of departure from the territory of the Member States. In a justified case of emergency, this obligation may be waived;
(ii) it shall have been issued within the previous 10 years;

But the same article further provides that

third-country nationals who do not fulfil all the conditions laid down in paragraph 1 but who hold a residence permit or a long-stay visa shall be authorised to enter the territory of the other Member States for transit purposes so that they may reach the territory of the Member State which issued the residence permit or the long-stay visa.

So in principle, a passport valid until at least September 19th should be required to cross an external border but that requirement can be waived and residence permit holders should still be at least authorised to return to their country of residence (i.e. not detained and removed). So it's not a very firm requirement and I am guessing border guards might therefore turn a blind eye for a couple of days.
For internal borders (e.g. travelling directly from Spain to Switzerland without leaving the Schengen area), I don't see how the passport's validity can be an issue. Most of the time, you shouldn't have to go through a formal passport check and even if there is one, it would not be a "thorough" external border check so the rules I just mentioned do not apply. And your student has both a valid ID and a valid title to be in the Schengen area.
Still, if at all possible, renewing her passport would seem like a good idea.
Comment: Schengen residents only need a valid passport, including at the external border, period. It's even clearly stated in TIMATIC
Comment: @Crazydre Only if they are going to their country of residence, the Borders Code is clear about that (unless it changed since I wrote the answer as it was updated in 2016). In practice, it's unlikely to be an issue, as I explained. I don't really care whether TIMATIC is accurate or not.


Estimated bandwidth for KDE does not allow to cluster data

Question: I wanted to cluster one-dimentional data with kernel density estimation. I tried to count the optimal bandwidth with Silverman's rule of thumb and also using cross-validation. However, the obtained bandwidths are large, and KDE returns only one cluster of data. Is there a method that will force to estimate the bandwidth which will cluster the data?
Answer: You can set the bandwidth to whatever value you like. You could start at the bandwidth suggested by Silverman's rule, decrease it until you find the number of clusters you think there should be, and make clear when you're reporting your results that that's what you did.


in small signal analysis why only ac currents and voltages are used for calculation of resistance

Question: small signal analysis of bjt
in small signal analysis why only ac currents and voltages are used for calculation of resistance and why bias voltage along with ac signal is not taken into account?
Comment: Because the AC stuff **is** the signal.
Answer: As a result from small-signal analyses we get the gain of a stage and - if desired - the input and output impedances of the circuit. All these parameters depend on the small-signal voltages and currents only. This is because they are derived from linearizing the relevant (non-linear) characteristic curves around the selected bias point.
However, the VALUES of the small-signal voltages and currents depend on the selected bias points on the non-linear DC characteristic curves. This is because they are identical to the SLOPE of the curves at the bias point.
Insofar, all DC voltages and currents are, of course, taken into account (but only indirectly, because they do not appear in the small-signal equivalent diagrams).
Answer: Bias voltages and currents are constant, and therefore not relevant to AC analysis. In the small signal equivalent circuit they are replaced by their respective output impedances.


How To Edit The Minecraft servers.dat File

Question: I was looking through my .minecraft folder on Windows 10, and I decided I wanted to edit the servers.dat file. The reasons behind this are very complex, so I wont explain anything other than the fact that I need to open that file. I tried using NBT editor and researched the internet, but there doesn't seem to be any way to open that file. NBT editor only gives me an error saying this:
<code>Error while opening File "C:\Users\<my_user_name>\AppData\Roaming\.minecraft\servers.dat":
Not in GZIP format
</code>
I am assuming this means that the data structure is wrong, and there is no way to access it with NBT editor. Does anyone know what the best way to open this file would be?
Answer: NBTExplorer opens my servers.dat file just fine.


How to Change Colors of Node Terminal Output?

Question: When I run a node template with cargo run -r -- --dev I get a whole bunch of debug info in the terminal.
Is it possible to change colors of some words (phrases) in the terminal output? For example: color of best and finalized blocks.
Answer: TL;DR: see https://stackoverflow.com/questions/4267400/colour-highlighting-output-based-on-regex-in-shell
It is quite likely you just want to highlight within the terminal when operating.
I you want to build this into your node's logic, read on.
To start, the log crate is used in AFAIK all places stdout/stderr logging is enabled in Substrate. Substrate provides a minimal Wasm ready logger implementation: runtime_logger that is used in the runtime API described here.
But the meat of your question relates to the logging crates, specifically EventFormat.enable_color and the associated logic that stems from it. See the /client/tracing/src/logging/* implementation in Substrate for trace-level logging color schmeme.
For a custom logger that had such nuanced coloring built in, IIUC you would need to implement this are replace the present logic. Perhaps as stated to start, you simply want to highlight keywords rather than chage logic o the node.


How does softmax work for vectors?

Question: In skipgram we predict the context words. That is the output layer before applying the softmax function is a number $V$ of words, where $V$ is the dictionary size. But each word is represented as a vector. So we have $V$ vectors in the output layer. And now we want to apply softmax to those vectors to get a vector of dimensionality $V$, where each component represents the probability of a word appearing with an input word. But how do we apply the softmax function to vectors? By definition the softmax function takes as input a single vector, but we have $V$ vectors each of a chosen dimensionality $N$.
Answer: I think there are some misunderstandings or, at least, some not-clear-naming problems in your question.
To train skipgram word embeddings, we take text data and, for each word, we try to predict the words in a window around it.

Each word is represented by an embedded vector of dimensionality $E$. In the embedding table, there are $V$ embedded vectors; each vector represents a word from the vocabulary, which is the list of $V$ words that will be supported by our embeddings. To create the vocabulary word list, usually, we select the $V$ most frequent words in our training data.
Our training data here are pairs of input word index and output word index, where output word index is one of the words in the context window of the input word. For each context window, we have multiple input-output entries in our training data.
The model to train the embeddings is just a matrix multiplication. We multiply the input embedding by a $E \times V$ matrix, obtaining a vector of dimensionality $V$. We then compute the softmax over this vector $V$ and then the negative log-likelihood loss.
Note that the softmax takes as input the vector of dimensionality $V$ and generates a vector of dimensionality $V$ with the probability distribution over the vocabulary words. In reality, softmax takes a batch of those vectors, but the softmax function is computed on each vector separately.
For reference, the original articles proposing the word2vec skipgram approach are Efficient Estimation of Word Representations in Vector Space and Distributed Representations of Words and Phrases and their Compositionality
.
Comment: Hmm... I am confused. "Each word is represented by an embedded vector of dimensionality ". I thought the whole purpose of skipgram is to find an embedded vector of each word? I though the input is a one hot encoding of a word, the hidden layer is a vector of dimensionality of the embedded vector and then the output is a list of vectors as seen in the picture I added
Comment: One-hot encoding + matrix multiplication is an equivalent but suboptimal way of implementing an embedding layer.

How does softmax work for vectors?


Can I use CPVC to make a solar water heaer?

Question: I have a shed in my backyard and I have installed a sink on the outside to clean up with.  I have run a cold water line to the sink, but would like to attach a "heated" line to the hot water side.  I have found a few projects on YOUTUBE about making a solar water heater and they used "black tubing", but never said what kind of black tubing. I know CPVC is used inside of building for hot and cold water applications, but will it withstand direct sunlight. Also know it will be painted black to help heat the water.  Thank you for any advice in advance.
Answer: Sunlight resistance is not a problem if you're going to be painting it anyway.
The real problem is temperature. You're not clear as to how you intend to design the system, but, unless you take specific measures to prevent overheating (e.g. by having a pump that turns on and flushes pipes periodically), pipes can get very hot. Solar heaters are traditionally copper, which can handle boiling water just fine. On the other hand, CPVC is only rated up to about 200 F. Maximum temperature varies depending on pressure and pipe dimensions, but, generally speaking, at 200 F, CPVC piping is barely strong enough to withstand normal water-main pressure. ("Hot water" inside your house is rarely hotter than 140 F.) Other plastics are as bad or even worse (e.g. ABS and PVC are both rated for lower temps than CPVC and PEX).
The link in the other answer suggests that PEX might handle 230 F, but it depends on your system (I don't see any pipe dimensions there).
Answer: Black tubing is ABS. ABS is used for waste lines and not potable water supply lines. PEX is best and easiest to use for potable water supply lines. Copper is best to use for exposed solar lines because the metal will absorb the solar heat quickly and efficiently, but can be costly.
Here's a link on PEX used for solar tubing...  http://www.builditsolar.com/Experimental/PEXCollector/PEXCollector.htm
Comment: Be prepared for periodic tubing replacement being one of your standard maintenance items unless the collector is designed to protect the tubing from direct sunlight (as in the example). PEX isn't known for its ultraviolet breakdown resistance.
Comment: Fiasco Labs your incorrect based on the Plastic Pipe Institute. Industry Standards for PEX Systems - ASTM F2657 - UV resistance test method for PEX pipes.  https://plasticpipe.org/pdf/pex-plumbing-presentation-01-17-2011.pdf
Comment: Heh, test method which is for maximum amount of exposure permitted, ie storage in direct sunlight allowed before installation => •
ASTM F876 has four categories for UV resistance, as part of the
Material Designation Code:
• 0:
Not tested or not rated
• 1:
1 month
• 2:
3 months
• 3:
6 months
Additional UV designations are also proposed at ASTM
•  Each PEX pipe manufacturer publishes a maximum recommended
UV exposure limit, based on the UV resistance of the pipe when tested in accordance with ASTM F2657
Answer: Of all the normal plumbing materials, by far copper has the best heat exchange characteristics.
I would spend the money on the copper tubing for the collector itself. It will pay for itself with the difference in the amount of heat collected.
After that, you can pipe to and from the collector with PEX or CPVC if you like. The supply and return lines will have to be thoroughly insulated. Here is where PEX will actually help by having a lower heat coefficient and not lose as much heat going to and from the exchanger.
If the unit overheats from lack of water flow, the superheated water can blow the PEX lines. Check Mother Earth News, and Home Power for articles on DIY solar water heaters. Lots of great reading there.
Sounds like a fun project.
Good,luck!
Comment: Lots of information about home built solar heating on builditsolar.com too. My favorite design has a heat storage tank that is open to atmospheric pressure. A pump circulates water from the tank to the collector to gather heat (with proper design, all water drains back to the tank when the pump is off). For hot water, run pressurized water through a heat exchanger in the heat storage tank. It is a good idea to have a valve to mix the hot water coming out of the tank with cold water to get a more consistent output temperature.
Answer: I converted a passive system with a tank above the collector panel to an active system using my immersion heater as the tank, which was situated in the loft below the panel, after the tank started to leak.  This worked fine except for the tubing.  Some of it was CPVC (1/2")and some was black flexible "rubber" tubing. The CPVC did not stand up to the heat and burst at one stage, giving a damaging flood downstairs. The black flexible tubing did not fare well either, especially at the outlet from the panel where temperatures often exceeded 100C (212F). A little Chinese-made pump, also made of some type of plastic, rated for boiling water, has been fine.  However the PVC on the inlet to the immersion heater started to bulge, and a valve became stuck, due to hot water expanding back into the supply.  I changed all the pipework around the tank for galvanised and replaced the flexible tube to the panel.  The flexible tube has started deteriorating already after a year or so.  I also put in a non-return valve on the supply side and a pressure relief valve on the panel, but these have introduced their own problems.  The pressure relief valve tended to leak, despite being an expensive brass one.  As a result I kept on tightening it and so set the pressure too high. That meant that the pressure built up (because of the non-return valve) and blew out a connection to the rubber tube, luckily above the roof.  I now wish that I had gone for copper throughout.  It would have beena a lot less trouble and work, even if it would have been more expensive. CPVC and especially PVC, and even the black "rubber" tube can't stand the high temperatures.  If there is flexible tube that will stand the heat and is cheaper than copper, I should like to hear about it.
Comment: It's really hard to parse that massive wall of text, but I don't think it actually answers the question. If you'll please take the [tour] and read through the [help], especially on answering questions, you'll see that this is a Q&A site, not a "general discussion" forum. While your experience is very valuable, we like clear, concise answers whenever possible, and the experience will go well to support your claimed answer.