How to properly estimate a Schwartz function

Question: For every Schwartz function $\varphi \in S(\mathbb{R}^{n})$ there exists a constant $c_{\beta, k}$ such that one can estimate the Schwartz function by $$|\partial^{\beta}\varphi(x)| \leq \frac{c_{\beta, k}}{(1 + |x|^{2})^{k}} , $$ where $\beta \in \mathbb{N^{n}}$ is a multi-index and $k \in \mathbb{N}$. However, when one is dealing with tempered distributions and one wants to show that such a distribution is continuous one often chooses to estimate the test function - let's call it $\phi \in S(\mathbb{R}^{n})$ - as follows: $$|\phi(x)| \leq C_{M, n}\frac{\sum_{|\alpha| \leq2M}  \left\lVert \phi\right\rVert_{\alpha,0}}{(1 + \left\lVert x\right\rVert^{2})^{M}} ,  $$ where $\left\lVert \phi\right\rVert_{\alpha,\beta} = \sup_{x \in \mathbb{R^{n}}}|x^{\alpha}\partial^{\beta}\phi(x)|$ is the "Alpha-Beta" norm of the Schwartz space and $\alpha, \beta$ are multi-indices, $M \in \mathbb{N}$ is arbitrary and the constant $C_{M,n} > 0$ is chosen such that the estimate holds ($n$ is the dimension of the Schwartz space). How come the numerator of the second inequality contains a summation over certain norms? I don't understand why one can't simply use the estimation that only involves one constant in the numerator, such as in the first inequality. It isn't either clear to me why the summation is only carried out as long as $|\alpha| \leq 2M$.
Answer: Observe
\begin{align}
\left|(1+|x|^2)^M\phi(x)\right| \leq&\ \left|(1+M|x|^2+\ldots+|x|^{2M})\phi(x) \right|\\
\leq&\ |\phi(x)|+M|x|^2|\phi(x)|+\ldots +|x|^{2M}|\phi(x)|.
\end{align}
Next, note that
\begin{align}
|x|^k|\phi(x)|
\leq&\ C_n\sum_{|\alpha|=k}|x^\alpha \phi(x)|.
\end{align}
Finally, it follows
\begin{align}
|\phi(x)|+M|x|^2|\phi(x)|+\ldots +|x|^{2M}|\phi(x)| \leq C_{M, n}\sum_{k\leq 2M}\sum_{|\alpha|=k}|x^\alpha\phi(x)|.
\end{align}
Answer: Depends what one is trying to do. If you have a candidate for a temperate distribution say $T(\phi)=\int f(x)\phi(x) d^n x$ and you want to show it is indeed a distribution you have to establish continuity, i.e., an inequality of the form $|T(\phi)|\le C \rho(\phi)$ where $\rho$ is a continuous seminorm on Schwartz space, for example the numerator of the 2nd inequality. One would typically use this 2nd inequality to bound $|\phi(x)|$ in the integral, whereas $M$ would have to be chosen large enough so $\int |f(x)|(1+|x|^2)^{-M}d^nx\ <\infty$ which will give you the constant $C$ in the continuity statement.


Unexpected LSTM layer output in PyBrain

Question: I am using an LSTM layer to multiplex among several memory cells. That said, having several input options, I want to feed only one of them to the hidden layer. I arranged the input to LSTM in such a way, so it would select an apropriate cell based on the input_gate, forget_gate, and output_gate I pass to it in addition to the cell_input.
However, it seems that the LSTM layer transforms the values of the memory cells, while I would expect it to pass them to the output as-is.
For example, I am passing the following input, which I printed in groups corresponding to input_gate, forget_gate, cell_input, and output_gate for convenience:
ig: [ 0.  1.  0.  0.  0.  0.]
fg: [ 0.  0.  0.  0.  0.  0.]
ci: [ 0.5  0.5  0.5  0.5  0.5  0. ]
og: [ 1.  1.  0.  0.  0.  1.]

I want the LSTM layer to only pass ci[0], ci[1], and ci[5] to the output as the og group indicates.
However, what I see in the output buffer is different:
LSTM out: [ 0.16597414  0.23799096  0.1135163   0.1135163   0.1135163   0.]

While not absolutely meaningless to me (the 0-th and 1-th entries are slightly greater than the rest) this output is not the [.5 .5 0. 0. 0.] that I expected.
From what I learned about LSTM, it doesn't seem that there is any transition function from the memory cells to the actual output.
Answer: Silly question, of course: the output is clamped by a sigmoid.

Unexpected LSTM layer output in PyBrain


Can I always assume that fixed time step in Unity is reliable?

Question: I was thinking about games on low end machines or phones where the CPU would be limited. If I were to move all of my game logic into FixedUpdate() can I assume that it will always be called with the same time delta? Or would it still be worth adding code to make it take the actual time delta into account?
Comment: It's worth noting that FixedUpdate is "fixed" with regard to the simulation time represented by each step, not with regard to realtime. There's a common misconception that FixedUpdate is called on a regular timer, when in fact it runs at the beginning of each frame and loops back-to-back some number of times to catch up to the current game time. So, reliability with regard to simulation consistency, and reliability with regard to realtime event sequence are distinct questions. If I understand correctly, you're asking about the former - how much game time is simulated in each fixed step, yes?
Answer: I've done some tests simulating low framerate conditions, and empirically confirmed that the deltaTime value for each FixedUpdate step does indeed stay consistent.
For example, using the default Fixed TimeStep of 0.02 (50 Hz) and Maximum Allowed Timestep of 0.3333333 (as set in Edit -> Project Settings -> Time)...

At 60 fps we get 0-1 physics & FixedUpdate steps per frame
At 30 fps we get 1-2 physics & FixedUpdate steps per frame
At 15 fps we get 3-4 physics & FixedUpdate steps per frame
At 3 fps we get 16-17 physics & FixedUpdate steps per frame,
and we hit the max allowed timestep
For any lower framerate, Unity clamps the real time elapsed to 0.33333, so we continue to get just 17 physics & FixedUpdate steps per frame

Throughout the whole spectrum, every call to FixedUpdate gets the same deltaTime value of 0.02. The variability in timing is handled solely by running more or fewer iterations, not by scaling the deltaTime value - exactly as we should expect for a "fixed" timestep.
As shown above, when the framerate is extremely low, Unity will limit the amount of time by which it advances the game simulation, capping at 17 FixedUpdate iterations with the default settings.
So, if you want to know that the game time represented by each FixedUpdate iteration remains the same, the answer is yes (as long as you don't assign a new value to Time.fixedDeltaTime directly)
If you want to know whether the realtime interval represented by each FixedUpdate iteration remains the same, the answer is no - at extremely low framerates, Unity will cap the number of FixedUpdate steps, allowing game time to run slower than realtime. Also, as noted in a comment above, all the physics steps and FixedUpdates for a given frame occur back-to-back at the beginning of the frame's execution, not evenly distributed in realtime like a metronome.

In doing this test, I learned some interesting things about how Unity handles Time.timeScale:

Slowing/speeding game time with timeScale does not modify the deltaTime of each call to FixedUpdate - you'll just get fewer or more steps in a given frame, again as we should expect from a fixed timestep.
If you want to increase physics time resolution when running in slowmo, modify Time.fixedDeltaTime when going in & out of the time warp.
The enforcement of Maximum Allowed Timestep occurs before multiplying by timeScale. So if I use Time.timeScale = 0.5f to slow the game by half, the maximum deltaTime I'll see in Update will be 0.16666666 instead of 0.33333333
Comment: Oh wow. I thought that the update was simply called after the physics step but this appears to show that it is much more involved than that! Thanks for the testing. How did you slow down the frame rate in the tests? just some arbitrary calculation I assume (`while(not X amount of time has passed)` or something like that)?
Comment: I used `System.Threading.Thread.Sleep` in an Update method to increase the time the main thread takes to complete each frame. :)
Answer: So a few years later I stumble upon this article johnaustin.io where someone has an answer to something very similar to what I was wondering about.

Is FixedUpdate always called every 0.02 seconds?
No, FixedUpdate will run once for every 0.02 game-time seconds, but precisely when in real time this happens is unspecified and can vary drastically. See above: "A Heavy Load in FixedUpdate".
How does the Unity timestep respond to low framerates?
Depending on the source of the slowness, it will do different things. For slow >FixedUpdates, it slows down the overall game-time (the game will run for 0.5 seconds in the span of one real time second). In some cases, the rendering rate can be drastically cut, even if the problem is your FixedUpdate speed.
For slow Updates, FixedUpdates get crunched together during the "catch up" phase between the longer Updates. Otherwise, generally the the Update dynamic timestep just gets longer.

It's a really good read and worth checking out the article to get more information about the fixed update cycle.


meaning of "a barber"

