Why did Kurama keep helping Naruto?

Question: As I was browsing through an old question, the answer shocked me. It seems that if Naruto were killed, Kurama would just revive. Then why did Kurama give Naruto some of its chakra when he was on the verge of death? For instance, when Naruto first summoned Gamabunta while falling to his potential death, Kurama gave him some chakra and helped him out. Wasn't Kurama's dream to break free from Naruto? What's the need of breaking the seal when he can just let Naruto die and he is free? He did push Naruto to the point of opening the gate when Naruto fought with Pain. Why not just sit tight and let Naruto die? Did I miss something? All this while I thought if the host dies so does the tailed beast.
Answer: The reason might be because if the Jinchuuriki dies, the bijuu will indeed be set free. However, the bijuu will also "die" first. The bijuu will "die" first before reviving itself after some time. Where it revives might also be random, as seen in Isobu's case. Isobu, or more commonly known as the Sanbi, revived itself after its host, the 4th Mizukage died. It revived itself in a lake.
Now, Kyuubi might want to avoid this. There are three possible reasons for this.

Kyuubi had half of his chakra sealed in the 4th Hokage with Shiki fuuin. Because of this seal, even if the Kyuubi had revived itself, it would have revived with only what he had during the time he was sealed in Naruto.
Kyuubi dislikes the idea of having to die first. Kurama's nature is a bit prideful, so that fits.
The half of Kyuubi that was sealed in Naruto was the less sinister half, and Naruto had the power to attract people, so this half might have taken interest in Naruto ever since Naruto used his power to defeat Haku.
Answer: Kurama is quite a prideful one and wanted to defeat the Jinchuriki and gain control instead of simply dying.
Jinchuriki were shunned and outdasted by people because of having a beast sealed in them, or needed an extremely strong person to keep the bijuu sealed in them and several Jinchurikis in the past couldn't control their emotions and the tailed beast broke free.
His hatred for humans was immense and he took great pride in belittling them. Naruto was quite impulsive, so kurama gave him his chakra to make his presence felt which would make naruto seek more and more.
In the encounter with orochimaru at the tenchi Bridge, kurama is shown belittling naruto, trying make him submit himself and seek his power.
Then in the progressive battles where naruto is emotionally broken it tries to takeover naruto through his hatred until finally it almost broke free in the battle with pain after naruto was hopelessly broken(thanks to the fourth hokage, the attempt failed).
So to sum up,Kurama's sense of identity was strong, for him naruto was just a cage that held him. Almost like HE WAS NARUTO, not some enslaved creature that donated power as and when asked.  Like it looks, his identity was very strong and being sealed didn't stop him from being what he is, THE NINE TAILS, THE MOST POWERFUL BIJUU.He showed his ominous presence and didn't want some puny human to defeat him in any form.

Why did Kurama keep helping Naruto?


What is the best wired protocol choice for home automation?

