Should starter pinion be greased?

Question: When replacing a starter (or reinstalling the old one), should the pinion that powers the flywheel (is that actually the flywheel?) be greased or not?
Answer: Basically the answer is "no". You should leave both the ring gear on the flywheel (standard shift tranny) or flexplate (automatic tranny) and the gear on the Bendix dry. As @elmerfud stated, as long as the starter is shimmed to spec for its engagement, you'll have no issues with it. Both the ring gear and the Bendix gear are built to take the punishment.
Also, if you consider the overall use of the starter gears in comparison to the rest of the vehicle, they really don't get used much. Besides, if you put grease on these gears, where it is at will attract dirt and abrasives. This will cause wear if you are not doing a continual maintenance on them (cleaning both gears and regreasing on a regular schedule). This is something not only do you not want to do, it's something which doesn't need to be done.
Comment: The Bendix is the one way clutch or (like a sprag) which has the gear stuck on the end of it (there to provide over-run protection in case the engine starts while you still have the key in the start position). You want to leave this dry (no grease on it).
Comment: what is "the Bendix dry" ?
Answer: This is one of those solid "maybe" answers. If you have access, I would consult the manufacturers assembly/repair manuals for your vehicle.  That will be the most correct information for you.
In my experience it is generally not done, but in most cases a small amount won't hurt.  It is not a continuously lubricated part nor is it usually something that is lubricated on a maintenance schedule.  If the starter is shimmed to spec for its engagement with the flywheel you should have no issues with it engaging or disengaging.
Answer: Yes, always on a new starter you should get a small brush and put a good layer of moly grease on the pinion. It's not done during assembly simply as a way to save money because it won't cause problems in the short term. This is simple common sense, they're gears like any other that will benefit from lubrication. Nissan products especially seem to eat ring gears, lube from the factory would have saved so many people so much money.
Answer: No lube required; they are only engaged for a few seconds till motor starts. Adding grease or any other wet lube WILL attract dirt and debris and do premature wear to gears.

Should starter pinion be greased?


How did Thawne make sure the Particle Accelerator would affect Barry the way he wanted it to?

Question: Recent episodes imply that Eobard Thawne designed the particle acellerator to malfunction and give Barry his speed but isn't that leaving a lot to chance? Assuming it even affected Barry how could Thawne be certain it wouldn't cause Barry to develop different abilities - or vapourize him altogether?
Comment: there's the fact that he comes from the future so he knows what is going to happen if certain conditions are met.
Answer: Thawne didn't have to do anything special.  Barry's special, he's not a normal meta-human; the Speed Force chose him, and imbued him with stupendous power.  Thawne merely needed to mimic the conditions that originally created the Flash, and it would have the same result.  Barry's destined to become the Flash, Thawne merely sped up the timeline.
We see this (in addition to dialogue outright stating it) in Barry not just getting his powers from the particle accelerator, but also being struck by lightning.  When his powers were drained, another shock of electricity not only returned his powers, it unlocked the full potential of his power, which has since allowed him to travel fast enough to pierce the time barrier.


Translate admin settings

Question: I am writing a module configuration page for a module. Is there a way to make variables submitted and saved by system_settings_form translatable?
Answer: I think there are two issues you have to think about...

Is the item you are saving in the variable used for calculations?
Is the item you are saving going to be displayed?

Note there is actually a variable translation module located in Localization Module, but it seems you would need to ask for these for each language supported.
In the case of #1, code may be require this variable to be a specific value. This will make it to whether you need to keep a record of all the available translated values of this item that can be entered and compared against.
In the case of #2, you could simply wrap a t() around the variable setting it up for translation, but if it is something like a text field, this will have to be done after one figures out what the item is... Select fields and others would be no problem as you have a finite number of possibilities.
With all that said, if the item is a free-formed text field, I would just allow your user to type in a different value for this item for each language he has enabled using the Variable Localization module.
Answer: You need to install Variable translation module.
implement hook_variable_info where you define your variables.
Navigate to admin/config/regional/i18n/variable and make it multilingual.

Translate admin settings


Can you put a propeller on the back of a plane, and have it go forward?