Question:
He goes to a barber downtown. (Merriam-Webster's)

Does a barber mean a person or a shop?
Answer: It could refer to either a person or a shop, but probably a person. However, nearly all barbers work in barber shops. So, in effect, the person is going to go to a barber (person) who works in a barber shop (place) that is located downtown.
Answer: Well the dictionary indicates a barber is a person, not a shop. Should I infer that you doubt the definition in dictionary? The term for the place is "barber shop" or "barber's shop". But yes, the implicit meaning is that he goes to a barber shop; this is accentuated by the lack of otherwise specification and by the presence of the article "a". In the same way, when you say "I go to the dentist" usually means I go to the dentist's office.
Comment: Perhaps "figurative" is a better word than "implicit" meaning
Comment: True for barber, perhaps, but there are more ambiguous examples, like, "I'm taking my car to the dealer," where _dealer_ refers to the owner or manager, but the speaker probably means "to the dealership."

meaning of "a barber"


reducing input voltage to motor

Question: I have a hypothetical question about running a DC motor on lower voltage than it is designed for.  Lets say I have a 2hp 100VDC (yes, Direct Current) motor that I want run on 12 VDC. The motor is 2hp = ~1500 Watts, so I'd have to supply 125 Amps at 12 VDC.  This would require some big wires, and result in some efficiency and heat losses. Would it burn out the wires in the windings of the motor?  Would that be entirely dependent on the load?  Would the motor turn at a lower speed? Lets say the rated speed of the motor is 4400rpm, what would the speed be with a 12VDC input?
Comment: The motors would run slowly, if at all.  Furthermore, they may indeed burn out.
Answer: If the rated speed at 100v is 4400rpm, then the nominal speed at 12v would be 4400*12/100 = 528rpm. In practice, it might be a little quicker or slower than that, depending on how the losses vary with speed.
The rated current at full power is 1500W/100v = 15Amps. It is this current that heats your windings.
With a motor that large, it's possible you could get 15A or more to flow through the windings with 12v applied. However, if the motor is self-cooled by a fan on the shaft, or simply by stirring air around in the casing, then the cooling air available would be much less than at rated speed, so you would have to reduce the current significantly below 15A to avoid the risk of it overheating.
If the motor has a cooling duct driven by a separate fan, and if you can run this cooling fan at full speed, you can cool it properly and it should be safe up to 15Amps.
Comment: Just in case it is not obvious, at 12 volt, the rated power will be something less (depending on cooling) than 2 Hp X 12/100 = 0.24 Hp.
Comment: OK, that's helpful. Some followup questions:So the motor and its windings are designed to handle 15 amps and, regardless of the voltage input, if I run it at higher amperage I am heating the components more 6than they are designed for, correct?
Comment: more questions: I know that the amps that the motor will draw will increase as i add more load to the motor output shaft, but if I run it with no load (other than the friction of the bearings and whatever fan it has) at 100VDC, is it pulling the full 15A while it is sitting there spinning at 4400rpm?  If I run it on 12VDC, and its spinning at 528rpm, how many amps is it pulling (again, with no significant load).
Comment: I am trying to understand the relationships between voltage, load, current, and angular velocity.
Comment: In the simplest terms, Voltage = Speed, Current = Torque.  If you have little or no load, there is a very low torque requirement to maintain a speed (at any voltage).  DC Motors operate in a constant torque mode (they can deliver full rated torque, but only if loaded) from 0RPM up to their rated base speed.  Going above base speed, say with field weakening, they transition to a constant horsepower operation.

reducing input voltage to motor


stateless protocol and stateful protocol

Question: How to understand stateless protocol and stateful protocol? HTTP is a stateless protocol and FTP is a stateful protocol. For the web applications requiring a lot of interactions, the underlying protocol should be stateful ones. Is my understanding right?
Answer: HTTP is a stateless protocol, in other word the server will forget everything related to client/browser state. Although web applications have made it virtually look like stateful.
A stateless protocol can be forced to behave as if it were stateful. This can be accomplished if the server sends the state to the client, and if the client to sends it back again to the server, every time.
There are three ways this may be accomplished in HTTP:
a) One is cookies, in which case the state is sent and returned in HTTP headers.
b) The second is URL extension, in which case the state is sent as part of the URL as request.
c) The third is "hidden form fields", in which the state is sent to the client as part of the response, and returned to the server as part of a form's hidden data
SCALABILITY AND HIGH AVAILABILITY
One of the major reasons why HTTP scales so well is its Statelessness. Stateless protocol eases the replication concerns, as the state itself doesn't need to be stored on the server.
Stateful protocols are logically heavy to implement in Internet reliably. Stateless servers are also easily scalable, while for stateful servers scalablity is problematic. Stateless request can be sent to any node, at any time, while with Stateful this is not a case.
HTTP as Stateless protocol increases availability for stateless web applications, which otherwise would be difficult or impossible to implement. If there is connection lost, there is no state that is lost, simple request resend will resolve the problem. Stateless requests are also cacheable.
see more here
Comment: "b) The second is URL extension, in which case the state is sent as part of the URL as response.". This is wrong, a URL not is a `response`, but a `request` from the client and can have URL parameters in case of `get` and then evaluated by the server. "c) The third is "hidden form fields", in which the state is sent to the client as part of the response, and returned to the server as part of a form's hidden data" also has to be changed/rewritten.
Answer: Since you're asking about a Web application, the protocol will always be stateless -- the protocol for the Web is http (or https), and that's all she wrote.
I think what you're thinking of is providing a state mechanism in your Web application itself. The typical approach to this is that you create a unique identifier for the user's session in your Web application (a sessionID of one form or another is the common practice) which is handed back and forth between browser and server. That's typically done in a cookie, though it can be done, with a bit more hassle for you depending on your platform/framework, on the URL as well.
Your server-side code stores stateful information (again, typically called the user's session) however it wants to using the sessionID to look it up. The http traffic simply hands back the sessionID. As long as that identifier is there, each http transaction is completely independent of all others, hence the protocol traffic itself is stateless.
Answer: HTTP is a stateless protocol. All the web-based applications are also stateless.
When a request is send to the server, a connection is established between client and server. The server receives the request, processes the request and sends back the response and then, the connection will be closed.
If another request will be sent, after that, it will be treated as a new request and a new connection will be established.
In order to make HTTP stateful, we use session management techniques.
So that, it uses the data coming from previous request while processing present request i.e, it uses the same connection for a series of client server interactions.
The session management techniques are:

hidden form field
cookie
session
URL-rewriting
Comment: `request scope`, `session scope` and `application scope` can also be used for session management
Answer: Anything that forgets whatever it did in past is stateless, such as http
Anything that can keep the history is statefull, such as database

Http is a stateless protocol, that's why it forgets the user information.
We make http as statefull protocol using jsonWebToken(JWT) i.e. on each request going to server, server will first verify the user using JWT.
Comment: nice explaination
Answer: Your question is spot on, and yes, it would be great if your web transactions with your bank were done over a stateful connection. Alas, HTTP is stateless due to a quirky bug in FTP and a 12 socket limit in the partial socket table in BSD of 1989. Marcus Ranum explained it all here.
So HTTP throws away the state it inherits from TCP and has to recreate state at the application layer in the form of cookies. Crappy internet security is the result.
The Seif project proposes to fix all that using "secure JSON over TCP". DNS and certificate authorities are not required. The protocol and seifnode.js are finished and on github with an MIT license.
Answer:
HTTP doesn't 'inherit' from TCP, but rather uses it for a transport. HTTP uses TCP for a stateful connection, but then disconnects. Later it will connect again, if needed. So, while you browse through a web site you create many different connections. Each one of those connections is stateful, but the conversation as a whole is not, since you are dropping the connection with every conversation.

From this link
Answer: Basically yes, but you have no choice but use HTTP which is where websites are served in. So you have to deal with compromises to make HTTP stateful, aka session management. Possibilities are basically passing on a session id through each call in the URL so you know when you're talking to someone you've talked about before, or via cookies, which achieve the same goal without cluttering the url. However, most modern web development languages take care of that for you; if you google for the language of your choice + "session management" you should get some ideas of how it's done.


What is the difference between setting the directive default-character-set under [client] as opposed to [mysqld]?

Question: Reference: https://stackoverflow.com/a/8690422/784637
Correct me if I'm wrong, but the best answer suggests a way to force everything being inputted into the database to be encoded in utf-8 and everything going out of the database to be encoded in utf-8.
What's the difference between the following two:
[client]
default-character-set=utf8

[mysqld]
default-character-set = utf8

Does the directive under [mysqld] force all the writes to the database to be encoded under a certain format and the directive under [client] force all of the output to be encoded in a certain format?
For example if the following two directives are set:
[client]
default-character-set=utf8

[mysqld]
default-character-set = utf8

and a there's a php string $var that is encoded in latin1, if that string is inserted into the database, it will be stored in the database as utf-8.  But if a select statement is performed to retrieve that value, it would be encoded in latin1.
Comment: Just realized the directive under the `[client]` indicates the character set the client will use to send SQL statements to the server.  It also specifies the character set that the server should use for sending results back to the client.  This is from http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
Answer: [client]
default-character-set=utf8

This option can force client programs to use specific character set.
This is normally unnecessary. However, when character_set_system differs from character_set_server or character_set_client, and you input characters manually (as database object identifiers, column values, or both), these may be displayed incorrectly in output from the client or the output itself may be formatted incorrectly. In such cases, starting the mysql client with --default-character-set=system_character_set—that is, setting the client character set to match the system character set—should fix the problem.
[mysqld]
default-character-set = utf8

MySQL Server has a server character set and a server collation. These can be set at server startup on the command line or in an option file and changed at runtime.
The server character set and collation are used as default values if the database character set and collation are not specified in CREATE DATABASE statements. They have no other purpose.
Conclusion: Client setting is at session level whenever client connects to server, server forces clients to use specific charset however this is not necessary.
Mysqld section charset indicates that server is configured to use particular charset by default however you can change charset at any level Database,Table and Column level you want.


Why "bu" in burial is pronounced as "be" in bed?

Question: Why "bu" in burial is not pronounced as "bu" in burrow? Is there a rule behind it, or it's just random?
Comment: Oh, in my accent it does rhyme with burrow...
Comment: @tchrist: For most Americans, the /ɛ/ vowel of DRESS and the /e/ of FACE are merged when they come before an /r/, and can be pronounced with either one, or something in between, depending on your dialect. I certainly pronounce *bury* with the vowel of DRESS. [Oxford American Dictionary](http://www.oxfordlearnersdictionaries.com/us/about/pronunciation_american_english) agrees with me (but they're based in England; what do they know?)
Comment: Note that for most Americans, *burial* does **not** have the /ɛ/ vowel of DRESS but rather the /e/ vowel of FACE.
Comment: Never make assumptions about English pronunciation. Someone will always prove you wrong.
Comment: [Here](http://english.stackexchange.com/q/31999/42179)'s a similar/related question for _busy_.
Answer:
Word History: Why does bury rhyme with berry and not with jury? The answer goes back to early English times. The late Old English form of the verb bury was byrgan, pronounced approximately (bür′yən). During Middle English times this (ü) sound changed, but with different results in different regions of England: to (o͝o) as in put in the Midlands, to (ĭ) as in pit in southern England, or to (ĕ) as in pet in southeast England. London is located in the East Midlands, but because of its central location and its status as the capital, its East Midlands dialect was influenced by southern (Saxon) and southeastern (Kentish) dialects. The normal East Midlands development of (ü) was (o͝o), spelled u. Because scribes from the East Midlands pronounced the word with this vowel they tended to spell the word with a u, and this spelling became standard when spellings were fixed after the introduction of printing. The word's pronunciation, however, is southeastern. Bury is the only word in Modern English with a Midlands spelling and a southeastern pronunciation. Similarly, the word busy, from Old English bysig, bisig, and its verb bysgian, bisgian, "to employ," is spelled with the East Midlands dialect u, but pronounced with the southern (Saxon) development of (ü), (ĭ)

http://www.thefreedictionary.com/bury
Comment: "London is located in the East Midlands," I don't know if that was true in Middle English times (though I doubt the term East Midlands even existed then - more likely it was called Mercia) but it certainly isn't true now. London is sandwiched between the South East, and the East of England (often referred to by its older name of East Anglia, and not the same as the East Midlands region) See https://en.wikipedia.org/wiki/Regions_of_England for a map.
Comment: @alephzero You raise a seemingly fair point. I'm merely referencing in this answer and I'm not too confident about correcting it.
Comment: @alephzero: After the Middle English period, London English became heavily influenced by East Anglian dialect (notably in the use of -(e)s instead of -eth, but when /y/ was shifting to other vowels that had not yet happened.


Updating Android on a Rooted Tablet

Question: I have an Android tablet that I rooted to attempt to install a different OS. After I failed and restored my tablet to a backup that I had made earlier (it's still rooted), I tried to update Android. It checked for updates, and promptly displayed a box that said "Your device has been modified. Software updates are not available." Is there any way that I can update my tablet while it's rooted?
Comment: It might help if we knew a bit more information about your tablet. Who is the manufacturer? What Android version is it running?
Answer: I ended up just installing CyanogenMod. They have features that stock Android should have had from the beginning, and support pretty much every Android device on the market for many years after Google and the various device manufacturers abandon it.
Comment: Can you provide more information on the steps necessary to use this? My Samsung tablet apparently has a Knox "warranty" flag which is an eFuse and cannot be reset. From what I have read I am uncertain if the device can even be modified, especially if the bootloader is involved.
Answer: There are different methods for updating your device. Once you've rooted it, the checksum for your <code>/system</code> partition changes, and an update might check that and abort because of it (as you just experienced); this is mostly the case with ota-updates.
However: major version updates are rarely spread OTA, but mostly have to be flashed manually using a corresponding computer program. Which one that might be, is manufacturer-specific and depends on your device (so for details on that, we need to know which one it is). Still, applied as an update it might again fail with its checksum verification.
A third variant would be assuming a "virgin device", and make a full install. This usually does not apply any checksum verification (as it does a complete install, and not an update). For this, you might want to check with Where can I find stock or custom ROMs for my Android device?
More details on device updates can be found checking frequent questions tagged "update" and our update tag-wiki.
P.S.: After clarification for the targeted device, there are two more tags you might want to investigate: odin is Samsung's flash-tool for Windows, heimdall is a multi-platform open source equivalent.
Comment: Sorry for not clarifying this in my question; it's a Samsung Galaxy Tab 2 7.0 (p3113), running Android 4.2.2
Comment: Thanks for clarification! I've just updated my answer accordingly with links to the Samsung tools involved in ROM flashing. You can take a look at their tag-wikis for more details (and consider accepting the answer by tapping the checkmark next to it, if it answered your question sufficiently).
Comment: I originally used odin to root the tablet, and then installed ClockWork Mod Recovery. Is there a way that I can update Android but keep my settings and apps, like it would do if I updated it from the settings pane the normal way?
Comment: That always depends, and you never can be 100% sure. Details I must leave to those used to Sammy's devices and tools – but it never hurts to have a good backup. Take a look at our [backup tag-wiki](http://android.stackexchange.com/tags/backup/info) for good hints on that. In short, *Titanium Backup* and `adb backup` (including the *Helium* frontend) can be your good friends with that.

Updating Android on a Rooted Tablet


Indefinite article before plurals

Question: I have came across such sentence:

By now, Queen Elizabeth II has been on the throne for an astounding 67 years.

Why do we use "an" here, even though 67 years is plural?
Comment: Does this answer your question? ["A dreadful five minutes" - what about the article?](https://ell.stackexchange.com/questions/194440/a-dreadful-five-minutes-what-about-the-article)
Comment: [Tanya: I have come across a sentence like this or this sentence. "such sentence" is not right.]
Answer: This is a special case of simple agreement override that happens when a measure phrase is interpreted as a single measure (of time, money, or distance). So in this case, "an astounding 67 years" is understood as a single, continuous time period.
Huddleston & Pullum (2002) discuss this under § 18.3 Further Override and Alternations:

18.3 Further Override and Alternations
(a) Measure Phrases
We have already noted that plural measurement nominals can be respecified as singular for the purposes of agreement and selection within the NP. This carries over to subject-verb agreement, whether or not there is any marker of singular number within the NP:
[14] i That ten days we spent in Florida was fantastic.
ii Twenty dollars seems a ridiculous amount to pay to go to the movies.
iii Five miles is rather more than I want to walk this afternoon.
iv Three eggs is plenty.
This is the opposite of the collective override: here an NP that is formally plural is conceptualised as referring to a single measure (of time, money, distance, or whatever) and accordingly takes a singular verb. The measure override is characteristically found with be or other complex-intransitive verbs (such as seem in [ii]). In [ii], where the predicative complement is a singular NP, the override is obligatory (*Twenty dollars seem a ridiculous amount to pay); in [iiii-v] it is optional but quite strongly preferred.
Answer:
By now, Queen Elizabeth II has been on the throne for an astounding 67 years.

If you can give X an attribute such as "astounding", you "which"-ify it - meaning you are indirectly acknowledging there is a possibility that one X is astounding and another X is not astounding or something other than astounding.
The speaker/writer does not expect the listener/reader to know "which 67 years" beforehand, so the indefinite article is used, and not the definite article.
In this sentence, the indirectly acknowledged choices for X where the question "which X" would have to choose from could be any other possible attributes of 67 years, e.g. "an astounding 67 years" versus "a terrible 67 years", "an uneventful 67 years", etc.

Indefinite article before plurals


How would a noble gas lake form on an earth-like world?

Question: Pretty much the title. I was thinking that it could have originated from a meteorite impact. I think that there are meteors that are made of frozen noble gases, so that would be the source of the "water" for the "lake". The impact crater would form the basin, and the gas would melt, slowly filling the basin. I have no idea if this is at all realistic.
Comment: I think you are thinking of gas like a liquid, over time gas will simply mix with the atmosphere and not remain in a basin.
Answer: Radon is a noble gas. Radon coming up from the earth could form a lake.  In fact, radon pooling in low points and buildings with poor air exchange poses a real human health hazard.  Maybe there are radon lakes deep in the earth!
from https://www.radonseal.com/radon-indoor.htm
(bold emphasis mine)

Radioactive heavy metal elements uranium and thorium are dispersed
  throughout the Earth's crust. They very slowly disintegrate into
  lighter radioactive metals, including radium, the precursor of radon
  gas. Since the half-life of uranium and thorium is billions of years,
  the Earth will produce a never-ending supply of radon gas. Radon
  Element
When radium atoms disintegrate into alpha particles and atoms of
  radon, 10 to 50 percent of the radon atoms escape from the mineral
  grain into the underground "soil gas," which also carries biological
  decay gases and moisture. In most areas of the United States, the soil
  gas contains between 200 and 2,000 pCi of radon per liter but soil
  measurements ranged from 100 to 100,000 pCi/L. As radon slowly
  diffuses from the ground into the ambient air, its flux varies widely
  but, typically, one square foot of soil emits 130 pCi of radon each
  hour (0.4 pCi/m2s). In the United States, the resulting outdoor radon
  level averages 0.4 pCi/L. However, the stacks of radon mitigation
  systems emit undiluted soil gas with radon concentrations 2,000 times
  higher, averaging over 1,000 pCi/L

The other good thing about a lake of radon is that radon is very dense and so would tend to stay down.  Read my musings on lakes of xenon and radon here.
Can lava still be red hot liquid underwater?
The linked video https://www.youtube.com/watch?v=AsP4yMY-a6U from that idea shows what happens when you put xenon and water together under pressure - the water freezes as a clathrate at room temperature.  Maybe an underwater radon lake would do the same.
Comment: Radon is radioactive, so it can cause lung cancer. Also, someone who walks down into a lake of radon will soon asphyxiate from lack of oxygen. It's colorless, so no warning, except your voice will deepen.
Comment: Now I'm worried about walking through valleys.
Comment: Radon has its boiling point at 211.5 K (−61.7 °C, −79.1 °F)
Comment: Your high, reedy voice should be a reassurance to you, @Jammin4CO.


Finding replacement headset bearings

Question: Today I was trying to service my headset on my 2016 Felt Z95. When I took the bearings off (caged ones) they just fell apart when I tried to clean them. How do I go about finding replcements?
Thanks
Comment: Have you tried your local Felt dealer?
Answer: The balls are loosely held in normal cages, so once you determine the exact size of the bearings (typically imperial measurements e.g. 3/16"), you can buy replacement ball bearings at a bike shop. The shop will be able to verify the bearing size if you bring one or two along. Sometimes the upper bearings and lower bearings on a headset use slightly different size ball bearings.
If the cages themselves fell apart, in practice they are not required, and you can just put in the new set of ball bearings without them. Cages can make the process more convenient, and your local bike shop might also have replacements for those.
In terms of purchasing ball bearings for headsets, keep it mind:

Replace all the ball bearings at once, with new replacements from a single manufacturing batch. This ensures the balls are exactly the same diameter, not different from batch-to-batch variation or previous wear.

The quality of the ball bearing in terms of roundness and smoothness is graded, with a smaller grade number indicating less deviation from perfection. Grade 25 or grade 10 is what I usually get, and I would try very hard not to get worse than grade 100.

Buy a few extra bearings just in case you drop one and it rolls away; if you are getting rid of the bearing cage, there may be room for one or two more ball bearings than before, another reason to buy some extras.

If you don't already have some sort of bearing grease, I find "marine boat trailer wheel bearing grease" to be cheap and VERY effective. In the US a number of brands are easily available at auto and marine stores, home improvement center, etc.

There are many good headset bearing service instructions online. Park Tool has generally very good instructions; their non-video section on the bearings of threadless headsets is here.
Answer: Heatset bearings are rather small, (second-smallest bearing-balls on a bike after the freehub) so there are a lot of them.
IF you manage to find all the escapees, it is possible to reassemble them into the retainer cage.  The trick is to clean all balls and the cage first, and then insert a ball into each space, and use needle-nosed pliers to slightly-squash the metal tongue so it retains the ball, and does not bind on the ball.
This presumes the cage is undamaged.  If cage is dead, then it is possible to assemble a headset using grease to retain the balls, but without a cage there's a good chance all the balls will migrate to one side of the race, and you'd need to add more anyway.   This is a dirty-hack and later-you will be mad at present-day-you, the next time the headset comes apart and all the bearing balls fall out again.

Finding replacement headset bearings


Can not see test modules in module install page

Question: In Drupal 7, tests module can be added with hidden = TRUE property in .info file to not to display on modules list page, but tests can find and enable them using protected $modules property.
But Drupal 8 doesn't have this property and the test modules don't appear in modules list page. How does it work?
Answer: Test modules are under module_name/tests/ or module_name/tests/directory and can be enabled by TestDiscovery service. As ExtensionDiscovery::scan() calls TestDiscovery::getExtensions() method with $include_test flag TRUE.
The flag can be overridden by settings:
    if (!isset($include_tests)) {
      $include_tests = Settings::get('extension_discovery_scan_tests') || drupal_valid_test_ua();
    }
See also ExtensionDiscovery::scanDirectory
 and RecursiveExtensionFilterIterator::acceptTests()
For manually enabling and testing a test module, it could be moved under modules directory (from /tests) and move back once development done to enable it via test.


How does a bathroom scale automatically power on when I step on it?

Question: When I step on a bathroom scale how does the circuit turn on? I've disassembled these types of weight scales looking for obvious hardware switches, but none exist. I suspect the ADC is configured to generate an interrupt and wake the micro controller from a low power mode. If this is the case, how would this spec be translated to a common micro controller such as a MSP430F67 with its built-in 24-bit ADCs?
Comment: "built-in 24-bit ADCs" I wouldn't trust that as far as I could throw it.
Comment: Sleep. Wake every x ms, one time adc.  If value > n, wake up everything else go to sleep.
Comment: @KyranF Throw distance depends on ballistic coefficient and at such low mass, to get decent range you'd really want added mass and a long slim package with good streamlining. So may be ideal for use in a dart or aerial penetrator. | | [The ADCs in the MSP43F067..](http://www.ti.com/lit/ds/symlink/msp430f6736.pdf) are Sigma Delta converters and in ideal conditions could approach that resolution, if not accuracy (as 24 bit reference & stability is harder to come by). As, for a 100kg person, 24 bit resolution = 0.006 gram, the full 24 bits "is unlikely to be needed [tm]. A resolution ...
Comment: ... of say 10g in 100 kg = 1:10,000 ~ 2^14 or 14 bits is probably ample, especially given the linearity and absolute resolution of the overall strain gauge + IA system. Whether you can throw  16 BIT ADC system any further than a 24 bit one is moot, but with a suitable reference it's probably as trustable as it needs to be. To get 0.1 kg **FS accuracy** at 100 kg FS = 0.1% FS accuracy overall which is 'reasonably challenging' of itself, and suggest the actual reference is several bits better than that, which is unlikely in practice. No ? :-)
Answer: The scale is never really "off". Instead, it just turns off the display and other peripheral circuits such as the ADC and goes into a low-power mode internally. Every now and then (most likely based on a timer interrupt), it powers up the ADC briefly and checks the sensor to see if the weight has changed, and if so, it turns the rest of the peripherals, including the display, back on.
In low-power "sleep" modes, many microprocessors (and especially the MSP430 series) have a level of current consumption that compares favorably with the self-discharge rate of the battery.
Comment: It's additive, but about the same order of magnitude.
Comment: Re: self-discharge. When you write it compares favorably, does that mean if you use a little bit of current it negates the effect of battery self-discharge? Or, is using the current additive with self-discharge?
Comment: Some microprocessors also have comparators that can generate interrupts, but otherwise the same principle applies: the scale is not ever turned off completely.
Answer: I've opened a lot of bathroom scales some months ago to 'steal' some knowledge for my projects and I had the same question.
Most of them are using a 'vibration sensor' to detect when people step up on that scale.
Here you can see how a 'vibration sensor' is working: http://www.sunrom.com/p/vibration-sensor
This is much more efficient and simple to implement than a 'wake up' the uC once/second to check the weight.
I will give you an example why is not a good strategy to wake up the scale every second to check if someone steeped on it.
For example and Atmega328 in sleep mode will draw around 100uA (this value can vary based on chosen sleep mode) and after it's started will draw around 3mA.
A load cell amplifier based on HX711 IC draws 1uA in sleep mode and 4mA while running. Based on HX711 datasheet he can do 10 or 80 measurements over a second (that's 12ms or 100ms/measurement).
If you do the math, you will see that o lot of power will be wasted just to wake-up the entire system to check if someone is on that scale or not.
Comment: With your numbers, a 2000mAh battery capacity and one measurement of 15ms every second, I get about 2.2 years per battery. But your MCU is quite powerful. A PIC16 will take 0.5µA in sleep and 8µA in operation mode. The built-in12bit ADC (4096 steps) is enough for most scales. There's no need for this full featured HX711, one or two good opamps will be sufficient, draw much less current, and of course, you'll switch them off completely when sleeping. I guess 5-10years battery life is possible.
Comment: I've did the math with my numbers and you will get (only in stand-by) 1.14 years (0.1mAh for sleep mode and 0.1mAh for checking if someone is on a scale).If you use that scale will be less than an year.
Comment: Not to mention that most scales are using a CR2032 battery, which has 240mAh. So using this method you will have stand-by time of less than 2 months. Of course with some optimization you can increase that stand-by time, but just using a vibration sensor you can easily double it.


Magento Frontend Exam

Question: I have recently gone on to book my Magento 2 frontend exam, I have now seen that there are two different exams, both titled Frontend Certified, does anyone know which is the correct one to take? Have tried to email Magento but no reply as of yet.
The two options I can see are AD0-E710 and AD0-701, both share the title Adobe Certified Expert - Adobe Commerce Front-End Developer.
Answer: That one is correct for now AD0-E710

Magento Frontend Exam


How are metalogic proofs valid?

Question: I'm reading some materials on mathematical logic. I wonder how we can "prove" metalogical properties (soundness, completeness, etc.)? As at this point, the proof system has not been verified yet. Isn't this a chicken-and-egg question (we may then have meta-metalogic)? What types of proofs are considered valid at this stage?
Comment: a) Yes, there is a building of meta-meta-meta-logic. b) I saw your title as "How are metallurgic proofs valid?". ;)
Comment: +1 I like your question. Meta-maths is not my area of knowledge, let alone the philosophy behind it, but I think Munchhausen's trilemma is going to forbid having a non-circular, self-justified system, unless it's some kind of infinite regression (meta-maths, meta-meta-maths, meta-meta-meta-maths, etc).
Comment: I think this may be a duplicate of https://math.stackexchange.com/questions/201703/an-apparently-vicious-circle-in-logic/201713#201713 but I will let others vote if they agree.
Comment: Isn't soundness a definition and not something to be proved? A theory is sound when all proofs in the theory are sound (that is their premises is true, and the implication is valid (valid meaning the consequent must be true when the antecedent is)).
Answer: Short answer: yes, it is essentially a chicken-and-egg problem, or perhaps a hermeneutical circle or a spiral.  The common interpretation of the incompleteness theorems is that this circularity cannot be avoided.
You can use normal mathematical reasoning for the metatheory - which is not formalized in the first place - or you can choose some formal theory. In the latter case, you can choose a stronger metatheory, like ZFC, or a weaker one, like PRA.
In principle, you would then be able to choose a meta-metatheory, a meta-meta-metatheory, etc., but in practice essentially all the interesting issues arrive at the theory/metatheory level, and the higher levels just repeat these issues rather than giving new issues.
Answer: This is actually not a disagreement with Carl Mummert's answer, but another way of thinking about it. No, it isn't circular. But you don't prove what you might imagine you prove.
All actual proofs in mathematics are in what we call "mathematical English" -- we believe this is all completely rock solid, but essentially it is in the form of sentences and paragraphs and so on. Sometimes (rarely) you even diagram those sentences and break them down into something that looks more like formulas, and follow rigid rules (see Russell's "game on paper" interpretation of math), but ultimately the idea is to be "completely convinced" that a statement is true.
The informality of the above is completely necessary and unavoidable!
When we "prove theorems about theorems" or any other meta-mathematical idea, what we really do is design (in our informal mathematical English) a model where we represent statements as numbers, and so on, so that we can say "this number represents a sentence" and "this number represents a proof of this statement from this set of statements" and so on, we're actually making a statement about numbers.
You convince yourself that this statement about the natural numbers is really the same as the metamathematical statement you care about. This can't be formalized either, but should be seen as "obvious" once explained properly. Then you can prove this statement about numbers in the normal mathematical sense.
Comment: @TheoBendit Depends on who you ask. Many people believe that (a) proofs done at the extreme standard of Russell's "game on paper" are completely valid and trustworthy, and that (b) all correct mathematical proofs can be expanded to the standard of the "game on paper" [in fact they would argue that this is what "correct" means]. If you believe (a) and (b) then mathematics is "valid." But [cont]
Comment: [from cont] in the end we're all communicating in some natural language which is necessarily ambiguous and imprecise, and relying on an (unprovable!) belief in rules (a) and (b) above to decide that math is trustworthy. Empirically it seems to be working well so far :P
Comment: "Necessary" and "unavoidable" are not the same as "valid" and "justifiable". Does mathematics have more intrinsic validity than just how convincingly it is explained?
Comment: I don't see how proofs are what you call 'mathematical English'. If something is proven, then it has a truth value of true. We do not simply belive it to be true.
If you think this truth value is not absolute, you need only look at the logic gates on computers, or any line of code that involves truth values. The machine doesn't simply change its mind; it will not output from a gate something that does not logically follow from the input and the gate itself, or execute a false line of code.
Comment: @user400188 I'm not clear on what your comment means. You're talking about proofs, but then you're talking about computers which are, in this case, physical objects and not proofs. There isn't really a "truth value" here. There is a physical sense of truth for a computer (or at least usually-easily-distinguished states which we call "true" and "false"), but that's not really the same thing.
Comment: @user400188 Proofs are rarely written down strictly formalized, but using natural language. You can say "Well, but I can $-$ in principle $-$ rewrite it to formal language", but then one can argue (again in natural language) if your way of writing down this formalized proof is how the logic of reality is mapped to paper. Also, an automated proof system on computers is just a man made thing. A human thought about it and programmed it this way because he thought this was correct, not because he rigorously proved it this way. Every program and every language, also the formal ones, are man-made!
Answer: I think Richard Rast's answer is basically right, but I want to add a little to it.
Ordinary logic, as practiced by mathematicians, studies a formalized copy of mathematics. It studies that copy using the same tools, and the same level of rigor, as any other field of mathematics.  People get confused about this because the object being studied and the tools being used to study it look so similar.
For instance, the soundness theorem specifies a relationship between certain combinatorial objects (proofs) and certain algebraic objects (models).  In mathematical logic, the fact that these objects remind us mathematical proofs has no bearing on what constitutes a proof: the standard of validity is the same as for any other combinatorial proof.
Using logic as a philosophical foundation for mathematics is a more delicate task, and is fundamentally a philosophical project, not a mathematical one, though it obviously has to be heavily informed by mathematical ideas.  There, as in any other attempt at a foundation for mathematics, the question of what can be taken as basic and what gets built on top of what is very difficult.  In particular, materials on mathematical logic don't generally concern themselves with these issues.
Answer: Yes, it's all circular. You can have weird cases (maybe not in math), were you are proving metatheoretical stuff in a different logic (many sorted, polivalued, second order, etc.), but your theory is in first order. In math this never happens, as far as i know, but in logic people do these weird combinations. But again in these cases are kind'a cirular because you have to know the theory of your metatheory, so one assumes it.
Comment: Downvoted for drawing a false distinction between logic and math. Also, this isn't really circular, it's a question of deciding exactly what your theorem means, and proving that (in the same sense that you prove anything else in mathematics).
Comment: @RichardRast I do think there's a distinciton between logic and math. Leaving that behind, i did not say that when i wrote my answer. I paraphrase: not all logicians devote themselves to math, but they use circular thinking. And not all mathematicians devote themselves to logic, and when they do, they use this chicken-egg thinking.

How are metalogic proofs valid?


How to refer my friend for a vacancy in my office?

Question: My company at present is looking new IT recruiters. My close friend's girlfriend has just completed her Graduation and looking for a job. I really want to help her out and for that, I need to forward her CV to our HR Manager. Now, from the very beginning day, I and the HR Manager had a cold war, and it's still there. Now, if she comes for the interview without my reference, the chances of getting her selected is pretty low, as my company is looking for candidates with some experience. How to refer her?
Comment: If company policy tells you to forward her CV to your HR manager to refer her, then that's what you should do. Any attempt to circumvent that will likely backfire. This seems to be more a question of how to make peace with someone, or whether your HR manager would let your issues interfere with their job, because how you refer her is unlikely to matter if they'd do that, but we can't really tell you either of those things.
Comment: Does your company have a referral program? All companies I've worked in have had such.
Answer: Find out whether your company has an official process for referring candidates. If so, follow it. If not, hand the CV to your manager/supervisor and let them handle it.
If you are determined to hand deliver her CV to the HR manager you might try something like this: "Whatever disagreements you and I might have between us, this person would be good for our company and I think it would be worth it to consider her." (Of course, you have to really believe it if you're going to say it.)
Comment: This could also be as easy as an email to the hiring manager with the resume of your friend.


PHP Session Expire Redirect

Question:
Possible Duplicate:
Automatically re-direct a user when session Times out or goes idle…

I have a Log In system and the session expires, but they need to refresh the page to be shown the login in screen again. Instead, my users enter data and hit submit to find out that they have been logged out.
Is there any way to make the page automatically redirect to the log-in page once the session has expired?
Thanks!
EDIT:::
From reviewing the previously asked question found Here I have used the accepted answer for this application. Thank you all for your suggestions.
Comment: Possible duplicate: http://stackoverflow.com/questions/1003001/automatically-re-direct-a-user-when-session-times-out-or-goes-idle
Comment: You're right, it is a duplicate, thank you.
Comment: I can help you with a solution, but first I need to know if the session must expire after a duration, or is it ok to keep it alive as long as the user is on the page, or at least active.
Comment: I am currently using php.ini to expire the session after a certain period
Answer: You could use a meta-refresh tag, e.g. to redirect after 10 minutes:
<meta http-equiv="refresh" content="600;url=http://example.com/" />

This isn't a very user friendly way to handle session expiry, particularly for the use case you've highlighted.
A better technique would be to track user activity with Javascript by picking up keypress and mousemove events. Every minute, if there has been some activity, fire off an XMLHttpRequest to keep the session alive.
Say your sessions expire after 10 minutes, and this JS notices no user activity for that time, it can inside a banner into your page alerting the user that their session has expired and offering ways to re-establish the session etc.
That way, people performing data entry or (whatever the form is for) don't lose their session if they taking their time, and aren't redirected if they leave their desk for lunch!
Comment: That is a little too involved for what I am looking for.
Comment: I've edited it to include the simplest possible thing that would work for you :)
Comment: I am willing to take the challenge, but do you think you can explain your javascript-based example some more? Thank you Paul !
Answer: The PHP function ini_get can be used to read the session lifetime when the page is created.
JavaScript can be used to execute the redirect after the session has expired.
// javascript
var logout = function () {
   //redirect code
};
setTimeout(logout, <%= 1000 * (int)ini_get("session.gc_maxlifetime") %>);

Answer: you could use javascript to periodically check whether the session has expired and then redirect if it has.  The implementation depends on the details of your authentication system, but would basically involve passing the expiration time of the session to the page and then comparing time of expiration to the current time until the session is expired.
EDIT: Example
I use prototype.js, so if you use some other framework (or just raw JS) you will have to adapt it.
<input type="hidden" id="expiration" value="<?php echo(time() + SESSION_TTL) ?>" />

Should do something along the lines of what you want.
Comment: I am very new to javascript can you provide an example maybe?
Answer: I too employ a Javascript solution. Our login page destroys the session, so we have a timer that resets to zero on each page load. If that timer expires, it redirects to the login page, which destroys the session.
Answer: Well, optimally the data the user sent using your form is saved temporarily, the user gets a chance to log in again and then gets redirected to the page he came from, already filled with the old data. Having to type data twice (or having the page itself redirecting after some amount of time if you're in the middle of something) is rather annoying.
If you want to redirect without retaining the entered data on the page you should at least show the user an indication how much time he has left until the page expires. Using JavaScript should be a good option for that.

PHP Session Expire Redirect


What is gasoline used for in an engine?

Question: I know gasoline is used for heating the air particles, but is that all it's used for? I'm new to this stuff and now I'm learning some of the energy is used for transporting the gas into the combustion chamber. Maybe I heard wrong. But my question is, Is gasoline only used for heating the air particles in the power stage, or do it have another use in the engine?
Comment: For those who are voting to close as "off-topic", this sure seems related to the ICE from my point of view. To the OP, maybe you can broaden your question a little bit? Help us to understand exactly what you're getting at? BTW, welcome to the site! We're glad you're here.
Comment: Better? Sorry I'm new to learning this stuff and information is all of the place.
Answer: An internal combustion engine is a type of heat engine as defined by the Carnot Cycle, specifically a gasoline engine uses the Otto Cycle.
In essence gasoline is burned in the cylinders, releasing heat and creating a large volume of hot gas which, as it is confined in the combustion chamber is under significant pressure. It is this pressure which forces the piston down and produces mechanical work.
In all engines some of the work produced will be used to drive ancillary processes which use of energy but are still essential for the operation of the engine, for example :

Induction : sucking air into the cylinder on each induction stroke requires some energy (although turbochargers can achieve this with waste energy from the exhaust).
Powering electrical systems such as ignition and starter motor.
Fuel, oil and coolant pumps
Operating valves and fuel injectors
Plus various other demands from the vehicle as a whole such as electrical power for lights etc.

Of course not all of the heat produced by combustion can be extracted as mechanical work and some is dumped directly via the exhaust (although turbochargers can extract additional energy form the exhaust) and some is shed by the cooling system via the radiator.
So in a gasoline engine providing hot combustion products which act as a working fluid is pretty much the parts of the inducted air (mostly nitrogen) plus the various products of the reaction between gasoline and oxygen, in theory this will be carbon dioxide and water vapour but in practice various other products including nitrogen oxides and carbon monoxide are produced as well. So strictly the fuel does produce some of the exhaust gasses directly as well as heating the air already in the cylinder.
In some engine types, notable 2-stroke engines the fuel also has a lubrication function and diesel fuel provides its own lubrication for the fuel injection system.
Fuels will also have various additives to control their combustion properties.
Historically some vehicles have used liquid fuel for cabin heating, but this is now long since obsolete.
Comment: Actually, all vehicles use liquid fuel for cabin heating! The cabin heat comes from the engine heat via the cooling system, and indeed the engine heat comes from liquid fuel. The need for heat is one of the reasons the internal combustion engine occasionally runs in a hybrid electric vehicle when driven at cold temperatures, even though the battery could supply traction power. Of course, some auxiliary heaters like mirror/rear window/windscreen heaters and seat heaters can be powered electrically.

What is gasoline used for in an engine?


Is it safe to eat food that was heated in plastic wrap to the point the plastic wrap flamed?

Question: I accidentally used plastic wrap instead of foil wrap over the salmon in the toaster oven. There was a flame.  When i checked the salmon,  the cling wrap was gone. Did it melt into thge salmon? Is the salmon safe to eat?
Comment: Generally, plastic isn't good to eat and there is almost certainly some on your salmon. If it was a life and death survival situation, I'd eat the part that wasn't touching the plastic. But if you have a toaster oven, it's probably not a life and death situation... Chuck it...
Comment: Plastic wrap is actually acceptable as field wrapping for burns and wounds.  It is sterile as it comes from the manufacturing process, and non-toxic for contact.  So having had it in contact with food when it has not burned, is not a problem.  http://www.acep.org/content.aspx?id=40462
Answer: There are multiple types of film wrap, which are different plastics.  No matter what yours was made from, it almost certainly partially burned up, partially melted, and partially had other heat-based reactions leaving unknown remains on your food, possibly including dioxins, which are quite toxic.
In any of these cases, I would not risk finding out.
Discard the fish.
Comment: This answer is right, but just curious why does this get 15 up votes, without anyone leaving one comment? It is kind of a low-knowledgeable question with a relatively obvious answer. I feel fishy reading some really nice answers these days not being recognized as much as something like this getting inexplicable number of up votes.
Comment: @kmc I have long since stopped wondering these things.  The pattern of votes and comments is almost impossible to predict, it seems, and is not related in any way I can understand to the amount of research or depth a particular answer required! :-)
Comment: well I guess you're right. I might think it's common sense not the eat the plastic wrap but people may think otherwise..


Open-source Data Visualization dashboard

Question: We are looking for some open source technologies which can show a dashboard similar to the below picture. This has images for stores and data will be pulled against predefined points.
We evaluated Grafana - but struggling to get this. is there any other dashboard tools which can help with this.
Answer: HighCharts it's an excellent chart library that can help you:
Check out General drawing sample

or maybe Network graph


Why won't my install on Macbook work?

Question: I am trying to install Ubuntu 12.04 on my Macbook. The CD drive is broken, so I am going from a USB flash drive I created.  I can get it to "Try Ubuntu" perfectly fine, as a matter of fact I'm using it right now.
However, I really want to install. Everything is partitioned, rEFIt is installed.  I run the installer and I follow the guide at Apple Intel Installation I get to the install part of the installer, and after running it ends with a fatal grub error.
Anyone know how to get past this?  I feel like it has something to do with the fact that I don't get the last dialog box of the installer with the "advanced" tab used in the guide. Any help is greatly appreciated!
Comment: I've had the same problem on my desktop.
My problem whas an SSD (OCZ revodrive). I am not sure what SSD you have but I think its the SSD's fault.
Answer: I had a really hard time getting a working install of Linux on my Macbook Pro 6.2 with a few versions not even getting to the "Try Ubuntu", others creeping a little further.
In the end, I managed to get a copy of Xubuntu 12.10 to run. But even while partitioning, I experienced errors. I had to avoid making a home partition and let the installer proceed then retro create a home partition.
For the partitioning and EFI boot this source was very useful:
EUFI Booting Ubuntu on a Mac.
For the sorting out my home partition this helped: How to create a separate home partition after installing Ubuntu.

Why won't my install on Macbook work?


A mysterious signal at 14.2054 µHz

Question: After the stellar triple system PSR J0337+1715 was discovered a few years ago, I was interested in whether the GW could be detected here. From the known orbit times it follows that the GW frequency 14.2054e-6 Hz would have to be phase modulated with f_mod=1/(327 days). It's easy to build a software defined receiver for these frequency, the problem is the antenna. The LIGO interferometers cannot receive such low frequencies; LISA does not yet exist. So I used air pressure as an "antenna" because earthquakes don't interfere. Surprisingly, I discovered a weak signal with the characteristics described above exactly at the target frequency. Additionally it is phase-modulated with f_2=1/(365 days). Could this be a GW? It fits the triple system.
Comment: Why would the fact that air pressure is modulated on periods of 1 year have anything to do with a binary that has a period of 327 days? And why do you think air pressure should be modulated by gravitational waves? And where is your high precision air pressure data coming from?
Comment: Gravitational waves are exceedingly faint and don't cause large shifts in things. If you read a bit on the subject, you'll soon find that when a gravitational wave crosses the solar system, it changes the Sun–Saturn distance by the size of about one proton. So, no, there is no way in hell that you can detect gravitational waves on such a small scale as with an air-pressure "antenna." If what you found is really with the same period as that pulsar system (or anything else, for that matter), then it's simply a coincidence.
Answer: No, because the strain amplitude from this binary is vanishingly small compared with variations in atmospheric pressure due to a variety of mechanisms at frequencies similar to the expected frequency of the gravitational waves from both the short-period orbit and the longer period modulation; and because air pressure is probably not sensitive to the passage of gravitational waves in any case, since they do not alter volumes in space.
Details
The quadrupole gravitational wave strain expected from a binary in a circular orbit is given by
$$h =  -\frac{4G \omega_{\phi}^2 \mu a^2}{rc^4} \left[\frac{(1 + \cos^2 i)}{2}   \cos(2\omega_{\phi} t)\ {\mathbf e_+}
       + \cos(i)\, \sin(2 \omega_{\phi} t)\ {\mathbf e_{\times}} \right]\ , $$
where ${\mathbf e_+}$ and ${\mathbf e_\times}$ are unit 4x4 matrices representing the two polarisations of gravitational wave radiation, $\omega_\phi$ and $a$ are the angular frequency and semi-major axis of the binary, $\mu= m_1m_2/(m_1+m_2)$ is the reduced mass of the binary,$i$ is the inclination of the orbital plane to the line of sight and $r$ is the distance to the binary.
The numbers for this system can be obtained from Ransom et al. (2014):

$a = 5.76\times10^8\ $ m
$\omega_\phi = 4.46\times 10^{-5}\ $rad/s
$m_1 = 1.438M_\odot ,\ m_2 = 0.198M_\odot ,\ \mu = 0.174M_\odot $
$i = 39.2^\circ$
$r = 1300\ $pc
Thus
$$ h = 1.5\times10^{-25}\, \cos(2\omega_{\phi} t)\ {\mathbf e_+} + 1.5\times10^{-25}\, \sin(2 \omega_{\phi} t) {\mathbf e_\times} $$
i.e. Almost circularly polarised gravitational wave radiation, with a dimensionless strain amplitude of $1.5\times 10^{-25}$. This is about 4 orders of magnitude smaller than the gravitational waves detected by LIGO and would cause changes in spatial dimension of order 1 part in $10^{25}$.
Even if this did cause changes in pressure by virtue of changes in volume (but see below), these changes would be of order a few parts in $10^{25}$. Is that how precisely you are getting measurements of the air pressure?
Contrary to your statement, atmospheric pressure is sensitive to seismic activity and it is affected by all sorts of weather-related phenomena and tides at a wide variety of frequencies (e.g., Shven et al. 2013) from hours to months. These variations are measurable at amplitudes that are vastly bigger than the gravitational wave signal you want to detect. There is no possibility of detection against this noise background.
In fact, the passage of a transverse gravitational wave through space would not change the volume. A compression in one direction is balanced by a rarefaction on the orthogonal direction - e.g. see https://physics.stackexchange.com/questions/341988/can-a-gravitational-wave-stretch-a-volume-equally-in-3-dimensions . So it is difficult to see why gravitational waves would change the pressure of a gas at all.
Comment: @9herbert9 In what way have you been "cancelled"? You asked "Could this be a GW?" and I've given an answer. Are you saying that you asked in bad faith and only answers that match your pre-conceived ideas are acceptable?   You are absolutely free to contribute your own answer. Possibly you are referring to comments added underneath my question - removal of those has nothing to do with me, they possibly contravened site policies on comments? Note, this is a Q+A site, not a discussion forum. Comments clarifying your question should be edited into your question, not left as comments on answers.
Comment: Cancel culture? It is always bad when measurement results contradict theory.
Comment: Sorry, I didn't refer to your post above. I just don't understand why the moderator deleted the additions below. Regardless: I didn't know that Stackexchange is one-sided and doesn't allow fruitful discussions. Not even any questions. A pity.
Comment: @9herbert9 This isn't a discussion site - particularly to discuss unpublished results or personal theories. I can't now recall whether your comments were actually attached to my question, however I see that you had a (non) answer deleted. You were informed beforehand that this was likely to happen and asked to clarify your question or, if you had additional questions, to post these as new questions. This is not "cancel culture" it is following the rules of this Q+A site. Other discussion forums are available I believe.
Comment: Is a surprising measurement result only credible if an explanation is immediately provided? Wilhelm Roentgen received a Nobel Prize for his accidental discovery of X-rays, although no one knew why they were created and what effects they had. My suggestion: check for yourself! It's very easy if you know reception technology.

A mysterious signal at 14.2054 µHz


testing correlated data from 1:1 line

Question: I have correlated data points and they are fitted with a trend line. I wanted to know how far these points lie away from an arbitrary 1:1 line (45 degree line with data of equal magnitude). Is there any test to find how significant it is away from this 1:1 line?
Thank you
Answer: Warning: use this solution only if you can safely assume that you have no errors in $x$. For a solution when both variables contain errors, look @Nick Cox' answer or at the bottom of mine.
The 1:1 line is a line with slope 1. You could use a Wald test to test whether your slope differs significantly from a line with slope 1. The Wald-statistic is:
$$
W=\frac{(\hat{\beta}-\beta_{0})}{se(\hat{\beta})}\approx N(0,1) \\
$$
Where $\beta_{0}=1$ in your case, because you want to test whether the slope is different from 1.
Let's calculate an example in R:
mod <- lm(Fertility~Catholic, data=swiss)
summary(mod)

Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept) 64.42826    2.30510  27.950  < 2e-16 ***
Catholic     0.13889    0.03956   3.511  0.00103 **

If you wanted to test whether the coefficient for "Catholic" differs from a slope 1, you can do the Wald test in the following way:
test.slope <- 1

wald.statistic <- (0.13889 - test.slope)/0.03956
wald.statistic
[1] -21.76719

Now we can use the normal distribution to calculate the $p$-value:
2*pnorm(-abs(wald.statistic))
[1] 4.748743e-105

It's practically zero. So we have strong evidence that the slope is different from 1.
Alternatively, just calculate a confidence interval for the coefficient. If the confidence interval doesn't include 1 then your slope is significantly different from 1.
confint(mod)
                  2.5 %     97.5 %
(Intercept) 59.78556103 69.0709631
Catholic     0.05920667  0.2185648

The 95%-confidence interval for the slope of "Catholic" does not include 1. We reach the same conclusion as with the Wald-test.

Addition
As @whuber points out below, the above solution is only valid if you assume that your $x$-variable is known without error (error in $y>>x$). If you have errors in both $x$ and $y$ variable, you could use (standardized) major axis regression. This fits a line that minimizes the perpendicular residuals. If your data are bivariate normal and in the same physical units or if they are dimensionless, use major axis regression. With R you can fit a major axis regression with the smatr package:
library(smatr)
data(leaflife)

mar <- ma(longev ~ lma, log="xy", data=leaflife) # here, the variables are both log-transformed before fitting.

summary(mar)

These variables were log-transformed before fitting: xy

Confidence intervals (CI) are at 95%

------------------------------------------------------------
Coefficients:
            elevation    slope
estimate    -3.085214 1.492616
lower limit -3.968020 1.146777
upper limit -2.202407 2.001084

H0 : variables uncorrelated
R-squared : 0.4544809
P-value : 4.0171e-10

The output shows the slope and its confidence interval.
Comment: It is important to point out that this solution implicitly assumes the independent variable is not random; only the dependent variable is.
Comment: I think I should do major axis regression because the values are dimensionless, x and y are error prone also.
Comment: Thank you all for responding so quickly. Rather than testing the significance of the slope I wanted to test how far they are away from 1:1 line and is this significantly different from a scenario in which they might be equal (ie they are in 1:1 line)
Comment: The correlated data points are lying above the arbitrary 1:1 line. I would like to know if this is significantly higher than 1:1 line.
Comment: @kmonynam, then run a major axis regression and look if the confidence interval of the slope includes one. If it doesn't, your line is different from the 1:1 line.
Answer: Concordance correlation is a measure of agreement between variables. See http://en.wikipedia.org/wiki/Concordance_correlation_coefficient for discussion and references. It was named by Lin but was earlier suggested by Krippendorff.
Unlike regression, concordance correlation treats variables symmetrically. That may or may not be closer to what you want.
Comment: thank you soo much for the answers. I am trying to wrap my head around this at the moment.

testing correlated data from 1:1 line


Can I convert relationships in MS Project from Start-to-Start to Finish-to-Start? Is there any equation for it?

Question: I have a MPP file with Start-to-Start relationship between tasks. But when I import to MPP in one project, I need to convert it to Finish-to-Start relationship because the system only supports finish-to-start relationships.
Comment: Though I've provided a technically correct answer, this seems like a silly request.  The existing schedule may include many SS+lag relationships.  Simply converting these to FS+lag relationships completely changes the logic of the schedule.  You should re-plan tasks and relationships from the beginning.
Comment: I appreciate your answer. Condition here is, I have MPP with 400 tasks and some tasks have SS+ relationships. But my web portal only have FS+ relationship settings. So how to convert SS to FS with some equation that works for all tasks
Answer:
Display all tasks. i.e. make sure filters are clear and outline shows all tasks.
Open the Find/Replace window from the Editing group on the Task Ribbon (Shortcut is Alt-E-E).
Find what: SS
Replace with: FS [or leave blank]
Look in field: Selected; "Predecessors"
Replace all.

Note: the resulting schedule may be radically different than the one you started with.  Save before you start.


Best UI behavior for done actions in a list

Question: I'm developing a task app that has a dashboard task list.
The user can change a task's status to done. What is the best solution for the done state?
Tks!
Answer: You could screen it back with a check mark next to it. But to be honest, I prefer the strikethrough. Look at how Google Keep does it.
If it's not critical to be able to see completed items you could have the completed item slide off the list.
Answer: Both of your ideas are good. Since both ideas are good, how can you decide in this case of one item in a list?
I find close calls much easier to make when designing for the worse case scenario. How do these two UX ideas compare with a long list; when there is a lot for the eyeball to read?
When glancing at a long list (below), which is quicker to interpret the DONE items and the NOT DONE items? I would vote for the Strikethru Design over the Green box design.

The Green Box solution has an annoying fault of white space in between long and short answers. My eyeball bounces around like a tennis match when trying to align the words with the green box. And this bouncing around adds wasted time when reading a list. Hence, wasted time is bad UX.
Comment: I find the squared-box easier to spot done from non-done. That blank space is very useful, but maybe it could be replaced by a light gray done icon?
Answer: I agree with @jhurley and @Stefano's answers, but let me add a different angle:
Going back to first principles--what is the user's context and what task are they trying to accomplish?
I'll use my own experience to illustrate, since I don't know who you're designing for. Loosely ranked by frequency of use, these are my personal scenarios:

I have discretionary time and am looking for a task to take on.I
want to quickly review all my options and make a selection.
I have completed a task and want to update my list.
I want to review what I have completed and get a sense of my
accomplishment, as well as trigger any additional next actions.
I want to revive a task that was marked completed earlier (either
because it was checked off accidentally, or I want to use it for a
slightly different task).

For each of the above tasks, I want to separate DONE from not-DONE tasks.
I've seen several implementations of this separation:
a) spatially separate them (usually not-DONE on top, DONE tasks below)
b) check mark in front of DONE tasks (and blank checkbox in front of non-DONE tasks)
c) strikethrough the task title for DONE tasks
d) filter / toggle whether
ALMOST EVERY task manager implement (b) and (c).  (e.g. Wunderlist, 2Do, Toodledo, Asana).   SOME implement (a), and (d).  I consider (d) a more advanced feature, and whether you do (a) depends on how important it is to preserve list order.

To answer your specific question, the only advantage I see of a label vs. strikethrough is a slight increase in readability.
The advantages of strikethrough design:

mimicks what people do on paper, which makes it much less ambiguous
and learnable
easier to parse (since the user only needs to look at once place to determine status)
easier to distinguish DONE and not-DONE tasks - the strikethrough as a visual pattern is easier to pick up
you can reserve labels for other features, like "tags" or "categories"
this is what most task management apps do.
Answer: As @Schwood suggested, Google Keep could be a really good source of inspiration:

Completed actions are automatically grouped, so the user won't need to group them.
There is no vibrant label close to the text, and the strikethrough text-decoration reinforces the concept of "Completed/Done" action. Otherwise, if you want to emphasize completed actions, you could fade out a little bit the actions that still has to be completed.

Take a little time thinking about the meaning of the list of completed actions for your users: do you really need to show all the actions, and preserve their order (mixing actions with different statuses)?
For example, in the backlog view of Jira, completed tasks are completely hidden.


Not receiving notifications when getting Likes on a comment on a page's post on Facebook

Question: When I receive Likes on my comment that I posted on the post of a page, I don't receive notifications. Where can I change these settings?
Answer: It would be default set as On,you can review by going to Settings -> Notification.
In that option "Activity that involves youView" which include You'll always get notifications about activity that involves you, like when someone tags you in a photo or comments on your post is set as On.Please try login with facebook in web and check whether you are getting notification correctly.
Comment: It is turned on but I never get notifications of it. Sometimes I comment on a post (of a page not a person) and I get a lot of likes but I don't get notifications of it.
Comment: My experience: FB sent me notifications for each like until there were 5 likes. then it stopped. I randomly checked my comment, there were 7 likes but no notification; yesterday I got another notification about the 10th like; today it's 11 and still no notification.
My conclusion is: FB stops/decreases bothering you as the no. of likes increases. There logic seems: each time for 1-5, then on 10th, then maybe on 20th or 100th I don't know. I came here to find and answer myself, coz I don't always get that much likes; I wanted somehow to enable the notification for each like, I'd feel happy :)
Answer: Been experiencing that problem for months too and no Google answer has ever helped me. I tried fixing it myself as of the moment and I'm glad it worked.
Go to Settings > Notifications > More Activity About You > and you'll see this.
"These are notifications for posts to your timeline, Likes and other Reactions to your posts, and more."
Turn on Allow Notifications on Facebook. Then viola!


Test for equality of means for vector-valued random process with different variances

Question: I am studying linearity range of an RF amplifier (henceforth DUT). For that I am stimulating the DUT with a periodic deterministic probe signal (which is known only roughly) and measuring the DUT's output. The power of the probe signal is controlled with the help of attenuators.
For a given level of stimulus power, I am able to obtain discretized snapshots at the DUT's output. The snapshots are perfectly aligned in time with the probe signal, therefore they repeat quite precisely, with only a slight variation due to additive thermal noise. Thus, a series of snapshots can be modeled as a vector-valued i.i.d. Gaussian process with some mean and covariance $\sigma I$.
The series of snapshots itself is treated as a finite-length sample of the vector-valued random process.
So here is how I am trying to check for device linearity. Given two stimulus power levels $p_x$ and $p_y$, I measure two sets of samples: $\bar{x}_1,\dots,\bar{x}_N \sim \mathcal{N}(\bar{\mu}_x,\sigma_x^2I)$ and $\bar{y}_1,\dots,\bar{y}_N \sim \mathcal{N}(\bar{\mu}_y,\sigma_y^2I)$.
I am trying to check the linearity condition. If the DUT is under both power levels, then $\frac{\bar \mu_x}{\sqrt{p_x}} = \frac{\bar \mu_y}{\sqrt{p_y}}$
What test do I need to use to check for equality of samples' means?
If my random processes were scalar, it would probably be some sort of t-test. But what's about different levels of variance?
Answer: Given your normality assumption, you can consider Hotteling T-squared test.
See this and this.