Question: I know the X-10 protocol. X-10 is a good choice or is there better?
Comment: any particular reason it has to be wired?  Honestly there hasn't been a lot of advancement in wired systems for this use, most people are using ZigBee with the home automation profile.  You could try using CAN i guess, but ZigBee with the HA profile would probably allow you to interface to a lot of off the shelf devices.
Comment: @Mark, no particular reason.
Answer: I know this is far too short of an answer.
Wireless.
Zigbee makes a great option and tinkerers do great with the XBEE units(handles the protocol for you, just basic configuration commands and acts like uart.
Answer: It depends on what you want. X-10 is very limited. You can only send command messages to devices, and the bit rate is limited to 50 or 60 bits per second. But it is enough for turning things like lights on and off.
For large-scale automation, ethernet over power may be a good idea.
Or, you could try one of the newer protocols. http://en.wikipedia.org/wiki/Domotics lists many of them.
Answer: In my system, I've used a CAN bus, at 125kbit/s, using Microchip CAN controller and transceiver. X10 is a really simple and limited protocol, even with bidirectional modules, and it's SLOW!
In my old house I had an X10 system with computer control... and there was a 3 seconds delay from the push of a button on the radio remote to the action (RADIO REMOTE -> RADIO RECEIVER -> X10 CODE ON POWERLINE -> COMPUTER RECEIVER -> COMPUTER PROCESS -> COMPUTER TRANSMITTER -> X10 CODE ON POWERLINE -> APPLIANCE/LAMP MODULE)
Answer: IP would be my choice, it has become 'the one protocol to rule them all'.
This site has some nice videos of a house being automated this way, he even injected an RFID under his skin!
http://www.superhouse.tv/episode


Trim/Flashing for Flowerbed Next to House

Question:
We installed a flower bed next to our house. The house siding is T1-11. We put weatherproof paper against the house to keep the siding safe from moist dirt, but we would like to put some kind of trim or flashing on it for further protection and decoration. Does anyone have recommendations for this trim/flashing?
Comment: I have the same siding on a shed someone built on my property years ago, and rain rotted the lintel over the shed's door over more than a few years. It'll be worse in your case, since the shed was open to the sky and your siding will be hidden from the sun by the flashing and soil in the garden bed. No matter what kind of flashing you use, rain and/or the water from watering the bed will get behind it due to the vertical channels in the T1-11. It will then rot the siding from the bottom up, probably fairly quickly. I would remove the garden bed
Comment: What can be done to keep that from happening?
Comment: I moved my comments to an Answer, due to length.
Comment: I agree with Jurp this is not a good idea to have moist soil against the house.  The idea is keep water away from the house.
Comment: What if I put some Trex boards on stakes 1" away from the house, with the dirt going against the Trex boards? Would that be enough of a barrier from the house?
Comment: @mcdoma This barrier you built, is it simply stacked stone?
Answer: I'm assuming that the flower bed faces south. To use the bed with in-ground plants, you would have to build a wall inside it, so that that house-side of the wall is 6" from the siding (for airflow & weeding). This would be a large pain in the butt. I don't know the dimensions, but the bed seems large enough for one or two large containers. If it's 4 ft x 2 ft at the narrowest, you might be able to find something at a farmer supply store (make sure that you punch many holes in the bottom for drainage). But - you must still leave several inches between the side of the container and the siding. A collection of largish pots may also work, but would require more watering.
The idea behind the containers is that their height is no greater than the height of the flower bed's walls (a little lower is better), so that when you're looking at the house from the side you don't see their tops. If using a single large container, add mulch to it to help hide the container's sides and hold moisture; if using two or more containers, a small-sized organic mulch would be nice, then cover the spaces between the containers (and even on top of them to a small extent) with coir (ground coconut husks), sphagnum moss, or sheet moss. You can get coir in sheets or shredded; you can possibly find moss at a florist shop or online.
Another option may be a plastic liner for a pond (https://www.homedepot.com/p/Algreen-Avonlea-33-Gal-Rigid-Preformed-Pond-Liner-91901/206704125) - again, you must punch a lot of holes in it for drainage. Finding one to match the flower bed's shape would be a challenge, however.
Answer: I have ponds so I always have some bits of pond liner or EPDM around.  This is waterproof, resistant to UV and quite tough.  You can cut it to fit with a pair of scissors or knife and it can be glued in place with silicon or latex caulking.
Really, a thousand and one uses, including soil barriers for invasive roots, flaps that go over locks and prevent rust....


Trying to create an organized table in Python with some parsed HTML data

Question: Here is my code so far (and thanks to Martijn Pieters for helping me figure out the bottom portion!)
from bs4 import BeautifulSoup
from urllib.request import urlopen

url = urlopen("http://sports.yahoo.com/nhl/scoreboard?d=2013-04-01")

content = url.read()

soup = BeautifulSoup(content)

for table in soup.find_all('table', class_='scores'):
    for row in table.find_all('tr'):
        for cell in row.find_all('td', class_='yspscores'):
            print(cell.text)

When I was inspecting the elements of the table of the website in the url variable, the problem is is that the values of the columns (1, 2, 3, and so forth) are in the same class called yspscores. My idea was to use an if statement to state how to deal with them, but since their class is the same as the rest of the values in the score area, it would not work.
However, I noticed also that those numbers specifically have a width = 24, whilst the scores underneath them do not. Is it even possible to reference that in the code so that Python can recognize it and separate it from the rest of the values in a neat fashion?
Answer: Yes, you can use the width=24 attribute to separate them.
for cell in row.find_all('td', class_='yspscores'):
    if cell.get('width') == 24:
        print cell.text


Do neutron stars emit stellar flares?

Question: Since stellar flares are formed from the magnetic energy of a star, is it probable to assume that neutron stars can emit stellar flares as well? If so, how would the super fluid material of the star behave? Would there be anyway to observe such phenomena?
Comment: Outside my ken, but I think that https://en.wikipedia.org/wiki/Starquake_(astrophysics) may be relevant.
Comment: That's a very interesting question.   I'm curious if white dwarfs do as well.   Stellar Flares/coronal mass ejections are essentially magnetic storms overpowering the gravitational attraction.   My guess would be that magnetism can't do that on the surface of a Neutron star so there's no real "mass ejection", but it's just a guess and, maybe they do.  They probably have enormous and Magnetospheres though.
Comment: Just to add, the surface of the Neutron-star might not be superfluid at all, that's probably on the inside.   The outer shell of the star is very dense/compact matter that might kind of Iron rich perhaps with some super-heavy elements.   The mostly neutron part is inside, similar to the mantle in earth.   Neutron stars likely have layers.
Comment: Please don't think I am being pedantic here, I am not, but solar flares are from **our** sun, just in case anybody gets the wrong idea about your question. Best of luck with it.
Comment: Ah yes, that makes sense. Solar, sun. I guess the more proper term would be stellar flare. I will edit appropriately. Thank you.
Answer: There are classes of neutron star called soft gamma ray repeaters (SGRs) and anomalous X-ray pulsars (AXPs), which emit bursts of high energy radiation that last (usually) from less than a second to maybe 100s.
It is thought that these objects have extremely strong fields of up to $10^{11}$ T, which is produced during a core collapse supernova when some sort of dynamo action augments the usual field amplification by flux conservation.
These "magnetars" are thought to have a strong magnetic field that powers the high energy radiation. Magnetic energy may be stored in the interior of the neutron star or in the magnetosphere by twisting the field into configurations with a lot of potential energy. This is then stochastically released as the field relaxes again, producing "flares". See for example Link (2014).
To some extent this process is a little bit like the magnetically powered flares on stars, but unlike stars, where the field is regenerated by an internal dynamo, it is thought that magnetar magnetic fields decay on timescales of 10,000 years.
Comment: If a neutron star flares with the oscillations of the star, could it then look like a pulsar? @Rob Jeffries

Do neutron stars emit stellar flares?


single circuit simulating multiple Turing machines

Question: You can simulate polynomial time Turing machines with polynomial size circuits, can you simulate multiple poly time TMs with a single poly size circuit?
Answer: In a trivial sense, no, because circuits have a fixed input size. To compute the same function as a Turing machine, you need an infinite family of circuits, one for each input size. So a single circuit can't even "simulate" one Turing machine.
So let's restrict ourselves then to inputs just of size $n$, then the question is just are there two Turing machines that compute the same output for every input of size $n$? Well sure, no problem.
Moving back to the family of circuits, fix an infinite family, one circuit for each possible size. Are there two Turing machines that compute the same function for every input size as this circuit family? Again, sure, any two Turing machines with the same language can be paired up with the same family of circuits.
The polynomial bounds even behave nicely (even if they're different polynomials).
Note that this doesn't necessarily hold together once you actually start to think about how to get the family of circuits, and imposing uniformity conditions, but given the question, you're not up to that bit yet.
Comment: apologies, let me rephrase -- restricted to inputs of size n, can a circuit simulate two Turing machines that differ on at least one output given same input of size n? and if both TMs are PTIME can the circuit do this in PSZIE? what about as the number of Turing machines grows to 2-4-16... exponentially but remain PTIME is there still a PSIZE circuit that can take care of them? Thanks!


What is the Gayatri mantra?

Question: I am a householder and want to know what is the exact Gayatri mantra which I can recite for my benifit without any guru initiation . Thank you.
Answer: You can recite the Saavitr Mantra given in Rig Veda 3.62.10:

त्स॑वि॒तुर्वरे॑ण्यं॒ भर्गो॑ दे॒वस्य॑ धीमहि । धियो॒ यो न॑: प्रचो॒दया॑त् ॥

Avoid usage of the three MahaaVyahrtis at all costs, they cannot be used without initiation. Avoid the addition of Pranava in the front as well.
Just that Mantra here and nothing more. You can learn the pronunciation from a guru, if you cannot find one, it doesn't really matter as the mantras of the Rik are for all people and all Varnas (as opposed to the other Vedas), as I've been told by my guru.
You can learn the pronunciation here https://www.youtube.com/watch?v=mQ2nYFnMiQk&ab_channel=VinnithPullavarayar
The Varaanasi Paatha is most accurate.
Make sure to follow cleanliness, and recite in a fairly good place/surrounding.
Make sure not to invoke Rshi or Chhanda as additional rules have to be followed for it.
Also, recite in the tri Sandhyaa period only (sunrise, noon, sunset).
Learn the meaning of the mantra, and recite with Bhaava that the meaning represents.

Avoid out-loud recitations, there's special rules to be followed for Vaachika Japa. Do whispered chanting (the sound doesn't reach beyond a meter or two) or mental, instead or, don't do Japa at all, and simply say it once, in each Sandhyaa.
The correct methodology utilizes water and Sandhyaa Vandanaa as well avoid those things as even more rules have to be followed for them. If you get into Sandhyaa Vandanaa, then you'll need to follow its rules, which requires bathing in ashes, mud, and water everytime... among other things.
Either don't do it at all, or do it the tiniest amount, if you try to escalate, then you WILL need to change to living in a village in a hut, spending 2 hours per day to follow all the rules. Not to mention Vishvadeva offerings and Yajnas which are deeply linked and almost required for Sandhyaa Vandana... that's 4 hours at-least, per day.
Comment: Arya samaj says that this mantra is for nirgun parambrham om and not surya dev. Can you prove it is for surya dev
Comment: Lol, I don't need to prove anything, they need to prove their claim. Savitr is a name of Surya. The Devataa of the mantra is also Savitaa (Surya). No proof is required, everyone who is not from a neo-hindu institution accepts this.
Comment: Yes you are correct. But I have question why gayatri mantra has been given so importance unlike other mantras in vedas? ? ?
Comment: @Hope It's given more importance than others because of the effect. It purifies your actions. That's also why it's prescribed after committing a sin like masturbation for example. There's other mantras that purify the actions as well, all mantras with 4 worded sections do that. But, others have smaller (and different) effects due to various reasons, so this is the best. Your efforts are the only things you can control, you can't control your wealth or family, so that's why it's important. It directly changes your character for the better in every way.
Comment: @DadAnonymous Savitaa is the nominative noun for Savitr. They both refer to the same MALE Aaditya. All the 12 Aadityas can be simplified to the one Surya. Although, most things can be simplified into the rule of the Dirgha vowel ending in names to be equivalent to feminine, it's not the case in this instance. Saavitrii is feminine, Savitaa is not. There's more nuance here as Savitaa in a certain context is feminine, but essentially, Savitaa = Surya (at-least, one form of him).
Comment: @Hope even Sayanacharya Considered Savita as Atman/Parmeshwar in this mantra
Answer: Gayatri is a chhand, generally savita mantr is known as gayatri mantr.
it is found in Rigved samhita, Yajurved samhita and samved samhita.
Whole mantr is found in Shukl yajurved madhyandina samhita 36.3.
You need initiation from a guru to recite any mantr, if possible get the initiation from any guru, or just go to any Arya samaj mandir they will guide you regarding this.

What is the Gayatri mantra?


Unset key binding to tmm in aquamacs

Question: I use aquamacs on mac and the latest version apparently maps M-`  and M-' to tmm functions (which I don't use and don't care to). This is annoying since these are used for accented letters, in all mac softwares and I normally use it in aquamacs for LaTeX. How can I unset these bindings globally in aquamacs ?
Comment: I don't really know how to properly type the code blocks when it includes the backquote. Any hint would be useful to improve the presentation of my question.
Comment: [You use more than one backquote](https://emacs.stackexchange.com/editing-help#code). This works *almost* all the time, except for the cases where the "real" backquote is at the beginning or end of the string (as in this case). I cheat in those cases and add an extra space before or after the "real" backquote to separate it from the "quoting" backquotes. It is possible that a zero-width space might be used instead to make it look better, but I can never remember how to get a zero-width space from my keyboard - it doesn't help that I need it once in a blue moon, so I have no muscle memory...
Answer: After some digging, I found a working solution to my problem. I added
(global-unset-key (kbd "M-`"))
(global-unset-key (kbd "M-\'"))

to the file:
Library/Preferences/Aquamacs Emacs/Preferences.el
and I can type accents in the usual way.
Comment: After some time working with that, I realize that this does the trick but aquamacs complains with ``Invalid read syntax: ")"``. The trouble is that the rest of the startup file does not appear to be executed then.
Comment: Corrected the answer to remove the error ``Invalid read syntax: ")"``.

Unset key binding to tmm in aquamacs


How it is possible that a ket precedes a bra in a matrix expression?

Question: Is it possible to rewrite $\langle a| M|b\rangle$ as $|b\rangle \langle a|M$?
Comment: I beg pardon but why is this physics and not just math?
Comment: Some context for the more casual reader: [bra–ket notation](https://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation). And perhaps *[Duality](https://en.wikipedia.org/wiki/Hilbert_space#Duality)*.
Comment: @Greendrake The language employed is Dirac's bra-ket notation, which is used almost exclusively in physics. Translated into math, the question collapses to an evident "no" question.
Comment: The second expression is an [outer product](https://en.wikipedia.org/wiki/Outer_product).
Comment: @Greendrake: Related to quantum mechanics? Though it isn't revealed.
Answer: In general, you cannot rewrite $\langle a | M | b \rangle$ as $|b\rangle \langle a| M$. You can see that the two are not the same by just comparing what type of mathematical entity they are: $\langle a | M | b \rangle$ is a matrix element (of the operator $M$), which is a (complex) number. On the other hand, $|b \rangle \langle a|$ is an operator, as is $M$, so the product of the two is another operator, which is represented by a matrix, not just an element of one.
Comment: @leftaroundabout Yes, but one is free to choose whichever basis they like, so there is a matrix representation of the operator $M$ for which $\langle a | M | b \rangle$ is an actual element of that matrix. Apart from that, Dirac's notation is designed to be independent of the choice of basis and at least in the quantum mechanics lectures I heard and the books I read the term "matrix element" was used for any bra-operator-ket-expression. If this is not common practice, I'd appreciate being pointed to literature confirming this and will of course reformulate my answer accordingly.
Comment: "$\langle a|M|b\rangle$ is a matrix element (of the matrix $M$)" – no, unless both $a$ and $b$ happen to be basis vectors.
Comment: Fair enough, but then don't say "of the matrix $M$". That suggests that you already committed to representing operator-$M$ in a given basis, which will in general not include $a$ or $b$.
Comment: @leftaroundabout I replaced "matrix" with "operator" now where appropriate.
Answer: The expressions you write are extensions in infinite-dimensional Hilbert space of plain matrix expressions.
Their analogs for finite dimensional real vector spaces and their matrices  indexed by a finite set of indices i,j, whose repeated form implies summation over the whole set, are
$$
|a\rangle ~~\mapsto ~~ a_i \\
|b\rangle ~~\mapsto ~~b_i\\
M~~\mapsto M_{ij}\\
\langle a|M|b\rangle ~~\mapsto a_iM_{ij}b_j , ~~\hbox{ a scalar},\\
|b\rangle \langle a|M   ~~\mapsto ~~  b_j a_i M_{ik}, ~~\hbox { a dyadic matrix,} \leadsto \\
\operatorname{Tr}(|b\rangle \langle a|M ) =\langle a|M|b\rangle  ~~\mapsto ~~ a_i M_{ij} b_j  .  $$
Answer: Thinking in component form makes it easier to predict what kind of objects you will be getting out of Dirac notation. The expression $\langle a|M$ gives
a bra (row vector):
$$\begin{pmatrix}a_1^*& a_2^* \end{pmatrix}\begin{pmatrix}M_{11} & M_{12}\\ M_{21}&M_{22}\end{pmatrix}=\begin{pmatrix} a_1^*M_{11}+a_2^*M_{21} &a_1^*M_{12}+a_2^*M_{22}\end{pmatrix}$$
If we define $\langle c|=\langle a|M$ then your question becomes "is $\langle c|b\rangle$ the same as $|b\rangle\langle c|$?" They are not the same; the first expression is a scalar
$$\langle c|b\rangle=\begin{pmatrix}c_1^*&c_2^*\end{pmatrix}\begin{pmatrix}b_1\\b_2\end{pmatrix}=c_1^*b_1+c_2^*b_2$$
while the second expression is a linear operator (matrix):
$$|b\rangle\langle c|=\begin{pmatrix}b_1\\b_2\end{pmatrix}\begin{pmatrix}c_1^*&c_2^*\end{pmatrix}=\begin{pmatrix}b_1c_1^* &b_1c_2^*\\ b_2c_1^*&b_2c_2^*\end{pmatrix}$$
Heuristically you can see that $|b\rangle$ expects a bra on the left while $\langle c|$ expects a ket on the right. So the expression $|b\rangle\langle c|$ expects a bra on the left as well as a ket on the right.


Combining files and HTML pages in the same document library

Question: We need to have both ordinary files ( doc, pdf, xls) and HTML content that can be shown as popups in the same Document Library. Currently we have added a "Basic Page" content type to a regular Document Library, but this is not very elegant, as we also had to add a HTML column to the content type and use this to fill out the information. So the users create pages, then go back and edit the properties of the newly created ASPX file, and then enter the HTML content in this column. Our current setup is working, thanks to custom XSL, but there has to be a more elegant solution?
Answer: I would have considered maybe using a Wiki library, which stores all HTML content in the WikiField. Obviously, mixing the 2 is possible but not at all elegant. Use lookup columns to link documents to respective Wiki page, and load that in the popup.
Comment: Thanks for the suggestion. Still having the Document Library as the base, what would be the best content type for having elements that hosts the lookups to the Wiki pages?

This question is what led me to using the "Basic Page" content type in the first place, the closest thing to a blank content type that I could find, that would allow me to add a HTML content field as well as a "Description" and a people lookup column.


Send email inside our SharePoint provider hosted add-in (remote event receiver)

Question: I am working on a remote event receiver for our SharePoint online site collection, the remote event receiver is implemented as a provider hosted app hosted inside Azure WebApp. now inside the remote event receiver i want to send emails, but i am not sure how i can do so? in the server-side event receivers i use to use the .net MailMessage, but in the remote event receiver what i need to use?
Answer: You can use the same System.Net.Mail.MailMessage class and just supply your outbound SMTP configuration.
How you configure your SMTP service is out of scope of this network, though. If you don't have an available SMTP service/server, you may want to post over at ServerFault.
Comment: can you please provide more info on what i need to supply?
Comment: What specific questions did you have about the function (this should be posted over at StackOverflow for usage...)?


Unable to delete file

Question: I am unable to delete file:
sudo rm /usr/local/bin/Katy Perry - Dark Horse (Official) ft. Juicy J-0KSOMA3QBU0.mp4.part

It is showing an error:
bash: syntax error near unexpected token `('

How to fix it?
Comment: Insert file path between quotes `"`.
Comment: You can also use `sudo rm` and then directly pull the file(s) into terminal for the full/correct path!
Comment: @cornelius Can i place quotes in any filename, which does not contain tokens?
Comment: aVIRA yes, you can.
Answer: Tab Completion
If you only have one file in /usr/local/bin whose name starts with Katy, you can simply type
sudo rm /usr/local/bin/Katy

without pressing Enter yet. Then press Tab to complete the command to:
sudo rm Katy\ Perry\ -\ Dark\ Horse\ \(Official\)\ ft.\ Juicy\ J-0KSOMA3QBU0.mp4.part

(And then press Enter to run it.)
This quotes each character individually (as in AliNa's answer), and does so automatically so you don't miss anything.
In practice, a large amount of quoting we do on the command line is actually achieved automatically with tab completion.
Note also that tab completion is not limited to situations where something would have to be quoted. For example, a UUID like 8d44cd38-2158-42f4-9af1-94cd3ccbb9a8 doesn't need to be quoted but if it's the only possibility starting with 8 (or with some longer initial proper subsequence), tab completion could be very handy for composing a command containing it.
You can also manually quote, in which case you'll want to know about other ways of quoting than \, for cases like this one where many characters have to be quoted and mistakes are easy to make.
Manual Quoting with '
If you want an expression to appear literally, and the expression doesn't contain a single quote characater ('), a good habit to get into is to quote it using single quotes.
sudo rm '/usr/local/bin/Katy Perry - Dark Horse (Official) ft. Juicy J-0KSOMA3QBU0.mp4.part'
You can quote all of an argument, or just part of it. For example, this works too:
sudo rm /usr/local/bin/'Katy Perry - Dark Horse (Official) ft. Juicy J-0KSOMA3QBU0.mp4.part'
Or even:
sudo rm /usr/local/bin/Katy' Perry - Dark Horse (Official) ft. Juicy 'J-0KSOMA3QBU0.mp4.part'
(I've italicized the portions of the above commands that are quoted, so the effects of ' can be seen.)
When quoting with ', only ' is treated specially. It is always matched as a closing quote mark.
In contrast, quoting with double quotes, as is widely recommended (even when unnecessary), will usually work but operates in accordance with quite complex rules.
Manual Quoting with "
There are three common cases where quoting with " is used in preference over '.

For some reason, many people stylistically prefer ". This is not necessarily wrong or undesirable, but I recommend against preferring " unless you're familiar and comfortable with the rules of which shell expansions it does and does not prevent.
When your expression contains a single quote character ('), this cannot be enclosed in single quotes, but it can be enclosed in double quotes. And like ', " quoting removes special meaning from spaces, tabs, newlines (line breaks), ( and ), { and }, < and >, ;, &, |, ?, *, ~ and #. (And possibly other characters, depending on if I'm forgetting anything and on what shell options are enabled.) For example:
du -h "Don't Ask Me Why (Eurythmics, 1989).flac"

Thus double quotes work fine for the particular file you were deleting--whose name contained the special characters (, ), and space--and the suggestion to use them in this case was both helpful and perfectly okay.
However, unlike ', quoting with " does not remove the special meaning from $, `, \, and (unless history expansion is disabled) !. (Nor ", which as you'd expect is interpreted as the closing double quote. Usually.)
" quoting is thus useful when you don't want to prevent the shell from performing expansions based on the meaning of those characters. For example, running f='fee fi fo' followed by cat "$f fum.txt" prints the contents of fee fi fo fum.txt.
But when such behavior is unanticipated, it can cause problems:
$ du -sh
...
$ rm  "Stupid Scheme to Make $$$$$$ Quick!!!!.pdf"
rm  "Stupid Scheme to Make $$$$$$ Quickdu -shdu -sh.pdf"
rm: cannot remove 'Stupid Scheme to Make 453745374537 Quickdu -shdu -sh.pdf': No such file or directory
Characters that retain their special meaning within " quotes can themselves be quoted by being preceded by a \:
$ echo "\"Windows uses '\\' as the path separator,\" screeched Multiplatform Owl wisely."
"Windows uses '\' as the path separator," screeched Multiplatform Owl wisely.

When an unquoted \ precedes a character that doesn't need further quoting, it remains unchanged. (Thus \\ in the above command could simply have been a single \.)
Inside double quotes, \ before ! removes it special meaning (i.e., prevents history expansion). But unlike when \ quotes other special characters, a \ before ! is not removed. Thus, \! is interpreted as a literal \!, whereas \$ is interpreted as a literal $ and \ before a space is interpreted as a literal space.

Manual Quoting with \
\ quotes a single character, the character immediately following it. (Except of course when it is itself quoted.)
For most characters x, \x is equivalent to x. \ is specifically useful when the character following it has special meaning--it removes special meaning from that character:
$ rm -v Stupid\ Scheme\ to\ Make\ \$\$\$\$\$\$\ Quick\!\!\!\!.pdf
removed 'Stupid Scheme to Make $$$$$$ Quick!!!!.pdf'

When \ is enclosed in double quotes ("), it works differently, as described above. It then has special meaning only when the following character is special, and otherwise is interpreted literally.
Manually writing commands with \ is especially useful and appropriate when you don't have to use very many of them, and can be somewhat inefficient otherwise.
For example:
ek@Ilex:~$ pastebinit <<< Hello,\ world!
http://paste.ubuntu.com/8390449/

(A single ! character at the end of an argument doesn't need to be quoted.)
Combining Different Forms of Quoting
Suppose you wanted to couldn't wouldn't shouldn't can't won't don't!! to appear literally. An easy way to achieve this would be to quote it as:
"couldn't wouldn't shouldn't can't won't don't"'!!'

Or (since \ before ! only fails to be removed when double-quoted):
"couldn't wouldn't shouldn't can't won't don't"\!\!

This can be combined with, and may be considered a variation on, quoting only part of an argument, as discussed above.
Sources / Further Reading

Bash Reference Manual (see this page for other formats)
man bash (a.k.a. bash(1), the bash manpage)
Answer: Spaces are not allowed in terminal, because they separate different parts of a command. So for filenames with spaces you must use quotations, as @Cornelius said, or \ just before each space:
sudo rm /usr/local/bin/Katy\ Perry\ -\ Dark\ Horse\ \(Official\)\ ft.\ Juicy\ J-0KSOMA3QBU0.mp4.part

Since some rare commands doesn't accept quotations, you'd better to know about \.
Comment: Both backslashes and other forms of quotation are processed by the shell itself, not by the commands being run. (This is true even when passing quoted expressions to shell builtins--expansion of the quoted expression and quote removal is performed by the shell, and the action of the builtin is performed by the shell, but they are performed as separate steps, with the first carried out before the second begins.) So "some rare commands doesn't accept quotations" doesn't really make sense. Sometimes backslashes are the easiest way to quote, but they're unlikely ever to be the only possible way.

Unable to delete file


Incorrect Smooth object

Question: On flat shading it looks good, but on smooth displays incorrectly.
With subdivision surface, it looks terrible!!
How to fix it. There is my blender file: https://ufile.io/5qja2

Answer: To understand whats wrong you first need to understand what subdivider does.
Subdivider simply takes 3 vertices, and outputs the average of these 3 points, which in your case these are the points because your magazine lacks horizontal vertices
https://gyazo.com/a39bbb69b08b39541eac0cda3077ec60
you need to have vertical vertices along your magazine and other places where it deforms, something like this:
https://gyazo.com/4f41ac0fd74ee7850644daf9e7b975ed
and then add edge loops to sharpen corners.
Answer: Your Meshtopology is not made to be subdivided, because you have some n-gons (greater then 4 verts) that even make a kink. Because Subdivision Surface modifier operates on them as one face those ugly fragments show up.
on the screenshot you can see all n-gons, you can select them by "Select/Select All by trait/Faces by Sides/greater then 4".

I would recomend to fix your mesh and cut those n-gons to polys.
Sometimes "Grid Fill" can help in those cases but it doesnt to magic.
Then there are addons like "F2" or "Smart Fill" that could help.
And also you could use the "Edge Split modifier" to solve the problem with sharp angles and "Smooth" turned on, but be carefull to put it last and not before a subdivision Surface modifier, because it splits your edges as its named and could produce some problems itself

Incorrect Smooth object


Is there a bijection between $\mathbb N$ and $\mathbb N^2$?

Question:
Is there a bijection between $\mathbb N$ and $\mathbb N^2$?

If I can show $\mathbb N^2$ is equipotent to $\mathbb N$, I can show that $\mathbb Q$ is countable. Please help. Thanks,
Answer: It is easier to write an answer than to find one of its several occurrences on this site.
Let $n$ be a positive integer. Then there exist uniquely determined positive integers $u$ and $v$ such that $n=2^{u-1}(2v-1)$. This is because every positive integer $n$ can be written in one and only one way as a power of $2$ (possibly $2^0$) and an odd number.
Define $g$ by $g(n)=(u,v)$. Then $g$ is a bijection from $\mathbb{N}$ to $\mathbb{N}^2$.
For a different bijection, search for the Cantor Pairing Function.
Comment: It might be nice to learn some searching secrets. I did remember answering the question, but *finding* is another matter.
Comment: Indeed the first duplicate I found has essentially the same answer by you!
Comment: @AndréNicolas You can search for [`user:me is:answer cantor pairing`](http://math.stackexchange.com/search?q=user%3A6312+is%3Aanswer+cantor+pairing) to boil it down to (currently) seven candidates
Comment: How exactly do you write 8 with this?
Comment: This seems wrong. let n = 2^m. Then 2^(m-u+1)=2v-1 which is impossible if v is a positive integer
Answer: Here is a non constructive proof.
Of course, there is an injection of $\mathbb{N}$ into $\mathbb{N}\times\mathbb{N}$.
Now consider the map
$$
(x,y)\longmapsto 2^x\cdot 3^y
$$
By the fundamental theorem of arithmetic, this is an injection of $\mathbb{N}\times\mathbb{N}$ into $\mathbb{N}$.
By Cantor-Bernstein-Schroeder, there exists a bijection between $\mathbb{N}$ and $\mathbb{N}\times\mathbb{N}$.
Edit: I added this answer because the only constructive proof I knew was the zigzag along the diagonals, which I find slightly tedious to write down. But thanks to Andre Nicolas, now I know a straightforward and easy-to-write-down bijection. Which is actually a little step away from the injection I use above.
Answer: Yes there exists a quadratic bijection.
See this
Answer: Yes. Imagine starting at $(1,1)$ and then zig-zagging diagonally across the quadrant. I'll leave you to formulate it.
Hint: for every natural number $>1$ there's a set of elements of $\mathbb{N}^2$ that add up to that number. For $2$, there's $(1,1)$. For $3$, there's $(2,1)$ and $(1,2)$...
Answer: You're trying to find a way to "count" the things in $\mathbb N^2$ in a manner that gets you to any pair $(a,b)$ in some finite time. Notice that "counting" something is essentially finding this bijection - there is a "first" pair, and a "second pair" and so on.
There are many ways to do this, but most of them come down to ordering the set $\mathbb N^2$ in some meaningful way.
Hint: There are countably many diagonals, i.e. there is a "first diagonal" a "second diagonal" and so on. Does this work?


Calculate the height of a building

Question: This question I really need help with, I simply do not know where to start! Anyone can help, all I can offer is supreme thanks. Please include method. I don't want simple answers which don't help me learn
Answer: Let the length of legs of the small right triangle be $h,x$, then use trigonometry to get two relations including these unknowns
$$\frac{h}{20+x}=\tan 23 \\ \frac{h}{x}=\tan 39$$
Answer: Let $h$ be the height of building and $d$ be the distance from $Y$ to the bottom of building. Therefore, we have the following relations:
$$
\tan 39^\circ=\frac hd\quad\Rightarrow\quad d=\frac h{\tan 39^\circ}\tag1
$$
and
$$
\tan 23^\circ=\frac h{d+20}\quad\Rightarrow\quad d+20=\frac h{\tan 23^\circ}.\tag2
$$
Substitute $d$ in $(1)$ to $(2)$ yield
$$
\begin{align}
\frac h{\tan 39^\circ}+20&=\frac h{\tan 23^\circ}\\
20&=\frac h{\tan 23^\circ}-\frac h{\tan 39^\circ}\\
20&=h\left(\frac 1{\tan 23^\circ}-\frac 1{\tan 39^\circ}\right)\\
20&=h\left(\frac {\tan 39^\circ-{\tan 23^\circ}}{\tan 23^\circ{\tan 39^\circ}}\right)\\
\Large\color{blue}h&=\Large\color{blue}{\frac{20\tan 23^\circ{\tan 39^\circ}}{\tan 39^\circ-{\tan 23^\circ}}}.
\end{align}
$$
Answer: Let the point falling down from Z be T and the distance from Y to T be m
Apply tanQ in triangle XZT and triangle YZT which will give
tan 23 = x/(20+m) & tan 39 = x/m
Solve thes two linear equations you will get your answer
Answer: $$\begin{align}
&\tan 39^\circ=h/w \implies w=\frac{h}{\tan 39^\circ} \; \tag{*}\\
&\tan 23^\circ=\frac{h}{(20+w)} \implies 20\tan23^\circ+w\tan23^\circ=h \; \tag{#}\\
&\text{Hence from $*$ and $\#$,}\;\; 20\tan23^\circ+\tan23^\circ\times\left({{h}\over{\tan39^\circ}}\right)=h\\
&\rightarrow h=(20\tan23^\circ)\cdot \left(1-\frac{\tan23^\circ}{\tan39^\circ}\right)=4.039..\approx 4.04 \;\rm{m}
\end{align}$$
Answer: The way I solve problems like these (and word problems in general) is

identify what you want to solve for (in this case the height $h$)
identify all the relationships that you can. "This distance is 20" is not a relationship; it needs to be part of an equation (or inequality).
don't be afraid of creating more than 1 variable. You can eliminate the ones you don't want by doing substitutions later on. as long as you have as many relationships as variables, you'll be fine.

Calculate the height of a building


How do I add sounds to my Yamaha psrew300?

Question: I watched a YouTube video of someone using a sound effect as a piano on there keyboard. I was wondering how to add sounds to my keyboard. Also can you do it with a mobile device?
Answer: The PSR-EW300 does not let you add sounds to its internal library, however it can act as a midi controller so you can trigger samples with it. The manual has info on how to use the USB to HOST connector for this.


PhpMyAdmin (on ubuntu lamp): Login without a password is forbidden by configuration (see AllowNoPassword)

Question: My mysql password = '' i try to login to PhpMyAdmin (on Ubuntu 10.04 lamp) and get error:
 Login without a password is forbidden by configuration (see AllowNoPassword)
What should i do for enter to phpMyAdmin without set password?
Thanks
Answer: You can turn on the option AllowNoPassword on file /etc/phpmyadmin/config.inc.php.
Edit the file config.inc.php, search and uncomment this line:
// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
Then you can access PhpMyAdmin without password.
Comment: Thanks, I make that, after that i restart apache and mysql but i still get:
Login without a password is forbidden by configuration (see AllowNoPassword)
Comment: I don't believe this solution works anymore in Ubuntu 14.04. I edited `/etc/phpymyadmin/config.inc.php` to uncomment/enable that line, run `sudo /etc/init.d/apache2 restart`, refresh the website, try and login with root and no password and the `AllowNoPassword` error continues to occur.
Comment: This command can help (tested on Ubuntu 10.04):

sed '/^    .*AllowNoPassword.*/ s/\/\///' /etc/phpmyadmin/config.inc.php > /tmp/conf.tmp && mv /tmp/conf.tmp /etc/phpmyadmin/config.inc.php
Comment: I also run:
sudo sed '/^ .*AllowNoPassword.*/ s/\/\///' /etc/phpmyadmin/config.inc.php > /tmp/conf.tmp && mv /tmp/conf.tmp /etc/phpmyadmin/config.inc.php
but i get:
mv: try to overwrite `/etc/phpmyadmin/config.inc.php', overriding mode 0644 (rw-r--r--)? y
mv: cannot move `/tmp/conf.tmp' to `/etc/phpmyadmin/config.inc.php': Permission denied
Comment: Try to get root before run the command. Execute: sudo -s and then the sed command. Finally, ajust the permissions: chmod 640 /etc/phpmyadmin/config.inc.php && chown root:www-data /etc/phpmyadmin/config.inc.php
Comment: I can confirm this solution works in 14.04
Answer: Here is what I have noticed from attempting to solve this problem.
what I went through:

I set $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
I go to phpmyadmin and login fine without password ..No problem

Then I wanted to run apache with a different user than www-data so I

I go to /etc/apache2/eenvvars and I edit export
APACHE_RUN_USER=myuser and export APACHE_RUN_GROUP=myuser

I restart apache2 and when I try to login to phpmyadmin without password it does not let me event though, as I previously mentioned, I set $cfg['Servers'][$i]['AllowNoPassword'] = TRUE.
To resolve it

I go to  /etc/phpmyadmin/
check the permission (run ls-l)
I notice that it is root:www-data for config-db.php and for config.inc.php
I run sudo chown root:myuser
Restart apache
Then go to phpmyadmin and login with passowrd...It works

If you run apache with a different other than www-data (i.e you own) and your config.inc.php and config-db.php are owned by www-data, then phpmyadmin will not
Comment: Thanks! The file now being chowed to the www-data user was the problem I had, great help!
Answer: use Sudo to access the following file that mention above (etc/phpmyadmin/config.inc.php.) and also stop apcaha before editing this file with this

// $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

else it will wont allow you to update it.
Command for stopping apcahe

sudo /etc/init.d/apache2 stop

hope it will help it works for me
Answer: Open phpmyadmin config file
sudo nano /etc/phpmyadmin/config.inc.php

/* Uncomment the following to enable logging in to passwordless accounts,
     * after taking note of the associated security risks. */
     $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;


Connection to Eucalyptus is being refused

Question: I copied two Ubuntu VMs (cloud server and the node) from a computer to another. On the first computer it was working fine but on second one the browser Firefox is showing some "Internal Error(2)" when I type the address of the server machine. Please help me resolve it. I am using Ubuntu 10.04 and VMware 7.1.
Answer: You don't provide enough details on what you did. If you moved the cloud-in-a-box version, and changed IP addresses of the services, then of course the whole cloud won't work. Part of the configuration is to register the components, which means, make them aware of each others IP address. Changing IP will require a new registration.


Hyperbolic Riemann Surface

Question: Let $X$ be a compact Riemann surface and $x\in X$.
Is $X - \overline{D(x,r_x)}$ hyperbolic?
Comment: If you look at the tags it looks like theOP is interested in the existence of
positive Green's function which is certainly true for many values of the radius of the disc that is removed.
Comment: My goal is can say that there exists a Green's function on it.
Answer: If a domain on a Riemann surface has a component of the frontier with at least two distinct points then it is potential theoretic hyperbolic. This result goes back to Osgood. Existence of green 's function is connected to existence of barrier at some frontier point. The existence of barriers is local. The solution of the local problem can be found in the book of Ahlfors-Sario titled Riemann Surfaces .
Comment: Any reference where I can find the result?
Answer: Here's an answer from a different point of view then Henri's. It may happen that $X'$ is disconnected but in that case I'll just argue one component at a time. The Riemann surface $X'$ is noncompact, and if it is nonhyperbolic then by the Riemann mapping theorem it must be conformally equivalent (biholomorphic) to either $\mathbb{C}$ or $\mathbb{C}-$(point). Each of its one or two ends must therefore be a removable singularity. But that's impossible if $r_x > 0$ (justifying this impossibility probably involves a case analysis not unlike what Henri proposes).
Answer: Let $X'=X\setminus \overline {D(x,r_x)}$.
If $X$ is already hyperbolic, then the answer is yes (there is no entire curves in $X'$).
If $X=\mathbb C, \mathbb C^*$, then $X'$ has no entire curves by Picard's little theorem, so it is hyperbolic.
If $X=\mathbb C/\Lambda$, then $\pi_1(X')$ is non trivial, and different from $\mathbb Z$ or $\mathbb Z^2$, so $X'$ is hyperbolic. This works if $r_x$ is not too big. Else you could imagine that $X'$ becomes $\mathbb C^*$.
If $X$ is $\mathbb P^1$, then  your surface is biholomorphic to $\mathbb D$ (it is simply connected and strictly realized inside the complex plane).
In conclusion, $X'$ is always hyperbolic.
Comment: In the case where $X = \mathbb{C} / \Lambda$, nothing goes wrong when $r_x$ is too big, $X'$ will still be hyperbolic. It is possible as $r_x$ increases for the topological type of $X'$ to change (it could even become disconnected); but its hyperbolic nature will not change.
Comment: A priori, in the non-compact setting, it is not enough to exclude the existence of entire curves in order to establish Kobayashi hyperbolicity (this is a necessary but not a sufficient condition). But for Riemann surfaces, of course, it is necessary and sufficient to be uniformized by the disc (so that in this case it suffices to check non-existence of entire curves).

Hyperbolic Riemann Surface


Interesting ways you can provide a client with feedback from user testing?

Question: User testing reports are often pages long, lets face it how often do clients actually read this. What interesting ways can you share the results of user testing?
Answer: Don't do a report.
Tomer Sharon (Google), Jeff Gothelf (New Context) and many others have recently been talking about the ineffectiveness of reports and other deliverables. Involving stakeholders in every step of user research, including analysis, will improve buy-in and the overall results.
Clients should be watching the usability testing study and taking notes. Provide all clients and other team members with the same notetaking spreadsheet that has a row for each usability problem with a column to mark each participant that encountered the problem. Also, have a column for potential solutions to each problem. Hold regular debrief sessions to talk about the problems that were found.
At the end of the study, hold another debrief session to talk about solutions. Consider using a technique like the KJ Method (aka affinity diagramming) to organize findings and solutions. The end output of the study will be a recording of the meeting (video and audio) and photos.
Comment: This is pretty much what I do when at all possible. It works stupidly well. Test in the morning - everybody observes. Notes on stickies. Affinity diagram in the afternoon. Actions on the to do list at the end of the day.
Comment: Writing a report makes you think things through.  It's tedious but it does deliver a lot more analysis.
Comment: @PhillipW In my answer, I left out the fact that you can/should still do some analysis on your own (similar to what you would do when creating a report). If you can, do the analysis before the final debrief session to make sure all your findings are covered in the recommended changes.
Answer: Reports are fine, I do it for myself at least, so I keep my thoughts consistent.
But for clients, you have to do presentations.
It doesn't matter what your presentation medium is, powerpoint, prezi or an infographic. Or perhaps you just dance with a marker in your hand in front of a whiteboard or a big ol' sheet of paper. In lieu of a whiteboard, just bluetack some paper on a wall (yeah, I did this a few times, esp. when I was in my first startup, in a university dormitory).
A presentation is a kind of a performance, hence the rules of performance apply: you can act, or be honest, you could be funny or dramatic, but in general, you're doing a performance and you have to keep up the interest of your audience.
Tell stories. It doesn't matter if the stories are fictional or non-fictional.
Stories are what keep people's interest up. It's pretty likely that they had a children's room, with a mother or granny or whoever who read stories to them. It's pretty likely that they have best friends who they tell stories to. It's pretty likely that they read newssites which tell stories to them.
Good stories are always about people. You're a UX designer. Your stories have to be about users.
It doesn't matter if you say: "Listen, I have to tell you something about users. " or "Listen, I have a story for you. Take Alice and Bob, two youngsters in their 20s with a mobile phone". Or you say: "Listen, we had this user testing, and one of the participants.."
It doesn't matter if it's the general case, it's about fictional characters, or an actual person. Keep telling stories, set contexts.
Have the reports to back you up. You need that data. But don't present just the data, it's not interesting.
Of course, sometimes you have to do "offline presentations", that is, you have to provide documents which will be read by people in their "spare time" and it's obvious they don't have spare time for you to say a few things in twenty minutes. It's likely they have about 5 minutes for your whole project per week or even per month.
It usually has a great negative effect for the project as a whole, but still, you have to keep them engaged, you have to create a reading material which makes them interested even when they're just skimming through, as that's what they'll do.
You need reports here because they'll prone to make some pretty stupid consequences as they don't invest the time to actually understand the things you say. Here, reports help to keep your back, "yes, but did you read my report as well? on page 22, it says that...".
There's a science on how to make reading materials which keeps people engaged, it's called literature: you have to understand your readers however, to achieve that: you have to understand their context, and more importantly, their interests.
Perhaps they're not that much interested in UX anyway, and they trust you in general that you do this job just fine, just prove them that you'll bring the profits they need, or you're at least worth the money.
At the end of the day,it's the customer who pays you, but the user is your stakeholder anyway. You have to create a customer experience to keep you employed, but you have to create a user experience to make the world a better place.
Comment: Presentations are one step better than reports, but I have often found that it is hard to get everyone together in one room (or one gotomeeting). Your clients also have to trust you and your recommendations (so clips and quotes are absolutely necessary). If you can't get your clients to participate in the study, then a presentation is an ok fallback. Overall, I think you will a positive correlation between client involvement in the study and recommendations that are implemented.
Comment: @Andrew: in my practice, working in Europe for big companies, the client involvenment you describe belongs to the realm of science fiction unfortunately. Yes, it would be great, just as world peace, but it's utopistic and it needs your personal charm or whatever just to make them understand that users matter. The usual case is that they pay but don't care, and completely disregard user testing results
Comment: I don't think it's as utopistic as you may think. For example, this is what works at Google (ask Tomer Sharon, author of It's Our Research). The profession is gradually moving away from producing deliverables. I was trained and mentored to moderate studies, produce reports, and present results to clients. It's hard to break out of that cycle, but UX is more of a philosophy than a job title. We need to accept that everyone should be involved in UX projects.

That said, I do like your recommendations for presentations :-)
Comment: I'd tend to agree with Aadaam.  Despite offering to 'talk through' reports (something which can be done on the phone if people are busy), few clients take up the offer.
Answer: I like to do a 'show reel' of clips of the screen recording which illustrate the points made in the report.
If you embed them in say powerpoint you can give a brief text description of what's going on.


Estimating BDE Values

Question: I'm having trouble understanding how to "estimate" the value of the BDE for the compound shown below (I believe it is a secondary benzylic C-Br value) shown below (the 58 kcal/mol). We are supposed to be able to estimate the value from the table values shown below. My teacher said to use the C-H values and C-Br values from the table below to estimate it, but I don't understand how they are able to indicate the value. Any helpful drawings would be nice since I'm new to organic chemistry and have trouble just understanding the names! Thank you.
Comment: Welcome to ChemSE.  We would like to see how you arrived at your values. We like to help but loath doing homework.
Comment: @user55119 Thanks! Sorry if I wasn't clear, but the red is what I am trying to understand - the values are not mine; it is what the teacher said. Specifically, I am confused about how they got the 58 kcal/mol estimation.
Comment: Adding a reference for the source of that table might help. Also, ask your teacher if possible, it does look off.
Comment: @BuckThorn All the information I have is that it comes from Pearson Education : / . My teacher wants us to use this table to calculate our BDE values. She said the estimate can have a range of 55-60
Answer: What you have shown in red is the second propagation step in the benzylic free radical bromination of ethylbenzene. The bond dissociation energy  (BDE) of bromine is +46 kcal/mol while the overall heat of reaction of the step is -12 kcal/mol. Thus, the formation of the C-Br bond must be -58 kcal/mol. The BDE for the C-Br bond in (1-bromoethyl)benzene is +58 kcal/mol.
However, the BDE for bromine is not listed in your tables. So how can one estimate the BDE of the C-Br bond in (1-bromoethyl)benzene using the data in the tables? A simple ratio and proportion will suffice. In equation A compare the primary C-H bond of ethane to that of toluene. This ratio is compared to the ratio of the BDE of the secondary C-H bond of propane and its counterpart in ethylbenzene, which is the unknown "x". An estimated value of
82 kcal/mol is obtained. In equation B, this ratio compares secondary C-H bonds with secondary C-Br bonds. The estimate for the BDE of the C-Br bond in (1-bromoethyl)benzene is the value of "y" which is equal to 59 kcal/mol. Pretty close, wouldn't you say?
Comment: thank you so much for the response! this technique definitely works. Just a clarifying question, how did you know how to make the fractions? For instance, why did you choose to put CH3CH2H on top of PhCh2H?
Comment: Doesn't matter as long as the two ratios are in the same order. 2:4::1:x. So, x=2. But for 4:2::x:1, the answer is still 2.

Estimating BDE Values


Java-LAF: How to create Decoration using Synth-XML?

Question: I'm trying to create a custom Look-And-Feel using the Synth-Framework.
I successfully used a tutorial ( Look-And-Feel Tutorial by Oracle/Sun
 ) to experiment,and managed to skin Buttons, Panels etc.
The problem i have now is,that i want to decorate the Window/JFrame.
I read some things about it and tried it out with the MetalLookAndFeel and this Code,that works:
    try{
        UIManager.setLookAndFeel(new MetalLookAndFeel());
    }catch(UnsupportedLookAndFeelException e){

    }
    javax.swing.JFrame.setDefaultLookAndFeelDecorated(true);
    new SFframe().setVisible(true);

Now i try to use my own LAF:
<?xml version="1.0" encoding="UTF-8"?>
<synth>

    <bind style="backingStyle" type="region" key=".*"/>

    <bind style="button" type="region" key="Button"/>
</synth>

The code i use to load the LAF looks like this:
    SynthLookAndFeel laf = new SynthLookAndFeel();
    try{
        InputStream in = SFframe.class.getResourceAsStream("/synth/synth.xml");
        laf.load(in, SFframe.class);
        UIManager.setLookAndFeel(laf);
    }catch(ParseException | UnsupportedLookAndFeelException e){
        e.printStackTrace();
    }
    javax.swing.JFrame.setDefaultLookAndFeelDecorated(true);
    new SFframe().setVisible(true);

The Buttons and Panels get skinned, but of course, the Window/JFrame doesn't.
I just can't find a source on how to skin/decorate a Window/JFrame with Synth-XML.
Can someone help me there?
Comment: +1 for bothering with synth :-)
Answer:
AFAIK isn't possible to decorating JFrame/JDialog/JWindow with own L&F
JFrame/JDialog/JWindow is based on peers came from native OS, by default has the same decorations type color, font, font size as rest of windows invoked from Native OS
AFAIK Substance can do that, have look at its code source, ref. post by (-:forked new Owner:-)
Answer: Well, it is possible to decorate JFrame, JDialog and even JWindow with your own L&F, but i am not sure that Synth can do that. Atleast i didn't find any information about that.
L&F like Substance, Synthetica and others use a small cheat to decorate JFrame and JDialog - when setDefaultLookAndFeelDecorated is set to true JRootPane UI disables native frame/dialog decoration and simply displays its own styling. Also some native features like non-opaque frames/dialogs are very handy in that case and makes you feel that window is actually decorated with a different style (you cannot create a good window shade effect without those features).
Comment: and those attempts don't [work in Java7 by default](http://stackoverflow.com/questions/16219111/cant-transparent-and-undecorated-jframe-in-jdk7-when-enabling-nimbus)
Comment: Yep, for some reason Java developers disabled this feature for decorated frames and dialogs in Java 7 and later (which is pretty dumb imo). That could be easily confirmed by looking into `java.awt.Dialog` or `java.awt.Frame` `setOpacity(float opacity)` method source in JDK 7 and later.


Is there a standard convention for naming z-index layers?

Question: I want to create some sass variables to represent different z-index values, and would like to use a pre-existing naming convention if one exists. I'm looking for something like how Swing defines root, layered, content, and glass panes, or a pointer to some theory that I can use as a naming basis.
Comment: If you mean "default z-index" then there is no default z-indexes. Every element lays on each others, by order of appearance =)
Comment: I don't mean default z-index of elements in the DOM, but rather am curious about existing conventions, like if there are grid systems or naming conventions for how to stack items in the z-axis. Just using a number for the z-index is very flexible, but how often do you use more than, say, 12 different z indexes in a site?
Comment: then it's as I said: by appearance. Every next element has higher z-index, but that's not real z-index
Comment: z-index is all relative to how many elements are on the page. You could always set some predefined ranges for yourself: -1, 3000-5999, 6000-9999, etc and then name them accordingly.

* CSS positioning also has an effect on visual layering in HTML.
Answer: After thinking about this a bit at work, here's what we came up with (wrapped in a Sass map):
$z-index: (
  'satellite'           :       5000,
  'skyscraper'          :       1000,
  'tower-block'         :       500,
  'house'               :       200,
  'bungalow-chimney'    :       110,
  'bungalow'            :       100,
  'shed'                :       50,
  'postbox'             :       10,
  'curb'                :       1,
  'pavement'            :       0,
  'pothole'             :      -10,
  'ditch'               :      -20,
  'sewer'               :      -100,
  'mine'                :      -300,
  'seabed'              :      -1000
);

Which is then referenced like so:
.foo {
  z-index: map-get($z-index, 'pothole');
}

Answer: http://en.wikipedia.org/wiki/Structure_of_the_Earth ?
Exosphere
Thermosphere
Mesosphere
Stratosphere
Troposphere
Crust
UpperMantle
Mantle
OuterCore
InnerCore
geeky enough for you?
Comment: I love it! I started thinking along this route, but I can't remember the layers of the atmosphere off the top of my head :/
Comment: google pretty much IS the top of my head :D
Answer: We need to maintain the stacking order of the project covers, filter bar, location search modal, custom drop-down above the modal, and website navigation, in that order, from bottom to top. We can set up a Sass list, like so:
$elements: project-covers, sorting-bar, modals, navigation;

This list represents the order in which we want our elements to appear, from lowest to highest, with each index, or position, in the array representing the z-index of that element. We can use the Sass index function to assign a z-index value to each element.
For example:
.project-cover {
   z-index: index($elements, project-covers);
}

This would print out:
.project-cover {
   z-index: 1;
}

This is because project-cover is the first element in the list, at index 1, and the lowest element in our z-index stacking order. Let's write the Sass for the rest of the items in our list:
.sorting-bar {
   z-index: index($elements, sorting-bar);
}
.modal {
   z-index: index($elements, modals);
}
.navigation {
   z-index: index($elements, navigation);
}

Now, our compiled CSS would look like this:
.project-cover {
   z-index: 1;
}
.sorting-bar {
   z-index: 2;
}
.modal {
   z-index: 3;
}
.navigation {
   z-index: 4;
}

Comment: That's not what the OP is asking for at all.
Comment: This is a novel approach to defining a z-index stacking order without hardcoding any integers. I like it!
Comment: Yes, that's right, I may not have understood your question, sorry, did not want to ask, but help, hug.


Stepping down negative and positive voltage

Question: I have an old device that contains multiple buttons that are all tied to some connectors in the back. The connectors are hooked up to a computer that interprets each button press and sends out a command depending on what button was pressed. When the buttons are depressed, there is a constant 24V DC voltage coming out of the corresponding pin from the connector. When the button is pressed, the voltage on that same pin quickly changes to -24V DC. I am in the process of upgrading the hardware in the computer and the IO modules can only accept a range of 0 to +5V. I am trying to figure out a way that I can step down the +24V down to about +5V and convert the -24V to something close to 0 so that the computer modules can interpret that as a low. Because of the positive and negative voltage toggling through a single wire, I am assuming that I just require a single converter. I am so confused as to how I can even work this out or if it is even possible. Any help would be greatly appreciated.
Answer: It's called a "DC clamp" circuit:

simulate this circuit – Schematic created using CircuitLab
The Schottky diodes prevent the right-hand side from dropping below 0V or rising above 5V. If the left-hand side exceeds this range, the diodes conduct, and the excess voltage is dissipated in the resistor.
The forward voltage drop of the diodes is about 0.3V, so the final voltage range you get is -0.3V to +5.3V, which is usually acceptable to equipment that nominally requires a "0 to +5V" range.
Answer: You could also employ a Zener if that's your cup of tea.

simulate this circuit – Schematic created using CircuitLab
This will be slightly more conservative than Dave's -- the output will be 0V to just under 5V (the 1N4732A is 4.7V) -- if you're worried about the extra 0.3V.  But you'll pay: this design uses two different devices plus and an extra resistor.


Manuscript sent back to author, now status 'Incomplete submission'

Question: this is maybe a silly question. But my original submission was sent back for technical corrections. I went to check the status in Editorial Manager and clicked 'Edit Submission' just to see the files I had submitted; my intention was not yet to re-submit the manuscript. Then, when returning back to the main menu, I noticed that my submission was moved to 'Incomplete submission' from 'Submissions Sent Back to Author'. Did I do something wrong? Will the editor still notice that I re-submit the manuscript, or did the process started all over again? :( Will the co-authors also be sent a note when I have done the submission?
Comment: What on Earth are the close votes for? This can be unambiguously answered by anyone who's familiar with operating Editorial Manager.
Comment: A question for the editor and the editor only. You probably just triggered a piece of software.
Comment: @Buffy On the contrary, asking the editor a question this simple would be inappropriate.
Answer: It just means you've started to edit the submission but have not resubmitted it. The status is similar to if you start filling up a job application but have not input all the necessary details, so the system does not register the application as submitted. Viewed another way, if a system allows you to save your application with a 'save as draft' button, then after you click that button, the status is the same as 'incomplete submission'.
So: nothing to worry about, keep doing what you're doing, and when the paper is ready for resubmission edit the submission again and resubmit. Will the editor notice? If they are looking at the journal, yes - the current status of each manuscript is prominently displayed in Editorial Manager (but they are not likely to do anything, since this status indicates that the ball is in the authors' court). Can the process start all over again? Probably not. Even if you submit the manuscript as a new manuscript rather than a revision, Editorial Manager should flag your manuscript as a duplicate. The editor should then be able to merge the submissions. It's possible an editor inexperienced with the software will not know how to do this, but the publisher should be able to help.
Answer: "Incomplete" is there to remind you that you did not submit.

Did I do something wrong?

No.

Will the editor still notice that I re-submit the manuscript,

Not until you complete the resubmission.

Will the co-authors also be sent a note when I have done the submission?

Not before you complete the resubmission.


Are there any indications that English is going to split into different languages in the next hundred years?

Question: Are there any indications that (global) English is going to split into different languages in the next hundred years?
Comment: To properly answer this question we would need working definitions of _split_, _language_, _English_ and _indication_. Some of those are easy enough but I point it out because this isn't a remotely objective question yet. We can theory craft all we want, but to objectively answer this question we need a heck-of-a setup.
Comment: Closely related: [Do you think American English will keep on deviating from British English or they will one day become the same thanks to globalization?](http://english.stackexchange.com/questions/5774/do-you-think-american-english-will-keep-on-deviating-from-british-english-or-they). Also, as a general reference: [Where do accents and dialects come from?](http://english.stackexchange.com/questions/5815/where-do-accents-and-dialects-come-from)
Comment: Fascinating question, but both possibly a duplicate and too subjective. But the current answers are somewhat objective so I don't think I'll vote to close.
Comment: @Mitch As you can tell, I have just started to ask questions here, can you tell me if you would have preferred a version that explicitly asks for examples like Tok Pisin below?
Comment: I'm not sure how to reword your question; it's easier to answer well here if objectivity is possible, and questions about the future can lead to both objective and subjective answers.
Answer: If anything, I would expect the opposite to happen.
During the age of colonization many scholars predicted that the distances between English-speaking populations meant that by our times the average American would not be able to understand the average Australian, for example. What happened instead was the telegraph, and the telephone, and other advances in communication that kept far-flung speakers of English in constant contact with each other, thereby reinforcing the commonality of the language. Today, of course, we regularly exchange messages with people living on every continent, thanks to the Internet, which is likely to lead to regional variations either disappearing or being absorbed into worldwide English.
English will continue to evolve, and is likely to pick up qualities from places like India that have not historically contributed significantly to the development of the language before now, but I would not expect to see the English language fragment.
Comment: @Marcin: It is said that the Dutch spoken by the majority of Dutchmen and that of most Flemish speakers is diverging, though I am not sure. I, a Dutchman with a standard accent, find it easy to understand the Belgian news, but random people speaking Flemish in an informal setting will be incomprehensible to me for a large part. Then again, the same applies to many Dutch dialects from the Netherlands. It is very difficult to say whether there is general divergence going on, and even more so between which dialects/accents it is strongest.
Comment: Although, interestingly, I understand that Dutch is undergoing certain changes (such as simplification of the formal register, and assimilation of the masculine and feminine genders), which Flemish is not. Those languages also benefit from a community which is able to be in constant contact, and which are geographically very close.  Accordingly, I don't think fragmentation is impossible.
Comment: I agree. I would add that English has always been quick to coin phrases and adopt words and phrases from other languages, which I think would also make it less likely to split.
Comment: @Cerberus: Very interesting!
Answer: My money would be on English becoming more affected by places like India (and perhaps china) for everyday use as another billion english speakers come online.
Traditionally English has been very happy to absorb other language influences so I don't think there will be a formal correct English and a 'street' Indo-English in the way there was latin/vulgate.
Answer: Tok Pisin is already a descendant language of English.
In the book "The Last Lingua Franca" there was a fascinating case study of modern Tagalog (Taglish), which mixes in a lot of English, although as with all issues that aren't black and white, one could quibble if it is a form of Tagalog with English loan words, or a English dialect with Tagalog influences.
http://www.amazon.com/Last-Lingua-Franca-English-Return/dp/0802717713
Mass media, in my opinion, is really slowing down the rate of language fragmentation compared to what it was historically.
Comment: here's a list of English-based creole languages: http://en.wikipedia.org/wiki/English-based_creole_languages
Answer: I think it's more than just a metaphor to say languages evolve.
In that context, I would suggest the Galapagos Islands were a particularly good place for Darwin to investigate the evolution of finches.
Evolution (and more particularly speciation) occurs more often and more quickly when there's plenty of scope for populations to become disconnected.
By (more than just) analogy therefore, we can reasonably expect languages in general will become more homogeneous in the future because of increasing worldwide travel and intercommunication.
Logically, we should all be speaking Chinese in 100 years time, but because English has such a dominant position (not just on the Net), I think it will eventually become the only game in town.
I know it's always sad to lose diversity, but most Welsh people took the decision generations ago to bring their children up with English as their primary language. For the quite obvious reason that this would enhance their prospects for economic and cultural / social success.
Comment: similarly Ireland's literary reputation is based on speaking English. If Joyce, Shaw, Wilde had written in Gaelic they would be about as well known as the Icelandic sagas.
Comment: Personally I think we're doing God's own work right here on EL&U by helping to promote our language at this time of flux. Maybe we can get our associates (and alter-egos) over at *programmers.se* to hack into and disrupt *hindi.se* and *chinese.se* if they ever appear!
Comment: No need, for any culture to become sophisticated it has to be able to listen to Radio4, and in order to reach full enlightenment it must play Mornington Crescent - and so must be able to speak English.


odds ratio: the purpose and interpretation

Question: Could someone please explain the purpose of the odds ratio and how it could be interpreted (i.e., the origin of their usage is in primary interest for me)? Why don't people simply use the difference between two proportions instead of odds ratio? Reference to the proper mathematical book will be great.
Comment: I'm not sure that there will be a clear starting point or a proper reference exactly. But to understand the odds ratio better, it might help to read my answer here: [Interpretation of simple predictions to odds ratios in logistic regression](http://stats.stackexchange.com/a/34638/7290).
Answer: One reason odds ratios are used so frequently is that their logarithms have an unrestricted range.  That allows one to model covariate effects using ordinary unconstrained maximum likelihood estimation.  A second reason is that odds ratios can transport to settings where the base risk is drastically different from the original sample.  An odds ratio can be applied to any baseline risk.  A risk difference or risk ratio cannot, otherwise you would get probabilities outside [0,1].
Answer: Odds ratio for a success rate of $p$ is defined as $\frac{p}{1-p}$. A nice feature of this ratio is the plain English explanation you can do with it in a betting scenario. As an example, assume $p = 0.8$. Your odds ratio is $\frac{0.8}{1 - 0.8} = 4$. So you could say you are four times more likely to win than loose or vice versa. Lots of horse race betting (and their pay off) also works in the same way.
Comment: This seems only to push the question back one inconsequential step: *why*, then, do people use odds in betting rather than (say) differences of chances? Moreover, you need to go one step further: once the use of odds to express chances is justified, why would one use odds *ratios* to compare chances rather than, say, odds differences or something else?


The Google Cloud Extension Package package did not load correctly

Question: I am having an issue with VS2017 and Google Cloud toolbar. It used to work before and now I am getting this pop up every time I open VS2017.

The 'GoogleCloudExtensionPackage' package did not load correctly. The
  problem may have been caused by a configuration change or but the
  installation of another extension. You can get more information by
  examing the files
  '...\AppData\Roaming\Microsoft\VisualStudio\15.0_xxxxxxx\ActivityLog.xml'.
  Restarting Visual Studio could help resolve this issue.

Publish to Google Cloud option is also disabled. Tried reinstalling extension and VS. No matter how many times I restart, re-install, repair, anything it doesn't work.  Activity Log shows the following error
<code>LegacySitePackage failed for package [GoogleCloudExtensionPackage]
Source: 'mscorlib' Description: An item with the same key has already been added.
System.ArgumentException: An item with the same key has already been added.
  at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
  at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
  at GoogleCloudExtension.Accounts.CredentialsStore.LoadAccounts() at GoogleCloudExtension.Accounts.CredentialsStore..ctor()
  at GoogleCloudExtension.Accounts.CredentialsStore.<>c.<.cctor>b__67_0()
  at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue()
  at System.Lazy`1.get_Value()
  at GoogleCloudExtension.Accounts.CredentialsStore.get_Default()
  at GoogleCloudExtension.GoogleCloudExtensionPackage.Initialize()
  at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
</code>
I also tried deleting the below folders

C:\Users\\AppData\Local\Microsoft\VisualStudio\15.0xxxxx
C:\Users\\AppData\Roaming\Microsoft\VisualStudio\15.0xxxxx
Answer: A similar issue was reported to the extension developers on Github, see here. As you can see on this comment this issue was caused by multiple user account files linked to one user account, and should be fixed by deleting the offending files:

Go to %LOCALAPPDATA%\googlecloudvsextension\accounts and you will find several *.json files. Deleting them all (or just the ones with duplicate accounts) should fix this issue.


How can I cut a brick?

Question: I need to cut a brick to a particular size to fit it in that area. I am not sure which tool I use or buy. I have asked several places, but they have expensive tools which I can't afford.
Comment: Regardless of how you do it, make sure you wear proper eye protection. In the unlikely event that the brick shatters, any bits that happen to fly upwards and hit you in the face can do some _really_ nasty damage to your eyes.
Comment: I've often seen a trowel used to score the brick, before cleaving it with a hammer, or sometimes just the handle end of the same trowel.
Comment: A typical construction worker uses just the pointed end of the hammer - a few hits will usually cut the brick nicely in half. It requires a bit of training and you'll cut bricks without expensive tools. Of course if you need rounded shapes this method has to be repeated a few times - carefully .. a brick breaks apart rather easily
Comment: Given that there are all different kinds of bricks - ones with holes, ones with frogs, etc, you need to be more specific with the question.
Comment: [YouTube: How to Cut a Brick](https://www.youtube.com/watch?v=hn-v-tdZo9A)
Comment: Clarify - you're cutting one single brick?  And you have plenty of spares?   Time for Science !
Answer: Standard low cost method is with a mason's chisel and a hammer.

Use it to score a shallow line on all 4 sides, then give it a solid hit on one of the wide/flat sides of the brick. Hide the imperfections of the cut face in a mortar joint. Set the brick on sand or the ground, not on a hard surface.
Comment: I'm really, really bad at brickwork and masonry, and even I can do this. A little practice may be needed, but a few incorrectly cut bricks are significantly cheaper than powerful saws and diamond blades. +1
Comment: Or practice multiple times using a test brick before going for the right size.
Comment: Somewhat like cutting glass (if you have any experience of that) it's much easier to cut a brick in half, or perhaps thirds, than to shave a tiny slice off the end by the score-and-snap method. So "successively cutting it shorter" it likely to be more frustrating than just marking it where you want it cut and going for it. Little slices are where saws rule, but saws are relatively expensive.
Comment: @ThaRobster consider sneaking up on the correct size, using several cuts.
Comment: I ended up using this tool https://sydneytools.com.au/product/stanley-16-331-275x75mm-fatmax-floor-chisel
Thanks for your recommendation!
Answer: if you already have an angle grinder a $2 stone cutting wheel is probably the cheapest way to cut a single brick..
a diamond wheel will last longer, but cost more.
Comment: if you have to buy an angle grinder you can get pretty cheap ones maybe $25 USD that will come with masonry abrasive discs that will easily cut a brick.
Comment: yeah, but the chisel will be cheaper
Comment: I have used an angle grinder to cut thin brick, including 90 degree cutouts for electrical outlets. I trickle a little water on it, that seems to help, just don't get it on electrical bits of the grinder.
Comment: @FreshCodemonger the cheapest ones are usually too small to go all the way through, so you have to cut form both sides lined up nicely.  A bolster chisel is far quicker as well as cheaper if you want big pieces (but not so good for shaving bits off the edge, though that's more of an issue with pavers)
Answer: The usual way is with a circular saw and a diamond blade. I have done this myself for the edge of an enlarged space for an oven in a brick wall. If you are cutting loose bricks, you will need to clamp the bricks securely when cutting them.
There are other ways to split bricks with hand tools, which should be fairly easy when working with loose bricks. If you only have a few bricks to split and you have some bricks to spare (because you will probably need to practice a bit), this seems like a reasonable way to go.
Comment: @isherwood You are probably right. My experience was with cutting bricks *in the wall*. So a wired (not battery) circular saw, with its larger blade did quite well.
Comment: I'd say an angle grinder is more "usual". The torque in a circular saw is barely adequate. I tried using one for a paver walkway and gave up in short order.
Answer: Low cost, manual cutting.
Place a L- profile under the brick where you want to cut it
Hold one side down, and hit it with hammer on the elevated side.
It might work 50/50 depending on the brick.
Answer: I have successfully cut brick with a "tile coping saw".  It's slow, and not something you want to do often, but it works.

The "blade" is a rod covered in grit:
Comment: You can get carbide hacksaw blades as well. I imagine hacksaw would be more comfortable than a coping saw.
Comment: @DKNguyen and would cut straighter...
Answer: I have done this with a mason's hammer, a chisel and regular hammer, and a wet saw. A wet saw is quick and gives the best edge but makes a mess (red slurry/mist spray that stains what it gets on), but wet saws are a bit pricey. I prefer the chisel and hammer over a mason's hammer because it provides a better edge and control of where it breaks (at least for my novice skill level).
If you only need one brick cut and cut cheap, a chisel and hammer is your best option.
Comment: Mason's hammer, +1 or straight claw hammer backwards; *tink tink tink* all the way around and then go *thunk* on it.
Answer: Mark your brick. Chances are if you pull up to a job site where brick or block being layed. Someone will cut the brick for you. Pay them in beer.

How can I cut a brick?


Limiting number of app domains per worker process in IIS (And disabling overlapped recycling of app domains)

Question: My current understanding of IIS:
An application pool maintains a collection of worker processes (Operating system processes), within each worker process there is one or more app domains.
My current problem:
We currently used a third party dll in native code, our managed code talks to this.
This native code can only be initialized once per operating system process.
When we have more than one app domain per worker process, the native code blows up (As the initialize logic of the native code gets called more than once for the current process).
My ideal short term workaround (Until the third party fixes this issue):
I would like to limit the number of app domains running at any one time within a worker process to one. I also want to disable overlapped recycling of app domains within worker processes. Is this possible? And if so how?
In IIS I cannot see a way to limit the app domains, only the worker processes. I can also not see a way to disable overlapped recycling of app domains, again this option only exists for worker processes.
I realize this will impact our performance somewhat, for example by disabling overlapped recycling of app domains we will get service interruptions. I'm OK with this as overall is will enable us to improve performance with the current changes we are trying to make.
I also understand that this may require some registry hacking etc. but this is fine for a temporary workaround.
Any suggestions will be much appreciated!
Answer: Use self hosting or wrap the access to native code library into separate self hosted code accessed through named pipes from IIS hosted application.
You are fighting against core features of IIS and its application lifetime management and health monitoring. To turn off some features you must visit configuration of AppPool and set its Recycling and Advanced settings to turn off every related features (I'm not sure if it will solve all your problems). Basically it is bad idea - let IIS do its job or host application yourselves and build your own health monitoring.


How to choose "family" in Generalized Additive Model (GAM)

Question: When modelling a GAM model using mgcv in R, we need to define the family = . I tried some families (e.g., Gaussian, Gamma), R seems to build them all successfully.
Are there some guidelines about how to choose the appropriate "family"?
Comment: You have to think about the distribution of the outcome conditioned on the covariates.  So if you're modelling weight as a function of height, what is the distribution of weight for all 6 foot people?  That will determine the family.
Comment: Using fitdistplus is not the appropriate method.  When you use fitdistplus, you are fitting the marginal distribution of the outcome (that is the distribution of the outcome without considering covariates).  If you're modelling weight as a function of height and sex, consider the distribution of weight for all 6 foot tall men.  That is the distribution of the outcome conditioned on covariates.
Comment: @DemetriPananos I use "fitdistrplus" package ("descdist" function) to examine the most possible distribution of the response variable. Is this method appropriate? I think it does not take "... conditioned on the covariates" into account.
Answer: Here is an example of what I mean by "outcome conditioned on the covariate".
I want to do a linear regression.  I have a continuous outcome and I am regressing it on a binary variable.  This is equivalent to a t-test, but let's pretend we don't know that.
What most people do is look at the marginal distribution of the data. This is equivalent to plotting histogram of the outcome variable.  Let's look at that now

Ew, gross, this is bimodal. Linear regression assumes the outcome is normally distributed, right?  We can't use linear regression on this!
...or can we?  Here is the output of a linear model fit the this data.
Call:
lm(formula = y ~ x, data = d)

Residuals:
    Min      1Q  Median      3Q     Max
-7.3821 -1.7504 -0.0194  1.7190  7.8183

Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)   9.8994     0.1111   89.13   <2e-16 ***
x            12.0931     0.1588   76.14   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.511 on 998 degrees of freedom
Multiple R-squared:  0.8531,    Adjusted R-squared:  0.853
F-statistic:  5797 on 1 and 998 DF,  p-value: < 2.2e-16

An incredibly good fit.  So what gives?
The plot above is the marginal outcome.  Regression, be it linear or otherwise, only cares about the conditional outcome; the distribution of the outcome conditioned on the covariates.  Let's see what happens when I color the observations by the binary variable.

You can see here that the data conditioned on the outcome are normal, and hence fit into linear regression's assumptions.
So when I say "think about the outcome conditioned on covariates" what I am really asking you to do is to think about a particular set of covariates and think about the distribution of outcomes from those covariates. That will determine the family.
Comment: Now I understand your meaning. One "practical" question: how to think about the conditional distribution of Y? For example, if there're many covariates (X1, X2, ..., X10), Is there a way to figure out the distribution of Y given X? I noticed that in "https://stats.stackexchange.com/questions/190763/how-to-decide-which-glm-family-to-use", Tim said "If you are dealing with continuous non-negative outcome, then you could consider the Gamma distribution, or Inverse Gaussian distribution." This seems not consider the "X1, ..., X10", because he recommend the distribution when we see non-negative Y.
Comment: You have to use some of your background knowledge on the problem.  There is no way to determine from the data the most appropriate family.
Comment: I'm a bit of a novice myself but this confuses me a lot...why do you say that linear regression assumes a normal distribution? I mean, you seem to be suggesting that we are happy because the data conditioned on the outcome is normal. Why is that important for linear regression? I never quite know why statisticians say that fitting a model actually assumes something about the data. Isn't the model just a model (although how well it performs will of course depend on the characteristics of the data, but that's not relying on an 'assumption')
Comment: @T_M The inferences from the model are made under the assumption that the data are normal.  The validity of those inferences hinges on that assumption.
Comment: @DemetriPananos thanks for your very clear answer. Would you be kind enough to provide the data/Rscript you've used ?


Improve benching through adding speed to the lift...how?

Question: I've been 'stuck' at 240 lbs in my bench press.  My biggest issue seems to be in the lift off from the chest.  From what I've been reading, this could be due to the lack of speed/initial explosive power.  What exercises would you recommend to improve this part of the lift.
Answer: Certainly you're at the point where you have to focus on technique, and doing so will not only help you push past plateaus but also avoid injury.
The following technique list is taken from Power to the People Professional, and all adds up to an explosive push. Notice the focus on deriving power through your feet and directing that through your body! The bench press is just as much a full-body exercise as the deadlift or squat.

Choose the grip width the places your forearms parallel to each
  other when the bar touches the chest.
Place your feet firmly on the platform, pinch your shoulder blades
  together, press your shoulders towards your feet (the opposite of a
  shrug) and raise your chest to set a moderate arch. [My comment: Here, think of trying to put your shoulder blades into your back pocket.]
Unrack the bar and use your lats to carry it over your sternum.
  Keep as much weight as possible on your feet.
Take a deep breath and hold it.
Loosely lower the bar to your sternum. Meet it half way with your
  chest; force your chest up on descent.
Don't flare your elbows, keep them at an approximately 45 degree
  angle. Keep your elbows straight under the bar; focus on lowering the
  elbows rather than the bar. Keep your wrists straight.
When the bar has touched your chest relax your arms and let the bar
  sink into your chest. Don't let your ribcage collapse though and don't
  lose your air. Pause motionless for a second.
Explosively drive your feet, from toe to heel, into the platform
  and send a shock wave through your body. [My comment: if you're not a competitive powerlifter, it's ok to let your butt come off the bench a little.]
Immediately crush grip the bar and press with a maximum explosion.
  The shock wave from your legs should pass through your lats. Then the
  delts, the triceps, and finally the pecs will fire.
Press straight up. Keep your elbows in, your chest up, and your
  shoulders down. Forcefully exhale as you lock out.
Comment: Thanks Greg - I was actually looking for some exercises specific to increasing speed of the bench-off the chest part of the movement.  The above are GREAT steps to ensuring proper technique.  I started to use bands attached to the barbell....not sure if there's other similar supporting exercises
Comment: @Meade I guess my point was to focus on the full-body explosion of power during that part of your lift. My personal inclination would be not to look for supporting exercises but to focus on what you're trying to accomplish (a full bench press). If that's your sticking point, then it'll be what gets worked hardest naturally.


Marginal utility vs Total utility

Question: If marginal utility is positive, consuming an additional unit of a product will cause total utility to decline. Is that statement true and why?
Answer: Marginal utility is, by definition, the additional utility that comes from consuming an additional unit of a good (more precisely, this holds if we  consider discrete units of the good, if we have a continuous differentiable utility function marginal utility is  the derivative of the function, but the intuitive concept is the same).
Therefore, if marginal utility is (strictly, that is not zero) positive, this means that the consumption of an additional unit of the good increases  total utility.
In order to have a decrease of total utility, we must have a (strictly) negative marginal utility.
Therefore, the correct statement is just the contrary of what you said: if marginal utility is positive, an additional unit of a product will cause the total utility to increase.
Comment: If I consider the Law of diminishing marginal utility, then is the statement still false?
Comment: Yes, that Law doesn't change the fact that the mariginal utility is positive, it means that it is positive, but  decreasing, smaller  as long as the consumption increases, but still positive. From a  technical point of view this law involves the second derivative, not the derivative: the first derivative is positive, the second derivative is negative (but the second derivative only).
Comment: That means, Total Utility increases but in a declining rate if i consider Law of diminishing utility ?
Comment: Yes, exactly.  That's the meaning of the law of diminishing marginal utility.
Answer: The statement is not true. Consider trivial example of following utility function:
$$U= 2x^{0.5}$$
Marginal utility will be always positive for this for this function (given that x is a good so $x\geq 0$, you can check that MU is
$$MU = \frac{1}{x^{0.5}}$$
which will always be positive in this case yet consuming additional units of x causes $U$ to increase not decrease.

Marginal utility vs Total utility


Could an Orion Spacecraft launch from a Falcon Heavy?

Question: The cost of an SLS launch is significantly more expensive then a Falcon Heavy. Could an Orion spacecraft be mated to the Falcon Heavy to save launch costs?
Answer: Based on weight to LEO, the falcon heavy could lift the Orion.
The current fairing OD is 5.2 meters and the Orion capsule is 5 meters wide. Aerodynamically it'd be pretty similar to  the standard fairing.
Another issue would be the launch abort system. NASA typically wants these so SpaceX would need to include it and make an adapter to step up the diameter of the falcon 9 core.
Comment: The LAS is a component of the Orion (or Dragon, CST100, etc), not the launch vehicle. It would be qualified for use on Falcon along with all the aerodynamic qualifications necessary to put it up there at all.
Comment: @Saiboogu I know, I was just trying to say that obviously SpaceX would need to test/simulate the new aerodynamics and adjust the flight computer accordingly
Answer: One of the challenges Boeing has faced with CST-100 was the aerodynamics of a larger diameter capsule on a skinnier stack. This would be similar to the problems encountered placing Orion on Falcon Heavy, and would require aerodynamic studies to determine if it is stable, and what modifications might be required.
Besides the windtunnel and simulation tests, the government may require a test of the inflight abort system since A) the current system (tested standalone) was designed for SLS and B) They are aware SpaceX could realistically perform this test much cheaper than other providers, due to cheaper launch costs and possibilities of reuse (a cheaper used booster, and maybe saving the booster).