Question: So, I was thinking about how drones work, and I can't figure out how drones with propellers at the rear of the drone can still go forward. I'm not that experienced in aviation so if this is a basic question, I just didn't know the answer.
Comment: Interesting corollary ... propellers on boats and submersibles perform the same function as a propeller in a plane. Yet, you don't hear people asking why are there no boats with propellers at the front, like in a plane ?!
Comment: Please note, that the direction in which the propeller is moving the airplane is not defined by where it is placed, but why which direction it is rotating in, (and how the blades are angled).
Comment: It's call a [pusher propeller](https://en.wikipedia.org/wiki/Pusher_configuration) configuration. I'll it to the experts to answer authoritatively, but as long as the blade is curved in the right direction it will still propel air backwards and the plane forwards. Related [question](https://aviation.stackexchange.com/q/3306/31361). Boeing even had a [prototype 7J7](https://www.smithsonianmag.com/air-space-magazine/the-short-happy-life-of-the-prop-fan-7856180/) in the early '90's ([video](https://www.youtube.com/watch?v=APzO7OVGakw))
Comment: @ DarthVlader You don't need any changes to the propeller. They may be called pusher propellers but they are more accurately called left-handed propellers. This naming is more related to the conventions associated with the direction of rotation for an engine (usually CCW when facing the engine shaft) when you take an engine and turn it around to face backwards. It's nothing inherent to the propeller aerodynamics.
Comment: In addition to all the excellent answers and comments from people who know a lot more than me... the simple answer is yes. The propeller just has to spin the other way. (Or have its blades twisted in the opposite sense.)
Comment: Jet aircraft have the exhaust nozzle at the back - why wouldn't it work with a propeller
Comment: Your title and your text ask two different questions: your title asks *if* a prop can be placed at the rear if a plane, and your text asks *how* a plane go forward if the prop is at the rear. Please edit one or the other. - Probably you should change the title, as its answer is trivially obvious.
Comment: Imagine swimming with your arms vs legs. Either technically works despite one being at the front and the other being at the back.
Comment: The answer to the question is "nope".  Things such as this cannot work and therefore are a figment of someone's overly active imagination--  https://en.wikipedia.org/wiki/Kyushu_J7W_Shinden .  (Or maybe the plane was actually secretly designed to go backwards and confuse everyone?  Psych!!!)
Answer: Yes, in fact airplanes with pusher propellers were flying before those with tractor propellers:

Photo Credit: Smithsonian Air & Space Magazine
Comment: Since our intrepid OP seems rather new to aviation, I'll note that this is one of the original Wright Flyers. The first heavier-than-air craft to make sustained, controlled flight.
Comment: It may also be worth noting that the front of the above aircraft is at the *left* of the photo. The elevator was at the front of the aircraft, and the propellers were at the back. The person is laying forward with their head pointing in the direction of flight.
Comment: @GregHewgill Can't imagine there are that many planes where the pilot faces backwards to the direction of flight.  Maybe rear gunners on some military planes, but they're not the pilots.  (I also know the person who controls the midair refueling boom on tanker planes is sometimes called a pilot, but they're not *the* pilot.)
Answer: Your Question: Can you put a propeller on the back of a plane, and have it go forward?
Yes, there are several airplane types that have rear engines. Here is an example:
Cessna 337: Source: https://www.flyingbulls.at/en/fleet/cessna-337-skymaster-push-pull
Here is another example: Piaggio P.180 Avanti

Source: https://en.wikipedia.org/wiki/Piaggio_P.180_Avanti
And another example: Convair B-36 Peacemaker

Source: https://en.wikipedia.org/wiki/Convair_B-36_Peacemaker#/media/File:Convair_B-36_Peacemaker.jpg
Comment: Note that the Cessna 337 has both a pusher and a puller propellor.  This is a clever setup to breate a twin engine plane that has center line thrust.  This improves safety because it causes no significant change in handling (the airplane is not twisting/yawing to one side) and does not degrade performance (by forcing you to use lots of rudder to correct the yaw; that isn't free and comes from total thrust).
Answer: There are actually some planes that have this setup. Majority of prop driven airplanes use the pulling method, in which the propeller acts like a airfoil (wing) and the propeller itself generates lift which pulls the plane forward. This is also known as the tractor configuration.

But in this case you are talking about a pusher configuration. There are a few planes which have this configuration As seen below.

The Pusher configuration actually works just the same way as the tractor configuration. So the drone that you are referring to works no different from normal planes.
This website talks more about how propellers work.
How propellers work
And this link talks about some of differences and pros and cons
Pusher versus pulling propeller
Comment: @Trunk For another non-flying example, think of airboats, which are propelled by a large fan at the back.  Come to think of it, *most* powered boats and ships have the propeller(s) at the back, though unlike airboats, they're usually underwater.
Comment: Pusher's nose fins and fans reminds me of the famed Brabham "fan car" of 1978  https://www.tracksidelegends.com/articles/brabham-f1-fan-car-BT46B  though in the latter case the fan was for enhancing ground-effect of air under the car rather than thrust forward.
Comment: @Trunk, that car is very interesting!!!!
Comment: @Trunk Jim Hall's Chaparral 2J predates that car by at least 7 years. https://en.wikipedia.org/wiki/Chaparral_Cars?wprov=sfti1
Comment: Yeah. It was nice piece of idea borrowing by Murray. Though at the time no one in F1 said anything other than it being another devilishly clever idea from the ZA genius.
Answer: To answer the question in your text (instead of the title):
Suppose you bought a used single-engine airplane with the propeller on the nose and fixed it up. Imagine starting up the engine, the prop spinning, blowing air backward, pulling the plane forward.
Now imagine you have bought the wrong engine. When you start it up, it runs in reverse, the prop spinning in the other direction. What happens? The prop blows air forward, pushing the plane backward.
Obviously this is useless as the plane is not designed to fly backward. You can't even taxi straight.
So you disconnect the plane from the engine, keeping the engine where it is, turn the plane around, and attach the tail to the engine. Now the engine and the plane agree about which direction they should go. You have invented the pusher prop.
Of course, if you want to get the thing to actually fly, you're going to make a lot of changes -- but none of those changes will involve changing the direction the engine is spinning, or changing the direction the plane is pointing.
Instead of spending years of wind tunnel and dangerous flight testing, you can steal plagiarize copy most of those changes from other inventors. You want to look at the Rutan LongEZ, the Anderson Greenwood AG-14, and the Cessna 337 Skymaster, for example.
In every case, the engine is stuck onto the wrong end of the airplane, but that's OK, because the engine spins the wrong way.
Answer: EDIT: To help the OP better grasp the concept of how it's possible to put propellers on the back of a plane and help them grasp the concept of how drones with propellers on the back work, it may help just as an initial frame of reference to think of the placement of the propellers on planes as operating similarly, in basic principle, to the main two types of vehicles and cars on the road with regard to those that are driven using front-wheel drive versus rear-wheel drive driven vehicle.
Whereas most modern vehicles in the Western part of the world utilize a front-wheel drive setup that involves having the engine usually being installed in the front of the vehicle and is used to spin the front wheels, whereas the spinning force of the wheels pull the car forward.
Conversely, in a rear-wheel drive model vehicle, the engine is usually found in the back of the vehicle and otherwise is used to spin the rear wheel tires to push the car forward.
Both constructs have their advantages and disadvantages similarly to planes with those designed to have propellers in the front and those designed to have propellers in the back.
The propellers themselves play almost the same exact roles as the wheels on a car where power from the motor engine is used to rotate the propellers which exerts the necessary force of momentum to move forward. In this case, spinning the propeller blades force air to move in a particular direction that is generally coming out from "behind" or "under" the propellers if you looked at them from a top-down view. Others have answeres with links above to learn more about how propeller works but hopefully that helps remove any confusion that may have prevented an better understanding.

Edit Notes
In previous posts, everyone provided great answers already explaining the
difference in propeller systems and it was only in realizing how I had
misperceived the reference to drones that I realized, maybe the OP
has reached the same level of understanding that might seem like second nature to others and before diving in to the details of the physics and technical explanations on how propellers work, I thought it might help the OP better grasp the general concept and ideas rather than what was previously suggested and written below, but otherwise the above edit was added while below is kept simply for posterity.

Although I would've elected to post this as a comment and an answer has already been marked, I don't have the reputation in this community to do so, but to address where your question stems from, with regards to how drones can be propelled forward, they often use propellers differently than your typical airplane. How they use their propellers, or how drones with propellers at the rear of the drone can still go forward, would be better imagined as being similar to how a helicopter can still move forward.
If you're referring to the rear propellers of a drone, I would assume you are referring to the rear propellers in a quadcopter setup. In simple terms, the drone is able to move forward by varying the speed of its front propellers from it's rear propellers. This is why when you see a drone move forward, you will see it begin to tilt forward as it begins to move forward, this is because the rear propellers are spinning faster and producing more thrust from its rear propellers, to create an intended imbalance of sorts, allowing it to lean and begin moving forward; simulating the same sort of forward motion suggested by the concept of "falling forward" when you run (though this terms should not be taken literally).
With a greater thrust pushing air "down" at the rear of the drone, the leaning forward of the drone helps direct the propulsion of the drone and redirects the force of moving air coming "up" (or the force pushing up on the rotor that is pushing air down) to be more at an angle (again, an oversimplification) which pushes the drone to move forward or whichever direction it is leaning towards.
While this is a simplified explanation, if you want a more physics-based answer that dives into the how the propellers work, the direction they spin, and explains things like angular momentum being the rotational equivalent of linear momentum, etc. you may want to check out this site. But, hopefully that helps you imagine or understand how drones can fly forwards, backwards, side to side, even with propellers in the rear.
Comment: I thought that OP probably meant drones like the MQ-9, which fly like typical airplanes but have pusher propellers.  Maybe OP can clarify.
Comment: nice "comment" (it is too big to fit in a comment)
Comment: @Edward ahh you're probably right, that didn't cross my mind at the time and now I feel kind of silly for assuming the former. Though I now do wonder if maybe the OP was just generally curious to learn how lift, thrust, drag, and all that work together but due to a lack in experience, they were only able to propose and form a question that asks about what stirred their curiosity in the first place. At least, that might help me explain why there's one question in the title and another in the text as pointed out by someone else in an earlier comment. And, Phil ikr >_<


Is there a chemical test for gluten?

Question: I am looking for a chemical test for the presence of gluten: however, having looked online for such a thing, all the results seem to be about 'home testing kits' (presumably for people with a gluten intolerance). Is there a simple chemical test which can be used for a school science project (meaning that the chemicals involved should be easily available), something similar to how iodine can be used to detect starch?
Answer: Gluten describes a subset of proteins (glutenins and gliadins) found in wheat grain and making up a large fraction of the protein found in common wheat flour (>70%). Since the protein fraction of wheat flour can represent >10%/wt, the gluten fraction commonly represents >5%/wt of the flour.
Given the requirement for an easily implemented chemical test this eliminates more advanced and regularly used methods such as immunoassays (eg ELISA), and maybe even dye-binding assays such as described by the AOAC Official Method 2011.04.
One frequent chemical method to measure the amount of protein in a food sample is known as the Kjeldahl method, which detects nitrogen (which is absent in the carbohydrate). Other assays for nitrogen would also do the trick.
Büchi manufatures equipment for performing the required assay (Ref. 1), and provides an application note based on standard method AOAC 920.87. Although it is unlikely that you will have a Büchi SpeedDigester K-436, K-439, or Kjeldahl Sampler System K-370/K-371, available in your school lab, you'll still require the chemicals and equipment for performing a high temperature digestion and distillation, which should be similar to that listed in the application note. Note this is not a simple experiment.
Unfortunately the Kjeldahl method is likely to be difficult to implement in some educational laboratories given the required equipment, chemicals and experience. An alternative family of less challenging methods to determine protein are biuret methods (BCA and Lowry assays, which exploit protein-copper chelation and secondary detection of reduced copper), as described for instance on the ThermoFisher Scientific website. These however employ absorbance measurements to determine the amount of chelated or reduced copper.
If you are looking to distinguish gluten against a background of other proteins, you may have to isolate the gluten fraction (see eg Ref 2.). In general your approach would depend on the expected concentration and amount of gluten in the sample. Since this is a question about an educational application, it is assumed that you are not concerned with a non-gluten protein background or with detection of low concentrations.
References

Büchi Application Note 027/2010. Nitrogen and Protein Determination in Flour according to the Kjeldahl Method.

Ravinder Kaushik, Naveen Kumar,Manvesh Kumar Sihag, and Aradhita Ray. Isolation, characterization of wheat gluten and its regeneration properties. J Food Sci Technol. 2015 Sep; 52(9): 5930–5937.
doi: 10.1007/s13197-014-1690-2
Comment: Typically when one tests for gluten, the point is to distinguish gluten from other proteins. I assume that's what the OP had in mind for their classroom demo--e.g. show that wheat flour tests postive for gluten, while oat flour tests negative. Given this, it wouldn't make sense to use the Kjeldahl assay as a gluten test, since it tests for total protein of all types (by testing, as you said, for total nitrogen).  Plus it definitely doesn't meet the OP's requirement of a "simple" chemical test.
Comment: @theorist Yes, you are largely right, although I think the point is to detect gluten period. There is no explanation as to what background to expect. However for a HS lab I reduced the problem to identifying protein (reductio ad absurdum perhaps). Kjeldahl is too hard so I mention other protein assay choices. In general not easy to beat immunoassays for specificity.

Is there a chemical test for gluten?


Does the actual inventor of this item have any means of gaining financial compensation for his stolen design?

Question: Assume an inventor A has no patent, just published proof that he created the Invention.  Assume a second individual B copies the Invention and files for a US patent on the Invention.  Does A have any means of gaining financial compensation for his stolen design despite having no patent on the Invention?
Answer: Ask an attorney, especially if the patent holder is making tons of money from it. If it is a filed application rather than an issued patent, there are ways of bringing the published information to the examiner's attention to try to keep it from of being patented. If the person has gleaned information from you and added on to it, it is possible that legally you would be considered joint inventors. If you are legally joint inventors but you are not listed as an inventor, there are remedies for that.    If he copied from you or just made an independent invention/discovery but you did it first and his patent is relatively  new then you can file your own patent application and provoke an interference proceeding. In that expensive process you can attempt to prove you were first.
Comment: Provoke an interference? Really?
Comment: @yorick - unlikely as it might be, if the poster filed tomorrow and that was within a year of the granting of the patent he believes "stold" his invention why couldn't that result in an interference? Thanks.
Comment: I would be interested in your analysis, looking at the applicable law and timelines, that results in an interference.  Today is Febraury 22, 2013.  I would also be interested in why you do not mention a derivation or transitional proceeding anywhere above.
Comment: Posted as a self answered question. If I am off please let me know.


Cart page showing HTTP 500 Error and Not working

Question: I am using porto theme in magento 1.9.4.When user add products to cart then items added in cart but when user click to view cart or continue for checkout than gets 500 error. Any body know what might be the issue? Urgent Help needed! How to remove Http 500 error. Is it permission issue? Kindly Help
Answer: A HTTP 500 error means your server had an issue with the request, which means it threw an unhandled exception or you have a PHP fatal error somewhere. To get more details about what went wrong you should check your log files (<website_root>/var/log/), I would look at your system.log and/or exception.log files. You can also check your web servers error logs for PHP fatal error logs if the other two come up dry. The location of those logs depends on your websites configuration with whatever webserver you use. (For me at least I run a CentOS machine running httpd/apache and my website is configured to write logs to /var/logs/httpd/<site_name_error.log>)Now if both of those come up dry, you might be having an issue with a file your website is trying to include. If that's the case you can edit <website_root>/lib/Varien/Autoload.php (~line 94 as of 126.96.36.199) and remove the @ before include, the @ symbol is a PHP construct to suppress warnings and will prevent logging if something fails to load. Note: Make sure to remove that edit when you are done, as editing core code is generally speaking a bad idea and this is strictly for debugging purposes.


Backtesting algorithms

Question: Are there any books/papers/articles to describe how to develop a backtesting software? Something like backtest in quantopian website. How do they calculate the Cumulative performance?
Comment: There are several off-the-shelf backtesting packages. You might want to look at those before rolling your own. Depends in part what it is you want to backtest (e.g. options or stocks? Low-frequency or high-frequency?).
Answer: There are many resources on the web but you need to think why you would want to do this in the first place. Are there not packages or frameworks out there already that will do what you need?
Also backtesting or any financial trading platform will be suited to a specific style or method of backtesting. Some are vectorised iterative processes (e.g. just a big for loop with some whistles added on) and others are reactive CEP based solutions (they rely on events coming in from a data feed then reacting to these in some ways) so unless you have a specific style of trading the former will work for most people.
http://www.quantstart.com has interesting articles on back testing and there are plenty others. Rob Carvers site is quite informative also: http://qoppac.blogspot.com/
Answer: In this blog post I describe how to backtest trading strategies with R:
Backtest Trading Strategies Like a Real Quant
It gives a step-by-step template which consists of the following steps:

Load libraries and data
Create your indicator
Use indicator to create equity curve
Evaluate strategy performance

Details and the fully documented code can be found in the post.

Backtesting algorithms


Connection between Poisson bracket and Anti-commutator?

Question: Canonical quantization promotes Poisson brackets in classical mechanics to commutators in quantum mechanics. Is there any classical counterpart similar to the Poisson bracket for the anticommutator?
Answer: FWIW, in classical Hamiltonian formalism, the phase space is a supermanifold with a super-Poisson bracket $\{\cdot,\cdot\}_{SPB}$. The super-Poisson bracket corresponds to a super-commutator $\frac{1}{i\hbar}[\cdot,\cdot]_{SC}$ upon quantization. The super-commutator is a commutator (an anticommutator) in the Grassmann-even (Grassmann-odd) sector, respectively.
See also my Phys.SE answer here.
Comment: As a person who just started learning QFT, are there some gentle introductions to supersymmetry such that I can understand your answer?


Definition of reduced relative homology group

Question: In Hatcher's book on P140, he said that when $n=1$, the boundary map $d_1:H_1(X^1,X^0)\rightarrow H_0(X^0)$ is the same as the simplicial boundary map $\Delta_1(X)\rightarrow\Delta_0(X)$. I know the definition of $d_n$ is $j_{n-1}\partial_n: H_n(X^n,X^{n-1})\rightarrow H_{n-1}(X^{n-1})\rightarrow H_{n-1}(X^{n-1},X^{n-2})$. So I think when $n=1$, $j$ is just identity map. But I don't understand what does author mean to identify the $d_1$ with simplicial boundary map???
Answer: Since $H_1(X^1,X^0)=H_1^{\Delta}(X^1,X^0)$, $H_0(X^0)=H_0^{\Delta}(X^0)$ by homomorphisms induced by the canonical inclusion maps, we see that $d_1=\partial_1:H_1(X^1,X^0)\to H_0(X^0)$ is the same as the map $\partial_1^\Delta:H_1^{\Delta}(X^1,X^0)\to H_0^{\Delta}(X^0)$ in the corresponding long exact sequence of the short exact sequence of singular complexes $\Delta_n(X^0)\to\Delta_n(X^1)\to\Delta_n(X^1,X^0)$, hence we need only observe that $\partial_1^\Delta$ is the same as the simplicial boundary map.
Note that by definition $H_1^{\Delta}(X^1,X^0)$ is free abelian generated by $1$-cells of $X$ since any $1$-cell of $X$ is a relative cycle and $\Delta_2(X^1,X^0)$ is trivial. Also, $H_0^{\Delta}(X^0)$ is generated by $0$-cells of $X$, concluding that $H_1^{\Delta}(X^1,X^0)=\Delta_1(X^1)$ and $H_0^\Delta(X^0)=\Delta_0(X^0)$. It suffices to observe that $\partial_1^\Delta$ sends $1$-cells of $X$ to what the simplicial boundary map $\partial:\Delta_1(X^1)\to\Delta_0(X^1)=\Delta_0(X^0)$ sends to, which is rather straightforward by definition of $\partial_1^\Delta$: The quotient $j: \Delta_1(X^1)\to\Delta_1(X^1,X^0)$ is an isomorphism sending $1$-cells to $1$-cells and $\Delta_0(X^1)=\Delta_0(X^0)$ via the inclusion of $X^0$ into $X^1$.


Scene showing black outlines with no object faces

Question: I just downloaded a .blend file from blendswap but when i opened it in blender it is looking like graphs, i mean it looks like a bare structure, no white faces (walls). please help.
Comment: it might be helpful in getting better answers if, in addition to the screenshot, you could post a link to the file you downloaded from Blendswap.
Answer: At the first sight it looks like you have Viewport shading at wireframe enabled. But I can see it is is at solid. So it should render the faces.
I suggest to check Properties/Object/Display. Maximum Draw Type should be at Textured.
You can also switch to edit mode an see if there are faces (they should become visible when you select the surrounding faces).
Overall it might be a compatibility issue. Do you know what Blender version this file was save with? I think Blender is shows a warning when you open an old blend file. This warning should contain the version.
Be aware that blend data is not necessarily 100% compatible between blender versions. Subsequent versions usually convert fine but long jumps can cause such issues.
If so download that version and load the file there. If that is as you expect you need to find an Blender version that correctly loads the file, save it there and try the same thing until you reach your current Blender version.


Help with " in case of"

Question: Can I say" in case of cleaning your room, it will look nice." ?
Or should" in case of " be only followed by a noun?
Answer: "In case of" should be followed by a noun or noun phrase.  But even if we use a noun in your sentence, it still doesn't work.
"In case of cleanliness, your room will look nice" is grammatically valid, but semantically nonsense as it's not only a tautology, and but "in case of ____, _____" describes a something that is a contingency plan.  "Your room will look nice" is not a contingency plan.  It is not a plan at all.
I believe the word you are looking for is "If", as in: "If you clean your room, it will look nice."  This is a perfectly natural sentence.

Help with " in case of"


How to create collage video with still and moving photos?

Question: I'm looking to create a collage of images that include both still and video - similar to this
video collage using Photoshop CS5. Basically, I have 3 landscape photos and one video that I want to stylistically position onto one page, and export as a short loop for Instagram. Any suggestions?
Answer: I'm not sure if it can be done with just CS5 -- I went from CS3 to CC.
From what I see online you need CS5 Extended.
So with CS5 Extended it should be fairly straight forward. Create a document to the size for Instagram, position your static images, and your video, and export as an .mp4.
Without CS5 Extended its likely more complicated:
Might be able to get it as a .GIF but will need to use a 3rd party utility app to convert .GIF to .mp4 if you want to use it on Instagram.
As for the actual creation the only way you'll be able to do it in Photoshop CS5 is to frame by frame it. You can either find a utility app to convert whatever your video file currently is to individual frames; or since you only plan to use it on Instagram you could do it by taking screenshots every few frames in a video player capable of scrubbing.

If you're wondering the loop part, you'll just want to double the frames after a point going in essentially reverse back to the starting point.

All of this would be a lot easier with a video editor such as After Effects or Premier. If you don't have either there are free alternatives:

DaVinci Resolve
OpenShot
Avid Media Composer


git:use git commit or git stash?

Question: I was trying to pull data from repository with git pull command.this command gave me an error
error: Your local changes to the following files would be overwritten by merge:

        public_html/sites/file
        public_html/sites/file1.txt
        public_html/sites/file2.txt
Please, commit your changes or stash them before you can merge.
Aborting

In order to solve this issue i use below two commands.
   Step1
    1)git add .
    2)git commit -m "my first commit"

and then i did
   step2
    git pull origin master

Now everthing works fine, but the problem is that i had mistakenly commited some files in step1(by using command "git add ." and git commit -m "my first commit")".
Now If supposed i issued "git push origin master" command then those unwanted files (commited in step1) will be pushed to the repository.
I dont want these unwanted files(commited in step 1) to be pushed to repository.
Comment: You can only push commits, not changes to individual files. You can however change the commit to include include what you want before pushing.
Comment: Question title is confusing. This has nothing to do with stash, unless your question is 'how to pull without conflicts'.
Answer: You've to reset your commit in order to add only the files you wanted to push,
git reset --soft HEAD^

you've then to unstage the files you added accidentally,
git rm --cached list_of_files_you_added_accidentally

and commit again,
git commit -m "your commit message"

Or, unstage all the files and add only what you wanted to push,
git add file_1 file_2 ...

Answer: If the only commit you've made is 'my first commit', and you want to exclude some files from it, you can do:
git reset --hard           # undo the pull
git reset --mixed HEAD~    # undo the commit, unstash all the files
git add file1, dir2 ...    # add just the files you want

git commit -m "some msg"   # then commit and push as normal...
git pull origin master
git push

git:use git commit or git stash?


Will warm pizza get colder in deep space?

Question: If my Hot Pizza is in deep space and there is no gas molecules around it, how would it dissipate it's energy?
There are neither conduction nor conviction, and since the Pizza is solid it can't radiate its heat
will it stay hot?
Comment: duplicate: https://physics.stackexchange.com/q/72179
Comment: Similar question: https://space.stackexchange.com/q/7830/
Answer: It will still radiate heat in the infrared part of spectrum. It doesn't matter whether it is solid or not. See Black-body radiation for details.
Answer: Heat may be considered to be movement of particles.  The particles of your hot pizza oscillate.  An accelerating electric charge creates an electromagnetic field.  The oscillating particles of the pizza emit photons in the wavelength of the field the particles create, generally infrared radiation.  As the particles on the surface of the pizza radiate these photons, they become less energetic.  For a while, conduction from hot particles within the pizza keep the surface particles oscillating.  But eventually, all the paricles of the pizza become less energetic, their heat vibration slows, and the pizza cools.
See the first answer to this similar question: https://space.stackexchange.com/questions/7830/how-is-heat-in-space-dissipated.
Were heat never radiated away from the pizza as photons of electromagnetic radiation, the pizza would remain hot forever.  Such a state would contravene the increasing entropy of our universe.
Comment: @AccidentalFourierTransform : I edited the answer to make clear that there is radiation, so the heat energy of the pizza is accounted for as vibration slows.
Comment: "The particles of your pizza will gradually slow their heat vibration as friction against each other attenuates their movement." This doesn't make sense, as it implies that internal friction causes cooling. Also, an object that simply remains hot as a result of poor heat transfer does not constitute a perpetual motion machine. I think these statements could be reworded.
Comment: @Chemomechanics : I reworded the answer and hopefully eliminated the misleading statements.


How to go between partitions in terminal

Question: A very basic query which requires your kind guidance. If I am at command prompt in either DOS or Windows, I would use, (if I am in C: drive) d: to go to drive D. What is the equivalent in Ubuntu Terminal if I want to move around between partitions, from sda1 to sda2 for example?
Answer: Ok, this is one of the fundamental differences between windows and linux. The Windows file system uses devices as starting points for each section of the file system. So you have:
c:\
d:\
e:\

Linux/Unix systems use the concept of a unified file system. Everything is under the root folder, and can be arbitrarily mixed together. The user and programs do not know about devices because they have been abstracted away. So, all linux systems will have the same general hierarchy.
A linux system will look something like this:
/
|---var
|---lib
|---home
|---mnt

But these folder could be on the same hard drive, or separate hard drives. They can even be network folders! There is a special folder called /dev for if a program actually needs to talk to the physical device. So, anywhere that you want to go on a linux system will never require switching devices like on windows.
However, sometimes a device is not added to the filesytem! It will be plugged in, the OS can see it as a device, but it has not been mounted. Modern linux systems will try and do this for you as necessary. Sometimes it doesn't work, and you have to do it your self.  That is what the mount command is for. It is also the original purpose of the /mnt folder, so you can have an obvious place to mount new sections of the file system.
Before mounting a drive:
|---mnt
    |---temp

After mounting drive to /mnt/temp:
|---mnt
    |---temp
        |---docs
        |---programs
        |---tmp
        |---extra
        |---backups
        |---other stuff

So you can mount a drive, then use cd to move into it, or anywhere else in the file system. This allows for neat things, like having your /home directory on a separate hard drive, in case you want to switch linux distros later, or so you can back it up. The /tmp folder is often not on an actual device at all! It's could be some ram treated as a folder. That makes it easy to put stuff there, then have it cleaned up when you reboot.
Comment: the best answer!
Answer: Partitions that are mounted are found in the filesystem. They are usually mounted to the folders /mnt/ or /media/.
type df in the terminal to display all mounted partitions and where they are mounted . You can also use the Disk Utility application to see where each partition is mounted.
then cd into your partition using. For example if the partition mount is called data:
cd /media/data
Comment: @Achu. As far as I understand it `/dev/` contains device files for all devices but the mount points are generally `/media/` for removable media and `/mnt/` for manual mounts.
Comment: um, just a small comment: windows partition isn't mounted by default. There's only `cdrom/` in 'mnt/'
Answer: This is my process. Adapt the numbers as needed

execute lsblk first.

 NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 232.9G  0 disk
    ├─sda1   8:1    0   1.5G  0 part
    ├─sda2   8:2    0 138.6G  0 part
    ├─sda3   8:3    0   8.1G  0 part
    ├─sda4   8:4    0     1K  0 part
    ├─sda5   8:5    0  68.5G  0 part /
    └─sda6   8:6    0   5.8G  0 part
    sdb      8:16   0  14.9G  0 disk
    └─sdb1   8:17   0  14.9G  0 part /media/SergKolo/SERG
    sr0     11:0    1  1024M  0 rom

Identify which partition is what, e.g, by size, i know /dev/sda2 is my Windows 7 partition.
execute sudo mount /dev/sda2 /media/SergKolo/
If step 3 successful , you now have folder in /media/SergKolo which will correspond to windows partition. Navigate there and enjoy
Comment: If you like this answer, rate, comment and subscripe ! Oh, wait, wrong site ^_^ But simple upvote will do,too
Answer: Ok, this is the way I use to go to other partition where I have saved all my data...
   cd ..

This goes to the previous directory.
After this, I am on the home folder, so I execute once again cd .. to go to the / directory, once I'm here I execute
cd media

Here you have all your mounted partitions, just execute:
ls

and choose which partition you want to get in, and:
cd partitionYouChoose

you may see here the name of a partition with many characteres like 997ac596-09ce-453b-8ccd-2120839ba825 or something like that.
I hope to help you.
Comment: Your first command is invalid since it has an open backquote with no command and no end backquote.  It does not take you to your home directory.  To do that it is simply `cd` with no arguments.  From there `cd ..` takes you to /home, not /.  If your goal is to get to /media, then you can skip all of that rigamarole and just `cd /media`.
Comment: Just a suggestion to improve your answer: the partition actually has to be mounted in order to navigate to `/media` folder.
Answer: Ok here is how you do it.
Log into ssh as the root user.
You'll see this:
root@yourserver [~]#

Ok so if you saw that [~] then you are root. But it also means /root.
In other words, [~] = [/root]. †
Now to get to the other partitions, such as a second hard drive, first you need to find out what partitions you have. Find this by putting lsblk
root@yourserver [~]# lsblk

For me, it game something like this:
sda                  8:0    0 931.5G  0 disk
├─sda1               8:1    0   250M  0 part /boot
└─sda2               8:2    0 931.3G  0 part
  ├─vg-root (dm-0) 253:0    0 915.5G  0 lvm  /
  ├─vg-swap (dm-1) 253:1    0  11.8G  0 lvm  [SWAP]
  └─vg-tmp (dm-2)  253:2    0     4G  0 lvm  /tmp
sdb                  8:16   0 931.5G  0 disk
└─sdb1               8:33   0 931.5G  0 part /mnt/home2

Ok, so here in this setup which I simplified above, all you need to be concerned about is the sdb1 which is the second partition (I have more drives but I removed them from the output above for this answer).
For me, sdb is a second hard drive, but you can do the same thing if sdb is a second partition. It essentially functions the same.
Next, you need to get out of the root folder. Do this by doing the following:
root@yourserver [~]# ../

Now you will be here:
root@yourserver [/]#

Notice that [~] became [/]
Next, you need to enter your mounts folder. You can know what this is because if you look at the lsblk above, you can see at the bottom left that sdb1 is located in the /mnt/ folder. This folder might be different for you. If so just put whatever name is there.
Finally you are ready to enter the new hard drive or new partition. cd enters a folder.
root@yourserver [/]# cd mnt

Now you are here:
root@yourserver [/mnt]#

Make sure you're in the right place. Enter the following:
root@yourserver [/mnt]# ls

Now your output might look like this.
./  ../  home2/  secondary/

If you see the directory on the new drive or partition, you're in! Now just cd to the right place. Example (-lh flag means human readable):
root@yourserver [/mnt]# cd home2

Great! Now you're rolling! Now you can display the contents of your desired folder like this:
root@yourserver [/mnt/home2]# ls -lh

You might get an output like this:
total 32K
drwxr-xr-x   5 root      root      4.0K Mar 12 14:09 ./
drwxr-xr-x.  4 root      root      4.0K Mar 12 14:00 ../
drwx------   2 root      root       16K Mar 12 13:58 lost+found/
drwx--x--x  12 myfolder1 myfolder1 4.0K Mar 12 11:33 myfolder1/
drwx------  11 root      root      4.0K Mar 12 14:09 myfolder2/

Okay, I think that covers the scope of this question, you can take it from there! Good luck! :)
† Side note: (proof of this is to [~]# cd ../ and then [/]# cd root and now you are back in [~]#)
Debug info:
These instructions were written for a CentOS 6.5 system which is using cPanel/WHM and has a second hard drive.


Logic: variable names and quantifiers

Question: Good mornig to all of you.
If I have a formula like $( \exists x ) ( P(x) ) \land ( \exists x ) ( Q(x) )$ this means that $x$ is the same? I try to be more clear with an exemple. If I have $\exists x ( x-2=0)$, this is true since $x =2$ satisfies $x-2=0$. If I have $\exists x (x-3=0)$, this is true because $x=3$ satisfies $x-3=0$. But what if I have $\exists x (x-2=0) \land \exists x (x-3=0)$. Is $x$ the same? Can I choose if $x$ is the same or not? Is $\exists x (x-2=0) \land \exists x (x-3=0)$ true or false? Beacause if $x$ has to be the same, then it is false.
Thanks.
Comment: As they are quantifiers for different statements, they can be different $x$'s
Comment: @Adam Karlson So the variables can have the same name but I have to think them as two different variables? This means that $\exists x (x-2=0) \land \exists x (x-3=0)$ is true?
Comment: @rookie_of_math Yes, $(\exists x)(x - 2 = 0) \land (\exists x)(x - 3 = 0)$ is true.
Answer: The issue here is one of scope: parts of a formula where variables refer to the same thing. Scope also shows up in computer science where we can reuse variable names in different subroutines: the same letter refers to something completely different in those different subroutines, and is treated as if it had a completely different letter.
In a formula like $\exists x: (x-2=0) \wedge \exists x: (x-3=0)$ there are two separate variables referred to as $x$. Their scopes are:
$$\exists x: \underbrace{(x-2=0)}_\text{scope of first} \wedge \exists x: \underbrace{(x-3=0)}_\text{scope of second}$$
We can associate a variable that isn't free with its quantifier, and each separate quantifier gives a different scope. In order to determine which quantifier a variable goes with, work your way up the parse tree of the formula until you hit a quantifier. If the variable is free its scope is the entire formula*.
*Unless the variable is quantified over within the formula.
Answer: They are different variables which just happen to have the same name.
The sentence is equivalent to $(\exists x)(x - 2 = 0) \land (\exists y)(y - 3 = 0)$.
If you would want to denote the same variable, you would have to use only one quantifier like so:
$$ (\exists x)(x - 2 = 0 \land x - 3 = 0).$$
Note that in this sentence you cannot rename the one of the two occurrences of $x$, while in the previous case you could.

Edit after comment from rookie_of_math:
It is only a coincidence that the two formulas with $\lor$ are "compatible". Still, they are different:

In the first case, you can choose two different numbers, test if the 1st number satisfies the first formula, then test if the 2nd number satisfies the 2nd formula.
In the second case, you can only choose one number and test it with the 1st and the 2nd formula.

To make the distinction clearer, the solutions to the first formula are:

$x = 2$ and $y$ any number
$y = 3$ and $x$ any number
$x = 2$ and $y = 3$

The solutions for the second formula (with one quantifier) are:

$x = 2$
$x = 3$

In general, using two quantifiers is different from using one, as the example with $\land$ illustrates better. The question is "What do you want to express?". If you want to talk about only one entity/number, then you should use only one quantifier. If you want to talk about two entities, then you use two quantifiers.
Comment: It may also worth noticing that, analogously, $\forall x(x\geq0)\wedge\forall x(x\leq0)$ and $\forall x(x\geq0\wedge x\leq0)$ are equivalent (indeed, both are flase), while $\forall x(x\geq0)\vee\forall x(x\leq0)$ and $\forall x(x\geq0\vee x\leq0)$ are not equivalent (indeed, the first is false, but the second is true, at least for the real numbers in classical logic). So by the basic principles of how quantifiers work, these are all different, but then some theorems of logic come in to tell us that some of them are nevertheless equivalent.
Comment: OK but I think I'm a little bit confused. I try to explain. If I have $\exists x (x-2=0) \lor \exists x (x-3=0)$, I have a similar formula, I just changed $\land$ with $\lor$, so again I can say that it is equivalent to $\exists x (x-2=0) \lor \exists y (y-3=0)$, like you did. But I know that in this case I can write $\exists x (x-2=0 \lor x-3=0)$. So how is it possible? How are these formuals in this case (the case $\lor$) compatibale each other?
Comment: @rookie_of_math I've edited my answer. Note that in the formula $(\exists x)(x - 2 = 0 \lor x - 3 = 0)$, again you cannot rename the second occurrence of $x$, just like in the example with $\land$.
Answer: The parentheses after the quantifier indicate the scope of the quantifier: within that scope, all references to the variable being quantified refer to the same object. Outside that scope you can reuse that variable, but it can denote something different.
The same is going on in English expressions, if you think about it. Consider: "Something is big, and something is blue". Sure, I use the very same word "something" twice, but clearly the first "something" can refer to a different something than the second "something"

Logic: variable names and quantifiers


Video camera exposed to lightning in clouds

Question: Suppose you are sitting outside in the dark and the video camera in the mobile is ON. If the clouds are lightning again and again, will this damage the video camera? As our eyes can get damaged by light (not thunder but maybe very intense light), I thought maybe the mobile camera can get damaged too.
Answer: Basically, no.
Of course there is some luminous intensity above which the cell sensor will die, but I don't think Lightning will get there.

Lightning only lasts about 30 micro-seconds so the absorbed energy per pixel is actually quite small
You observe lightning from a great distance (intensity drops off at the square of the distance)
The PRP (pulse repetition period) is extremely high compared to the pulse-width (e.g. low energy waveform)

Let's do some math...
According to the National Oceanic and Atmospheric Administration (NOAA) the average lightning bolt contains enough energy to light a 100W incandescent bulb for 3 months.

That's almost a billion (777,600,000) Joules of electrical energy

Only a small fraction of that energy is converted to optical energy (light), just like the incandescent (~3%).

16 lumen/Watt,electrical
1/683 lumen/Watt,optical
2.35% Watt,electrical --> Watt,optical
~18,200,000 Joules,optical per lightning strike (typical)

Assuming you are 1km from the lightning bolt (VERY CLOSE!), the emitted optical energy is spread over the surface of a sphere

100,000 cm in 1km
Area = 4 Pi r^2 = 125,660,000,000 cm^2
Irradiance = Energy / Area = 0.00015 Joules,optical/cm^2

Here is the human eye safety limit for collimated polarized light.

The average lightning bolt lasts 30 microseconds (same NOAA citation used above). Therefore the maximum safe irradiance from a lightning bolt is:

.035 * 30e-6 = 3e-7 J/cm^2

The cell phone sensor (let's use an iPhone1) has 2048 pixels in 0.358 cm:

1/(2048/0.358) = 1.75 micron width of a pixel
= 1.75^2 micron^2 area of a pixel
pixel area / illumination sphere = 2.43e-19

The amount of the original almost billion Joules of electrical energy that reaches an individual pixel in your imager is about 1/2.43e-19 times smaller!

4.43e-12 Joules,optical/pixel

Therefore you are below the human damage threshold by five orders of magnitude. Even if we assume the full electrical energy of the bolt was light you get:

2.43e-10 Joules,optical/pixel

Still three orders of magnitude too small.
Cell phone sensors can withstand greater intensity than the human eye without damage since they can handle internal temperatures in excess of 125C which the human eye can, obviously, not.
Cell phone sensors are also a lot less sensitive to light than the human retinal cells, furthering their withstanding ability.
You can recalculate for being even closer to the lightning bolt and for farther away by recomputing with the equations above.
Expanding the assumptions
Optics is tricky and in the analysis I made a few assumptions that could be expanded to clarify.
Intensity reduction
One commenter bizarrely states:

"Intensity doesn't drop with distance"

Nope. Physically impossible for non-collimated sources. You can prove this to yourself by observing the lightning bolt from different positions. If you can walk around the lightning bolt and still see it, it's an approximate isotropic radiator (emits light in all directions). Given that lightning is a highly chaotic process involving the production of plasma (high-energy random motion), this is expected.
The camera cannot collect the light (energy) emitted in directions that do not point towards the camera. Therefore, the intensity, just the energy available over the area in which it is captured, will decrease with (the square of) distance in a loss-less medium.
The energy impinging the area of the camera represents an ever smaller quantity of the total illumination sphere of the lightning bolt as you back away from it.
The effect of the lens (focusing)
I modelled the lightning bolt as a point source and disregarded the lens of the camera. The lens has an almost insignificant effect. Let's put the lens back in and assume it's perfect (no spherical or chromatic aberration, perfect installation, and loss-less).
First lets validate the point-source assumption. Typical lightning bolt strikes from about 6,000 feet (~1.8km) to the ground and is 1 inch (2.54 cm) in diameter.
Standing 1km away you would need a camera with at least a 61 deg field-of-view, a requirement which our example iPhone1 camera meets. The camera therefore catches all of the light from the bolt radiated in its direction.
To validate our point-source assumption, we need to show that the total light reaching the camera from a single on-bore source is equivalent to the total light of a set of weaker point-sources distributed along the path of the bolt. To clarify the math, I'll model the lightning bolt as a straight arcing (uniform radial distance to the camera) line and the lens in a 2D plane (but the extension to 3D -- e.g. 2D image plane -- is logically trivial).
$$
\mid I \mid = \frac{P \cdot A_{total}}{n \cdot A_{lens}} n
$$
That is to say that if we divide the lightning bolt into n-many points of light, distribute them along its length, and reduce their intensity by n (evenly distribute the output power among the points), the total intensity of the light on the lens is the same as if radiated by an on-bore point-source (assuming the lens can see the whole extent -- arc length -- of the lightning bolt).
The effect of the lens becomes:
$$
\mid I \mid = \frac{A_{lens}}{A_{sphere}\cdot n_{pixels}}
$$
The number of effected pixels is a function of the composition of the image (how much of the frame the lightening bolt covers), the size of the bolt (width and height), and the distance of the observer (how close are we?!).
Rather than roll-up all of these parameters, I took a sample set of lightning photographs (example) taken under approximately these conditions, threshold filtered them, and averaged the number of white pixels. Approximately 5% of the sensor pixels are covered by the lightning bolt.
For the iPhone1 camera with lens area approximately 0.1 cm^2, the capture ratio on an illuminated pixel is 7.48e-18 -- for a lens focusing gain of only about 31x. Given the magnitude of the margins, the focusing/lens just doesn't play an important-enough role.
On the origins of damage

[you assume] the damage caused by optical light would be by radiative heating

That's a perfectly fine assumption (a lot like assuming there is gravity). Heat transfer is really all energy transfer is. You can read more about CMOS sensors and how damage occurs here.

and that a device that can withstand a higher temperature than an eye is necessarily more resilient,

Given that damage comes from heat transfer, withstanding greater heat transfer is by definition more resilient.

also that being less sensitive would make a device more resilient

This deserves some nuance, but not really that important given the other factors. Being less sensitive requires that you are less reactive to or less absorbing of the phenomenon of interest. In the general case, that implies less energy transfer, because the assumption is that the phenomenon is taken in isolation (ceteris paribus). In practice, there are alternate parallel mechanisms, so it may not hold.
Comment: Nice analysis. If you are getting closer to a thunderbolt, I'd start to worry more about the EM-field (and my personal safety) than dead pixels in a camera.
Comment: i love this and a lot of work went into it, but it contains several nonsequiturs, that the damage caused by optical light would be by radiative heating, and that a device that can withstand a higher temperature than an eye is necessarily more resilient, also that being less sensitive would make a device more resilient...
Comment: I agree with the conclusion, but one flaw in your analisys is that you ignored that the light is focused. That means the intensity doesn't drop with distance, only the area of the projected image. The intensity of the smaller bright spot remains the same. Still, the luminous diameter of a lightning bolt is probably small enough to be less than a pixel when projected, which would make your analisys correct again. In other words, you are probably right, but you should at least mention a obvious and possibly important effect like this.
Comment: 1.75 um for pixel size not 175 um newer sensors are 1.4 um and even 1.2 um
Comment: @rawbrawb -- doh! typo. The math is right though.
Answer: No, the light from lightning will not damage the video sensor in your phone.
Comment: I'm not sure this is definitively true. There is video of concert light-show lasers damaging the CMOS sensor of Canon 5D2 cameras on the internet. Considering that this demonstrates excessive light *can* damage *some* sensors in certain situations, it's distinctly possible that lightning could replicate the event. Of course, it's probable that to get enough light to damage the sensor, you would have to be ridiculously, dangerously close to the lightning, bus it's a possibility.
Comment: A laser and lightning are two very different things. There are special precautions that must be taken when using those light show lasers, and stupid things still happen.
Comment: The 5D2 also uses much larger and faster (read: collects more light) lenses and has bigger pixels (read: greater insolation per pixel) and laser light is collimated and polarized, whereas lightning is not.
Comment: Remember that coherent (laser light) is not entirely the same.  The coherent nature and focused beans makes it easy for a lens (or eye) to focus the beam precisely causing thermal damage to the sensor.  A bright flash from lightening is probably not concentrated enough to cause the same level of damage.


How much does one have to contribute to be considered a co-author (and therefore listed as such)?

Question: I am currently doing undergraduate computer science (machine learning) research, and I'm wondering how much one has to contribute to be considered a co-author (and therefore listed as such)? I've found that, during my research, questions often arise – questions for which I don't know where to look, or what I'm even looking at, but suspect that specific professors would (such as mathematics professors). If I occasionally email various professors and ask them questions (for instance, if what I've come across looks like it might be an optimization problem, then I'll email a professor who is doing research on optimization), then would this be considered sufficient contribution to be listed as a co-author?
Answer: This differs widely by field. The general principle is (or should be) that co-authors contribute to the intellectual content of the paper. The actual ideas that make it worth publishing.
But there are fields, such as high energy physics where nothing can get done without the participation of a lot (lot) of technicians. They sometimes get listed as "authors". But people in that field understand the intent. The first few authors came up with the ideas and framework. The rest actualized it in some sense. There are a few papers in which the list of authors is longer than the paper itself.
If you are asking general mathematical questions of experts to help you understand, then it is unlikely that they would warrant authorship. This remains true even if the questions are quite deep. If you ask them to help you prove the theorems or come up with important applications that you will include, then they probably do.
Comment: "If you ask them to help you prove the theorems or come up with important applications that you will include, then they probably do." Definitely nothing like that.
Comment: I didn't suspect that there was.
Answer: Answers to occasional queries don't call for coauthorship. Several important ones from a single person warrant an acknowledgment. Someone who reads your manuscript and makes suggestions as well as corrections might qualify: ask.


How to keep Sweden under control as Denmark

Question: Recently I have been attempting to do a Danish playthrough in vanilla EU4, and though I am able to diplo-annex Holstein, keep Norway's liberty desire at 0% and even expand eastward and take a few provinces from the Livonian Order, Sweden always seemed like a bucking bronco that wants to viciously tear away from their overlord at the first possible chance they get. My ultimate goal is to form Scandinavia, so I'm wondering what would be the best strategy to keep Sweden from declaring a war for independence just long enough for me to properly integrate them.
Answer: I suggest you read the EU4 wiki page if you want detailed information on what influences a subject nation's liberty desire (LD). What I consider the "easy to manage" factors would be as follows. Note that at any time you can go in your subject's section and hover your mouse over the LD number to get the more information of the current LD value.

Make sure your army is stronger than Sweeden's. They can get up to +75% LD if they ahve 100% of your army size (scales linearly).
Don't feed them any province. The highest development they have, the more their LD increases.
Make sure your Diplomatic Reputation is high. The lowest it is, the more LD you incur in your subjects. After annexing a subject, you suffer a -3 DR for a few years (10 or 15 if I'm not mistaken). This can hurt your relations with your subjects.
Keep high relations with Sweeden (always +200 if possible). Again, after annexing a subject, you get a penalty to the relations with your subjects (-30 or -50, I can't check right now).

I would suggest you buy the Common Sense DLC if you can/want. Among other things, it gives you more options when dealing with subjects (such as placating the subject's local ruler, reducing their LD by 10% at the cost of 20 prestige).
Comment: I truly despise Paradox's DLC policy right now, but common sense was definitely a must have for EU4. Thanks for the recommendation.
Answer: The key factor is fast expansion. I find the best way to do this is to get the "Danish Trade" mission at the start of the game and take Neva + Novgorod and Ingermanland before Muscovy takes them. These are valuable provinces and they allow you to get the trade flowing towards you from the East early on, which in turn enables you to keep an army that  is large enough to keep Sweden in check.
Once you have established yourself in Russia, make sure you get allied to Poland (hoping they have the personal union with Lituania) and slowly eat up the Russians to maintain your dominance over the Swedes. Combine this with some campaigns against Livonia and the Swedes will soon lose their desire to mess with you.
Important to keep in mind here is that you HAVE to let your Junior partners and allies do most of the fighting for you. If you let yourself get draw into big battles and lose a lot of men you run a substantial risk of dropping your power below what you need, in which case the Swedes will immediately withdraw their forces to their home turf and leave you to be beaten up on your own.
The events built into the game will still cause the liberty desire to peak over 50% incidentally, but this way you will certainly succeed in forming Scandinavia.


Flex Builder 3 design view, css not being applied

Question: I have Flex Builder 3 installed on two Windows machines and the same project on both of them. On one computer, the CSS styles I defined are shown in design view; on the other computer they are not applied. Is there any reason why it might not work on one?
Answer: Have you checked the preferences under Flex/Editors/Design Mode? That has a skin rendering option, could that be it?
Answer: Sometimes when I first switch to design view the CSS is not applied until I hit the refresh button.
Answer: The compiler probably uses by default the "Use the server's SDK" (Coldfusion??)
Right click the Project and select "Properties", select "Flex Compiler" and then select the correct SDK version. It has to be 3.x to be able to use the design view for CSS files.


How to improve the performance when doing rehash?

Question: At some point we need to increase the size of hash, and normally we just rehash, which leads to re-constructure of the whole hash.
Is there any better solution so that when we increase the size, we don't need to re-construct the whole thing?
Answer: You could use http://en.wikipedia.org/wiki/Extendible_hashing, although AFAIK it is used mostly for on-disk databases.
There are also general methods for smoothing out some amortised costs. Starting points for this would be http://en.wikipedia.org/wiki/Static_and_dynamic_data_structures and http://en.wikipedia.org/wiki/Dynamization. One application of this to hash tables would be to always keep two tables, one of size N and one of size 2N or so. When the smaller overflows, start creating a table of size 4N, but don't populate it straight away - populate it incrementally while using the table of size 2N. By the time the table of size 2N is full, the table of size 4N should be ready. For the special case of hash tables, extendible hashing should be better.
Answer: Any time you re-hash, there's nothing that says you need to actually re-hash. In fact all that you actually need to do is re-mod (i.e. shift everything's position).
If you cache the hash (hehe, sounds like the start of a dr. seuss book) then you only need to compute it once. So store the hash along with the actual data, and that will save you from needing to calculate the hash again in the future. However I'm assuming that you're not already doing this, you didn't exactly explain the current process.
<code>// Store these instead of the data directly. This assumes immutable data.
struct hashable_item
{
    data dat;
    int32 hash;
}
</code>


Is the morphism labeled by red rectangle injective?

Question:
Is the morphism labeled by red rectangle injective?
Answer: No it is not injective in general. For simplicity let's take $\mathcal{F} = \mathcal{O}_X$ and consider schemes instead of general ringed spaces. So we're looking at the equation above the one you boxed. Let $\mathcal{J}$ be a sheaf of ideals on $Y$, with an injective morphism of sheaves $\mathcal{J} \to \mathcal{O}_Y$. If the pulled-back morphism
$$
f^* \mathcal{J} \to f^* \mathcal{O}_Y = \mathcal{O}_X
$$
was always injective, then $f^*$ would be a left-exact functor and hence exact, but this is true if and only if $f$ is a flat morphism.
Thus to find a counterexample we need to find a non-flat morphism of schemes. The first example I thought of was the inclusion of the origin into the affine line, $\mathrm{Spec}(k[x]/(x)) \hookrightarrow \mathbb{A}^1_k$.


Has any other browser apart from Chrome implemented WebRTC as of now?

Question: Google has taken up the implementation of WebRTC in Chrome very seriously as indicated by the frequent updates in the Canary and Beta channel of Chrome. Are there any other browsers who are upto implementing this?
Comment: http://code.google.com/p/webrtc4ie/ - webrtc4ie is a WebRTC extension for Microsoft Internet Explorer 9 and later.
Answer: Firefox/IE/Opera are working on it. No word from Apple/Safari or Microsoft/IE, although IE is unlikely at best, because they're working on their own standard unfortunately. Crazier things have happened, but I wouldn't count on it. Apple has been fairly mum on the subject.
If you want support for those other browsers, we built a solution for it @ Frozen Mountain (I work there) using IceLink.
Answer: Opera Mobile does offer support to WebRTC. And according to this article, Mozilla isn't all that far behind either. Ericsson Labs has their own custom browser which supports WebRTC. But it runs only on Ubuntu as of now. WebRTC itself is still under development and I'm sure that we can see complete support from all major browsers in some time.
Answer: Mozilla is far along in implementing WebRTC, and we're leading the design and implementation of DataChannels within WebRTC, as well as Identity work.  We're working on a project-specific repo right now (alder), but pieces have already moved over into mozilla-central, such as initial support for getUserMedia.


Can you fix scratches in Little Tykes furniture?

Question: Little Tykes has thick plastic furniture and toys.  Is there a way to make them look new?  Buff, fill, what?
Answer: Buffing followed by acid etch (to restore texture).  Overall a pretty rough job.  You'll want to check the plastic type (found next to a 'recycling' symbol usually) for additional guidance.  LDPE is common.  Some people use heat guns, but for maximum potential entertainment value why not try a blowtorch?  LDPE is actually pretty hard to set on fire.
Comment: What would you use to buff it.  Give me a couple steps.  I can try it out on the back of something to see if it works.
Comment: A Dico Plastic Buffing Wheel BP40-4 would probably do it. Try a heat gun to get stuff soft and a cotton buffing wheel like the BP40.  You'll have to experiment to get the right mix of abrasion and effectiveness.  Once you get the rough edges off the scratches they may just well look "good enough".


Which is correct, "我对我的妈妈说很多话" or "我对我的妈妈说很多"?

Question: Can someone explain me which one is correct and why?
Comment: Both are correct, but "说**了**很多(话)" is better considering the tense.
Comment: it seems 对 can be replaced by 跟, see examples for "跟说" at jukuu (would 对 emphasize mother has to listen to speech by author? again see jukuu for examples for 对说)
Comment: @user6065 对 (to) implies telling and 跟 (and) implies two-way conversation.
Comment: Could there be users who do not know? It just seemed that the latter situation is the more common one for children talking to their mother.
Comment: Both are unnatural, just one of those things to do with good style
Comment: both the same meaning.
Comment: Putting aside the stylistic element and syntax which have already received some comments, the two sentences, IMO, actually have different meanings. The first is to say -- I have had a long conversation with my mother. The second, (which ought to be -- "...说了很多"), is to say -- I told my mother quite a lot already.
Answer: First, in Chinese if you don't want to emphasize "我的,你的,他的",we usually remove "我的",我对我妈说....or 我对妈妈说 is more natural.
Secondly, it should be added a complement "了" after the verb "说" to indicate the action is finished. So it could be 我对妈妈说了很多话。or 我对妈妈说了很多。
Finally, 说了很多话 means that you speak a lot "sentence" to your mother, while 说了很多 means you talk a lot topics or opions with your mother.
Answer: The first one seems to be more logic to the last one. But both of them are strange. I didn't get the point that what would you like to say.
To explain at least, the last sentence lacks object of verb "speak".
If they are declarative sentence, it's better to say 我对我的妈妈说了很多话 or 我对我的妈妈说了很多. Both of these are reasonable, but don't mean the same. The 2nd one seems to pull other points more, but 1st one didn't have this meaning.
It's complicated, wish that I've make it clearer to you.
Answer: Depending on the context.
說很多話 can mean that you habitually talk to your mother a lot.
說(了)很多 means you have said a lot of things (regarding a specific subject).
Answer: Actually, we often say it like this:

我和妈妈经常聊天

or

我对妈妈讲了很多

We usually drop the term 我的 if it is implicit but clear and unambiguous.
Answer: in most cases they are the same. Chinese has omissions of objective, that is, many verb has the most frequently used objective, like 说(话) and 吃(饭), so if you just use 说/吃 without objective, the objective could be regarded as 话/饭 by default.
Answer: Which one is correct depends on the meaning you want to emphasize. To me, if the sentence is too long, I separate it into sub sentences. And if you still want to use the word my in the sentence. Thus, I would say:
很多的话 我对我的妈妈说了
But this can have another meaning than you wanted to emphasize. You can edit your question with your meaning what you wanted to say.


Web-server after another computer

Question: I have main computer with 2 network cards: one from internet, another -> to next computer with web server. DNS points several domains to my static IP, I want to serve them by second computer. How to manage all this. I guess I need some proxy server?
Answer: DNAT (port forwarding) should work if you only want to put one webserver behind the bastion host. This would be my choice for a linux bastion host with a single webserver behind it.
A quick google should give you a recipe.
You could also use a reverse proxy or proxy passing, which is probably the route I'd take if I wanted multiple webservers behind the bastion.
Answer: Enable IP forwarding and NAT static_ip:80 to next_computer:80 in iptables.
In /etc/sysctl.conf
net.ipv4.ip_forward=1

Iptables
iptables -t nat -A PREROUTING -p tcp -d <static_internet_ip> --dport 80 -j dnat --to-destination <next_computer_ip>:80

Answer: reverse proxy would also be a good solution if you wish to cache some content and have the actual webserver less loaded

Web-server after another computer


ssh is not interactive

Question: I recently deployed a new website on a VPS thingy using a stackscript, and everything went well. It set up ssh to use my public key and everything. However, when I connect to the server with ssh, I can't TAB to autocomplete, and I can't use the up arrow to pull up previous commands. I've used ssh before and never had this problem. What configuration is responsible for this, and is it safe to change?
Answer: It is most likely the shell you are using - ie not something like bash that you are used to. Try the command chsh to change your shell.
Answer: The features you're looking for are not part of SSH, they're part of the shell that's run automatically for you when you sign in with SSH. You can run echo $SHELL to see which shell you're currently using. I'm going to assume that you're used to using the bash shell so run bash and see if it behaves like you expect. If it does, run chsh and set your shell to '/bin/bash'. Next time you log in bash will be started for you.
Answer: Check the /etc/passwd.
Your use must be use /bin/bash in your shell options.
BTW, you always can use this features typing bash in your console

ssh is not interactive


Is it possible to pick a vehicle as your commander?

Question: I'm making a commander deck, I've never played or deckbuilded in this game mode.
I've run across the Parhelion II card and I was wondering if it could be my commander. I know it's not a creature, but since planeswalkers can be commanders, I don't know if the vehicles can or can't be used as commander.
Answer: Nope, it can't be used as a commander. And for the record, most planeswalkers can't be used either; only those who explicitly state that they can. It's stated that way in the Comprehensive Rules:

903.3. Each deck has a legendary creature card designated as its commander. This designation is not a characteristic of the object represented by the card; rather, it is an attribute of the card itself. The card retains this designation even when it changes zones.
Example: A commander that's been turned face down (due to Ixidron's effect, for example) is still a commander. A commander that's copying another card (due to Cytoshape's effect, for example) is still a commander. A permanent that's copying a commander (such as a Body Double, for example, copying a commander in a player's graveyard) is not a commander.

903.3a Some cards have an ability that states the card can be your commander. This ability modifies the rules for deck construction, and it functions before the game begins. See also rule 113.6n.

Of course, Commander is a casual format, so if your playgroup likes your idea of a Parhelion II Commander deck, they might allow it as a house rule.
Comment: +1 for casual format mention. Make the deck. Use it. **BUT**: always have the conversation before the game starts, especially with people you've never played with before: "Hey, y'all: I have this deck that I've made that uses Parhelion II as the commander. Is everyone cool with me using it? If not, that's totally fine, I have  that can also be the commander," then shuffle up and play.
Answer: While you cannot pick that specific vehicle as your commander, you can pick Shorikai, Genesis Engine, released in Neon Dynasty Commander after this question was posted. It is a Vehicle that can be your commander via an explicit rules text clause. Plus, its colour identity is blue-white, so you can include Parhelion II in a deck with it.


Showing polynomial $p(x) = x^2 −3 \in\mathbb{F}_7[x]$ is prime in $E[x]$ and $x^3 - 2\in\mathbb{F}_7[x]$ factors into linear terms in $E$

Question: Here we define the set of equivalence classes $E[x] = \mathbb{F}_7[x]/(x^3 - 2)\mathbb{F}_7[x]$. I'm not sure if showing $p(x)$ is prime is equivalent to showing that it is a primitive root of $E^\times$? I'm not sure how to do either if that's the case.
Answer: (As a general rule, you should restate your question fully in the body, and not split it between title and body.)
Following you, I call $E$ the ring $\Bbb F_7[x]/\langle x^3-2\rangle$. Note that $x^3-2$ has no roots in $\Bbb F_7$, so is irreducible, so that $E$ is a field; you may think of $E$ as $\Bbb F_{7^3}=\Bbb F_{343}$.
I'm going to name $\xi$ as the image of $x$ in $E$. You might as well think of $\xi$ as a cube root of $2$. Accordingly, every element of $E$ can be written $k+m\xi+n\xi^2$ for elements $\{k,m,n\}$ of $\Bbb F_7$, in other words integers between $0$ and $6$ inclusive. Thus every equivalence class is of the form $(k+mx+nx^2)+(x^3-2)\Bbb F_7[x]$.
In the ring of polynomials over $E$, you don't want to call the indeterminate $x$; I'll call it $T$, so we're interested in factoring $T^3-2$ in $E[T]$, and since one root is $\xi$, the factors are $T-\xi$ and what you get by replacing $\xi$ there by its product with (nontrivial) cube roots of unity. Fortunately these are already in $\Bbb F_7$, and represented by integers. So the complete factorization is $T^3-2=(T-\xi)(T-2\xi)(T-4\xi)$, which you should check.
I think that takes care of everything except your questions about $T^2-3\in E[T]$.
Your first question about $T^2-3$ is whether it's prime, i.e. irreducible, in $E[T]$. Here, you are asking about square roots of $3$; since there are none in $\Bbb F_7$, the question is whether $3$ has a square root in $\Bbb F_{343}\cong E$. If not, $T^2-3$ is still irreducible (prime) in $E[T]$. Notice that $3$ is a primitive sixth root of unity in $\Bbb F_7$, so its square root will be a primitive twelfth root of unity in its extension field, whatever that may be. But the order of $\Bbb F_{343}^\times$ is $342=2\cdot3^2\cdot19$, not divisible by twelve. So $T^2-3$ is still irreducible (prime) over your larger field.
Finally, you ask whether $\xi^2-3$ has order $342$ in $E^\times$. This is quite separate from the other questions; that order is indeed $342$ (by a method I don't want to go into), but this does seem to be totally unrelated to the fact that $T^2-3$ is prime in $E[T]$.
Good luck to you. I hope this answered your quesitons.


Perfect hash function

Question: Is a perfect hash function always bijective ?
  In Wiki  "In mathematical terms, it is a total injective function" but it does not mean, that it is bijective.
Comment: Please note, that what you refer as a perfect hash is **not a perfect hash in a cryptographic sense**. A perfect cryptographic hash is random oracle and that is almost never injective. The Wikipedia article refers to hashing for non cryptographic purposes, e.g. database lookup. And that is a complete different story.
Comment: If the input domain is larger than the output, how could it be bijective?
Answer: No, it is not always bijective.
A perfect hash guarantees that no two inputs (from the set of valid inputs) collides, so it is clearly a 1 to 1 mapping.  However, in the case where the output range contains more possible values than there were valid inputs, there will be outputs which do not map back to inputs.  hence it is not bijective.
If you restrain the problem dramatically, and define the range of the outputs to be "the set of outputs attained from valid inputs," then you could argue it is bijective because you have constrained the output sufficiently to make such a claim.  However, it would be up to you to explain why this very particular output range is a valid one for whatever topic is being discussed at that time.
Answer: The injective hash function wikipedia referes to is not a secure hash function for cryptographic purposes.  It is a hash function used for fast database access.
An ideal secure hash function is a random oracle and a random oracle is not injective with very high probability.
Comment: It sounds like you're referring to an ECB-mode encryption of data for quick lookups, but this still has all the pitfalls of ECB (identical plaintext maps to the same ciphertext). Using a simple cryptographically-secure ***keyed*** hash of data for this would likely be more secure: https://security.stackexchange.com/a/239565/25009
Answer: Depends on how you define the function. A perfect hash function is a bijection from an input set onto a set of integers. However, that set of integers is not necessarily a continuous range, unless you have a minimal perfect hash function.
So if you define the function as mapping a particular set to e.g. $\mathbb{N}$ or $[1, n]$ where $n$ is larger than the size of the set, it is not a bijection.

Perfect hash function


Invoke a class only once using flow or Login flow

Question: Guys I have a requirement to execute a piece of code only once. I created a flow to call a invokable method and called this flow from login flow. This was working fine and the code is being called only once. The issue here is when a newly registered user tries to login into the application, instead of redirecting to the user to the default page(visualforce tab based on user profile) an intermediate page("Your Flow Finished" page of the flow) is being displayed. This happens only during the first time login or if there is any change in the flow. Is there any way to stop or avoid this behavior? Is there any other approach to invoke a class only once.
Answer: Use of static variables might be an option to do this. Declare a static variable in a class and set it to false on declaration. Every time you enter the flow check the value of this variable before, enter the flow only if this value is false.
Once your flow begins set this variable to true. So that when the code tries to invoke the class for a second time it detects that the code has already run once and prevents running again. Hope this helps.
Thanks
Comment: Stygon, thanks for the quick reply. Using the flow I am able to achieve the one time execution requirement. But the problem with this approach is during the first time login im getting a flow finished page which is not reproducible when i login next time. I want to suppress this page if im going to use the flows. Else I need any other approach to execute code during login.
Comment: Just a suggestion, when a user finishes the flow successfully for the first time - you could set a boolean field in the user record true. Based on this field value now you can decide to redirect the user to the home page.
Answer: You're looking to set the LoginFlow_FinishLocation variable...
LoginFlow_FinishLocation - String type. Setting this variable will determine where to send the user when the flow completes.   [https://developer.salesforce.com/page/Login-Flows]
You need to set it with an Assignment element to make it go - but yeah, thats the way to do it.


What is the best view to decide a run out?

Question: In cricket, what's the best angle to view if a batsman is out or not out in a run out scenario?
Is it from an angle where the umpire runs to (so on the sides) or is it from the bowlers' end?
Answer: When judging  a run out the best position is viewed as being level with the popping crease and in position to see the wickets being broken as well, at the end the ball is being thrown.
Now lots of umpires including me suggest that at times a better view is gained by being at a 45 degree angle with the batsmen running towards you and the line.  This is best used when you don't have time to get to the square position.
An important factor in position is that the human eyes have poor image stabalisation and so you will always be best standing eyes still and level to make the decision


Why $\sum(x)$ is greater than $\int x \, dx$

Question: I studied that difference between integration and summation is Summation is evaluated on discrete values while integration is evaluated on continuous values. If we consider a strictly increasing function like $f(x)=x$, $\sum_{i=1}^2 x=3$ is greater than $\int_{i=1}^2 x=1.5$ but according to above statement Integration value should be more since in integration every small value is adding up to the sum. But it is not happening. Am I going wrong with basic definitions of Integration and summations?
Comment: You can interpret the sum as an area under the 'curve'. Try to figure out what is this curve in your example.
Comment: Here, curve is y=x and area made by y=x with x-axis between the interval 1 to 2 is 1.5 which is equal to integral of x from 1 to 2. But my doubt is, does integral of x from 1 to 2 mean summation of x for 1,1.000001,1.000002,....2 is same?
Comment: @SaiSatwikKuppili no the curve is a staricase
Answer: Actually you are treating unfair and $\sum_{x=1}^2x$ (a sum of $2$ terms) should be compared with $\int_0^2xdx$ (an integral over $2$ intervals of length $1$).
But also then:  $$\sum_{x=1}^2x=3>2=\int_0^2xdx$$
More generally:
$$\sum_{x=1}^nx=\int_0^n\lceil x\rceil\;dx>\int_0^nx\;dx$$ because $\lceil x\rceil> x$ almost everywhere.
Answer: You want an explanation of $\sum_{k=1}^n k>\int_0^n x dx=\sum_{k=1}^n\int_{k=1}^k xdx$. It suffices to show $k>\int_{k=1}^k xdx$, i.e. the height-$k$ width-$1$ rectangle is larger than the trapezium under $x$ from $x=k-1$ to $x=k$. From a diagram, that's trivial. More generally, integrating an increasing function gives such a rectangle-exceeds-area result.


Calculating expected loss using actual probabilities

Question: I'm calculating expected loss on fixed-income using actual default probabilities and risk-free rate as the discount factor. I understand this is not theoretically correct. In absence of risk-neutral probabilities, are there any alternative rates I can use (besides risk-free rate) as the discount factor?
Answer: Yes, I solve this in a paper I am about to submit.  It is important that you understand what it means to say "actual probabilities."  Most people use Pearson-Neyman type statistics and they do not and cannot give rise to actual probabilities except in the narrow case of "exact" tests when the null is actually true.
The reason is that Pearson-Neyman methods use minimax distributions.  Minimax distributions are worst-case distributions, but they allow you to guarantee that you will not have false positives more than $\alpha$ percent of the time if your sample size goes to infinity.
The result is that any statistics generated are not coherent, with the technical definition of coherence being that a bookie offering to buy risks could not be gamed into taking a sure loss by a crafty actor or set of actors.  In essence, you can gamble on these probabilities and they will be the true probabilities, given the information available.  If you would use Pearson-Neyman probabilities then someone who is crafty would be capable of gaming your solution.  This is very surprising, but also true.
When Pearson and Neyman put together their system of thinking, which rolls into economics, they did not intend it to be used for gambling, but instead to direct behavior.  Should you keep the lot coming off the assembly line or reject the lot based on a sample?  It is a wonderful system when used as intended.
Let us begin by estimating the default rate and to simplify the argument we will drop things like logistic regression because they nicely add dimensionality, but detract from the simplicity of the explanation.  Note that the only thing that would change in this discussion is the form of the likelihood function and the dimensionality of the prior distribution.  How you would do it would change, but the logic is unchanged.
Let us also narrowly define what a default is, acknowledging that a wide definition would merely add dimensionality to the problem.  So, for example, in a real model, you would separately define the probability of a temporary suspension of payments, the probability of a permanent suspension with full recovery of principal, the probability of a permanent suspension with partial recovery and the probability of permanent suspension with no recovery.  For partial recoveries, either of interest or principal, then you also need to model the likely recovery given the type of default happened.
For our narrow discussion, we will pretend we live in an all or nothing world, wherein default results in no form of recovery.  In essence, this is now a Bernoulli trial.  Let us also make this a zero coupon bond so that we do not need to model separate defaults on each coupon.
I know I just shrank the problem down tremendously but there is no loss of generality.
You would then use Bayesian decision theory and there is no issue of either risk neutrality, risk aversion, loss aversion or risk loving preferences.  The first issue is to set the prior distribution.  A flat or non-informative prior is not a true credible solution as it would imply that the chance of default for a bond is equally 99% and 0.1%.  This would provide a 50% chance of default as the prior expectation.  That is ridiculous.
There are two ways to set a prior.  The first would be to observe actual historical rates.  Since we are dropping logistic regression we are assuming true independence of defaults rather than dependence on accounting values or the state of the economy.  In this pretend world we can get away with that.  Let us imagine that you found a large data set of one thousand observations and in that set, there was one default.  That would create a prior probability for $\theta$ where $\theta$ is the probability of default equal to $999(1-\theta)^{998}$ by assuming the prior is a beta distribution.  This may not be true, but for our purposes is very convenient mathematically.  If you have a better way to construct the prior, then don't do this.
To understand, this density is not the probability of default, but rather the probability $\theta=k,\forall{k}\in(0,1),$ where $\theta$ is the true chance of default.
A second solution could be to work backward from rates using relationships such as $i=r^*+p_h+p_m+p_d,$ where you would factor out inflation, maturity and the Fisher effect from bond rates.  There are other solutions too.  Let us stick with the simple one above though.
Now lets assume you buy a portfolio of 100 bonds and none of them default.  We are also going to assume you are not collecting outside data though the process would be the same as no one cares where the data came from.  Random sampling is not required here.  The binomial density is $(1-\theta)^{100}$.  The beta distribution above and the binomial likelihood would be multiplied together and normalized to a density.  The resulting density of $\Pr(\theta|data)=\frac{1}{1099}(1-\theta)^{1098}$ is the posterior density of $\theta.$
You are not interested in the location of the parameter, but rather, the probability there will be zero defaults, one default, two defaults and so forth.  To do this, you would integrate out any unknowns leaving only the knowns, which are the data and the prior knowledge.  This is often expressed as $\Pr(\tilde{x}|X)$, where $X$ is the data.
To solve this prediction you integrate out the uncertainty as follows:
$\Pr(\tilde{x}=k|X)=\int_\theta\Pr(\tilde{x}|\theta)\Pr(\theta|X)\mathrm{d}\theta$.  In this specific case, the solution is analytic and well known.  It is called the beta-binomial distribution.  If $\alpha$ are defaults, in this case, 1, and $\beta$ is surviving bonds, in this case, 1099, and $n$ is the future number of bonds purchased and $k$ is possible default levels, then you can construct a discrete mass function for each level and take the expectation.
The analytic solution is $\Pr(default=k|\alpha, \beta) = \frac{\Gamma(n+1)}{\Gamma(k+1)\Gamma(n-k+1)} \frac{\Gamma(k+\alpha)\Gamma(n-k+\beta)}{\Gamma(n+\alpha+\beta)}
                         \frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)},$ where $\Gamma$ is the gamma function for the mass function and then the expectation would be trivial to take as the chance of two defaults is very small.  You would then discount at the institution's marginal cost of funds, which is the deposit rate in the case of a bank.  There need only be a subjective cost of funds.  You end up with $$\frac{E(k)}{1+i}$$ where $i$ is the marginal cost of funds for the actor.  This is the present value of your expected losses, though not expressed as a rate.
The above outcome has a known solution in the literature.  It is $$\frac{\frac{n\alpha}{\alpha+\beta}}{1+i}=100/1100/(1+i)\approx{.09}/(1+i).$$  So in one hundred future bonds you would expect to lose nine hundreths of one bond.
Now, if I were doing it, I would ignore everything I just told you as it would make computation very costly unless I wanted to write a do loop and calculate the factorials in logs and invert the process.  For a large enough sample size, the normal approximation would be better to work with in theoretical work.  If I were serious about the computation then I would use Bayesian logistic regression because it does not have the assumption violations so well documented in Nwogugu at:
Nwogugu, Michael; Decision-making, risk and corporate governance: A critique of methodological issues in bankruptcy/recovery prediction models; Applied Mathematics and Computation; 2007;(185); pp. 178-196.
Still, you would take the expectation of the Bayesian predictive distribution divided by the subjective cost of funds.  It would just now be very complex due to the true dimensionality of the problem and you would almost certainly be forced to use a Metropolis-Hastings algorithm to solve the problem.
If you are not risk neutral, then you would not use quadratic loss as it assigns equal quadratically growing costs to the risk of mislocating the point estimate of $E(k)$ downward as upward.  If you were loss averse then you would underweight underestimates of $k$ and overweight overestimates of $k$.  This is why I said it may be easier to do with the normal distribution.  It may be easier to solve as a traditional risk aversion problem with something like CARA or CRRA.
There is a good book on both Pearson-Neyman and Bayesian decision theory at:
https://www.amazon.com/Decision-Theory-Principles-Giovanni-Parmigiani/dp/047149657X/ref=sr_1_1?ie=UTF8&qid=1510287077&sr=8-1&keywords=parmigiani+decision+theory
I do apologize that this is so long, but you would likely ask the question in a different manner if you were accustomed to thinking in terms of decision theory.  Also, you wanted to know about the actual default probabilities and not abstracted ones if the parameters were truly known at a risk-free rate.
In the real world, I used Bayesian methods to test 78 models of bankruptcy and found two that worked, although all are statistically significant.  All significance tells you is that the results are unlikely to be due to chance if the null is true, it does nothing to tell you how useful it is.


cdf of a "mixed" random variable

Question: If $B$ is a random variable following a known distribution (in my case $B$ follows a Pareto distribution with parameters $\alpha = 1.5$ and $\lambda = 1000$) and $R$ is independent of $B$ following a normal distribution of mean $0.08$ and standard deviation $0.2$. Is there any way to find the cdf of $X=B \times 1_{\lbrace R \leq -0.1 \rbrace}$. I tried a lot (by conditionning on the variable $R$) and it did not lead me to somewhere. Any hints?
Comment: The distribution of $1_{\{R\,\le\,-1\}}$ is Bernoulli with expected value about $ 0.1586553$.  No information about the distribution of $R$ beyond that is relevant here. ${}\qquad{}$
Answer: I'm assuming that's a simple product (and not, say, a cartesian product).
Let $\{A = 0\} = \{R\le -0.1\}$, and $\{A = 1\} = \{R > -0.1 \}$.
Let $P(A = 1) = p$
\begin{align}
P(X \le x) &= \sum_{i \in \{0,1\}} P(X \le x ~|A = i)P(A = i) \\
&= P(0 \le x) (1-p) + P(B \le x)p \\
&= (1-p) u(x) + P(B \le x)p
\end{align}
where $u(x)$ is the step function. You can play with the value of $u(0)$ to make the CDF left or right continuous, whatever your convention may be.
Comment: Thanks for your answer! So, from what I ve read, you're just using the total probability law. So independency is irrelevant here?
Comment: Well, in this case, it seems so. If it was say, addition instead, it would matter a lot more. Think of how you'd calculate the distribution of the sum of two independent gaussians.

cdf of a "mixed" random variable