Game of coins - find the winning strategy

Question: Alice and Bob play a game. There is a box with $n \geq 2$ coins in it. Bob starts first and he can take any amount of coins from the box and put them on the table, but not all of them. Then, Alice can do the same thing, but the amount of coins she puts on the table has to be no more then what Bob has taken in his last turn. Then, Bob does the same, and he can not take more coins then what Alice has taken in her last turn, etc. The winner is who takes the last coin (after the winner's last turn the box will be empty). Who has the winning strategy? (the answer can depend on the value of $n$). My guess is that Alice wins whenever $n=2^m$ and otherwise Bob wins (I checked $n=2,3,4,5,6,7,8,9,10$ and it seems to be true), but I am not sure how to prove it. If $n$ is odd, Bob wins by taking $1$ coin in each of his turns. If $n$ is not divisible by $4$ and $n>2$, Bob wins by taking $2$ in each of his turns (because Alice has to take $2$ as well, since if she takes $1$ we arrive at a position where there is an odd number of coins and It is Bob's turn).
Comment: For $n=1$, Bob has no valid first move ...
Comment: @HagenvonEitzen Sorry, suppose $n \geq 2$
Comment: Well, $B$ wins for odd $n$, just by taking $1$.
Comment: @lulu Yes, I saw that too. However by checking the smaller cases it seems that Bob can win whenever $n$ is not a power of $2$
Comment: You should include the cases you have already solved in the post.
Comment: @lulu Edited my post
Comment: Seems to me that, if $n$ is not a power of $2$, $B's $ first move should be to hand $A$ the highest power of $2$ which is less than $n$.  Thus if $n=14$, $B$ should take $6$, leaving $8$.
Answer: As situation is determined by a pair $(n,m)$ of positive integers, where $n$ is the current numer of coins and $m$ the maximal allowed number to take.

The starting position for Bob is $(n,n-1)$.
In a position $(n,m)$ with $m\ge n$, the player can win immediately by taking $n$ coins
Otherwise, the player can take $c$ coins, $1\le c\le m$, and the situation becomes $(n-c,c)$

Note that the only move valid from $(k,1)$ is by one coin to $(k-1,1)$.
Consequently, $(k,1)$ is a winning position (W) if $k$ is odd and a losing position (L) if $k$ is even.
Claim. If $n$ is odd, then $(n,m)$ is W. If $n$ is even and $m>1$, then $(n,m)\sim (n/2,\lfloor m/2\rfloor)$. If $n$ is even and $m=1$, then $(n,m)$ is L.
Proof. By induction on $n$.

If $n$ is odd, we can take $1$ coin and produce $(n-1,1)$ with $n-1$ even. By induction hypothesis, this is L so that $(n,m)$ is W.
If $n$ is even and $m=1$, we must take $1$ coin and produce $(n-1,1)$ with $n-1$ odd. By induction hypothesis, this is W so that $(n,m)$ is L.
If $n$ is even and $m>1$, then we can either take an odd number $c$ of coins (so enecessarily $c<n$), which results in $(n-c,c)$ with $n-c$ odd. By induction hypothesis, this is W. Or we can take an even number $c=2c'\ge 2$ of coins, which results in $(n-c,c)$, by induction hypothesis $\sim(\frac{n-c}2,\frac c2)=(\frac n2-c',c'),$. Our $(n,m)$ is W iff at least one of these successors is L. Equivalently, all corresponding $(\frac n2-c',c')$ with $1\le c'\le\lfloor \frac m2\rfloor$ are L. And this is equivalent to $(\frac n2,\lfloor \frac m2\rfloor)$ being W.

$\square$
Corollary. $(n,n-1)$ is L if $n$ is a power of $2$ and W otherwise.
Proof. If $n=2^k$ is a power of $2$ with $k\ge1$, then $(n,n-1)\sim(n/2^{k-1},\lfloor(n-1)/2^{k-1}\rfloor)=(2,1)$, which is L.
If $n=2^ku$ with $u$ odd and $>1$, then $(n,n-1)\sim(n/2^k,\lfloor (n-1)/2^k\rfloor)=(u,u-1)$, which is W.
$\square$
Answer: I'll prove your guess by induction.
"For $n$ coins, the 1st (2nd) person has winning strategy" means that no matter how many coins the 2nd (1st) person takes, if the 1st (2nd) person takes some number of coins in each step then he'll take the last coin.
Denote Bob and Alice as B and A resepctively. $n$ is the total number of coins.
Proof.

Suppose $P(m)=\{2^i|i=1, 2,\dots, m\}$ where $m\geq1$.
Initial Case. When $m=1$,

for $n\in P(1)$, A has winning strategy.

Induction Step. Suppose this claim $C$ is true:

for $n \in P(m)$, A has winning strategy.

Then for
$$
\begin{align}
n&=1+1+2+2^2+2^3+\dots+2^{m}\\
&=2^{m+1},
\end{align}
$$
A has winning strategy:

Case 1. In the 1st step, B takes 1 coin. A will win.
Case 2. In the 1st step, B takes $b_1$ coins, where
$$
\begin{align}
b_1 &= 1+(1+2+2^2+2^3+\dots+2^k+r) \\
&= 2^{k+1}+r,
\end{align}
$$
where
$$
\begin{gather}
k\geq 0, \\
0\leq r<2^{k+1}.
\end{gather}
$$
In 2nd step, B takes $a_2$ coins, where
$$
a_2 = 2^{k+1}-r \leq 2^{k+1} \leq b_1.
$$
Then there are left
$$
s=2^{k+2}+2^{k+3}+\dots+2^{m}
$$
coins. For $i=3, 5, 7,\dots$,
$$
b_i\leq a_2 \leq 2^{k+1}.
$$
For each term in $s$, i.e. $2^l$, B cannot take all coins of it, and A has strategy to take the last coin of it according to claim $C$.

So

for $n \in P(m+1)$, A has winning strategy

I've proved that claim $C$ is true for $m\geq 1$.
For $2^m< n < 2^{m+1}$, where $m\geq 1$, B has winning strategy:
In 1st step, B takes $n-2^m$ coins and there are $2^m$ coins left. In 2nd step, A can take $l$ coins, where $l\leq n-2^m < 2^m$. From now on, regard A and B as the 1st and 2nd person respectively. According to claim $C$, the 2nd person, i.e. B, has winning strategy. $\square$


Are measurement probabilities on the two qubits of a maximally entangled state equal?

