Should I post publications in preparation (or just submitted) on my CV?

Question: If I have works that are almost submitted to journals, or are in journal review, is it appropriate to include these on my CV?
Comment: if they are under review, then simply write _under review_ after citing them without mentioning the journal or proceeding. I've seen many do that. But I know someone who mention in some of his papers _ideas_ and cite them as _under review_ but I am sure that they have never been even considered for publication. I dont know if this is ethical or not though.
Comment: 'almost submitted' = 'in preparation' _Use that specific term._ They will know what you mean. Like others said, just be prepared to provide a draft if asked to do so.
Comment: FWIW - this is for a post-doctoral application to a facility in the US.
Answer: Don't put anything in your CV you cannot justify if asked. A CV is not just a list of your accomplishments, it's a list of material you can provide to a recruiting committee in order to help them make a decision.
In a same way that if you claim to have a given degree, you should be ready to provide the corresponding credentials, if you claim to you have a paper under review, you should be ready to provide the submission.
In other words, you can list in your CV your submitted work, but not the pieces of work that are "almost submitted", unless you're ready to provide the draft if asked (the question is: if the draft is not submitted, that probably means it's not ready, therefore can you provide it?). If it's possible with the journal/conference policy, you can even put your submitted version on a pre-print site, such as arXiv.
On going work can go into the "research statement" part of your CV, where you can explain the different ideas you're working on, and even give the key concepts.
Comment: To extend this, if you *aren't* prepared to justify it, *don't list it on your resume*. I've interviewed too many candidates who listed a boatload of skills that, when pressed, they couldn't back up in practice; it didn't work out for them. The same applies here.
Answer: I will usually list things that are on the arxiv. They can be viewed as tech reports, so I don't see the harm in doing so.
Where it gets tricky is if (for example) you submit to a double blind conference. In such a case adding the paper to your CV might be viewed as a breach of the process.
But in general my view is that if you have the paper posted on your web page (and you should!) or on the arxiv, then it's perfectly fine to list it.
Answer: Okay, it seems I have to play devil's advocate again… because my position on this is different from Charles' answer.
My CV lists my scientific production separated between peer-reviewed articles, non-peer reviewed articles (I have none, but it could happen), invited conferences, oral conferences. As such, I would definitely not put a non-published paper among the "publications", especially not among the peer-reviewed ones. In my field, it is rare to publish (in the sense of "make publicly available") a manuscript before it is accepted (chemists don't use arXiV much, because most journals prohibit it), so I find it weird to list unpublished material in a CV.
So, because you didn't tell us your field, I would say beware:

if your manuscript is unpublished, it's not a publication, don't list it as such
if it's published (arXiV or your website or other) while in review, clearly mark it as such (and don't list it as peer-reviewed)

I would say that the "under work" manuscripts do not add much information anyway. The topic they cover is surely already covered by your research statement (or list of research interests), so why would a hirer care about whether you are writing this paper or that paper?
Comment: "why would a hirer care about whether you are writing this paper or that paper?" There's a difference between a research statement saying you're interested in something and actually producing work. Beyond that, for postdocs and the like, work currently in the pipeline may represent a fair amount of their overall productivity.
Answer: I have a Publications section on my CV with Peer Reviewed Publications, Submitted for Publication, Conference Publications and Presentations, Invited Lectures and Seminars, and Reports.
For the manuscripts that have been submitted for publication I just put the authors, title, and I put (submitted) as the year.
I see people include the journal they submitted to, but I don't think that's appropriate since it unjustifiably uses the reputation of the journal to bolster your reputation. Anyone can submit anything to Nature or Science.
I also recently had a PhD applicant say they had submitted a manuscript to relatively good journal. I asked for a copy and the article was in no way suitable for the journal they submitted to.
I never put in-prep on my CV, since it's practically meaningless.
Answer: Another thing to think about is the rules of funding agencies and other people to whom you might submit these CV's. In German and EU funding applications, only accepted papers can be listed as part of an author's "publications" list. Work that is in review, no matter how far along the review process, cannot be listed until an acceptance notification has been given.
However, it's also not clear what stage of your career you're in. If you're applying, for instance, for a post-doctoral position, then it would probably make some sense to mention manuscripts under review. Normally, in such cases, the CV isn't going to a committee—usually it's just the advisor himself.


How much pressure does the water ring exert on the spacecraft when gravity is generated by rotation?

Question: We all know that the rotating spacecraft will generate artificial gravity. If there is a water ring along the wall of the spacecraft, the width of the water ring is b, the depth of the water ring is H, the radius of the spacecraft is R, and the rotating speed of the spacecraft is ω, my question is: how much pressure does the water ring exert on the wall of the spacecraft?

1 is a spaceship, 2 is a water ring
Comment: That's gonna depend on the station's internal (air) pressure.
Comment: @JoãoVítorG.Lima The spacecraft rotate around itself
Comment: Yes, but is there air inside of the station? What is its pressure?
Comment: @JoãoVítorG.Lima one  atmosphere
Comment: @JoãoVítorG.Lima There is air, assuming that the air pressure is one atmosphere.
Answer: If we look at a cross section through the part of your spaceship that contains the water channel it looks like this:

And what you are asking is the pressure at the bottom of the channel, as shown by the arrow. Now let's zoom in on the channel:

The pressure at the bottom of the channel is simply the weight of water above it. On Earth where the gravitational acceleration is constant this pressure is simply:
$$ P = \rho g d \tag{1} $$
where $\rho$ is the density of the water and $g$ is the gravitational acceleration. To derive this consider a unit area at the bottom of the channel. The volume of water $V$ above this unit area is area times depth i.e. just $V=d$, and the mass $m$ is the density times the volume $m=gd$. Then the weight $W$ is just the mass times $g$ i.e. $W=\rho g d$, giving us the equation (1) for the pressure.
The difference between the Earth and your spaceship is that on your spaceship the artificial gravity is due to the rotation of the spaceship. If the spaceship rotates with an angular frequency $\omega$ then the artificial gravitational acceleration is the equal to the centripetal acceleration:
$$ a = \omega^2 r \tag{2} $$
where $r$ is the distance from the axis of rotation (the dashed line in the first diagram). So unlike on Earth in your spaceship the artificial gravity isn't constant but varies with distance.
If the depth of the channel is much less than the radius of the spaceship $R$ we can say that the artificial gravity is approximately constant throughout the water and in that case the pressure becomes:
$$ P \approx \rho a d \approx \rho\omega^2 R d \tag{3} $$
If you want a more accurate calculation then we need to use integration. Consider a unit area of the channel, and take a thin layer of water of thickness $dx$ at a height $x$ above the bottom of the channel. Then the weight of this slice of water is:
$$ dW = \rho a(x) dx \tag{4} $$
where I've written the artificial gravity as $a(x)$ to show that it depends on $x$. The distance of the layer from the axis of rotation is $R-x$, so the artificial gravity is:
$$ a(x) = \omega^2(R-x) \tag{5} $$
If we substitute this into equation (4) we get:
$$ dW = \rho \omega^2(R-x) dx \tag{6} $$
And the total weight, i.e. the pressure, is calulated by integrating equation (6):
$$ P = \int_0^d \rho \omega^2(R-x) dx \tag{7} $$
giving:
$$ P = \rho\omega^2 (Rd - \tfrac{1}{2}d^2) \tag{8} $$
and that's our result.
If you want the total force exerted by the water then we need to multiply this pressure by the area of the channel bottom. The channel forms a strip of width $w$ running round the spaceship:

And the area of this strip is simply the width $W$ multiplied by the circumference of the spaceship $2\pi R$. So the total force is:
$$ F = 2\pi RW\rho\omega^2 (Rd - \tfrac{1}{2}d^2) \tag{9} $$
Comment: the greater the pressure? What is the unit of P?
Comment: @enbinzheng if we use SI units i.e. the density in kg/m$^3$, the the distances $R$ and $d$ in metres, then the pressure will be in Newtons per square metre. Multiply the pressure by the total area of the base of the channel to get the total force.
Comment: Is the unit area here the area of a curved surface? The surface of the spacecraft is a curved surface.


Nginx config for craft working for everything but admin url's

Question: I am trying to configure NGINX to serve a craft 2 site.  I am getting the requests being routed through index.php for template url's but not for any admin routes which are redirecting to index.php?p=/admin/**/*.
I am assuming this has more to do with my NGINX config than craft as I have the following option enabled:
'omitScriptNameInUrls' => 'true',
Is there any craft related reason that admin URL's would redirect that way whereas template url's wouldn't?
here is my nginx config:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

index index.html index.htm index.php;

server_name _;

error_log  off;
access_log off;

root /code/public;

charset utf-8;

location / {
    try_files $uri/index.html $uri $uri/ /index.php?$query_string;
}

location ~ [^/]\.php(/|$) {
    try_files $uri $uri/ /index.php?$query_string;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass php:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    include fastcgi_params;
}

# Disable reading of Apache .htaccess files
location ~ /\.ht {
    deny all;
}

# Misc settings
sendfile off;
client_max_body_size 100m;

# 404 error handler
error_page 404 /index.php?$query_string;
}

Update:
just deployed this same app to AWS elastic beanstalk and am running into the same issue with Apache.  This leads me to think maybe it's not related to nginx?
Answer: Try adding specific location for admin & cpresources in the nginx config
location ^~ /admin {
    try_files $uri $uri/ /index.php?$query_string;
}
location ^~ /cpresources {
    try_files $uri $uri/ /index.php?$query_string;
}