Question: Suppose we get the Bell state
$$
|\Phi ^{+}\rangle ={\frac  {1}{{\sqrt  {2}}}}(|0\rangle _{A}\otimes |0\rangle _{B}+|1\rangle _{A}\otimes |1\rangle _{B}).
$$
If we now apply a unitary operator $U$ only to the first qubit then this operator is given as follows:
$$
U \otimes I
$$
but if we consider a POVM with the elements ($E_1, E_2$), and since we get the same result when we measure the second qubit, then we should have
$$
E_1 \otimes I = I \otimes E_1
$$
But this is obviously not the case. Where is my reasoning error here?
Comment: It might be easier to understand where your misunderstanding comes from if you try to work through an example. Note that $\langle \psi| (X\otimes I) |\psi \rangle = \langle \psi| (I\otimes X) |\psi \rangle$ does not imply $(X\otimes I) =(I\otimes X) $.
Comment: @Rammus I was able to do it with an example as long as $E_1 = |v_1\rangle \langle v_1|$ and $v_i$ is an orthonormal basis. But this is not general enough.
Comment: @JohnyDow The question makes an impression that you expect that the operator equality $A=B$ follows from the equality of a single matrix element $\langle v|A|v\rangle=\langle v|B|v\rangle$ for some vector $v$. However, this is obviously false and your question includes a counterexample (set $v=|\Phi^+\rangle$, $A=E_1\otimes I$ and $B=I\otimes E_1$), so it is not clear what it is that you're asking :-)
Comment: @AdamZalcman For a maximally entangled state measuring the first or the second qubit should give us the same result, correct? So is it correct to say that $\langle \psi|(I \otimes X)|\psi\rangle = \langle \psi|(X \otimes I)|\psi\rangle$?
Comment: Re question 1: No. This depends on which maximally entangled state you use. For example, measuring the first or the second qubit of $|\Psi^+\rangle=(|01\rangle+|10\rangle)/\sqrt2$ in the computational basis will give opposite results. Re question 2: No. For example if $|\psi\rangle=|0+\rangle$ then $\langle\psi|I\otimes X|\psi\rangle = 1$ but $\langle\psi|X\otimes I|\psi\rangle = 0$. (I'm voting to close because the post remains unclear. I encourage you to edit to clarify what the question is.)
Comment: OP is correct that, for any Bell state, a POVM with elements $E\otimes I$ is equivalent to a POVM with elements $I\otimes E^\top$. See eg Eq. (4) [here](https://arxiv.org/abs/1906.07731)
Answer: Your assumption that performing the same POVM on first and second qubit always gives the same probability outcome (even sticking to maximally entangled states).
You might be assuming that this is the case because you are thinking of a maximally entangled state written as
$|00\rangle+|11\rangle$. Such a state can equivalently be written, for any pair of orthonormal vectors $|u\rangle,|v\rangle$, as
$$|0,0\rangle+|1,1\rangle
= |u,\bar u\rangle+|v,\bar v\rangle.$$
For such a state, your assumption does indeed clearly hold.
However, this is not the most general form of a maximally entangled state, which in general has the form
$$|u_1,v_1\rangle + |u_2,v_2\rangle$$
for some pair of orthonormal bases $\{|u_1\rangle,|u_2\rangle\}$ and $\{|v_1\rangle,|v_2\rangle\}$. This is the type of state you also get after applying a local operation to your initial maximally entangled state.
For these, the same POVM might lead to different outcome probabilities on the two systems.
It is, however, true that given some measurement $E_1$ on the first system, you can find an "equivalent" measurement $E_1'$ which applied on the second system gives same outcome probabilities. This will simply be the operator which acts in the basis $\{|v_1\rangle,|v_2\rangle\}$ in the same way $E_1$ acts in the basis $\{|u_1\rangle,|u_2\rangle\}$.
Comment: |0,0> + |1,1> isn't equal to |i,i> + |-i,-i>.  That equals |0,0> - |1,1>. The state that's invariant to basis is the singlet state |0,1> - |1,0>.
Comment: @CraigGidney you are right, thanks. I should have written $|u,\bar u\rangle+|v,\bar v\rangle$. The invariance I was thinking of is $(U\otimes\bar U)\sum_i |i,i\rangle=\sum_i |i,i\rangle$ for any unitary $U$ (which is equivalent to the statement $UIU^\dagger=I$ with $I$ identity). Using your example, this amounts to |00>+|11>=|i,-i>+|-i,i>. In this notation, the invariance of the singlet you refer to corresponds to the identity $UJU^T=J$ with $J$ standard symplectic matrix, which is true because every unit-determinant 2x2 matrix is symplectic
Comment: @glS notably, the related measurement can always be expressed as $I\otimes E_1^T$ when the state is maximally entangled
Comment: @gIS Technically, $UJU^T=(\det U)J$, but we can of course ignore the global phase (or assume that $U\in SU(2)$).


How do I model line comments in a CFG?

Question: Assume we want to define a context free grammar of say a programming language, where on each line everything after the character # until the end of line is considered a comment and should be ignored. How to express that in a context free grammar?
Answer: Without multi-line statements, it's rather simple; assuming line is the non-terminal for well-formed line, change its right-hand-side appearances to
line (# .*)?

(borrowing regular expression syntax for brevity).
Otherwise, if you explicitly handle line breaks, replace occurrences of the line-break token CRLF (or so) similarly by
(# .*)? CRLF

If line breaks remain implicit, one chance you have left is make it part of the lexer; don't only skip whitepace, but also (# .*)? [\r\n]. You can also create a token COMMENT for that and place it in all places of the grammar where it may appear. This strategy doesn't work for nested multiline comments, though, a common problem in older languages.
Comment: thanks, sorry but I don't fully understand the syntax you're using. also I have to do it all using a context free grammar, even if I rely on a lexer, the lexer has to be expressed as a cfg as well. and unfortunately I have to support multiline statements that may contain comments each, just like // in C (btw I see that C lexer also had to do it using some kind of "hack" as in here http://www.lysator.liu.se/c/ANSI-C-grammar-l.html )
Comment: @TroyMcClure Are you a student facing an exercise task, or are you a practitioner traying to build a compiler?
Comment: The first two approaches should be workable given the setting you describe. Note that, in practice, such issues are probably often taken care of by some preprocessing -- it's trivial to run a tool over a a set of files that removes all comment suffices from lines (unless your language has stuff like multi-line strings, you are interested in extracting the content of some comments, or any number of other complications, of course). Then you don't have to handle them in your grammar.
Comment: @troy: the link you provide a quote is not "the C lexer", but rather a lexer put together by someone, not as part of any C compiler. Furthermore, it does not recognise line comments, which as  Raphael says, are trivial, but rather C's multiline comment syntax. (This can also be represented as a regular expression, and you should be able to find a correct one easily enough a or with a little more thought write one.) The hack in the code snippet was probably pragmatic with lex, but flex works much better with regular expressions and any serious C implementation would use one.
Comment: @Troy: anyway, you "model" a comment just like you model whitespace. In almost all languages, they're syntactically and semantically identical.
Comment: @rici yes i figured it out in the meanwhile, i'll just treat it as space indeed
Answer: Can just treat comments as whitespaces.

How do I model line comments in a CFG?


Recommended events to display throbber?

Question: To indicate that the application is doing something, throbbers are often displayed.  Are there certain type of events that one should or shouldn't display one?  Obviously long events which the user must wait till complete are a good application, but is there more to this?  Also, i
Is there a recommended amount of time of a given event when one should or shouldn't display one?  Thanks
Answer: Throbbers are also known as 'spinners' or 'loading indicators'.
Throbbers can be used to indicate progress on long actions/waits which meet some or preferably all of these characteristics:

The action/wait is blocking user flow. That is, it's difficult or impossible for the user to proceed with the flow she is on without waiting.

e.g. The user asked a question and the answer is being retrieved from a server
e.g. The user scrolled to the bottom of a Facebook or Pinterest feed and new content is being loaded.
If the wait is non blocking (eg your app is loading some podcasts in the background) then throbbers often aren't the right solution because the animation draws user attention away from the flow.

The action is long enough that a user may feel anxious if there is no indication of progress (aka did it hang?). For short actions or waits having a short-lived throbber is not a great idea because it can confuse users.
It's difficult or impossible to indicate exact progress. If it's possible to indicate progress (eg percentage complete) then progress bars or widgets are more appropriately communicative and less likely to frustrate users.
Answer: It is relative.  If you have a very responsive application then maybe as short as 1 second.  Anything over 10 seconds would be a long event to most users.
In programming terms it is a long running task.  An event is what triggers the task.
The problem with a long running task is often the application just does not know how long.  It is typically a task that depends on an external resource.  You need to deal with that gracefully.
There are two type of long running events:

cancelable
uncancelable

On a cancelable task the user is presented with both a busy indicator (e.g. throbber) and a way (button) to cancel out.  If all the buttons simple go dead with a busy indicator and the user has no way to cancel out but to kill the application that is a poor UX. Another problem with kill is the application does not (typically) release the external resource. Ideally you can display a progress indicator but unfortunately many long running tasks don't progress metrics.
Long running tasks can be preformed asynchronously and leave the application hot (buttons enabled) but if the users moves on to other tasks (buttons) and later the result from that button 3 buttons ago is displayed it confuses the user.
If it is resource that is going to respond in 10 seconds or less or not at all then you don't need a cancel - just a simple busy indicator.  If you don't get a response give the user a message "resource X is not available".
What I typically do is delay the busy indicator by 1 second.  If the task takes more then 1 second then it is likely to take more than 2 seconds.
And a simple message in a text box can also be a valid busy indicator.
For example if the results from a search are returned to text a box then fill the text box with "search running" while the search in running. I think this leads to better flow than a spinner.

Recommended events to display throbber?


When walletnotify and blocknotify notifications are sent out?

Question: Do the notifications from walletnotify and blocknotify are sent during the wallet synchronization or at the end? Say the wallet was offline for 100 blocks and when started: will it send the notifications after the each block it downloads and verifies and so all the relevant transactions in them or will it send them at the end? I would assume it sends them as it gets them, so then how would I resolve these properly if all the incoming request at that time are blocked?
Answer: Refers to Bitcoin Core 0.17:
WalletNotify
Will be executed at the time when a transaction gets added to the wallet. If your wallet is 100 blocks behind and in those 100 blocks you have 2 transaction in each block, the wallet notify script will be called twice per block (== 200 executions during the 100 block catch up).
Only valid blocks (valid transaction) will result in a wallet-notify call.
Will also be called when a mempool transactions (unconfirmed transaction) was added to the wallet (and therefore relevant to the wallet)
BlockNotify
Will be executed when a block gets connected to the active chain and before WalletNotify.
Consider taking a closer look at Bitcoin Cores ZMQ API that allows more efficient process interaction (wallet/block notify spawn a process on each call).
Comment: Thanks for the quality response. It's worth noting that ZMQ does not guarantee responses, for situations where you must know about transactions it is more suitable to poll.


Getting CPU usage per Process of Chrome

Question: I developed a Chrome-Extension and want to know if it is possible to get CPU usage of any tab in Chrome (please see the image)? I saw a few questions which are very old. Maybe there is some new techniques to get the CPU usage for each tab.
Comment: https://developer.chrome.com/extensions/processes#method-getProcessInfo is still in the dev channel and not yet available, but will provide more information about each running process.
Comment: See the [documentation](https://developer.chrome.com/extensions/processes)
Comment: i installed chrome dev and run the code chrome.processes.getProcessInfo but got following error:

Uncaught TypeError: Cannot read property 'getProcessInfo' of undefined
    at :1:18
Comment: Please update your question , insert getProcessInfo segment.
Answer: It is possible. You need to request the permission: "processes" first in your manifest.json with something like:
{
  "name": "My extension...",
  ...
  "permissions": [ "processes" ],
  ...
}

If you are on dev-channel you'll have chrome.processes available. On other channels the extensions will be rejected with an error saying:

'processes' requires dev channel or newer, but this is the stable channel.

Getting CPU usage per Process of Chrome


Constraints on the factorization of a unit quaternion rotation operator

Question: In Jack B. Kuipers' Quaternions and Rotation Sequences page 194-195, section 8.7.1 explains how to decompose a tracking sequence quaternion $q = q_0 + \vec{i}q_1+\vec{j}q_2+\vec{k}q_3$ into two other quaternions $a^3 = a_0 + \vec{k}a_3$ and $b^2 = b_0 + \vec{j}b_2$ (the 3 and 2 denote axes of rotation, not quaternion exponentiation). Equation 8.10 states that
$$q = q_0 + \vec{i}q_1+\vec{j}q_2+\vec{k}q_3 = a^3b^2$$
$$  = a_0b_0 - \vec{i}a_3b_2 + \vec{j}a_0b_2+\vec{k}a_3b_0$$
which makes sense in the context of quaternion multiplication. However, he then states

In Equation 8.10, it is easily verified, that $$q_0q_1 + q_2q_3 = 0  \tag{8.11}$$

Where did this constraint come from?
Edit: This text continues by tabulating this factorization for all combinations of $a^ib^j$ for $i,j \in [1,2,3]$. Associated with each factorization is an associated constraint of the form $q_lq_m \pm q_oq_p=0$. Where do these come from?
Answer: It turns out that the constraint is nothing more complicated than seeing that $$q_0q_1 = -a_0b_0a_3b_2$$ while
$$q_2q_3 =  a_0b_0a_3b_2$$
and, therefore, for all a and b subject to the forms above, this constraint equation holds.


ps3 saved data between users

Question: I played assassins creed:black flag on my friends ps3 on his user but then he said I could create a new user for me to use. I copied the save data from his user to mine and then accidently deleted it from his user but when I go on the game on my user it won't let me open the saved data. Is there anything I can do or will I have to restart the game again?
Comment: I'm pretty sure saved data is handled differently per-game, though post-trophies many games will block other user's save data. IIRC usually it prevents copying the save data at all though rather than letting you copy it then just not reading it. Don't have this particular game to test with though
Answer: Well, officially you're not supposed to be able to copy save data between users from what I've read from Sony, but apparently it is possible on some games.
You can find a list here that is kept current (at the time of this answer) that lists games that allow copying between profiles as well as other details.

ps3 saved data between users


How can I get a visa for Canada as a Kenyan citizen visiting the USA?

Question: I am visiting the USA with a B1/B2 visa, with a Kenyan passport.
Do I need a visa to visit Canada and if I do, what are requirements and the process for me to be able to get a visitor's visa?
Answer: Kenyan nationals do normally require a visa to visit Canada.
Source: http://www.cic.gc.ca/english/visit/visas.asp
To apply for a visa, you must show evidence of your legal status in the territory where you're applying.
Sources:

http://www.csc-cvac.com/en-US/selfservice/cvac_welcome
http://www.csc-cvac.com/en-US/selfservice/cvac_docs_forms_checklists
http://www.cic.gc.ca/English/pdf/kits/forms/IMM5484E.PDF

In your case, proof of immigration status will be

the visa you used to enter the US
the stamp you received when you entered the US, and
a print-out of your I-94 record, for which you'll need to visit http://i94.cbp.dhs.gov.

Other requirements are substantially the same as for your B1/B2 visa, or indeed for any visitor's visa.  You must have a reasonable purpose for your trip, you must have enough money for your trip, and so on.  These requirements are also covered in the sources cited above.


Where were the locations of the districts in The Hunger Games?

Question: In The Hunger Games, the nation of Panem (implied to be North America after some sort of post apocalyptic scenario) is divided into 13 districts and the Capitol. District 12 is hinted to be in the Appalachia Mountains, and the Capitol is hinted to be in the Rocky Mountains. District 13, which was destroyed, is described as "east of District 12", which made me think it's where Washington D.C. is today.
The other districts, however, were mostly ignored, and almost no detail was provided as to their locations in the books. Has there been any supplemental information that reveals where the districts are?
Comment: Hmmmm...I had always kind of assumed that District 13 was in the southeastern US, specifically in the east Tennessee area. That is, after all, where Oak Ridge National Laboratories and Y12 are located and it is the site of the former K-25 plant which was the uranium enrichment facility used during the Manhattan Project. Just made more sense in my head for District 13 to be located there than somewhere north of District 12.
Answer: Panem is actually where North America currently is, they're not confined to just the current area of the USA.  Here's a map from a brief shot in the Catching Fire film. They haven't released an official map, as far as I know, nor do the books fully describe the locations of all of the districts.
Comment: It derives from the Latin saying 'Panem et circenses', as in 'bread and circuses'.
Comment: This seems way to large.  Most districts can send all their children to the reaping, which occurs in a city square typically.  District 12 is implied to have only one town in it.  How can that make sense if Panem is all of America?  Is America really that devastated or the Capitol really that brutal that the population is that low?  How can they control such vast areas -- why doesn't Katniss and friends just escape into the wilderness _within_ district 12?  I'm thinking it can't be much larger than a state like, say, Georgia.
Comment: @TravisChristian That's a case of the Writer Not Doing The Research.  It's known that the sea levels have risen, but the book doesn't mention then traveling over water on their trip from District 12 to the Capitol.
Comment: I haven't read the books, but the sea level on this map doesn't make any sense. It shows the Cascade Range completely underwater while the low-lying Mississippi basin is mostly dry. If the sea level rose significantly, most of what is shown as Districts 4, 8, 9, and 11 would be underwater.
Comment: @KeithS: Of course, you need a lot of land for farming, ranching and timber. But the population of panem is a LOT lower than that of modern-day North America. Thus, the area needed is also a lot smaller. I think what you describe in your answer is a lot closer to the author's intention than the map drawn in the answer here: "large swaths of wasteland" that just don't belong to any district.
Comment: I agree with you that most District areas seem very large. However, sometimes that's by necessity; farming, ranching and timber take a LOT of land to be sustainable. Mining and manufacturing not quite so much. My guess is that most of these Districts have one large, fenced population center, surrounded in most cases by more "wilds" than is shown here, and if there is a need to ferry workers to outlying agriculture areas, it's on a "day-trip" basis, and there is a no-frills rail system to accomplish that.
Comment: Despite the low population, if the human race were close to wiping ourselves out we'd probably be pretty far-flung, to avoid the destruction we'd caused prior to the creation of Panem. If the world had survived a nuclear war, then basically take any current city with a population > 1 million, and wipe a 100- or even 200-mile radius around it off the map. Those population centers that aren't now under sea level, of course. The author does state that the Capitol is in the Rockies and D12 is in Appalachia, so Panem's at least that big.
Comment: I think it's worth noting that "Panem" probably derives from "Panamerica".
Comment: Thanks!  This is possibly one of the best fan maps I've seen, since it does include the higher ocean levels.  Thanks.
Comment: @TravisChristian I'm wondering if the inland sea in California is meant to be the Central Valley, although there should be an outlet to the Pacific (perhaps near San Francisco).
Answer: Although I think the fan map Keen shows is very good and logical, there are some things that bug me about it:

Panem is located in the "remains" of North America, and was formed at a time when the human race was dangerously close to wiping themselves out. This would imply that large swaths of formerly densely-populated areas are now uninhabitable from the use of some form of WMD. Think of any current North American city with a population >1m, and pretty much wipe a 100-mile radius around that city off the map permanently. Most of what the map shows as District 12 wouldn't be habitable.
District 12 is described in the book as being one urban center with mines just underneath it, and the whole complex within the electric fence is within pretty easy walking distance. Everybody in District 12 was expected to be in the square for the Reaping, and they only got Reaping Day off to be there; that means there likely aren't other urban centers within the District.

My view of the world of Panem was of small areas of habitable land in between large swaths of wasteland around what used to be dense population centers. These Districts aren't "states" or "regions" as we'd know them; they're more like cities; small population centers in areas where people can still live, and that have economic interest to the Capitol.
Let's say the nukes didn't hit present-day Beckley, WV; it's only got a population of about 20,000 people, and there are a lot of coal mines around it. That could well be the location of District 12 in the novels, after the human race re-centered around what was left. The fences would basically enclose what was needed (which would be within walking distance) and everything else around that very small dot would be "the wilds".
The other districts would probably be very similar: small patches of habitable, even arable land that are all that's left after the major population centers surrounding them were destroyed. Districts 4, 7, 10, and 11 are highly agricultural, and so would take more land than just the urban center/manufacturing complexes of the other Districts. These Districts might count more land as being part of the District (since it's maintained and so not "wild") and may have a rudimentary, "no-frills" rail system branching off the main lines for transporting "day laborers" out to the fields/pastures/fishing grounds.
The Capitol is tricky. The map seems to center The Capitol around an area in the middle of nowhere near the T-corner of Utah, Colorado and Wyoming. There's a pretty decent river/reservoir there, but not much else, making it prime real estate when everything else has been made unlivable. At first I thought the map may be inferring that the Capitol is around Cheyenne Mountain, but first being near a major population center (Colorado Springs), and second being a VERY high-priority target for WMDs (NORAD), it would be very likely reduced to smouldering radioactive glass.
Comment: But we don't know that for sure. Panem has largely lost the technology and resources required for trans-oceanic travel; we're limited to rails and hovercraft, no aircraft or ocean liners to speak of. As I mentioned in an answer to another question along these lines, it seems naive to assume that of the 7 billion people currently on the planet, Panem's hundreds of thousands, all in North America, are all that's left. Panem may well be the last civilization to possess advanced technology, but there could well be nomadic tribes wandering habitable areas of Eurasia or Africa. We just don't know.
Comment: @recognizer - That's one option, however if there were a nuclear apocalypse long ago, Cheyenne Mountain would be a smoldering ruin. There are lots of mountains in the Rockies that the Capitol could use to rebuild a fortress like this.
Comment: I think the lack of anyone in Europe, Asia, and Africa covers the lack of inhabitable land.  Along with the rising sealevels, humanity is definitely barely hanging in there.
Comment: exactly right!!
Comment: @KeithS In Mockingjay, they describe District 2 as containing a huge military facility built into a mountain - I was under the impression that was meant to be Cheyenne Mountain. It's also noted that District 2 is close to District 1 and the capital.
Answer: Check out the following link: http://aimmyarrowshigh.livejournal.com/32461.html
This was made by Aimmyarrowshigh & Badguys. I am VERY impressed with their rationale and final product. Big fan of their work on this.

Explanations from aimmyarrowshigh:

The Capitol is in Denver.
D12 is Appalachia.
D11 shares a border with D12, is one of the largest districts, is South of D12, and is primarily used for growing grain and produce.
D10 is primarily used for raising livestock. They do NOT process the livestock in D10. However, to feed an entire nation, D10 is likely another very large District.
D9 processes food for the Capitol and the tesserae; therefore, it likely shares borders with the food production Districts (D4, D10, D11).
D8 produces and treats textiles and is a factory District. It is POSSIBLE to reach D12 from D8 on foot over a course of weeks/months. Therefore, it does not cross a large body of water.
D7 specializes in lumber. It's probably large. It has no role in food processing or manufacture.
D6 works closely with the Capitol in the research and manufacture of drugs (morphling, medicines). It likely has close ties to D5 in the production of mutts.
D5 is entirely dependent on the Capitol, so it's probably somewhat nearby, and specializes in genetic research and manipulation. Because of the necessity of creative thought and intellect, it's most likely a smaller District so that it's easier to monitor and control.
D4 is the ocean. It does have a role in food production. It's very large. It is a Career District, so it likely is near the Capitol and has some self-sufficiency, but not enough that it doesn't engender loyalty. (Aside from that, D4 = perfect.)
D3 has extremely close ties to the Capitol and works with electronics and technology. It is likely small, the Capitol can closely monitor its scientific minds. It has no role in food manufacture or processing.
D2 specializes in weaponry, is the most loyal District (because the Capitol needs to keep its weapon specialists happy, non?), and has no role in food production. D2 also works in some minor Mining elements and trains Peacekeepers. The Panem railroad is easily accessible in D2.
D1 produces luxury goods for the Capitol -- INCLUDING having a diamond mine. Kelsey Lake Diamond Mine is a defunct diamond mine in Colorado, USA. It is located in the State Line Kimberlite District, near the Wyoming border.
D13 specialized in nuclear power, shares a border with D12, is both visible and reachable from D12 by foot, and is North of West Virginia. Three Mile Island was in Londonderry, Pennsylvania (107 miles west and slightly north of Philadelphia) and probably remained a nuclear reactor or was co-opted again as a reactor. D13 is small but mighty and is surrounded by Wilderness. It is self-sufficient.
Comment: Could you please provide a bit of synopsis of what your link covers. I agree that it provides some very well rationalized insights into the map of Panem, but without context this link could later be useless.
Comment: @HpShout:  Why is the Yucatan there twice?
Comment: see my other comment above, this seems way too large, I can't believe Panem is much larger than a state's size.
Comment: Good logic, but they fail to take into account the destruction of many real-world population centers. Panem's Districts were fenced in long before the first rebellion "for their own safety", due to the use of chem/bio/nuclear WMDs in past conflicts. Denver would be wiped off the map permanently, and global warming would bring the coat many miles further inland. Additionally, each District has only one major population center, and with very few exceptions ( farming, fishing and lumber) most of the economic production of that District takes place there. So, most Districts would be rather small.
Comment: @KeithS - The map depicts what is essentially "corporation limits" of the districts. The linked blog post describes that while the mapped land may not functionally be used by the districts, it wouldn't make sense for the Capitol to leave large swaths of land "unincorporated". Likewise, the same can be said of real maps and the location of state borders, which extend far beyond city limits.
Answer: I know you referred to the books; but there is a brief shot in the Hunger Games: Catching Fire movie that shows the location of some of the districts.
It's near the beginning when Katniss and Peeta begin the Victor's Tour. Katniss snaps at Effie for saying they (Katniss and Peeta) have "earned" the special treatment they are getting. Katniss then leaves the dining car and gets a glimpse inside of some sort of control room with a large map showing the different districts. The operator quickly notices Katniss and closes the door:

It depicts generally what has been described here already (i.e. mainly based around the current United States in North America).
Answer: Like Keen said, the books refer to North America, not specifically the USA as the home of Panem, so Canada/Mexico are certainly included somehow. District 12 is definitely in the Appalachians, 11 borders on it and encompasses a large agricultural region, so it is generally portrayed in the southeast. The capitol is in the rockies, and it is likely that District 2 is as well. Other than that, it is guesswork.
One thing often missed on the fan maps - the books make it clear that the oceans have risen and the coastlines changed. How much they don't say, but it does make the more common fan maps inaccurate.
Edit - And I see now that Keen's map does account for the higher sea levels. Not sure how I missed that first time around. Makes my answer a little more redundant.
Answer: This is the map released by the Hunger Games Instagram:

This matches up exactly with the map from the game The Hunger Games Adventures, which also shows District 13 north of 12, and what used to be Florida underwater near the corner of Districts 8, 11, and 12:

On the other hand, these two maps are not exactly what's shown in the map in Catching Fire (see the other answers), where District 9 is shown to stretch very far south, bordering District 10 and even a stretch of ocean to the south. And many districts are missing entirely (or hidden) on that map.
Comment: Wow, so these districts are hundreds of thousands of square miles each? With only a few thousand citizens? That's pretty sparse...
Comment: @BradyGilg Most people would be clustered in cities. I also get the feeling that they have faster, more advanced transportation than what we do now.
Answer: Panem is located in a ruined North America (so modern-day America and Canada).
The Capitol: is located near Salt Lake City. The city would most likely be kept in one piece, and is located in the midst of the Rocky Mountains.
District 1: is located directly north of the Capitol. They produce luxury items and the district is located in northern Utah and Idaho.
District 2: is located to the southeast of the Capitol in modern-day New Mexico.
District 3: is located in California and Nevada.
District 4: is located in southern California and Mexico along the coast.
District 5: is located in Arizona.
District 6: is located near the ruins of Chicago.
District 7: is located in the Pacific Northwest.
District 8: is located near Rochester in modern-day New York.
District 9: is located in the Mid-West somewhere.
District 10: is located in Texas and Oklahoma.
District 11: is located in the Deep South, near Atlanta.
District 12: is located in Appalachia.
District 13: is located in central Pennsylvania.
District 14: (fan-fiction only) Hawaii
Comment: I don't know much about this book/film, but I'm pretty sure there's no District 14. Can you back this up with some evidence?
Comment: I *do* know much about these books/films, and there's definitely no District 14. Where did you get this information from?


Using an Ethernet Shield and a tlc5940 together

Question: I have am using an Arduino Uno R2 and TLC5940 to control a bunch of RGB LEDs. I want to add an Ethernet Shield R3 so that I can control the LEDs over a web-interface. However, the ethernet shield and TLC5940 use many of the same pins. Can I use them together? How?
Answer: When using multiple SPI devices the normal way to have them share a bus is to assign them distinct slave select lines. The problem here is that although the '5940 libraries use SPI to send data to it, the '5940 is not actually a proper SPI device and so lacks any sort of slave select line.
All is not lost, however. Since the '5940 responds only to SCLK (and GSCLK of course, but you should be running that one separately) all you need to do is inhibit it while nSS for the Ethernet module is active. This can be done with just a little bit of external circuitry. Since nSS must be high in order for the Ethernet module to be inactive, we can AND SCK with nSS to derive SCLK from it.
Using a 74HC08 for this would work, although it leaves 3 of the gates unused. A 74HC02 will let you do it with no wasted gates, but with a slightly higher propagation delay.
And of course, the requirement to clock in the grayscale data before the grayscale cycle completes is still there; properly interleaving this with the Ethernet communications is left as an exercise for the reader.
Answer: You can do this with out any additional hardware by putting the TLC5940 to BITBANG mode instead of SPI mode and making the Ethernet Shield use D8 pin instead of D10 pin.
Software Changes

On line 61 of sketchbook/libraries/Tlc5940/tlc_config.h replace
#define DATA_TRANSFER_MODE    TLC_SPI

with
#define DATA_TRANSFER_MODE    TLC_BITBANG

On lines 339 - 341 of arduino/libraries/Ethernet/utility/w5100.h replace
 inline static void initSS()    { DDRB  |=  _BV(2); };
 inline static void setSS()     { PORTB &= ~_BV(2); };
 inline static void resetSS()   { PORTB |=  _BV(2); };

with
 inline static void initSS()    { DDRB  |=  _BV(0); };
 inline static void setSS()     { PORTB &= ~_BV(0); };
 inline static void resetSS()   { PORTB |=  _BV(0); };

Hardware Changes

Bend leg of the D10 pin on the Ethernet Shield so it doesn't connect to the D10 pin on the Arduino.
Connect D10 pin of Ethernet Shield to D8 pin on the Ethernet Shield

Connect the TLC5940 using the following pins:
-------------                                  ---u----
Ethernet   13|                           OUT1 |1     28| OUT channel 0
Shield     12|                           OUT2 |2     27|-> GND (VPRG)
           11|                           OUT3 |3     26|-> SIN (pin 7)
10,underneath|-> BLANK (pin 23)          OUT4 |4     25|-> SCLK (pin 4)
            9|-> XLAT (pin 24)             .  |5     24|-> XLAT (pin 9)
            8|-> to pin 10 on shield       .  |6     23|-> BLANK (pin 10 underneath shield)
            7|-> SIN (pin 26)              .  |7     22|-> GND
            6|                             .  |8     21|-> VCC (+5V)
            5|                             .  |9     20|-> 2K Resistor -> GND
            4|-> SCLK (pin 25)             .  |10    19|-> +5V (DCPRG)
            3|-> GSCLK (pin 18)            .  |11    18|-> GSCLK (pin 3)
            2|                             .  |12    17|-> SOUT
            1|                             .  |13    16|-> XERR
            0|                           OUT14|14    15| OUT channel 15
-------------                                  --------

Tested with Arduino 1.0.5 on Linux Mint 17 with r14 of the tlc5940arduino library.
References:
http://blog.andrewwei.mu/?p=19
http://forum.arduino.cc/index.php/topic,22111.0.html
http://forum.arduino.cc/index.php/topic,142977.0.html
http://forum.arduino.cc/index.php/topic,118265.0.html


How are the limits of regional vernacularism/slang should be employed in a novel that is true to the area and time?

Question: What's an acceptable amount of non-standard English that can be used to depict the language of a certain area of the South (Louisiana) without turning off readers? My current work in progress has dialogue from a rural community which I know is authentic, but a couple of editors have warned me that its use will turn off some readers. Likewise, I recall several books that I read in a book club that were not well received by some of the other members for the same reason.
Answer: You want something that sounds authentic, not is authentic. You are trying to create and impression, not a record or documentary.
You need something readers can understand. 'Huckleberry Finn' uses a number of slang terms but it is easy enough to work out what they mean. They create the character and the place without getting in the way of meaning.
Overdoing regional words and constructions leads readers to give up. It is similar to using foreign language words and phrases in a story -- people start skipping them and then the pages they are on and finally the chapters they're in.
Comment: I used is authentic because, most often, they are the actual words spoken, and spelled phonetically.


Is heat energy actually kinetic energy?

Question: According to KMT, heat is just molecules moving/vibrating. By that definition, could heat energy be seen as kinetic energy?
Comment: Does this answer your question? [What exactly is heat?](https://physics.stackexchange.com/questions/8522/what-exactly-is-heat). See also: [Misunderstanding of kinetic energy turning into heat](https://physics.stackexchange.com/q/215370/226902),
 [Confusion between thermal energy and heat](https://physics.stackexchange.com/a/200265/226902),[Difference between "Heat" and "Thermal Energy"](https://physics.stackexchange.com/q/290814/226902).
Comment: By te way: KMT means [Kinetic Molecular Theory](https://physics.info/kmt/summary.shtml).
Comment: "Heat energy" is incorrect - the correct term is *thermal energy* - see https://en.wikipedia.org/wiki/Thermal_energy. As pointed out below, "heat" is thermal energy that is *transferred* between two systems - it is not an internal property of either system.
Answer: It is true for gases, when the interaction between molecules is small, which is the case of kinetic molecular theory. For liquids and solids the potential energy also play an important role.
Comment: Ah, interesting.
Answer: No. Heat is not the kinetic energy of molecules and atoms. That energy is properly called the internal kinetic energy of a substance. Heat, on the other hand, is the transport or transfer of energy due solely to temperature difference between substances.
An example of the distinction between an energy transfer mechanism and the energy itself at the macroscopic level is a collision between objects at different speeds (different kinetic energies). The collision is the mechanism for transferring kinetic energy from one object to the other. It is not the kinetic energy itself.
Heat may result in a change in temperature (change in internal molecular kinetic energy) in which case it is referred to as "sensible heat", or it may result in a change in phase, such as solid to liquid, (change in molecular potential energy), in which case it is referred to as "latent heat".
For a further discussion of the difference between heat and energy see: http://hyperphysics.phy-astr.gsu.edu/hbase/thermo/heat.html The article references Mark Zemansky (Co-author of textbook Heat and Thermodynamics) "Plea" about the use and misuse of the term heat. To quote:
"Don't refer to the "heat in a body", or say "this object has twice as much heat as that body". He also objects to the use of the vague term "thermal energy" and to the use of the word "heat" as a verb, because they feed the misconceptions, but it is hard to avoid those terms. He would counsel the introduction and use of the concept of internal energy as quickly as possible.
The emphasis on "hard to avoid those terms" is mine. It acknowledges the common, or colloquial, use of the term heat
Hope this helps.
Comment: Well, Wikipedia starts its article about heat with *"In thermodynamics, heat is the thermal energy transferred between systems due to a temperature difference.[1] **In colloquial use, heat sometimes refers to thermal energy itself.**"* You are making a point of using the proper terminology here, which is good, but you could make the answer a little more accessible by saying "in colloquial use, one could say so" or the like, and then point out that it is important to use the right words for things so that everybody agrees on what you talk about etc.
Comment: @Peter-ReinstateMonica OK I will update to acknowledge examples the common (though technically incorrect) use of the term heat, as is already pointed out in the link I provided. In particular wit respect to "Zemansky's Plea" referred to in the link in which he also discourages the use of the term " thermal energy" instead of internal energy. Thanks
Answer: No. Heat is the microscopic kinetic energy due to random molecular motion. Kinetic energy (as defined in Newtonian physics) occurs when the molecules all have a preferred direction.
Just like the difference between still air and wind. When the air is still, the molecules are all moving but they don't have a preferred direction, and the average is no net movement. However when there is wind, there is a net movement of air molecules.
Comment: You can define the kinetic energy of a single molecule. Therefore, it's better to say that "internal kinetic energy" (colloquially referred to as "heat") is the kinetic energy measured in the centre-of-mass reference frame of a fluid element. Otherwise, one could transform "heat" into macroscopic kinetic energy only by a formal change of reference frame! This is why thermodynamic quantities are always defined in the "comoving frame".
Answer: Yes, heat is kinetic energy of the atoms and molecules.
More precisely: Only the kinetic energy of their disordered movement is called heat energy. But the kinetic energy of their ordered movement (like of a flowing river or a driving car) is not considered heat energy.
Answer: Not entirely. For an ideal gas at rest, the thermal energy is indeed the kinetic energy of the gas atoms.
However, real substances are not that simple:

When two gas atoms/molecules collide, they first convert some kinetic energy to potential energy and back. Since you always have atoms/molecules colliding, there's always some thermal energy stored in potential energy of colliding particles.

When you have molecules instead of atoms, you not only get to store energy in the rotations of the molecules, you also get vibrations that contain thermal energy (if the temperature is high enough). Vibrations constantly convert kinetic energy to potential energy and back, so half the thermal energy stored in the form of vibrations is potential energy.

So, thermal energy is virtually entirely kinetic energy for a low pressure noble gas. But even sufficiently hot nitrogen gas (2-atom molecules that can vibrate along their axis) stores significant amounts of thermal energy in the form of potential energy.
Answer: Yes, well, sort of anyway. Rather than "heat", we should probably say thermal energy (internal energy). There was a lot of work done during the latter half of the 19th century to attempt to derive the laws of thermodynamics based on the idea that gases (and matter more generally) is made of a large collection (ensemble) of molecules/particles moving with a certain kinetic energy and interacting with each other through perfectly elastic collisions.
One of the great abstract theories formulated to do this was that of the Canonical Ensemble, which allows one, using statistics, to derive the classical thermodynamic laws from statistical principles, assuming both a large number of particles and all of the possible states that that large number of particles might exist in (all permutations of their velocities and positions).
Introducing the ideas of quantum mechanics and treating them in the same statistical manner extends this idea and allows us to obtain macroscopic explanations from quantum mechanical first principles. This spawned an entire field of physics, now known as condensed matter physics, and it deals with things like Bose-Einstein condensates, superconductivity, Drude-Summerfield models of electrons in metals (including their heat capacity, conductivity, Seekeck effect, etc.) It's the "missing link" from the building blocks of physics to the "real-world" macroscopic picture that we are familiar with in our day-to-day lives. One of the greatest successes of modern physics in my opinion.

Is heat energy actually kinetic energy?


Implementing version-control functionality

Question: Are there any recommended approaches for implementing version control functionality accessible to end users of a business application?
The goal is to create a robust version control system for an application where users modify business objects (rather than text).
I'm not looking for recommendations on version control software for developers (e.g. SVN, Git, etc.), but rather libraries or best practices for exposing version control to end users.
Ideally, I would like to allow concurrent editing with write locking, an undo-redo system (or local commits and reverts), etc.
Has anyone attempted something like this? Are there any (.NET) libraries that would help with this?
Answer: Have a look at CSLA, it's a business object framework which has N-level Undo-Redo support.
Also I'd look at CQRS  which can help you keep all the states that a business object went through.
Answer: Don't know of any ready-made libraries, but having a look at the command pattern might be helpful. Here is a starting point.


'No pictures are available on the phone' after selecting contact picture

Question: After upgrading my Nexus 5 to vanilla Lollipop a few days ago, I'm no longer able to assign pictures to my contacts. I can tap "Choose photo" and select a picture, but when I confirm I get the error "No pictures are available on the phone". How can this happen? It doesn't make any sense. I already tried wiping cache from recovery because some people say that it can fix some upgrade problems, but that didn't solve anything for me.
Comment: I've got the same problem. It seems a proper bug. I've opened an issue on android.
Comment: Here's the link for future readers: https://code.google.com/p/android/issues/detail?id=80352
Answer: You need to have a gallery app installed like the default "Gallery" or "QuickPic" app.
I had the same issue since "Gallery" doesn't come with Android 5.0 Lollipop, only "Photos" (which I disabled since I don't use Google+)
Comment: I was able to browse through my photos but *after* selecting the photo the error popped up. I was able to resolve it by installing a third-party photo editor.


Cable Modem MAC Addresses

Question: Does anyone know how many MAC addresses a cable modem can support?  Does the DOCSIS 3 spec allow for more MAC addresses?
Answer: The DOCSIS standard says nothing about this. There might be equipment-specific limitations though, so it's hard to say.
Answer: Your cablemodem will typically have one MAC address on each of its interfaces (e.g. one for the cable side and one for the twisted-pair side) - They are usually different (In my experience with the equipment supplied by Cablevision they are always different), but they could theoretically be the same.
I don't know of any brand of modem that supports multiple MACs on an interface, and the ones supplied by CV don't allow you to change the MAC (and here the cable side is locked down by MAC address, so if you changed that you would probably knock yourself off the network).
Answer: I think people are misinterpreting the question. I think you want to know how many devices with separate MAC addresses you can have on the LAN side of the cable modem. Not, "how many MAC addresses does the cable modem itself have." In any case, I don't know.
Answer: This value is controlled by a parameter in the config file which the cable modem downloads each time it boots up. Usually referred to as "Max CPEs allowed" or similar. Your cable company controls this behavior.
The normal practice is for ISPs to set the value to "1" because they don't want residential customers consuming global IP addresses. They can set it higher.
In the past, certain security flaws may have made it possible for end-users to control this configuration value (and any other value), but normally, the end-user doesn't have any way of altering the value.
Answer:
Does anyone know how many MAC addresses a cable modem can support?
Does the DOCSIS 3 spec allow for more MAC addresses?

MAC addresses are a property of an interface, or socket.
You have 2 such interfaces, or sockets on your cable modem - 1 where the cable from the cable company plugs into, and 1 where you can plug in an Ethernet port.
Each one of these interfaces has a MAC address, and just one MAC address.
This doesn't strictly apply to your cable modem, but some physical interfaces don't have MAC addresses if they are bridge or switch type interfaces that are designed to be invisible on a network.
If you are hoping that you can connect 2 devices to the LAN side of your cable modem using a hub or switch, it won't work.  Every cable modem I've experimented with will only talk to the first device that responds on the LAN port.  If you want to share the cable modem connection, this device needs to be a router, or a device that has a built in router (there are "cable modem routers" that consist of both the modem and router part in 1 chassis).
Answer: I think it depends on your ISP. Usually they give 1 public ip, if you want more you have to pay.
Cable modem should support more than one IP connect in a swith or hub, etc.
Comment: Thanks for the info.  But I was wondering what the physical limitation of MAC/IP addresses would be on a single cable modem?
Comment: I dont think, the modem is only at layer 2 at most...I think
Comment: @rmwetmore: any such limitation is built into the firmware of a particular model of cable modem; there is no other factor in determining the limit.

Cable Modem MAC Addresses


Giant bugs part 1: nature

Question: So a little bit ago I asked a question that asked multiple questions so my new strategy is too ask multiple questions. First off this first question is going to revolve around the bugs themselves and their changes. So due to increased plant life oxygen is much more prevalent due to this fact most insects in this alternate earth have noncupled in size not all but most (meaning by nine times their original size). Now they would have changed anatomy to fit this new size (some insects wouldn't get too large because of the square cube law like goliath bird eating spiders but most would get pretty big) there changes would be leg placement exoskeleton thickness increased intelligence because of there increased brain sized (some may not need it though like ants) increased lifetimes so no more constant birth and thicker legs. (also flora would increase and size) mammals and birds in this world would stay around the same size but would be faster stronger and more endurant (this includes birds and reptiles). so in this new world of large bugs what niches would you think would be taken up by bugs and what changes would basic mammals,reptiles,and birds to deal with or eat these new giant insects. Also humans are during this story in medieval time.
Answer: first off- evolution would take a long time to reach this point, a very long time. if humans are around in your story, they probably would've stopped it because who wants a two foot bee landing on your soda? second off, i'm not a biologist, so a different answer will almost definitely be better than mine.
anyways, assuming they evolve naturally to be bigger, birds, reptiles, etc would also evolve along side them(unless humans interfere) and have their adaptations ready at the same time/before the bugs got there. the bug eating animals would probably evolve to have stronger jaws/teeth/beaks to deal with the exoskeletons, and would have to adapt new hunting strategies if the bugs get too smart for them.
as for the niches, i think they'd take whatever was open, or whatever they could take over. think rats- they eat whatever, so they live wherever, doing whatever. there's enough different types of bugs you could put them anywhere eating anything(within reason, of course. can't have a bird eating bug...unless you really want one. )
if you want big bugs, you'll almost definitely get big bug eating animals, but big bugs also means big food needs, so you have to either scale down the bug population(quality before quantity) or increase the food source size, which doesn't seem as realistic. of course, you could always write in something about food waste, carnivorous bugs, eating sunlight, etc, etc, to deal with this, but then you'd basically have a bugpocalypse.
so, in short, big bugs = big bug eaters. bug eaters ready for bugs before or same time bugs get there, bigger bugs = bigger food source, bugs = rats, all this assuming humans stay out of it.
Edit- ah, humans. that changes things.
if humans want giant bugs(torture devices, terror agents, whatever the twisted mind could think of, etc) they might allow them to evolve. if the medieval times is already after they've become big, then the human society before then would need to have a good reason to let the bugs get big, or they probably would've (quite literally) squashed it before it even started. i don't know about everyone else, but i certainly would kill everything with a stinger just cause i hate wasps and stuff. in fact, i was stung by a yellow jacket earlier today, and i'm very glad it wasn't a foot long.
one good thing about big bugs tho- u ever heard of cricket meatballs? they'd probably have been changed(at least nowadays, not sure about medieval times) to be a big as possible, and maybe even replace meat cows. if people realize, hey we can eat these, they probably would keep some big, but not quite all. again,, getting big would take a very long time.
Comment: You should edit this graphic into your post https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcT_As6FfJ6CV8g1iEnZsnfFDkTkqbv5Z-gIYA&usqp=CAU
Answer: Many years ago, as I was leaving the movie house after an opening night showing of Jurassic Park, a friend of mine turned to me and asked, "Would lions, tigers and bears ever have evolved if raptors had not gone extinct?"  That question has haunted my world building efforts ever since.
It is my belief that the presence of a small but communal apex predator would completely fill the top of every food chain that it could participate in.  So lions and tigers who occupy warm reptile (and insect) friendly zones would be in for a challenge, but cold loving bears would probably be okay.
I believe that the insect-scale ecosystem is much more brutal than our larger scale ecology.  Big cats have tough hides and sharp claws and teeth, but the major predators of the insect-scale have chitinous armor, ensnaring webs and mandibles!   Pack sizes on our scale usually top out below a hundred while insect hives can number in the tens of thousands.
Your world wouldn't need any mammalian apex predators.  That throne will be very efficiently filled by your super bugs!
Comment: Just a small info expansion: Jurassic Park's raptors are too big and lacking feathers, as opposed to the true velociraptor, so they are more similar to Deinonychus, but still lacking feathers. Conclusion, a complete, still more believable than the mean, fictional species. Also a bit overrated, Allosaurus, a bigger and older predator, survived longer. This applies to real raptors, the ones from Jurassic Park probably didn't extinct, they built spaceships and are now out there, colonizing the Milky Way.
Comment: i bet alligators and crocodiles would do just fine with their ridiculously high psi @Henry Taylor
Comment: now i wonder what herbivore roles would be taken over by bugs. @Henry Taylor
Comment: Don't forget that the insect world has chestbursters and and handful of Japanese hornets will decaptiate an entire hive worth of bees. Where else in the animal kingdom can you walk into a room and see even three fresh heads laying on the floor? Only humans probably.
Answer: LOOK OUT, MAMMALS:
Postulating that a large concentration of oxygen-producing plants means a warm, wet tropical climate globally, I think mammals would be in for a lot of troubles. During the Permian epoch, the proto-endothermic synapsid ancestors of mammals were the dominant life forms. After the Permian mass extinction (arguably the largest mass-extinction event on Earth) the warmer world with lots of open ecological niches allowed for dinosaurs to evolve. They did better with warm conditions and were exothermic, so they didn't need to expend as much energy just to live.
So if your climate change resulting in insect-friendly conditions opened up niches for insects, they would exploit a lot of the spots mammals hold today. The fewer limits to size the insects have, the more spots they'll take. The spots of smaller animals will go first. Cockroaches will displace rats, spiders and centipedes will displace small predators, and beetles and the like will displace small herbivores. Probably all the spots for birds would have a more efficient insect able to do the job better. Roles for big animals will still favor the mammals that are physically able to fill them better, only they will be better evolved to deal with big bugs.
But don't forget that mammals survived the dinosaurs, and reptiles lived even back in the carboniferous. The giant insects survived into the early Permian, but were pushed out by competing synapsids and climate change. You can justify almost anything, just by deciding the conditions favored X (where X is whatever fits your plot). A lot of birds in a niche can outcompete giant flies by eating away all the resources - or having a taste for giant maggots. Don't get too bogged down in details, because evolution is a sloppy, complex and fickle process with more variables than we can track. Have fun and good luck.

Giant bugs part 1: nature


Why does the ginger wither at the top/tip?

Question: I have been growing culinary ginger quite successfully however there are times when one or two stems start drying out at the top/tip and I don't know what could be the cause. The ginger are planted near the window and not exposed to direct sunlight. Would be great if someone could advice, thanks!
Comment: How big is the container this is growing in (height, width and depth or a photo showing it and the soil within please) What part of the world are you in?
Comment: 45cm length, 35 cm width, 15 cm depth. Potting mix. Im in southeast Asia.
Answer: If you've only got one piece of ginger root in that size pot, the pot's too large, but if there's more than one growing, fine.
Usual cause of this problem is dry air, that is, low air humidity, or erratic watering or poor drainage. They like free draining soil which is moist, but not waterlogged. If you have air conditioning, that could cause this problem, or if you let the soil dry out too much, but otherwise, if it's just the occasional tip, it's not really a problem.


How can I change the encoding of a subtitle file?

Question: I have a subtitle .srt file. Is there an app which can change the encoding of this file.
(I guess it's encoding is Arabic(windows-1256) but vlc and MXPlayer didn't open it.)
The link of subtitle is here.
Comment: It seems to be in Arabic (DOS) encoding.  You could open in TextEdit and resave as UTF-8 or what ever you want.
Comment: Is there a Apple product involved in this ?
Comment: @Buscar웃 My laptop is MacBook Air and I'm searching for an app or a way to do it.
Comment: If it is not asking to much, please provide the link to the subtitle file so we can check on it.
Answer: I often use this online converter to get my .srt in UTF-8, give it a try !
Comment: Well, as Tom Gewecke said you should be able to do it with TextEdit but I always had issue doing it (you can set this in TextEdit > Preferences > Open and Save > Plain Text Encoding > Opening/Saving). I find out this online converter much simpler !
Comment: Your answer helped me in my work. But you didn't provide any application to do it. Maybe you can claim there is no such app. Then I figure it as an answer.


How to map a sequence of vim commands to a shortcut?

Question: I have the following sequence of vim commands I use to copy a function va{Vy, how can I map this to a shortcut key like F1? I'd also like to persist this.
Comment: https://vimhelp.org/usr_05.txt.html#05.4
Answer: The command would be:
nmap <F1> va{Vy

You can store this command in your ~/.vimrc file. This will make it persistent. If it does not exist simply create it.
More infos about this you can find here.
My question would be what should this command do? If you want to yank the current line the shortest commmand would be yy. If wou want to yank a paragraph (all text between an empty line) this does not work and the better command would be vipy. vip selects the current paragraph.
Comment: Well, the command is equivalent to `yVa{`, which yanks everything in `{` forced-linewise.
Comment: Also: prefer `nnoremap`


How to install PyObjC on Tiger?

Question: I installed Python 2.7 from python.org on OS X Tiger. It does not come with PyObjC, so I tried running easy_install pyobjc==2.2b2 as suggested on the website. However, it fails when trying to compile the FSEvents framework (which I understand is not available on Tiger). But the PyObjC website claims it works on Tiger. Is there any way to install it without the FSEvents framework (which I don't use anyway)?
Answer: I don't test on Tiger unless I know that something is wrong.
Could you please file a bug at the PyObjC bug tracker (https://bitbucket.com/ronaldoussoren/pyobjc)?
I've fixed the installation of FSEvents in the 2.5 branch of pyobjc (which you can download at  https://bitbucket.org/ronaldoussoren/pyobjc/downloads), but I haven't tried to install on 10.4 myself yet so there may be other problems.

How to install PyObjC on Tiger?


Get current user info on omnistudio

Question: how can I get information from the logged in user and show it in a flexcard in omnistudio.  in apex we can use the UserInfo class, but in omnistudio how do I do that in a dataraptor, integration procedure or flexcard?
Comment: Currently stuck on the same problem. Really hope someone in the community can provide suggestions on this one.
Comment: I think I found a good working solution. Take a look at my answer and let me know what you think.
Answer: There are a number of environment variables that we can use for DataRaptors and Integration Procedures according to this Salesforce doc: https://help.salesforce.com/s/articleView?id=sf.os_environment_variables_in_dataraptors_and_integration_procedures_47878.htm&type=5
For our use case, we can use the '$Vlocity.UserId' environment variable. Make sure you put single or double quote around it though when you use it. See screenshot below for how that works in a DataRaptor.

Update (March 18, 2023): I dug deeper into Saleforce docs and found a list of context variables, like {User.userId} that we can use to get the current user Id for flexcards. You can check out the list at: https://help.salesforce.com/s/articleView?id=sf.os_flexcards_context_variables.htm&type=5
Comment: That option '$Vlocity.UserId' worked! thank you very much!

Get current user info on omnistudio


Conceptual understanding of Line Integration

Question: From Calculus II, it's easy to understand what is basically being calculated by integration; the area under a curve. $\int_a^bf(x) \, dx =$  the area under $f(x)$ within the interval $[a,b]$. However, a line integral is a bit more complicated. I completely understand the computation of a line integral; it isn't too difficult to understand. However, I lack the understanding of what exactly is being calculated by it. Is it the area under the integrated curve, treating the path along which it is integrated as though it were the $x$-axis? A visual example would be greatly appreciated! Thanks in advance.
Comment: I think of the physics analogy.  You are moving along the path, and the function represents a force that you are working against.  The path integral then is the energy you expend getting from here to there.  If it is a conservative force, you get that energy back again on the return trip (you are going down hill).
Comment: There is a great graphic on the wikipedia page of line integral.
Answer: You can have your geometric interpretation if you picture the function you are integrating "attached" to the line at each point on the curve.  Now straighten out the curve and lay in along the $x$ axis, and treat the values of the function you had sewn to it as $y$ coordinates at each point.  Then the line integral will be the ordinary area integral.
Fans of rigor will rake me over the coals on that answer, because it is easy to come up with tricky functions for which what I just said is meaningless, but for ordinary line integrals you will be encountering in early days, it is fine.
Comment: Thanks so much for this answer! It's very helpful; I don't mind the inaccuracy. I'm not trying anything special; I'm just trying to get ahead in my knowledge of college mathematics. Thanks again!
Answer: Let me make an attempt. I hope others can criticize and improve it.(Or downvote it if I am plainly wrong).
Let us first look at the integral of  $g(x)$ between $a$ and $b$. It is the amount  of area bounded by 3 straight line segments $x=a,\ x=b,\ y=0$ and the curve $y=g(x)$.  This is a flat surface lying in a plane. This is swept our by a vertical line segment of varying height but bottom moving on $x$-axis between $a$ and $b$. Notice that all these line segments are in the same plane.
Now  line integral is the generalization of this for a curve lying in a curved surface (not in a plane). That is, take the surface $z=g(x,y)$, for a curve lying on it (specified by two functions $x(t), y(t)$ with $g(x(t), y(t))=0$  pick the line segments parallel to $z$-axis with bottom on the plane $z=0$ and the top on the curve. The bottom instead of moving in a line moves in a "bottom plane" following the curve. They sweep out a curved sheet, a surface.
It is the  amount of area of this curved sheet we get as line integral. (Algebraic geometers may call the region of 3d-space swept out by this "a ruled surface").


Stop script in MySQL Workbench after error

Question: I just ran a script in MySQL Workbench 6.3 Community.
I've set it to 'Stop Script Execution on Errors'.
There were two queries that gave errors.
The errors say 'Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.'
Ok, so I missed that. No big deal.
But after that, the script simply continued as if there were no error at all, or as if I never set 'Stop Script Execution on Errors'.
As a consequence I've lost some data. (This was a test database, so no worries there.)
The script continues after the errors:

Any idea how to make it stop executing the script?
Answer: A colleague pointed me to Edit->Preferences, SQL Editor, SQL Execution, Continue SQL script execution on errors (by default).
Continue SQL script execution on errors (by default)
This worked after restarting Workbench.


Use of "entitle" in "the book is entitled 1984"

Question: Is it really proper to say "The book is entitled 1984"? Entitle seems to refer to the act of giving one the right to do something.
Comment: It's usually possible to avoid using "entitled" and "titled". E.g., "I just read a terrific book: George Orwell's _1984_" or "I'd like a copy of Orwell's _1984_". If you're playing a guessing game -- "I'm thinking of a book. The title is _1984_. It was published in 1949. And it's author was who?" -- you don't need it either.
Answer: There is nothing wrong with using entitle that way.

entitle : 5. give a title to a book, film, play, etc.

It may be taken as in a higher register than many people normally speak but it is, in fact, more widely used in books
Comment: Yes, and it merely means that it's pretentious, verbose, academic prose. But there's nothing wrong with poor writing or speaking style these days because all anyone cares about is what they and their cellphones look like: fashion plates don't need to communicate with words: consumer goods are good enough.
Answer: It's better and more usual to say 'the book is titled 1984,' or 'the book's title is 1984.'


What you do when you see a cheaper flight after you booked a non refundable flight?

Question: My question is about USA, I have booked a flight from BDL (Bradley International) to Miami with one stopover. A week later I found a better (non stop) cheaper flight. Is there a trick, like price match, etc?
Comment: I sit down in a corner, cry a bit and go on like the grown up woman I am, doing nothing about the ticket. Bad luck, that is what you get when you book non-refundable tickets.
Comment: The rule of buying (non-refundable) air tickets: once you find something at a price you can live with, take it and *never look back*.
Comment: Are the flights on different airlines?
Comment: Yes, different flights.
Comment: It would probably help if you specified which are the two airlines, as well as the specific fare(s) for the first booking.
Answer: Once you bought it, you are pretty much stuck with it.  Some airlines offer a 24 hour grace period for canceling or re-booking, but a week later you are out of luck.
If your ticket's fare rules allow changes, you might be able to get the better (non-stop) flight, but the change fees will wipe out any fare difference and probably end up costing you more.
Answer: You ever heard of 'Rule of Acquisition #5'?
Once you have their money, you never give it back.
That applies here too, but:
'non-refundable' does not necessarily mean 'lost' - most airlines allow to cancel or change the flight, and the price gets 'stored' with them for up to twelve months (counting from the day you bought the ticket, not when you canceled). Within that time, you can use that 'stored' amount to buy another ticket; however, there will be a fee for the change, which is - depending on airline - anywhere between 0 $ to 400 $, or even more.
So a) that might not help you much, and b) it might be a larger loss than your gain, but still, it might be an option.
Comment: Any price of anything on earth is "anywhere between 0 $ to 400 $, or even more".
Answer: Judging by its name, a non-refundable ticket is as non-flexible as you can get it, though nothing can be certain without seeing terms and conditions. I doubt there would be a price match incentive (what's the benefit for the airlines?)
However, I advise you to call and ask if it's possible to cancel. Airlines often overbook, and if several people with a flex ticket have rebooked seats on your flight, the airline may actually want someone to cancel now to avoid bumping people at the gate. Most probably your request will be turned down, but nothing prevents you from trying.
Answer: You have to check your fare rule, afterwards if is convenient for you can ask for a partial refund and buy the new ticket.
Usually if is not a full fare penalty, it will cost you about 100 $ / 180 $, anyway could be higher.
If you provide me you departing and arrival airports, and just the fare basis of your fare I can get the exact penalty amount for you.


Change addresses in old backups

Question: I have a very old wallet backup, from 2011, from bitcoin-qt, I imported it to bitcoin core, but I seem to have only one address, seems that I have no change addresses in the imported data.
Is the current bitcoin core importing wallets partially?
Did bitcoin-qt at 2011 create change addresses in a different way?
I searched, but the info I found mainly relates to much newer versions of wallets than the ones bitcoin-qt used.
Update: using pywallet I managed to get the additional 102 addresses in the wallet, and import them, now I'm doing a rescan.
Answer: Only very, very early Bitcoin clients didn't create change addresses automatically.
In 2011, change addresses were automatic, but the address pool was only 100 addresses long (more frequent backups were needed). It was some years later it was increased to 1000 and Hierarchical Deterministic was invented.
Comment: I'm pretty sure that the Bitcoin Core wallet always created change addresses (including before it was called that way) since version 0.1..

Change addresses in old backups


Spiralling in Galaxy evolution

Question: Could some stars be orbiting galaxies in outward spirals instead of perfectly round circulation? Patterns of matter movement relate strongly to the galaxy centre. A special relationship between the galaxy and the central object suggest the centre may be an origin point in 'outflow'. The BH central object behaves strangely by instigating the release outwardly of massive amounts of matter. This may form stars that spiral out across the galaxy. The grand design of features in galaxies may related to general outward spiralling.
Comment: This "outflow" is gas, not stars. The spiral pattern of disk galaxies has nothing to do with the outflow, but is density waves with enhanced star formation (and exists also in galaxies without an active nucleus).
Comment: Out-sprialling stars would need an energy input to "push" them out. There's no dynamics I know if that allows for such a thing.
Answer: Basically, yes, it's possible.  Our moon is slowly moving away due to energy transfers from Earth related to tidal drag.  This is very slow spiral.
I do not know whether a star can experience sufficient tidal drag relative to the center of its galaxy to cause a change in orbit - and there are a few billion other objects in the galaxy producing gravitational force in other directions, making the analysis kind of messy.
Comment: Your analogy with the moon is not really relevant to stars orbiting in the galaxy at all.
Comment: @zephyr please quantify the failure
Comment: Quantify what failure?
Comment: Assuming particulate dark matter exists, then stars orbiting within a galaxy will experience dynamical friction, which will cause them to (*very, very* slowly) spiral *inwards*. This will take many times the age of the universe to have much of an effect, however.
Comment: The outward trajectory of stars is achieved from escaping the centre in this proposal. The outflow process from around the central object, powered by the SMBH, forms into stars in places like the Torus. That continues moving away from the centre. This would create a causality between that central object and the mass of the galaxy and a sedentary system of star forming (producing unified orbit and speed).

Spiralling in Galaxy evolution


Does exhaustion affect a creature after it is polymorphed?

Question: I have an ally that is exceptionally exhausted. If I polymorph him into another form, do the negative effects of exhaustion—such as reduced speed—apply to the new polymorphed form?
Answer: Yes, an exhausted creature that is polymorphed is still exhausted.
Exhaustion levels are a type of condition, and ...

A condition lasts either until it is countered
(the prone condition is countered by standing up, for example) or for a duration specified by the effect that imposed the condition.

(PHB, p. 290).
Nothing in the description of the Polymorph spell indicates that it counters any conditions, nor does it specifically mention removing exhaustion levels. A character who is polymorphed while prone, frightened, or paralyzed thus keeps those conditions, and likewise they would keep any levels of exhaustion they had before they were polymorphed.
Some creatures are immune to some conditions, including exhaustion. If a character with one or more levels of exhaustion were polymorphed into one of these creatures, they would ignore the effects of those exhaustion levels while they were polymorphed. Generally, the creatures that are immune to the exhausted condition are angels, constructs, and incorporeal undead, and thus such a transformation would require the 9th-level True Polymorph spell.
Answer: Assuming that you are referring to the Polymorph spell (because there is no general polymorph rules all polymorph effects are specific unto themselves), it says:

The target's game statistics,
  including mental ability scores, are replaced by the
  statistics of the chosen beast. It retains its alignment

"Statistics" are those things that are in the creature's stat block. Conditions like exhaustion or unconsciousness or fear are not part of these so whatever the person has before, they continue to have after the spell takes effect.
Answer: Probably less of a RAW answer here: exhaustion should end
Polymorph changes you into a beast, an average one at that. This means you are no longer you.
I agree with other answers in that I don't see anything RAW that says exhaustion ends if you change forms, but this is the kind of edge case where DM intervention is a good thing.
You don't become sleepy bear, you become normal bear, and I would guess that since most bears don't live on a diet of junk food, social media and mundane low paying jobs they aren't constantly exhausted.
After it wears off you are back to your usual exhausted self of course.
Also mechanically and for balance, it is best to let a buff spell actually be a buff. If someone wants to spend a 4th level spell to not be exhausted for an hour, let them.


compare and contrast a 2p6 orbital to a 4s1 using quantum numbers to help

Question: Would you be able to help me understand how to compare and contrast a 2p6 orbital to a 4s1 using quantum numbers to help?
Comment: We have a policy which states that you should show your thoughts, effort and attempts to answer your question yourself. It'll make us certain that we aren't doing your homework for you, and that the Q/A is beneficial for broad audience.   As "homework-like questions" are considered literal homeworks, self-study questions, puzzles, worked examples etc.  Please [edit] in your full reasoning or thoughts on this. See [Homework](http://meta.chemistry.stackexchange.com/q/141/7448).  Otherwise, the question may get closed as "low effort homework-like question."
Answer: $2\mathrm{p}^6$, $4\mathrm{p}^1$ are not orbitals.
It is a partial description of an atom electron configuration, saying there are 6 electrons in 3 orbitals $2\mathrm{p}$, respectively 1 electron in the orbital $4\mathrm{s}$.
$2$ in $2\mathrm{p}$ means the (main, energy ) quantum number $n=2$. $n$ can have values 1, 2, .....
$p$ in $2\mathrm{p}$ means the ( orbital, orbital angular momentum) quantum number $\ell=1$. $\ell$ can have values 0, 1, ...  , $n$ - 1.
The ( magnetic ) quantum number $m$ ( $-\ell \le m \le +\ell$ ) is for the axis projection of the vector of the electron orbital momentum ), determining e.g. there is

1 orbital $n\mathrm{s}$
3 orbitals $n\mathrm{p}$, called $\mathrm{p_x, p_y,p_z}$
5 orbitals $n\mathrm{d}$, called $\mathrm{d_{{xy}^2}, d_{{xz}^2}, d_{{yz}^2}, d_{x^2-y^2}, d_{z^2}}$
7 orbitals $n\mathrm{f}$, being seldom explicitly named.

See also Wikipedia.

In a hydrogen atom, or ions with just 1 electrons, orbitals with the same $n$ have the same energy(*).
In multielectron atoms, electrons in different orbitals have different interaction with other electrons and their energy differ. Their energy increases in order $\mathrm{s < p < d < f}$
Generally, but with multi exceptions, the energy ( and filling order) increases in this order:
1s 2s 2p 3s 3p 4s 3d 4p 5s 4d 5p 6s 4f 5d 6p 7s 5f 4d 7p

The naming has historical origin in spectroscopy. s as sharp, p as principal, d as diffuse, f as fundamental.

s means $\ell = 0$
p means $\ell = 1$
d means $\ell = 2$
f means $\ell = 3$

Orbitals have 3 meanings:

A wave function being  a particular solution of the Schroedinger wave equation, with integer constants $n, l, m$ called quantum numbers.
An electron quantum state with the particular $n, l, m$ values
A 3D shape, describing the probable electron occurence, with borders defined by occurence probability threshold, corresponding to 1 and 2.

(*) Relativistic corrections for Schroedinger  equation reveals and explain observations it is not fully true.


Lie locally nilpotent associative algebras

Question: Let $A$ be an associative algebra over a field. Then $A$ can be regarded as a Lie algebra via the Lie bracket defined by $[a,b]=ab-ba$ for every $a,b\in A$.
The algebra $A$ is called Lie locally nilpotent if it is locally nilpotent as a Lie algebra. Also, $A$ is said to be locally Lie nilpotent if every finitely generated associative subalgebra of $A$ is nilpotent as a Lie algebra.
Clearly, if $A$ is locally Lie nilpotent then it is Lie locally nilpotent. Is the converse true?
Comment: Of course, my question is equivalent to the following. Suppose that a finitely generated associative algebra $A$ is locally nilpotent as a Lie algebra. Is $A$ necessary nilpotent as a Lie algebra?
Comment: It maybe that the following paper: P. Etingof, J. Kim, X. Ma, On universal Lie nilpotent associative algebras, J. Algebra 321 (2009), N2, 697-703 DOI: 10.1016/j.jalgebra.2008.09.042; arXiv:0805.1909, and/or references therein, are relevant.
Comment: Hi Pasha, thank you for pointing out this reference. I took a look at that paper, however a satisfactory answer to my question is not present there.
Answer: I have to mention that for associative algebras over fields of characteristic not 3 the question has now a positive answer. This is a consequence of a very recent paper by Dias and Krasilnikov: https://arxiv.org/pdf/1709.05728.pdf


Unable to run jobs on SQL Server on my PC

Question: I have been trying to run an SSIS package in my C: from SSMS on my PC. I have scheduled a job as per below

And below is the error that I am getting

Executed as user: .
Microsoft (R) SQL Server Execute Package Utility  Version 14.0.1000.169 for 64-bit
  Copyright (C) 2017 Microsoft. All rights reserved.
Started:  11:15:37 AM
  Error: 2019-10-03 11:16:28.52
  Code: 0x000002C0
  Source: Address Connection manager "ORACLE_v"
  Description: OCI error encountered. ORA-12154: TNS:could not resolve the connect identifier specified
  End Error
Error: 2019-10-03 11:16:28.52
  Code: 0x0000020F
  Source: Data Flow Task Oracle Source [70]
  Description: The AcquireConnection method call to the connection manager ORACLE_v500 failed with error code 0x80004005. There may be error messages posted before this with more information on why the AcquireConnection method call failed.    > End Error
Error: 2019-10-03 11:16:28.52
  Code: 0xC0047017
  Source: Data Flow Task SSIS.Pipeline
  Description: Oracle Source failed validation and returned error code 0x80004005.    > End Error
Error: 2019-10-03 11:16:28.52
  Code: 0xC004700C
  Source: Data Flow Task SSIS.Pipeline
  Description: One or more component failed validation. End Error
Error: 2019-10-03 11:16:28.52
  Code: 0xC0024107
  Source: Data Flow Task
  Description: There were errors during task validation.  End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started:  11:15:37 AM Finished: 11:16:28 AM  Elapsed: 50.625 seconds.  The package execution failed.  The step failed.

I am not sure why I am getting these errors. I can run that package from SSIS and it is not giving me any connection issues.
Comment: . 'ORA-12154: TNS:'. look like a connection issue to oracle source. Check through each error message.
Answer: create a proxy account you know can access the Oracle source.
then run the agent under the proxy account you've set up.


Does have a web address on your site affect SEO?

Question: If I have
http://www.site.com

And
www.site.com

The second one is bad, but will the first one count as an out link?
Comment: Why do you say the second one is bad?
Answer: If there is no HTML there is no link. So the second one is a link and has SEO value (it is counted as a "vote" and passes PageRank). The first only has SEO value as content, not as a link (just like any other text on your website).
Answer: Google has started to identify URLs that are shown as text on the page, as well as URLs that are embedded in javascript.
When it finds URLs like this, googlebot certainly now crawls them.  It is unclear whether Google is also factoring them into the pagerank algorithm.  (My opinion is that it does.)


Weird blue shine on URP Lit shader Unity

Question: I recently started to use URP and I am noticing a weird blue like tint on shiny objects that use the URP/lot shader and I can't understand what it is and how can i remove it.
Comment: Could that be reflection from the ambient light generated by the skybox? That would explain why it's only on "shiny" objects. And while there is no skybox visible in your screenshots, they tend to have light blue in them.
Comment: Yeah that could be the case. Its probably from there as the skybox is the same color. Thank you very much.
Answer: This appears to be colored light emitted by the skybox.
When you don't want the skybox to act as a light source with the color of its textures, then

Open the lighting window (Menu entry Windows->Rendering->Lighting)
Go to the "Environment" tab
Change the "Source" under "Environment Lighting" from "Skybox" to "Gradient" or "Color". You can then select the color of the ambient light. If you don't want any ambient light at all, set the ambient color to pure black.

It is also possible that this isn't actually ambient light, but actually a reflection of the skybox. This would explain why it only appears on "shiny" objects. When you want reflections on specular materials to reflect the actual environment around them, then make sure you scatter some reflection probes around your scene. But keep the performance concerns in mind.


Orthogonal hypersurface to timelike vectors

Question: Our 4-D manifold is represented by ($r,\theta,\phi,t$) and sub-manifold (hypersurface) ($r,\theta,\phi$) and having a metric of the form $$ds^2=g(t)dt^2+f(t)ds_{spatial}^2$$($\hat t$ orthogonal to the hypersurface,$g(t)=-1$ and $f(t)=1$).
 At an event if the  the timelike vector points along $\hat t$ then the hypersurface orthogonal to it is space like.
Now if the timelike vector points other than $\hat t$( within the light cone($v\lt c$)) then will the hypersurface orthogonal to it will remain space-like??
Answer: A hypersurface orthogonal to a timelike vector is spacelike by definition. To convince yourself of this, you may always find a reference frame in which the timelike vector has zero spatial components.


How can ESL students improve their pronunciation by using technology?

Question: Can ESL students improve their pronunciation by using technology?
Are there any specific applications for pronunciation assessment and  improvement?
Answer: This 1½ hour session is designed to assist non-native speakers of English in accent reduction. The session includes a brief overview of the elements of pronunciation, including difficult sounds, stress, rhythm, and intonation. Specific practice techniques for addressing the most common pronunciation problems will be shared, along with a list of technology resources available for further independent practice and self-study: Here.


How to get from Malaga to Sierra Nevada via Motril?

Question: I try to find out how to get from Malaga to Trevelez or Lanjaron via Motril, not via Granada. I know there is a bus, since I have toke it 4 years ago but I cannot find any in the internet. I checked the Alsa.es side but I guess it was not an Alsa bus it took but some sort of school bus. Anyone who can help me finding a pdf with the schedules?
Comment: Using [Alsa](https://www.alsa.es/en) I was able to request Malaga to Lanjaron, and it returned a bus that takes just over 3.hours, and route you from Malaga, through Torre del Mar, Torrox, Narja, La Herradura, Almunecar, La Caleta de Salobre, Salobrena, Motril, Gorgoracha, Velez de Benaudalla, Orgiva, before arriving in Lanjaron.
Answer: Rome2Rio is really good for this sort of thing.
Take a look here: https://www.rome2rio.com/s/M%C3%A1laga/Motril
You can then get a separate bus from Motril to either Trevelez or Lanjaron, whichever you actually prefer