before
location ~ [^/]\.php(/|$) {


Is there a way to prevent Tor from appearing suspicious by connecting to strange locations?

Question: I used Tor at work and got informed by a security analyst that my computer was exhibiting strange behavior. She said that it was connecting to servers in Amsterdam. Though I think there were some other situation specific factors that caused her to become alarmed, is this generally a red flag if a computer in North America connects to Amsterdam? If yes, how can it be better obfuscated?
Comment: Before going any further, check if using Tor is allowed by your company's policies. Everywhere I have worked proxies are forbidden, and only once I was (informally) autorized to use Tor to activate a software which couldn't use corporate proxy.
Comment: @DmitryGrigoryev who or where precisely would you check, if your direct manager already said it's ok?
Answer: If you use a pluggable transport such as meek-google, meek-amazon or meek-azure, all outgoing connections will appear to go to google appengine, amazon cloudfront or microsoft azure; see https://trac.torproject.org/projects/tor/wiki/doc/meek
However, this will slow down browing speed in Tor Browser, and use bandwith on the meek backends which costs money to provide, so you should only make use of it if really necessary.
Answer: It is not unusual for a computer to connect to "foreign" locations. So a computer in North America can connect to a computer in Amsterdam without any problems. However I guess your company runs some monitoring (or better call it surveillance) device which looks at all connections. They follow their own definitions of "unusual" and maybe a long-term connection to any non-US country is seen as unusual.
If you want to prevent this, you can edit your torrc. Open the file in a text editor and enter the lines:
EntryNodes {us}
StrictNodes 1

After you've restarted Tor it will connect to a US based server and will always use this as a first node.
If this does not work for you, you can also use bridges and pluggable transports. Go to https://bridges.torproject.org/ and get a bridge address. However some bridges are also outside the US. So you might have those problems again. Maybe the pluggable transport meek works best for you.


Four note chord?

Question: So... I was wondering, what is a chord like C-E-G-C called? Is it a four note chord? I heard four note chords were sevenths (notes stacked in thirds). So how is this specific chord named?
Comment: I know we've answered this question may times before, I just can't find a good duplicate.
Comment: @Dom Sometimes I wonder if there was a way to create like a general-knowledge sticky or something that people can refer to, so we don't constantly say: "This question is too narrow / it's a duplicate / try Googling it / etc."
Comment: @jjmusicnotes If we get a good duplicate that should suffice, but the problem is even if we do have one, we can't find it easily because the title doesn't reflect the topic.  One thing we can do and I have done in the past is create a canonical question that directly the core question and answer it i.e.(Why do notes have multiple names?).
Answer: I would think it is just a triad since really you only have 3 notes [C (twice), E, and G].
More specifically you have a C Major Triad. As long as you have those 3 notes in there it is a triad. I don't think it matters if you have a note repeated (at the same pitch if you are playing a guitar for example, or at a different octave as if you are on a piano for example.
The note that is lowest in pitch will tell you what inversion the chord is in.
So, in your example, with C being the lowest note this is the Root position.
Putting the E in the bass would make it a C Major, first inversion. G in the bass will make it a C Major 2nd inversion. sometimes the bass note will be written in with a "/" slash as in C/G (c major triad over G). In this notation the major and the triad are both implied.
Comment: No need to hedge your answer here, @b3ko, you're exactly on the money with **triad**
Answer: It's just call a chord. Doubling notes does not change the name. In classical theory, there are some procedures to determine doubling if one doesn't what the music to sound as if a voice dropped out. In orchestral music, almost all doubles are fine as doubling a voice doesn't add a voice.
In playing accompaniments to a melody, one often doubles some note of the accompanying chords so that the 7th chords don't sound too heavy. (One may want them to sound a bit thicker to call attention to them too.)
Comment: Not as comprehensive an answer as the one from @b3ko
Comment: It's not "just a chord". It's 1 very specific type and quality of chord: it's a *C Major Triad*.
Answer: It's a chord. More specifically a triad with a doubled root (in the case of C E G C). If the 'chord' contains notes only from a triad it would generally be considered a triad with doubled root/3rd/5th although is open to interpretation as with many chords.
If the 4th note is a note other than a triadic note, generally it would be a chord(add x); eg. Cadd4.
Comment: "If the 4th note is a note other than a triadic note, generally it would be a chord(add x)" -- not if the fourth note is a 6th or a 7th.
Comment: Agreed with David Bowling - the last statement is not accurate; it depends on context. Typically "add" chords are triads or 7th chords with "added" upper-tertian harmony: 9th, 11ths, 13ths. They are "added" because they do not serve a voice-leading purpose, they just color the chord. A non-"triadic" note ("non chord tones" is more widely used), could be part of longer-range voice-leading, or, in the case of your suspended chord, perhaps you're 2/3rds of a way through a resolution. Also, lest we forget other non-chord favorites: LNT's, UNT's, and PT's. Sorry for acronym / short on characters.

Four note chord?


Replacing a door handle with no visible screws

Question: I am trying to replace a door handle that doesn't have any visible screws. I am assuming the first step is to remove this faceplate that probably conceals the screws underneath, however the plate does not budge. There is a tiny divot in the plate, large enough for a screwdriver, but no amount of twisting, pulling, or prying via the divot seems to remove the faceplate (rose?). Any tips on how to remove this without causing any damage?
Answer: Lever-style handles like this often have a face plate that you need to remove. Your first image shows the nub on the face place. I've circled it for you

Slide a flat screwdriver into that slot and twist it. The plate will come off and expose the screws.
Comment: try pushing first .... it may unlatch the cover ... twisting may damage the cover it it is a push type latch
Answer: It may be that you need to rotate the place to remove it. I would guess counter clockwise. But as Machavity states, it probably just pops off.


Editing a module from another component

Question: Suppose I want to edit the field ("Home") of a module (say mod_breadcrumbs) from edit.php file of another module.I want to use the radio button inside another module instead of using here. Is this possible in joomla 4. Please refer the screenshot for the "home" field, I mentioned above.
Comment: if this answer was helpful to you I would appreciate it if you would accept the answer so that it at least shows your issue has been resolved and no further action is likely. It is not compulsory to accept an answer, meta.stackexchange.com/help/someone-answers, but it does help encourage people like me to take the time to answer more questions for you and other people.
Answer: It would be very difficult but it could be done if you wanted to write enough code.
The values for each setting are stored in the params field for each instance of the module in the #__modules table. As it is possible to have more than one instance of a  module your code would need to handle this to make sure you are updating the right module or all of them if that is your requirement.
Converting it to a radio check button is easy enough, just change to that type in the .xml file of of your other Module.
Comment: I actually want to edit the the published/unpublished state of a module from inside a component (say com_menu). I want to edit the the published/unpublished state of a module from inside of a menu item in com_menus. I have changed the title to make things more clear

Editing a module from another component


What are the disadvantages of bicycle saddles with cut-outs?

Question: I'm thinking about buying a new saddle and I have seen that you can still buy high-end saddles without any cut-out / relief channel. I was always advised that I should go for the latter ones since they are healthier on the long run, so I am a bit confused now. Who wouldn't choose that?
Comment: Worth a read https://bicycles.stackexchange.com/questions/65981/what-exactly-do-seats-with-a-cut-out-in-the-middle-achieve
Answer: The primary consideration in finding a saddle is how well it suits your sit bone shape and groin tissue. Some people do best with saddles that have massive cutouts (heck, even those ones that look U shaped because the nose is split too), while others can use Fiziks or the like that are rounded without any cutout whatsoever.
Cutouts can be disadvantageous as they can increase the pressure placed on your backside (same force but smaller area; imagine how a saddle with a massive cutout resembles a cookie cutter). However, if cutout saddles are what suits your physiology best, you're actually going to harm yourself more by riding an uncomfortable non-cutout saddle.
Comment: But even if you have the right saddle wrongly positioned, it is likely to become an awful torture implement. And as my preferred cycle mechanic jokingly says, it is easier to find a perfect life-time partner than a suitable bicycle saddle.
Comment: I'd also add that ideal saddle depends on the type of bike/riding. I have saddles both with and without the cutouts, on different bikes.
Answer: Saddles are the most personal contact point on the bike.
If you prefer a cutout, or specifically don't like cutouts, then you have the option of either.  Gender and differences come into it as well, there may be body shapes that suit one style over another.
While saddle width can be inferred from sit-bone width, noone can really advise what shape of saddle you will find most comfortable.
High-end saddles tend to be low-volume sellers, compared to cheaper saddles, so giving all possible options to the end user helps with choice.
Answer: To answer the question as written:

For many people, the groove or hole does not serve any practical purpose.
Because the hole takes space, the middle part of the saddle has to be wider so that there is still enough surface area to sit on. This can be a fit problem.
The hole's edges go pretty much against the part of your anatomy where you don't want any edges.
The hole introduces an unnecessary weakness in the structure, and reinforcing the saddle adds some weight.
It gives the impression that the rider is one of the people with genital-related phobias or obsessions.

If the hole or groove makes you more comfortable, it's great for you and nobody's forcing you to buy a saddle without one. But there are some reasons why expensive saddles without these features are sold. It is interesting that it is far more difficult to find a cheap saddle without some kind of anatomic gimmick.


Why does nuclear fuel not form a critical mass in the course of a meltdown?

Question: A BWR reactor core may contain up to 146 tons of uranium.  Why does it not form a critical mass when molten?  Are there any estimates of the critical mass of the resulting zirconium alloy, steel, concrete and uranium oxide mixture?
Comment: Take a look at [wikipedia](http://en.wikipedia.org/wiki/Critical_mass). I think the main point is that the core does not consist of pure uranium.
Comment: If there isn't a critical mass then what caused the meltdown?
Answer: If you read Wikipedia page about corium, they say that critical mass can be achieved locally.
But if you are concerned about a critical mass allowing a nuclear explosion, the difficulty in nuclear weapon design, as told here, is to achieve the criticality fast enough. If you do not achieve criticality fast enough, your material heats and its interaction with neutrons decreases, slowing the chain reaction down. And that is with pure ²³⁵U. So basically what happens if criticality happens in a melting nuclear reactor is the release of a lot of heat and radiation, but not in an explosive manner as in an atomic bomb.
Comment: Honestly, I think the wording of Wikipedia about a local critical due to a critical mass is likely to reflect an insufficient technical understanding.  A prerequisite for critical mass is to have $k_{\infty}>1$ and this is generally not satisfied for the Uranium Oxide or Uranium metal, as per the arguments regarding the moderator.  On the full-core scale, a rearrangement could add reactivity although it is more likely it will subtract reactivity, either way it has to do with the neutronic communication across the entire core.
Comment: +1 Thank you for your answer.  Your point about heat and anna's one on the moderator in the mixture were equally valuable and I'd accept both answers if it were possible to do so.
Answer: The probable answer is that to make a bomb one needs a very special design and very pure U235, in  a sphere. So even if a critical mass forms in meltdown, a reactor does not have the geometry and purity for a nuclear bomb. No mushrooms.
But it may continue to heat, acting as a reactor, and the problem is in conveying the heat away without building up steam and hydrogen in order to avoid a chemical explosion.
A nuclear engineer should answer whether the amalgam of all the metals does not allow criticallity. Their plans to first cool the melted reactors and then encase them in sand and cement would imply that they do not expect the melted core to be critical. The fact that with the control rods in place the reactor is no longer critical by design, just has  residual radioactivity, argues from conservation of mass that even in melt when the metals will be mixed the same will hold true.
Comment: An operating reactor is critical. TO make a bomb you need to get to criticality faster and hold it for long enough to fission enough of the material - it's called a "prompt criticality"
Comment: There's certainly no requirement for a bomb core to be spherical. The Little Boy bomb had a cylindrical core, for example, which was in two parts, a smaller cylinder and a tube, that were brought together.
Comment: So both the boron from the control rods and the heat (Frédéric) prevent criticality.
Comment: @DavidRicherby a sphere is a geometrical design easy to comprehend. Other symmetric designs would also do, the symmetry being necessary for the time factor . Reactors are designed wit safety factors, so that they cannot become supercritical, i.e. a bomb, even when mechanical safety fails . At worst it is a melt down.http://en.wikipedia.org/wiki/Fukushima_Daiichi_nuclear_disaster#Overview_of_incident
Answer: One of the questions often being answered is "why don't meltdowns go supercritical?" ie. "Why don't they create a nuclear explosion?"  A good understanding of why they don't provides a good framework to understand why corium should not be critical, and why subcritical can be fairly bad.
Critical mass is more a description of neutron flux than actual mass of material.  Perhaps a better term would be critical concentration, but I think "critical mass" sounds better; don't you?  In the supercritical mass the fuel can act as moderator and neutron generator.  Fission produces mostly fast neutrons which are not absorbed at high probability by fuel nuclei, but if you have enough fuel nuclei this problem is obviated.  Some nuclei will absorb fast neutrons and give off slow neutrons, and a gamma ray.  Some of the first reactor designs were slurry reactors where finely ground moderator and fuel were mixed together.   I suppose if a slurry reactor melted down the corium would be critical. Modern reactors use fuel rods and both solid and liquid moderators.
The fuel in the rods has both an internal and a surface neutron flux.  The perfect nuclear reactor would have surface flux where all the fast neutrons escaping the fuel rod were reflected back as slow neutrons.  This would allow the fuel to "burn" most efficiently.  By arraigning the fuel rods and moderators in an optimal configuration the closest to perfect flux is achieved.  If you remove the moderator the fuel is not critical by itself.  If you change the arrangement the fuel should go subcritical also.  If it were not for the fact that much more fuel is present for the minimal critical configuration it would be so statistically unlikely to even have local areas of critical flux that it would really be impossible.  With the overabundance of fuel it is only highly improbable that a local slurry reactor zone could form in the corium blob.
Subcritical neutron flux does not mean that fission has stopped; it only means that fission will eventually drop to the level expected with only spontaneous fission.  Depending on how subcritical the reactor is this could take a while.
Answer: But it does have a critical mass. Otherwise it would not become critical.
What you avoid in a well designed power reactor is 'prompt' criticality where an active core becomes supercritical on prompt neutrons only. Normally a critical reactor is stable on a fraction of prompt neutrons (neutrons released at the instant of fission) and delayed neutrons (netrons released on average several seconds after the incident neutron). This is fundamental to the operation of a power reactor as it allows the control system to manage the neutron flux.
A reactor that becomes supercritical on prompt neutrons only will increase in power at a rate only controlled by the fission rate and increase in fractions of a second to very high power. This is how a nuclear weapon operates.
A reactor that becomes supercritical on delayed neutrons will increase power much slower and can be controlled.
Answer: Several things are required to cause a nuclear explosion. It is not just about mass... In terms of a melt down, perhaps heat is the real issue, because it expands the gap between atoms and this diminishes the target cross section for a neutron to strike, thus lengthening the mean neutron pathway.
Other issues include isotope purity of the fissile mass... Also impurity from decay products like Xenon 135. In a nuclear melt down like Chernobyl for example there was very high Xenon poisoning before the steam/hydrogen explosion which destroyed containment buildings.
Geometry of a critical mass is a further consideration, but given the two points above once it is too hot and contaminated Geometry is the least consideration.
Compression of the critical mass is another and this is related to heat. If the mass were squashed tight or frozen the chances of explosion would be higher. In a nuclear warhead too much Alpha activity raises the temperature and degrades the bomb. With heat in a reactor melt down there is virtually no compression.
Having an effective reflector would increase the chances of a nuclear explosion, but nuclear reactors are not normally configured to reflect neutrons back into the pile. In any case in a melt down the confinement vessel is usually ruptured.
Even if you somehow overcame all this there still has to be sufficient neutron flux and this is totally unlikely. In terms of Neutron Flux one has to ensure that 35-40% of neutrons do not escape the mass to obtain an explosion.
Answer: A thermal reactor requires a moderator to be in a critical state.  A BWR (and a PWR) use water $H_2O$ as the moderator.  Other thermal reactors use graphite-the old N reactor at Hanford- or heavy water $D_2O$- the CANDU and the old Savannah River production reactors- as a moderator.  If the core melts and slumps into a mass of $UO_2$, cladding metal, and control rod materials, the fuel/water is no longer in a critical configuration; the water is on top and acts as a reflector, not interspersed among the fuel.
A fast reactor does not require a moderator to be critical. The fuel is of a higher enrichment than that of a thermal reactor because the fission cross section is lower at higher neutron energies.  It is possible for a melted mass of fast reactor fuel to go critical and result in a minor nuclear excursion (called "work energy" release in the jargon of reactors).
The safety issue for reactors is removing the decay heat; the energy released from the radioactive decay of radionuclides that build up from the fission process  during operation.  At shutdown, the decay heat is about 5% of full power; that is 150 MW for a 3000 MW (thermal power) reactor, a significant level.
A nuclear reactor cannot explode like a nuclear weapon. For a thermal reactor the prompt neutron generation lifetime is too long. For a fast reactor (and a thermal reactor) there is no mechanism for creating and maintaining a super prompt critical assembly sufficiently long for significant release of energy from fission. You have to really work hard to assemble the correct material to create a nuclear weapon; you need to create a system that is super prompt critical using fast neutrons and remains so sufficiently long for the chain reaction to produce enough energy before pressure causes dis-assembly into a non-critical configuration. By super prompt critical is meant super critical on the prompt neutrons alone without having to wait for the delayed neutrons to contribute.  In operation, reactors are critical but not prompt critical; delayed neutrons are required for criticality.
Answer: My guess would be that the moderator (normally the water, graphite already would have caused the accident) is missing and that is still vital in a compacted mass. The uranium oxide is not enriched to military grade, but I can't speak for MOx-elements.
Should be difficult to say without some decent figures about leftover UO_2, mass, previous distribution.
Comment: The water is said to slow down the neutrons which increases their cross ection wrt fission. So without the water, it is harder to obtain critical mass. I don't know if it is impossible however, I thought it was considered very improbable, which isn't the same thing.
Comment: That is where one would have to need to know details about enrichement. I somehow doubt that even a melted down mass of nuclear fuel pellets will reach criticality without a moderator. That was always a big risk to be avoided in constructing the whole shebang - because then terrorists just could come along, steal a bit here and there and homegrow a small bomb.
Comment: A reactor bomb would be a variety of dirty bomb, i.e. you can't obtain kilotons or megatons of energy out of it. Slow assembly of materal into a critical mass, means it would get hot and disperse the material before more than a tiny fraction of nuclei are fissioned. It would still make of awful radiological mess however.
Answer: I seriously doubt that any realistic reactor will contain 146 TONS of Uranium at any one time.
Even if it did, it'd be so spaced out as to preclude the creation of a supercritical mass (i.e. a mass that leads to a nuclear explosion).
Of course any operational reactor WILL be critical, if it weren't there'd be no chain reaction going on, no sustained fision reaction, no energy output.
Comment: From http://www.nucleartourist.com/basics/hlwaste.htm : "A 1000 MWe reactor has about 100 metric tons of uranium dioxide fuel, of which 3 to 5 tons consist of the fissile U-235". So I think one can imagine a realistic reactor containing 150 tons of Uranium, even discounting the oxygen in UO₂
Comment: @leonidas The page cited by Frédéric also mentions 183 kg uranium/assembly for BWRs and in http://en.wikipedia.org/wiki/Nuclear_fuel#BWR_fuel it says "A range between 368 assemblies for the smallest and 800 assemblies for the largest U.S. BWR forms the reactor core".
Comment: Maybe artistoex refers to the spent fuel pool, where some years worth of semi-spent nuclear fuel are stored and produce enough decay-heat to melt down too.
Answer: if the pressure vessel contained a supper critical mass long enough it could go boom like a nuclear bomb but its more likely to blow the containment before then and lose mass
its about a self compounding reaction that quickly builds on its self if they lost all ability to moderate the reaction a critical mass could be reached much quicker but it still comes down to the containment being intact at the last moment unlikely but some advocates have spoken out about this remote possibility
japan was close to this outcome they had a fizzle type explosion that was more or less a dirty bomb if their containment was stronger they would have likely had a nuclear bomb of some size
Comment: There is no "vessel" that can contain a super critical mass long enough to permit an explosion with any significant nuclear yield.  Runaway fission inside a sealed container produces a Chernobyl-type explosion---what the engineers euphamisticly call "spontaneous disassembly of the core."  Containment in nuclear weapons is achieved by a shock wave produced by chemical explosives, and "long enough" is roughly one microsecond.  The explosions at Fukushima were not nuclear powered.  They were due to the detonation of hydrogen gas.


9-speed system to 11-speed drivetrain upgrade?

Question: I am currently upgrading my bike from a 9 speed to an 11 speed system.  I am currently using shimano 105 components and will continue to use them within the new system.  Current bike has a shimano 105 rear derailleur but does not specify if it is unique to a 9 speed system.  Will I need to buy a new rear derailleur?
Comment: From Shimano 9- to Shimano 11-, Shimano recommend you need a new everything. You might get away with the brakes, but certainly as regards drivetrain you should be prepared to change the lot. Also your freewheel hub, most likely, since this has also changed for 11-speed systems. The thinking is simple - an 11-speed chain is that much narrower than a 9-speed chain, therefore all components that the chain touches (incl rear derailleur) are affected.
Comment: Worth also pointing out that there is a school of thought that says these differences are sufficiently tiny that it is all a marketing ploy by the bike companies, to get you to replace your kit. At this point, you pay your money and take your choice...seriously, it boils down to how much a person feels like spending money
Comment: @FredtheMagicWonderDog Pull ratios can be found online.  The [Maintenance and Repair](https://en.wikibooks.org/wiki/Bicycles/Maintenance_and_Repair/Gear-changing_Dimensions) chapter of the [Bicycles](https://en.wikibooks.org/wiki/Bicycles) Wikibook is one such source.
Comment: I can't find anything definitive, but I'm pretty sure the cable pull is different between Shimano 9spd and 11spd.
Comment: I already bought new wheels whose hub is 11 speed compatible.  I obviously will be getting a new cassette with a new chain along with new shifters to index correctly. I plan on leaving the brakes as are.  With this input I'll probably just go ahead and upgrade my rear derailleur as well.  This will also allow me to put a full drive train on a spare frame.  Thank you for the assistance.
Answer: This page has the best answer I've found so far
http://blog.artscyclery.com/science-behind-the-magic/science-behind-the-magic-drivetrain-compatibility/
Reading between the lines, the cable pulls from 9spd to 11spd are probably close enough, but the derailleur ratios are significantly different. 1.4 vs 1.7. This means
that the 11 spd indexing in your new shifters will not work correctly with your old
derailleur.
Answer: You'll need to change the chainwheels and the cranks, the rear derailleur, the brake-shift levers, the cassette and the chain of course. The rear wheel probably has an older hub but then if you're lucky and the hub is designed for 10-speed as well it will also take 11. The brakes won't need changing but then the newer ones are designed for less friction in moving parts. Technology trickle-down from Ultegra.
Comment: Shimano moved to Super SLR pull ratios on their brakes recently so the older brakes will no longer be optimal (see http://bicycles.stackexchange.com/questions/20295/use-of-shimano-long-reach-calipers-with-new-super-slr-brake-levers-shifters)
Comment: All my older Shimano wheels are 10-speed - But NOT 11-Speed compatible. So a 10-Speed hub is not necessarily going to work with 11-Speed.
Answer: There are numerous top end bike companies selling their bikes with part 105 11sp builds . You need obviously the 5800 shifters, front/rear mech and chain. But you typically see money being saved by using non 105 brakes and chainset.
Comment: This doesn't answer the question. Can you edit in specifics about whether the 9 speed 105 derailleur will work with an 11 speed shifter and cassette please.
Answer: To specifically answer your question, you will have to change the rear mech (derailleur). If for nothing other than 11sp chain will not fit onto the jockey wheels correctly. You could change the jockey wheels, but they are thinner on 11sp vs 9sp.
To take this a step further, you will need to replace all of the groupset components, including the brakes as 5800 has a slightly different action/cable pull. Having tried this before with customers bikes, it causes major issues and very poor brake performance (not somewhere you want poor performance).
On a positive note, 5800 brakes are leaps and bounds better than their predecessors!
Answer: You won't need to replace your rear derailleur. Cable pull is determined by the shifters so if you're getting new 11 speed shifters you can use ANY rear mech as long as it has a long enough cage to accommodate the largest rear sprocket. For example i'm pretty sure that if you have a short cage rear mech you won't be able to run an 11-32 cassette. The rear mech has an infinite range of movement between the high and low stop screws so as long as they are adjusted properly you'll be fine. B-tension screw is what brings the cage in or out to accommodate the largest cog.
The reason for any problems in compatibility is that for 11 speed there are more cogs (11) packed into the space between the hub flange and the frame dropout so the spacing between cogs is narrower which means the chains need to be narrower and the shifters pull less cable with each click. But if you try and run a 9 speed chain and chainset the teeth are wider so the chain won't sit properly on the chainrings.
So in short you'll need a new chain and cassette and shifters but you can keep your front and rear mechs.
Comment: 11-speed Shimano derailleurs have different actuation ration than older ones.
Comment: Welcome to [bicycles.se] @tim. Thanks for answering one of our questions. Since you say the opposite to other answers, it would help if you explained how you know this. And we recommend that new members take the [tour] to make best use of the site.


What song plays when Kaguya asks Lelouch "what are you really after?" at the UFN meeting at Ashford in 22nd episode of season 2, at timemark 16:10?

Question: It plays for some time when Lelouch is trapped inside the geass countermeasure walls, a few moments after Kaguya's image appears on the TV screen inside the dome before Lelouch, and she asks him "What are you really up to, treacherous Emperor Lelouch?" and continues until Xingke offers Lelouch to either break up the empire or limit his votes. It has a sort of quiz timer feeling to it.
I've searched for it for ages on youtube
Answer: I found it finally, it's called Birthplace and I found it after a long time of unsuccessful consumption of code geass music. I decided to, perhaps ironically, attempt to look it up by looking at the names at the Code Geass Wiki, in hopes what a theme of the title will match the required song. It's not on youtube, so I could not possibly have known of it's existense before, and I did relatively less research on other sites, the wiki helped here.
The moment I was looking for actually begins at 0:22 second timemark if you listen to the OST, unexpectedly. It's actually the same song that plays before and after the marked scene, when UFN member discuss whether they were right in trapping Lelouch in the walls, and when Lelouch asks Kaguya what is the most important trait for governing the world. It's one of these "composite" Code Geass OSTs


How to be a good math teacher at a liberal art college?

Question: I am thinking of taking up a position at a liberal art college. I have taught mathematics at large public universities but I have no idea what is it like to work at a liberal art colleges. So what are things I should know about teaching mathematics at a liberal art college? Can you recommend some resources to read so I may be better prepared for this new job?
Comment: I'm skeptical that an answer that would be good for Guilford would be good for Carleton.
Comment: Do you have an _offer_ to teach at a specific place? Or is it that you imagine you'd _like_ such a position? As @AlexanderWoo comments, "liberal art[s] college" is not at all a tight identifier, in any case. Can you clarify?
Comment: @paulgarrett Yes, I do have an offer from a liberal art college.
Answer: Let me reply as someone who left a university in favor of a Liberal Arts College (LAC).
Although @AlexanderWoo's point is valid, my experience supports the following:

At a LAC, the walls between the departmental silos are lower,
enabling relatively easy cross-disciplanary collaborations.

At a LAC with a strong faculty-governance tradition, you can play an
all-college role that is almost impossible to achieve at a
university.

If you are passionate about teaching, it is uplifting to work at an institution
that prioritizes and rewards teaching.

I've found the engagement with students much more direct: There is less
separation between students and faculty.

The best students at a LAC are comparable to the best students at
a university. So one can still research-collaborate with the top students.

The scholarship that counts for tenure is more varied than at a university.
For example, writing a textbook could gain you tenure at a LAC, but
rarely at a university.

To counter-balance the above with two negative points:

It rarely possible to remain active at the research-frontier of a popular math
subdiscipline. You might need to adjust your research agenda toward less-traveled
paths, and less-dependent on graduate students.

The Univ$\to$LAC transition is nearly
irreversible. It would not be easy to move from a LAC to
a university later in your career.
Comment: @ablmf: Hmm. I don't think I changed how I teach, except that of course teaching graduate course is different from teaching undergraduate courses. But I taught/teach undergraduate courses more-or-less the same at the university as at the college.
Comment: The vibe I get from you is that a liberal arts college is a nice place, right?
Comment: Yes. But it depends on your inclinations: how much you value contributing on the frontier of research, compared to how much you value teaching.
Comment: Thanks for the answer! Have you changed how you teach math in any way since moving to LAC?


When not to use pseudoinverse?

Question: I know this equation: $\tau = J^T f$. In my case, the Jacobian $J$ is not square. Is it valid to use the pseudoinverse of $J^T$ to calculate end effector forces $f$ based on joint torques $\tau$? I have just never seen this equation used with given joint torques, this is why I am curious.
Answer: Short answer: you can use it.
Long answer: Depend on your case, but I have seen many papers where they use the pseudoinverse of the non-square Jacobian matrix.
The rectangular Jacobian matrix opens the window to optimize in terms of other variables such as space constraints or force minimization.
The pseudo inverse by definition (in a redundant manipulator) minimizes the joints velocities.
Source

When not to use pseudoinverse?


Is it better to close gates or save up clue tokens to seal them?

Question: Imagine that we've got a couple of gates open and every investigator has 3 clue tokens. All other things being equal, is it better to try to immediately attempt to close those gates or would it be better to save up to 5 clue tokens in order to seal them? By better, I mean more likely to result in the investigators winning the game.
Answer: It depends. Mostly on how likely a gate is to open again at that particular location.
It's better to wait and seal gates with lots of gate mythos cards in the deck, to prevent them from continuously re-opening.
It's better to quickly close gates with few gate mythos cards and many clue mythos cards, as it will be unlikely to open again, and blocking access to valuable clues while it sits unaddressed.
The specific frequencies can be found in this document.
Comment: +1, in the situation of the asker, do both. Assuming 4 players, have one or two investigators collect more clue tokens to seal the gates that are most likely to be drawn again as gate-mythos. Have another one or two investigators jump into gates which are less likely for gate-mythos and more likely for clue-mythos. If in doubt, choose the gate that will get rid of annoying monsters when closed. The remaining characters (if any) should fight monsters, go shopping or whatever else is currently on your plate.
Answer: I think the document on "Gate Seal Priority" was a little bit misunderstood. It seems to be meant as advice on which gate to close, given that you HAVE TO close a gate.
The biggest drawback with closing gates as opposed to sealing them is that if they reopen, a new doom token is placed on the doom track. In my group we ALWAYS save up and clues and seal games unless the "gate limit" is very nearly exceeded and no-one has enough clue tokens tokens. In this desperate instance, the document on "Gate Seal Priority" is a great way of determine which gate to close.
Even when playing with expansions that has the "gate burst" rule(gates open even when sealed), we always seal. This is because gate bursts do not put new doom tokens on the track.


Microwave Faraday cage shielding

Question: After a decade of using a microwave oven in my house I figured out I never cared to connect the grounding cable. So my question is regardless of electrical shock risk, does the Microwave Faraday cage shielding work without a ground connection? I am afraid the shielding require a ground connection to work and hence a lot of microwave radiation leaked. Is that correct?
Comment: Yes shielding still works since it works by rearranging the charges on the metal to cancel the field.
Answer: The grounding cable is to prevent a surge in current from producing a shock danger at the case of the appliance.  It has nothing to do with the Faraday shielding.  Metal absorbs microwave radiation whether in an electrical appliance or not, and even the glass window is an effective Faraday shield because it has embedded within it a wire grid whose holes are much smaller than the 'wavelength' of the microwaves, rendering it opaque to that frequency.
Comment: Metal *reflects* microwave radiation would be more accurate.
Comment: This answer is basically correct, but the grounding is to prevent an electrical fault, for example caused by a leak of fluids, from giving the metal case of the microwave a voltage relative to ground, and shocking the user. It has nothing to do with "current surges" at all. Protecting against current surges would require a fuse.

Microwave Faraday cage shielding


Can I fit a kitchen in the US on the visa waiver program?

Question: I am a sole trader and am based in the UK as a freelance kitchen fitter. I have been asked to fit a kitchen for a client in the US. The kitchen is being built in the UK and shipped over. I have fitted kitchens for the manufacturer for around 8 years, which is why my services have been requested. The fit will take a week, is there anyway this can be done on a visa-free visit? Thanks in advance!
Comment: probably best for your UK client to use an immigration lawyer to ensure you have the right paperwork. It's tempting to think that as long as you're being paid by the UK firm it's fine, but there's enough on the line that it's worth paying someone to be sure.
Comment: Are you being hired by the customer, or are you employed by the UK based kitchen company?
Comment: The customer as it stands, I'm guessing that is a problem @DJClayworth?
Comment: Are you willing to lie to the immigration officer?
Comment: @Lucas Please let us know what the CBP tells you
Comment: @JonathanReez He may not have to
Answer: I believe this situation is covered by the
business visa flyer but as @KateGregory said, actually talking to a lawyer is probably advisable. Here:

Engineer(s) install, service or repair commercial or industrial equipment
  or machinery sold by a non-U.S. company to a U.S. buyer, when
  specifically required by the purchase contract.

This is a very specific exception and the only one possibly applying to your situation and while cursory reading would say "hey that's me" there are at least two reasons this does not apply to you:

You are not an engineer.
This is neither commercial nor industrial

So my reading of the B1 reasons is that you can't do this.
You want to read http://blog.cyrusmehta.com/2016/05/the-b-1-visa-trap-for-the-tailor-bricklayer-and-tesla-motors.html however.
Comment: Legal advice would be best, yes. I think another important part comes after the bit @chx quoted: "Installation cannot include construction work, except for supervision or training of U.S. workers to perform construction." A lawyer might advise that you cannot perform the work yourself, but could come to supervise or train US workers so the job is done to your standards. But you'd want to get a legal opinion based on the specifics of your situation.
Comment: 3. The OP does not work for the manufacturer, and his services are not "specifically required by the _purchase_ contract".
Comment: Thank you @chx and Henning Makholm. In the UK the kitchen manufacturer normally provide the fitting service too. It's quite a complex process but it isn't part of the purchase contract I guess I need to seek some legal advice!
Comment: @Lucas I added a recent, extremely relevant blog post to my answer.
Comment: Extremely helpful @chx , thanks for taking the time. Pretty much confirms I cannot do the practical portion of the installation but possibly the supervision.
Comment: Thanks @ZachLipton, I'll definitely look into doing the work on a supervisory basis now.
Comment: I think you will have a problem here, because in essence you are doing a job that could be done by an American. That's kind of the bottom line.
Answer: Besides contacting an immigration lawyer, also call the CBP at 1-202-325-8000. They're the ones checking you on entry to the US and as such they have the final word.
Explain your situation in great detail to them, and ask whether you can enter visa-free or if you need some type of employment visa. If they sound even slightly unsure, ask them to ask their supervisor
Preferably call them two or three times, in case different people were to give different answers (which sometimes does happen)
Comment: Thanks @Crazydre, I'll give them a call or three on Monday! Experienced a similar issue taking my tools on a flight to Ibiza, ended up with three different answers from the same airline!?
Answer: I believe you cannot do this under VWP or B1/B2 visa. However it is complicated, and I think a consultation with a lawyer or CBP is well advised.
The issue is that you cannot received payment from any US source under a B2 visa. If you were working for a UK kitchen company who had sold the kitchen and were paying you to install it you would be fine. And technically you might argue that you are being paid by your own contracting company (which is being paid by the customer). Unfortunately US laws tend to treat situations like that as if you are being paid directly, and this would make you ineligible.
An immigration officer will look at this and say "is he taking a job that could be done by an American", and the answer is "yes". There is no reason why your customer could not hire a US based contractor to do the job. This is going to make it very hard to justify your admission.
As I say, only a lawyer or CBP are going to give you a definite answer.
Comment: Thank you for taking the time @DJClayworth! I am going to seek legal advice and make contact with CBP. It would seem clear now that even if I establish a legal way of being paid for the work it could only be on a supervisory basis.


How to use built-in flash with off-camera 430ex ii on my Canon 600D

Question: I have a 430EX ii speedlite which is controlled by the built-in transmitter in my 600D. I want to use the built-in flash as a fill light while using the off-camera speedlite as a key light. How can I achieve proper exposure with this setup? I have tried yesterday  using my speedlite in ETTL mode, but images were over-exposed. Thanks in advance.
Answer: You don't want to have the Speedlite in E-TTL mode. This tells it it will be getting control signals from the hot shoe connector. To use this mode off-camera, you'd have to be using an off-camera shoe cord like Canon's OC-E3 or Syl Arena's OCF33. That, or an E-TTL capable radio trigger.
Instead, you should have the off-camera flash set to Slave mode, with the same communication channel set as on the camera. It should be in group A for that setup, since it's the primary. You'd set the on-camera flash to group B, then adjust the flash ratio to suit. You want more power to group A than group B to make B (the on-camera flash) the fill.
Comment: Thanks Young. From your answer I learned that my speedlite cannot be used in E-TTL mode wirelessly. But I wonder then at what power would it fire? And on lcd of speedlite I can see E-TTL mode displayed, is that misleading?
Comment: That's really a separate question, but the 430 series lets you manually dual in the power for slave triggering.
Answer: You can use it wirelessly in ETTL mode if you get a Canon ST-E2 wireless trigger, which costs about $120.00.
Comment: While you *can* use an ST-E2, you don't need to as the 600D's pop-up flash is a more capable wireless eTTL master.
Answer: Just set the 430 into slave mode.
Then use your built-in flash of the 600d to trigger the 430.
But first, you have to change the menu of the flash in the 600d.
Comment: Welcome to Stack Exchange. When answering questions, please try and add new information which isn't contained in the other answers - in this case, putting the flash into slave mode is already in Warren Young's answer. If you think an answer is useful, you can upvote it once you've got a small amount of reputation - that's better than having multiple answers saying the same thing.
Answer: Sorry to fall back to an RTFM type of answer - but it really is the best way to find this out! :-)   Read section 8 of the 600D manual on Wireless Flash usage (p.189 - and the bit you'll specifically want is on p.197), in conjunction with section 3 of the Speedlite 430 EX II manual (p.25).  You should be able to work out from this how to have both flashes fire, with the 600D as master, but have them in separate flash firing groups to have them at different power settings.


grant permissions in oracle from one database to another

Question: I have two databases, employeedb and contractordb. The employeedb has a user called employeeuser and contractordb has a user called contractoruser. (These are the users I log in with in Oracle SQL Developer). When I am logged into contractordb as contractoruser and I issue the command grant select on table_name to employeeuser; it fails saying 'ORA-01917: user or role 'employeeuser' does not exist'. I get the same thing if I log in as SYS. If I use the GUI and go to "Privileges->Grant" I also don't see the user there. How can I allow employeeuser to select from one of contractoruser's tables?
Comment: Are they actually two different instances on the same machine?  Or two schemas on the same machine, or two instances on different machines?
Answer: If you actually have different databases (and it sounds like you do), you can't grant permissions for users in one database to access data in another database.  You'd need to create a database link in the EmployeeDB database that connects to the ContractorDB database.  That database link can either use a fixed username and password in the ContractorDB database (i.e. create an EmployeeUserRemote user in ContractorDB with a password that doesn't change that can be hard-coded into the database link definition) or that database link can be a CURRENT_USER database link in which case the username and password would need to match in the two databases for every user that wants to use the database link.  Queries that use the database link log in to the remote database (ContractorDB) as the specified user and have the privileges of that user in the remote database.
Comment: Thanks Justin. I will create a database link and use a CURRENT_USER link. I will use "CREATE DATABASE LINK remote.us.oracle.com CONNECT TO CURRENT_USER USING 'remote';" In the USING remote part, in my example above, would 'remote' be 'contractordb'?
Comment: @KyleM - It would be whatever the TNS alias on the EmployeeDB database for the ContractorDB database is.  That's generally going to be the same as the name of the database but that's just a naming convention-- your TNS alias might be different.


Can I use syntax highlighting on an unwritten buffer?

Question: I pasted some code into a new, unwritten buffer in Vim.  I'd like to do some quick edits on the code without saving it to a file, but it hurts my eyes to look at code without syntax highlighting.  Can I use syntax highlighting without writing it to a file?  I don't want to write it to a file so I don't have to delete the file when I'm done.
Comment: A SQL query that I'm going to run once.
Comment: What are you editing that youre not saving when done?
Answer: In addition to setting the syntax, setting the filetype brings indent options (if you have those on), mappings, and other filetype specific vimscript to bear on your code. So I recommend
:set filetype=java

Which we typically abbreviate in interactive use as
:set ft=java

Answer: You can set the syntax highlighting by doing:
:set syntax=java

This will work in the unwritten buffer. Change java for the appropriate value.
Comment: Or even `set filetype` if you have mappings/other goodies to use.
Comment: Thanks, alanboy.  That works.
@D.BenKnoble That's even better.  I'll mark that as the correct answer if you make an answer.


HDR Imaging - Exposure Compensation

Question: Tried HDR Algorithms of OpenCV. Since the algorithm takes pretty much time. I tried few alternative steps as follows.

Took sample images from: HDR Images

1. Divided the image into four equal regions as Top Left and Right, Bottom Left and Right
2. Estimated the brighter region and the darker region from the Highly exposed image by taking average of the regions respectively
3. Replaced the brighter region with the average of Low and Mid exposed image.
4. Replaced the darker region with the average of High and Mid exposed image.
5. Then merged the images back into a single image.

 Can someone suggest how to compensate the difference in them
 Tried Exposure Compensator of OpenCV but does not get expected result.

 The result image looks like:

Answer: Here is one idea:
Merge the HDR images per-pixel using known thresholds for saturation etc. The final image will have pixel values above 256.
Apply a CLAHE (Contrast Limited Adaptive Histogram Equalization, its in OpenCV) to get the final image.
Often just doing the later will make your images look good.
Comment: Thanks @Mikhail.. That was a nice option and it worked out the case. Does chossing the clip limit has any predefined ways..?
Answer: The effect is similar to having a gain which is different in the top-left quarter, and you need to somehow smoothen the discontinuity.
You can estimate the relative gain on both sides of the discontinuity by measuring the average luminance in small regions facing each other. [Where luminance values are saturated (>255), you can't measure the relative gain, ignore those areas.]
Now you probably want to keep parts of the image far from the discontinuity to look like they do now, meaning with a unit gain.
So to define the gain correction, you can consider a smooth function that equals one in the top-left corner and interpolates the measured function √G along the discontinuity. This looks like a diffusion equation problem. √G is chosen to distribute the discontinuity equally on both sides.
For the rest of the image, the gain correction will be 1/√G along the discontinuity and tend to 1 elsewhere.
In the end, the gain correction field will look like
Answer: I think the way to go is to rethink your approach in merging these images. I believe you already tried tonemapping and/or exposure fusion in opencv.
What you need is a some type of mapping function. Ex. for each pixel location Vout = Vin / ((n * 255)+1) where n is the number images and 255 is the max possible value that a pixel can get in an image. Vin is the total pixel value for the specific pixel location (sum of all the values of a pixel location in each image). Vout is the value for the specific pixel location for the resulting image.
You can find a nice list of tonemapping approaches in here
If you want to continue with your old approach, there is not much answer where you should write your own normalization function.
One idea that comes to my mind is to get small kernels inside the regions and find their average illumination relationships and try to preserve them after you merge them.

HDR Imaging - Exposure Compensation


Fusion Drive with missing partition

Question: Initially my Fusion drive (1TB data disk + 240 GB SSD) consisted of a single partition where it was installed El Capitan, then I split the fusion drive into two partitions, the second partition I installed again El capitan ...
All was well ...
For a problem to the system keychain I wanted to move all the data in the second partition, I reset the first partition using disk utility that I returned an error not completing the process ...
Now the second partition running 100% where startup El Capitan and the first partition does not exist, no longer visible!
I tried to correct the error with disk utility but when I run SOS to repair the fusion drive, nothing happens ... will not start any operation by disk utilities ..
terminal with diskutil cs list:
<code>Luca:~ geminimac$ diskutil cs list
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 9B6BD63D-4451-4324-AB99-0855D82312C1
    =========================================================
    Name:         Fusion Drive
    Status:       Online
    Size:         628372754432 B (628.4 GB)
    Free Space:   621867577344 B (621.9 GB)
    |
    +-< Physical Volume F3B0E961-E842-4ED3-AF12-452551D913FA
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     388659318784 B (388.7 GB)
    |
    +-< Physical Volume 10C75CA7-7AE0-42EF-B6A5-4077F457A629
        ----------------------------------------------------
        Index:    1
        Disk:     disk1s2
        Status:   Online
        Size:     239713435648 B (239.7 GB)
</code>
I also have a FreeSpace of 621.9 GB which is the first partition lost.
Also Logical Volume and Logical Volume family no longer exist in the scheme ...
Is there a way to repair the disk from the terminal without losing any data?
Answer: Ok solved...I deleted everything with terminale used this command line:
diskutil cs delete "LVG"
After, I recreated the Fusion Drive

Fusion Drive with missing partition


Is there evidence for the speed of gravity?

Question: Is it an assumption that the speed of propagation of gravitational waves is exactly the same as the speed of light? If the speed of gravity is only slightly less than the speed of light, the effect might not show up over solar or intra galactic distances, but over extragalactic distances could it give the appearance that there is dark matter influencing motion?
Comment: @Hohmannfan Indeed, his answer is over there
Answer: It has long been one possibility that gravity does not work as in general relativity, or as in the Newtonian limit that is relevant to the gravity in a galaxy.  Thus, many different modifications to gravity have been tried.  But the reason they are generally not very successful is that dark matter seems to alter gravity on many different scales, from within a galaxy, to over galaxy clusters, to the expansion of the universe as a whole.  Thus it generally requires multiple different modifications to fit them all, and that makes for a very clunky model of gravity-- one can fit anything if given enough free parameters.  That sounds like it would be the problem for trying something based on the speed of gravity-- the timescale for propagation of changes would be very different over the three scales I just mentioned, yet dark matter has a similar influence on all three scales.
Answer: The fact that gravitational waves propagate at the speed of light is not an assumption, but is derived from the assumption that nothing travels faster than light. In General Relativity, you build a metric, which is a tool to be able to measure and locate events in space and time. Building this metric puts constrains on the speed of information, and a basic assumption is that this speed is at most $c$ and is equal to $c$ if the information carrier is mass-less (photons for example).
Gravity waves are small non-static perturbation of this metric in the void. So they are propagating information without any mass and travel at $c$.
Of course, this is a physical approach to your question, answering it correctly would involve much harder calculations to perturb the metric, obtain the propagation equation and study the speed of the waves. This is for example explained in the wikipedia article in the linear section.
I can think about an example (correct me if I'm wrong). Think about a massive object collapsing into a black hole. This is an extremely energetic process, if light was able to get out of the forming black hole, you would see it shining like a extremely bright supernova. To my knowledge there is no evidence of that.
More theoretically, I think that the assumption that light travels faster than gravity is incompatible with the cosmic censorship hypothesis,


Protocol Methods not Recognized When Implemented in a Category

Question: I have a view controller class that has to implement several protocols. Too keep things neat I have a habit of putting each protocol's methods in a category on the view controller class.
This time I am getting warnings from the linker that the class does not implement one of the protocols. The methods do work at runtime, the linker just can't seem to recognize the implementation in the category.
I simplified the class in a different project and I get the same error in the same place.
The class header:
#import <UIKit/UIKit.h>
#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>

@interface TopVC : UIViewController
<
    UINavigationControllerDelegate,
    ABPeoplePickerNavigationControllerDelegate
>
{}
@end

The TopVC.m (not shown) is the automatically generated one with no changes. The UINavigationControllerDelegate protocol methods are implemented in this category:
#import <Foundation/Foundation.h>
#import "TopVC.h"

@interface TopVC (UINavigationControllerDelegate)
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
@end

#import "TopVC+UINavigationControllerDelegate.h"

@implementation TopVC (UINavigationControllerDelegate)
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
    NSLog(@"navigationController:willShowViewController:animated:");
}

- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
    NSLog(@"navigationController:didShowViewController:animated:");
}
@end

The linker does not complain about this methods in this category. However, if I try a category to implement the ABPeoplePickerNavigationControllerDelegate protocol in an identical fashion it complains:
#import "TopVC.h"

@interface TopVC (ABPeoplePickerNavigationControllerDelegate)

- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker;

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person;

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier;

@end

#import "TopVC+ABPeoplePickerNavigationControllerDelegate.h"

@implementation TopVC (ABPeoplePickerNavigationControllerDelegate)

- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker{

}

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person{
    return YES;
}

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier{
    return YES;
}
@end

The linker complains:
warning: incomplete implementation of class 'TopVC'
warning: method definition for '-peoplePickerNavigationController:shouldContinueAfterSelectingPerson:property:identifier:' not found
warning: method definition for '-peoplePickerNavigationController:shouldContinueAfterSelectingPerson:' not found
warning: method definition for '-peoplePickerNavigationControllerDidCancel:' not found
warning: class 'TopVC' does not fully implement the 'ABPeoplePickerNavigationControllerDelegate' protocol

The only difference I can see is that the UINavigationControllerDelegate protocol methods are all optional whereas the ABPeoplePickerNavigationControllerDelegate are all required.
Yet, even though the linker complains, the methods are still called at runtime. I just refuse to have a build with warnings in it.  I've apparently missed something or made a trivial error somewhere but I can't spot it.
Answer: Hah! I was having a brain blank.
I forgot to move the protocol implementation declaration to the category's interface like so:
#import "TopVC.h"

@interface TopVC (ABPeoplePickerNavigationControllerDelegateMethods) <ABPeoplePickerNavigationControllerDelegate>
...
@end

This compiles without warning and works as expected.
I just got lazy when using so many optional protocols which the linker ignores if it can't find the method implementations.
Comment: hello, I made all like you are and I'm getting the error: `Category is implementing a method which will also be in its primary class`. I made something wrong or just this way is not relevant anymore?
Answer: By declaring the protocols, you intend to implement, on the primary interface, the compiler expects to see the methods in the primary implementation (about which you state "... [it] is the automatically generated one with no changes"). The compiler doesn't know, that you are going to implement the methods in a category. All it knows is: you "promised" they would be there, but you failed to provide them where it did expect them.
Answer: When the compiler is compiling TopVC.m, it has no way to know that some other file is going to provide the rest of the required protocol methods. In gcc, every .m file is compiled independently. Your desire to split up this stuff into separate categories is fine, but all of them need to be implemented in TopVC.m.
Your re-definition of the protocol methods in TopVC+ABPeoplePickerNavigationControllerDelegate.h has no effect on anything. There is no relationship between a particular category tag in an @interface and one in an @implementation. A category definition in an @interface just says "here are some other methods that are legal to pass to this object without generating a compiler warning." It's not even an explicit promise to create such methods. That was already handled when you indicated that you conform to the protocol (which is a promise to implement the methods).
A category definition in an @implementation just says "here are some other methods for this class." The category tag itself is nothing more than a comment. It is not correlated in any way.
You need to move the protocol implementations into TopVC.m, and there is no reason to have a TopVC+<protocol>.h file. If you like to break up your .m into separate @implementation blocks, that's fine, and I know folks who do it that way. Personally, I just use #pragma mark to break up the file.


Extension risk with IO bonds

Question: I'm trying to understand the extension risk associated with interest only bonds in a CMO. When rates rise, prepayments drop, and so the life of the IO bonds is extended. This causes the value of the IO to increase because investors receive more interest. But doesn't extension risk play a role since investors are missing a chance to invest in a higher rate environment?
Answer: No, for an IO bond, if someone pre-pays the entire mortgage, the payments (and therefore interest) stop.  If you bought an IO bond today and immediately after all of the debt is pre-payed, you lose your entire investment.  Extension risk is the risk that cashflows are delayed.  For an IO, you want them to last as long as possible.
However, when interest rates are high, duration can still be positive. If at current interest rates expected prepayments are zero, an increase in interest rates would reduce the price (same cash flows discounted at a higher rate).
For a PO bond, extension risk is important.  The total payments you will receive are fixed.  For any positive interest rate, you would prefer to receive the payments sooner rather than later and would be harmed by a slowdown in payoff rates.
Comment: but if rates are falling for example then the PO investor will have to reinvest at lower rates much quicker?
Comment: If you had the choice between receiving $100 today and investing it at 0.25% for the next year or receiving the $100 at the end of the year, you would prefer to receive it now.  However, if you knew that you would receive the $100 today regardless of whether the rate was 0.25% or 0.5%, you would prefer 0.5%.  Note that regardless of whether the rate is 0.25% or 0.5%, the price of $100 today is $100.

Extension risk with IO bonds


Can mirrors be used to deflect lightsabers

Question: Since lightsabers are made out of light, and all other laser based weapons, can't it be reflected by a mirror or something reflective?
Comment: When you are ready, you won't have to (deflect or dodge)
-Morpheus
Comment: If lightsabers could be deflected by mirrors, then Sith Lords would wear these into combat. https://i.etsystatic.com/8905937/r/il/252689/2109028305/il_794xN.2109028305_k2vx.jpg
Answer: No, it shouldn't be possible.  The problem is that lightsabers aren't actually lasers (if they were, they wouldn't stop after 1-2m length, they'd go on until they hit something).
They're some form of magnetic plasma bottle.  The defences against them are magnetic or heat resistance (shields, dense metals, etc.), not reflection.
A surface which reflected charged particles would help, but the heat transfer would probably still melt it rapidly.  (Lightsabers don't have much trouble with blast doors, for example, even shiny ones.)
(Even against laser weaponry, a mirror would be of limited value. The surface polish helps at first, but a sufficiently energetic pulsed laser will rapidly blow that shiny surface apart.)
Comment: I recommend you make your hull out out of Mandalorian iron (http://starwars.wikia.com/wiki/Mandalorian_iron)
Comment: Technically the free electrons in the metal should act as a plasma (oscilating at the plasma frequency, in a similar way to the lightsabre) and deflect the blaster bolt. But various corrections to that model mean this is largely not the case.
Comment: Thank you for clearing this out. So polishing my spaceship could give me a small advantage
Comment: There is precedent for a reflective surface successfully deflecting a blaster bolt; IG-88 did with his palm shortly after he was activated - see http://starwars.wikia.com/wiki/IG-88A
Comment: @PhilPursglove: A blaster bolt only interacts with the surface momentarily; it's a small fast-moving pulse.  A sufficiently shiny surface might do it.  (It's still silly scientifically, but within the usual range of SW tech.)  A second blaster bolt on the same point, however, ought to hit the scorch mark and, well, not reflect.  (Also, IG-88 is made of very tough materials; that makes a big difference as his shiny surface was also designed to cope with incoming energy and damage.)
Comment: Right. Laser mirrors for very high energy need to be specially designed for the laser frequency and require active cooling systems. A spec of dust or a smudge can destroy the mirror.
Answer: Yes.  The way I understand them is based on a bunch of books I purchased as a kid, so I am unsure how canonical it would be, but I think it would work.  As I understand it, the lightsaber is not plasma, as some claim (it is clearly actually light), and works by the photoelectric effect, ionising a surface to the point where it is destroyed by the repulsive force of the bits ionised very strongly by virtue of the blade.  By this logic, perfect mirrors which reflected all photons would block a lightsabre, and it would refract, and do everything else light does.  It would also go through glass.
Comment: This doesn't appear to be correct per my knowledge of canon. Could you find at least what books they are but the quotes as well if possible and [edit] them in to back this up?


What if the GM knocks over the tower during a game of Dread?

Question: In Dread, the status of the tower is pretty much the entire game. If it falls over accidentally, it really sort of ruins everything. Obviously the GM stays as far away from it as possible to avoid the worst, but accidents happen. In the case of such an accident, what is a good strategy to salvage the rest of the game?
Answer: Why does it ruin everything? If the GM caused the fall then re-stack and pre-pull the same as if a player had.

If at any time a player other than the host causes the collapse of the tower, their character is removed from the game.

This implies to me that if the host causes the collapse then nothing much happens, just re-stack and pre-pull the correct number for the number of remaining players.
Page 50 is clearer:

Don't sit near the tower. Nothing happens in the game if you knock it over, but the story will grind to a violent halt. If it does happen, rebuild the tower and ask for some free pre-pulls -- this is the only time besides the beginning of the game when a tower fall does not mean the removal of a character.

Italic emphasis mine.
Answer: The players win!  Whatever the dread threat is loses this time, and they don't all die.  Woot!
In Dread, pacing is already heavily dependent on chance and other people - they can have 4 collapses in the first hour and game's over. So playing Dread, like any board game, you have to roll with the pacing and be ready to start a new one a lot, so this doesn't necessarily ruin the game by cutting it short. May as well let the players win from time to time!
Comment: I really like this answer because it highlights the possibility that the players should be able to win, rather than just grinding through it until everyone is dead.
Answer: In practice, I'd choose one of the following two options:

Restack the tower and pre-pull, as per the rules.
Restack the tower and don't pre-pull, because it takes time, and hell, let's just get on with it.

But there's another consideration. In Dread, the tower collapsing feels important. When a player collapses the tower, there's been a death.
Thus, when the GM collapses the tower, it feels as though something should happen. Simply rebuilding the tower would be an anti-climax.
So I'd use the collapse to narrate something into the story. Give the PCs a breakthrough against the horror. Give them a moment of hope. Or make the creatures suddenly become much, much worse.
This is often easy when the game's running. You'll suddenly think: well, OK, if the tower's collapsed, that must mean X happens. I'd use the tower collapse to narrate that thing.
Answer: I would re-stack and then make as many pulls (being fair about it) as were made on the previous tower. If I was being especially sheepish, I might even leave an extra block or three in, but that might mess with your pacing.


Multiple domains with SSL on same IP

Question: I know that a dedicated IP is needed for setting up SSL. What happens if we add SSL for  domains sharing an IP ? (Namevirtualhost)
Comment: Duplicate of http://serverfault.com/questions/126072/
Comment: Does this answer your question? [SSL certificate selection based on host-header: is it possible?](https://serverfault.com/questions/126072/ssl-certificate-selection-based-on-host-header-is-it-possible)
Answer: I think it is a good idea how to explain what the problem really is with virtual hosts and SSL/TLS.
When you connect to an apache server over HTTP you send a set of http headers along. They look like this:
GET /index.html HTTP/1.1
 Host: www.nice-puppies.com

If you have virtual hosting apache will look at the hosts field, then fetch the right index.html for you. The problem is when you add SSL/TLS. The server sets up the encryption before you ever send your http request. Therefor the server doesn't know if you are going to www.nice-puppies.com or www.evil-haxxor.com until after the authentication/encryption is completed. The server can not guess (as sending the wrong certificate gives you a nasty error message).
One solution is a wildcard certificate (as mentioned above), which is valid for *.nice-puppies.com. That way you can use the same cert for multiple domains, but you can't have a *.com certificate (okay, you can, but it would be very bad for everybody else), so in general you will need separate IP for each HTTPS domain.
Comment: Also SNI.  Your statement is no longer definitive, pehrs.  Your explanation is historically accurate but no longer reflects current technologies.
Comment: Good explanation, but you could have a UC cert that will allow multiple domains in one cert
Comment: SNI doesn't (yet?) work with IE6 on Windows XP. Which kind of limits the value, considering the market share. I believe the original user was more interested in what would happen than the set of hacks that exist to get around it.
Comment: Yes, you can have Unified Communications Certificates (UCC/UC certs). I should probably have mentioned them. They are, as far as I have seen, mostly used with Exchange/Office Communication Server. And if you use the same certificate for different sites you abuse x509 semantics. But they do work on most TLS stacks.
Comment: Tried to correct the spelling mistake at the end SHTTP to HTTPS but this was rejected as too small an edit.
Answer: The real solution to this problem is "Server Name Indication":
http://en.wikipedia.org/wiki/Server_Name_Indication
It's only starting to be rolled out into servers and web clients, so it's not really something you can use now, but hopefully in a few years' time this won't be as big of a problem.
Answer: The problem is that the SSL certificate is bound to the IP address not hostname. When the connection comes in on the IP address for an HTTPS request the first action is to establish the SSL communication by passing the server certificate and/or client certificate. During this stage of the connection handshake the Apache server has no way of knowing what the request about to come through is for. This is different for HTTP (non-SSL) traffic as after the connection is established the Apache server can determine the virtual host configuration to use if the client sends the Host header or else it hands it off to the first virtual host configured.
If you had multiple virtual hosts under the same domain you could setup a single wildcard certificate on the IP address and have multiple virtual hosts with different server names defined; however, if those server names are not under the same domain name they would generate client server errors. This would work as the wildcard certificate would be valid for all host names under that domain name. You would need another IP address if the domain names were different as the first certificate defined for that IP address would be the one presented for connecting clients.
Answer: This can be added into one single ssl certificate as SAN (Subject Alternative Name). In my excperiance i had to request a organisation sll certificate. i used globalsign.
Answer: Actually, with modern software you CAN serve multiple HTTPS sites over a single IP address, using a new feature called 'SNI - Server Name Indication'.
http://en.wikipedia.org/wiki/Server_Name_Indication
http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI
I have yet to use this myself, but it sounds good for internal and intranet sites. Most modern browsers support SNI. IE6 does not support SNI, but IE7 does.
(Correction: 20100426 -- SNI is not supported on Windows XP at all. Windows Vista and above do support SNI. See "Section 2.2.3" at http://msdn.microsoft.com/en-us/library/dd208005%28v=PROT.13%29.aspx#id8 ).
Comment: With IE, support doesn't come from the IE version, rather comes from the underlying OS version. Vista and above support SNI. XP doesn't, so even with IE8 on XP, you won't get SNI.
Answer: I am working on same issue. As my test, IE7 and later (Only in Win7 & Vista)/Chrome/Firefox/Safari/Opera support "Server Name Indication". In fact, if browser uses Tsl 1.0, It supports "Server Name Indication".
Answer: If you will try to add two certificates on the same IP, only first read certificate will be used everywhere. One IP - one SSL certificate.
If you want to get more SSL certificates on the same IP, consider getting multiple-domain (so called UCC - check it out @ godaddy) or wildcard (more expensive) certificate.
Comment: If you have two certificates - for site A and B, and apache loads configuration for hosts in sequence A.conf, then B.conf, then it will use certificate from A.conf. Or vice versa.
Comment: You mean the certificate first added in Apache conf will be used for both ?
Answer: I think that the OP is asking what happens if he adds an SSL cert to an IP that has many virtual hosts. If none of the other virtualhosts use an SSL cert then he should be in the clear.
Comment: well i'm puzzled by the question. The Q's title says black the content says white.
Comment: this is the white one
Answer: A UC certificate is definitely the way to go: http://www.sslshopper.com/unified-communications-uc-ssl-certificates.html

Multiple domains with SSL on same IP


Did Ravana have ten heads?

Question: Did Ravana really have ten heads? Or is it a mythical concept?
If he really had ten heads, who gave him this and what is the story behind it?
Comment: Physically he doesnt have 10 heads. Ravan was able to communicate with 10 other people at a time.
Comment: Also about the heads, its more of a symbolic meaning rather than real heads, which represents his knowledge of six shastras and four vedas
Comment: It is symbolic.
Answer: Yes, Ravana literally had ten heads.  This excerpt from the Uttara Kanda of the Ramayana describes Ravana's birth:

[T]he girl [Kaikeshi]... after a length of time brought forth a very terrible and hideous offspring having the form of a Rakshasa, — having ten necks, furnished with large teeth, and resembling a heap of collyrium, with coppery lips, twenty arms, huge faces, and flaming hair. On his having been born, jackals with flaming mouths and other ferocious beasts began to gyrate on the left. And that god showered down blood; and the clouds uttered forth harsh sounds. And the Sun was deprived of his splendour; and meteors began to dart to the earth. And the earth shook; and the wind swept away violently. And that lord of streams — the ocean, which was calm before, became agitated. And his sire resembling his grand-father named him, (saying), "As this one hath been born with ten necks, he shall be called Ten-necked."

Now as described in another excerpt from the Uttara Kanda, Ravana cut off nine of his heads in the course of his Tapasya (deep metitation), but then Brahma restored them:

And the Ten-necked one passed ten thousand years without fare. On a thousand years being complete, he offered his own head as a sacrifice to Fire. In this way he passed away nine thousand years ; and nine of his heads entered into Fire. And as in the tenth year he intended to strike off his tenth head, [Brahma] the Great-father presented himself at that place....  [Brahma said] "Hear!  I having been gratified, will
  confer on thee a fresh boon. O Rakshasa, O sinless one, those heads of thine which have been offered as sacrifices and which have sunk into the fire, shall again be thine.

Ravana's heads also play a role in the final battle between Rama and Ravana, because as Rama kept cutting Ravana's heads off they kept magically regrowing, as described in the Yuddha Kanda of the Ramayana:

Thereupon, the great-armed Rama who augmented the fame of the kings born in Raghu dynasty, stretching with anger, the serpent-like arrow with his bow, chopped off the glorious head of Ravana, which was graced with blazing ear-rings. Then, all the three worlds saw that head, fallen on the ground.  Another head, exactly similar to that head, cropped up on the shoulders of Ravana. That second head was again chopped off by Rama, possessing a swift hand and who was swift in his act. The second head of Ravana was cut off by arrows in that battle. Soon after that head was chopped off, it again rose into view.  Rama chopped off that head too with his arrows looking like thunderbolts. In the same manner, a hundred of Ravana's heads of equal splendour were chopped off by Rama. Yet, no certainty about Ravana's death could be seen.

It was only when Rama hit Ravana's chest with a Brahmastra that Ravana finally died.
Answer:
Rāvaṇa is depicted and described as having ten heads and two ears
  in total. His ten heads represents that his knowledge of the six
  shastras and the four Vedas. Lord Shiva also gave him the name
  "Dashaanan" (Dasa = ten, mukha/anan = face), after he offered his ten
  heads to Lord Shiva.

Source: Wikipedia
The ten heads also represented passion, pride, anger, greed, infatuation, lust, hatred, jealousy, selfishness and ego when he offered them to Lord Shiva.
Answer: Yes he did.
https://www.sacred-texts.com/hin/m03/m03273.htm

And to every one of them he gave princely sons according to their desire. Two sons--those foremost of Rakshasas named Kumvakarna and the Ten-headed Ravana,--both unequalled on earth in prowess, were born to Pushpotkata.

And at the close of a thousand years, the invincible Ten-headed One, cutting off his own heads, offered them as offering to the sacred fire.

'Thus addressed, the Ten-headed (Ravana) was highly gratified, for on account of his perverted understanding, the man-eating one slightened human beings.

'Having obtained this boon, the Ten-headed Rakshasa defeated Kuvera in battle and obtained from him the sovereignty.

On the other hand, the powerful and man-eating Rakshasas and Pisachas, having assembled together, invested the Ten-headed Ravana with their sovereignty.

The bolded parts in Mahabharat repeatedly called Ravana as the one with ten heads from Mahabharata.

Did Ravana have ten heads?


installing a replacement fixture with three lamps in one on a two way switch

Question: I am replacing a single pendant-type ceiling light with a new pendant fixture that has three individual pendants that go into the single "hood" that attaches to the box in the ceiling. There are two wall switches that control the light on opposing walls. My question is, how are the wires from the three individual pendants wired to single set of wires (black, white, ground)from the box? I understand about ground wire, of course; just not sure about how to configure/join the wires from multiple pendants to the single set from the box. I will have an electrician check once I have done it, just  want to know how it is done. Thank youT
Comment: If it's a new fixture they typically pigtail the sets of wires to one pair for just this reason. Basically it's a black to black, white to white scheme, but for DIYers and such they simplify it. Question, if you are having an electrician "check" it once you're done why not simply have him do it? Once the light is up there's not much for him to see anyway, so why bother?
Comment: Because I want to learn how to do it.
Answer: In most modern fixtures that have multiple lamps, the wires are preconfigured going into the hood so that there is only one black (hot), one white (neutral) and one green or bare (ground) wire coming from the fixture to be attached to the wires in the box.
If there are separate wires for the three lamps, all three black wires should be twisted together and connected to the single black wire from the box, capped with a wire nut (and taped if you want added protection). Similarly, all three white wires should be combined with the white wire from the box. And finally all the green/bare wires combined with the ground wire from the box.
The switch wires are already worked into the overall wiring (assuming they were working before) and need not be modified. By the way, when a lamp is controlled from two locations, the switches that control the lamp are called three-way switches.
Comment: Thank you. I appreciate your answer. The second paragraph applies to my situation and you made this very understandable Again, thanks!!