Theoretic Mass Energy Conversion?

Question: say you had a large quantity of a heavy element such as uranium... AND you put a massive amount of energy into it, so that it began to undergo nuclear fission and transformed to a significantly smaller element(s). Would it be possible to use this energy to now begin a process of fusion, to output energy? And then once it's fused beyond a certain size, back to fission? Basically the idea is to extract back and forth as much energy as possible from the original sample.
Comment: Starting with a heavy element, the most energy you can extract is by reducing it to the most stable form of normal baryonic matter, which is stuff somewhere around iron on the periodic table. You could conceivably get to iron through running back and forth through cycles of fusion and fission, but in reality I think it would be very inefficient and take more energy than you got out. If you want to be really unrealistic, the ultimate theoretical limit would be to convert your input matter into a microscopic black hole and then extract the energy from the Hawking radiation.
Comment: Not really. Heavy fissionable elements are products of supernovae, not just simple fusion (the buck stops at iron IIRC). On a much smaller scale, there are fission-fusion-fission nuclear weapon designs but they don't make the full chain that you mention and are just a means to get more bang for the buck...
Comment: You can't get energy out of a transformation from A to B to A any more than you can get energy out of rolling a ball down a hill and then pushing it back up again. If you get energy going one way you have to supply energy going the other.
Comment: When we right now produce energy do we perform fission until we hit iron? Or do we stop earlier
Answer: The first iteration -- fission driven fusion -- is exactly what happens in thermonuclear weapons. There the energy released by fission of heavy elements is used to fuse lighter elements (in practice isotopes of hydrogen, maybe with the help of lithium). In staged nuclear weapons design this fusion energy could be used to additionally drive the thermonuclear (that is, fusion) explosion of a larger scale.
One can also foresee the second iteration -- the neutrons released by the fusion of deuterium and tritium used to power the fission reaction of U-238 (or other heavy element). The U-238 by itself is not fissile by means of ~1MeV neutrons released in fission but can be split by energetic 14MeV neutrons from D-T fusion reaction. That single step (fusion driven fission) is also exploited in the suggested hybrid reactor designs.
As to further iterations -- fusion of elements heavier than hydrogen or fission of elements lighter than uranium or thorium -- these, while possible theoretically and achievable in accelerators, are not usable for power generation either controlled (like in a reactor), or explosive (like a bomb).
Let us also note the theoretical limits for this type of energy extraction -- the nuclear binding energy (already noted in other answer) is one such limit for ordinary matter (composed of atoms).
Another limit is imposed by the conservation of baryon number: all nuclear reactions conserve it so the total number of nucleons is constant and maximum energy extracted would be only a fraction of $M c^2$.
In nature several processes provides energy conversion rates exceeding the nuclear binding energy for atoms without violating the baryon number conservation:

formation of neutron stars, which could be thought as consisting of neutron matter. Note that besides nuclear forces, gravitational collapse also releases energy.
hypothesized strange matter formations.

There are also theoretical models that allow total energy conversion through physical processes beyond the Standard Model of particle physics. For instance magnetic monopole predicted by some such models would be catalyst of proton decay. None of such processes has been (reliably) observed so far.
Finally black holes formation and their subsequent evaporation through Hawking radiation also totally converts mass to energy -- however the timescales involved are (much) greater than the current age of the Universe.
Comment: just for the sake of theoretical argument (and to fuel my curiosity), could a machine that makes, small black holes, feeds small amounts of matter, and quickly has them radiate, perform total mass energy conversion?
Comment: Yes. While looking at at wikipedia pages for Hawking radiation I noticed this [entry](http://en.wikipedia.org/wiki/Black_hole_starship) which discusses such energy conversion for propulsion. See original [paper](http://arxiv.org/abs/0908.1803) for discussion of finer points.
Answer: The nuclear binding energy goes as displayed there. You can see that if you start with a heavy element (right hand side of the curve) and breaking it into 2 smaller elements (center of the curve), you end up with more energy. Say you want to break it up even more. Then the left part of the curve drops. It means that you will loose energy doing so. As a consequence, when you fuse these elements, you will only gain exactly the energy that you lost before.
Note that, any machine you do will have a finite efficiency, so overall you will loose energy. The solution is to find the fuel in the nature around us.

Theoretic Mass Energy Conversion?


Difference between ARM7 and intel i3, i5 & i7 processors

Question: I am just starting out on a journey to understand microcontroller and microprocessor design. Have read briefly on their differences (ARM7 and Intel i3, i5 & i7).
Couldn't find any information on their differences in architecture.
for example, ARM7 has 21 external interrupt pins. but couldnt find definite information about intel's external interrupt pins.
or how On-chip static ram is 8 kb-40 kb, on-chip flash memory is 32 kb-512 kb, the wide interface is 128 bit, or accelerator allows 60 MHz high-speed operation for ARM7. couldn't find any corresponding information on intel's processors.
Comment: I think you're comparing apples with hotdogs here. A microcontroller with embedded flash memory,  SRAM &  peripherals is a very different beast to a PC microprocessor.
Comment: Take some computer architecture course in UDEMY/Coursera.
Comment: welcome to the world of buzzwords
Comment: Usually all the juicy details are in the Technical Reference Manual...
Comment: I recommend that you visit this [CARDIAC](https://vonkonow.com/wordpress/cardiac-recreating-an-educational-paper-computer-from-1968/) site and also pick up a book called Bebop BYTES Back: An Unconventional Guide to Computers. The first is from a Bell Labs pair of authors and is designed to teach bare machine programming, including bootstrapping ideas, to young students. The second provides a quick overview for self-study on computer architecture. Obviously, there are some very good textbooks. But these often need the support of a teacher/aides to absorb well.
Comment: you did not ask an actual question ... all you did is to describe what you are doing
Answer:
ARM7 has 21 external interrupt pins

No, a generic ARM7 has two external interrupts: IRQ and FIQ.
The problem here is "architecture" versus "implementation". ARM7 is an architecture. LPC2148 (for example) is an implementation of that architecture. The implementation has pins, cache, etc. You got that information from this page, perhaps?
Intel handle interrupts very differently. A datasheet for Intel. It has no external interrupt pins - instead it has a PCI-E bus, and messages on that bus can be translated into interrupts.
Comment: To be a bit pedantic, the ARM7 series are actual implementations. Confusingly, the series implements the ARMv3, ARMv4, and ARMv5 architectures. The ARMv7 architecture is split into A, R, and M for Application, Realtime, and Microcontroller. Implementations of the respective v7 architectures are, for example, Cortex-A15, Cortex-R5, Cortex-M4.
Answer: As @pjc50 noted, you are confusing architecture vs implementation. Also, the ARM implementation you noted is a microcontroller or SOC (system on chip). This is why it has RAM, FLASH, interrupt controller, etc. on chip.
On the other hand, the Intel chips mentioned are microprocessors. All that is on-chip is basically the CPU, cache memory and maybe on-board graphics. Everything else, interrupt controller, RAM, non-volatile storage, etc, is off-chip, in the "chipset", DDR RAM modules and external storage.
Comment: In terms of 'architecture', there's the ISA (instruction set architecture) which describes things like the register set and the available instructions. This is distinct from the actual hardware implementation. The Intel i3,5,7 all implement much the same ISA, but the hardware is different due to the market wanting a range of cost/performance options. Similarly with the ARM - the hardware implementation ranges from low end devices you might find in a watch all the way up to the likes of the Apple M1 which competes with the Intel offerings in terms of compute performance.


Why are atoms electrically neutral?

Question: I get the grade-school explanation that "the number of electrons equals the number of protons", but the electric field drops off with distance. If the protons are concentrated in the nucleus and the electrons are nebulously around the atom in orbitals, shouldn't the atom have a complicated electrical field that depends on both the position of the electrons and the distance from the nucleus?
Comment: At any point further from the nucleus than all the electrons, the field is $0$ by Gauss's law. Of course, quantum mechanics prevents any location being far enough with certainty, but the field is negligible even a nanometre from the mean centre of mass.
Comment: Electrons don't have positions. They can be modeled to exist in a shape around the nucleus, where you might find one if you were looking, but that doesn't mean *that* election *is* there. They are smeared out. So is their charge.
Comment: @JG Your calculation is only correct if the distribution of charge is spherically symmetric---which say, in the simplest "billiard ball" model of protons and electrons, is impossible. Using a "classical" interpretation of orbitals which is compatible with the question, we have the same problem for non-spherically-symmetric orbitals.
Answer: Being neutral does not exclude having an electric field. Any dipole is neutral but still has electric field. Your question is based on a wrong premise. "Neutral" simply means zero net charge. It does not mean no field. If you consider the average field, for a spherical symmetric distribution the field will be zero even though the negative charge is distributed over a larger volume. The instantaneous field may be non-zero due to the fluctuations in the charge distribution. This may produce an instantaneous dipole field. This is the origin of the Van der Waals force between neutral atoms and molecules. If the distribution is non-spehrical then a permanent dipole field will exist even though the net charge is zero so the system is neutral.
Answer: Atoms do have "complicated electric field", and occasionally may lose or gain a few electrons - in which case they are called ions. In fact, this happens all the time in chemical reactions.
However, most of the electron density is concentrated very close to the nucleus, so the nucleus charge is largely screened, and the atom can be seen as approximately neutral (even though the electron cloud of negative charge technically extends infinitely far, and for any finite sphere drawn about the atom, the positive charge inside is a bit bigger than the negative one.)
Answer: Atoms are usually too symmetrical to have notable or complex electric fields. But molecules are often not simple and neither are their electrical fields.
So, even though neutral molecules have the same number of electrons as protons, unless the molecule is very symmetric, there may be significant fields because the distribution of electrons is far from even. This is one of the reasons why chemistry is interesting (certainly far more so then the physics of isolated neutral atoms). Many of the most interesting properties of water (H2O, just three atoms) arise because the electrons are unevenly distributed giving the molecules an uneven field that causes major intermolecular interactions that are responsible for many of the unique properties of the vital liquid.
Even isolated atoms are not perfect in their distribution of electrons and no gas would liquefy if they were. The effects are far smaller than for many molecules, and understanding the detail requires a fair chunk of quantum mechanics, the but van der Waals attractions between atoms that cause gases to liquefy can be thought of as a consequence of fluctuations in the distribution of the electrons in the atoms (this is a little simple, but not grossly wrong).
Answer: As Roger Vadim stated, atoms do have a complicated electric field. But at such a scale, those effects are negligible.
(Talking from a classical point of view)
Consider the case of gravity on earth. The acceleration due to gravity(g) on earth varies with height. But the variations(to a certain height) are negligible and don't affect the calculations.
Answer: The total number of protons and the total number of electrons in the nucleus of an atom balance out the total positive and negative charges. This is why an atom is electrically neutral.

Why are atoms electrically neutral?


How can I create this graphic in inkscape?

Question: I want to create a 3d box, with a grid overlaid on the surface of the box, and have the grid have the same vanishing points. How do I do this? I am very new to InkScape.
Comment: Hi. Welcome to GDSE. Is the example what you want to achieve, or is it your failed attempt? Also note that Inkscape has very limited 3D capabilities. You might be better doing this in actual 3D software such as Blender, which is also free and open source.
Comment: Tiled boxes like these https://i.stack.imgur.com/RBeSc.png are easy to draw. There's no vanishing points because this is a parallel projection, there's no perspective. Can you accept it or should it be a perspective drawing? Know that if it must have a perspective and vanishing points, drawing equally sized boxes right in a 2D graphic program really needs descriptive geometry knowledge and then some more, if the boxes must be cubes.
Comment: (continued) This box https://i.stack.imgur.com/N2ZSA.png is built of equally sized cubes and drawn in 3D. The perspective makes every cube different. Drawing this right in Inkscape would be a nightmare, but it's not impossible. Mathematicians explored the math behind the construction hundreds years ago.
Answer: Inkscape has a dedicated tool for creating 3d boxes ( or Shift + F4 by default). I've found that it's really finicky and buggy, though.
Anyway, draw a box on the canvas, make all angles in the toolbar parallel and set them to something like X: 185 Y: 270 Z: 350 (or X: 175 Y: 90 Z: 10 in older verions). Adjust your box with the diamond-shaped handles.
Switch to the selection tool, select your box and set a stroke in the 'Fill and Stroke' dialog, or select some of its faces with the node-editing tool and set the fill color.
Enable snapping, snapping to nodes and snapping to cusp nodes in the snapping toolbar. Now make a clone of your box with Alt + D (duplicates seem to constantly lose their perspective information) and drag it next to your original box until it snaps two corners together. Repeat until you have the amount of boxes in the shape you want. You may have to adjust the z-order with the 'raise' and 'lower' buttons in the toolbar.


How to customize Sitecore's Layout service api url?

Question: The out of the box Sitecore layout service api seems to follow the format /sitecore/api/layout/render/<app>.
If I wanted to use a url of the like of /api/layout-service, is it possible to achieve this? Possibly through config updates alone?
Comment: Which version of JSS and which front end framework are you using? Is there a specific reason why you want to do this?
Answer: The big question is why you would want to do this; however, I can provide an example in which you might want to. In the past, I did this not to modify the original path, but to add another easier way to get layout service responses during development / testing (ex. /api/pages/path/to/page). I am not currently aware of a way to update this via config alone (haven't looked).
This post may be of assistance to you: NextJS: Short URL for Viewing Layout Service Response. In essence, you capture a request for the arbitrary path you want to support, and in the back end, you simply return the fetch result of the default /sitecore/api/layout/render.
Note that any custom modification / addition of different layout service endpoints can be a security vulnerability. Depending on how you do it and what your architecture is, be mindful of security implications. For example, in Next.JS, adding custom code under your /pages directory can expose raw layout service responses, which can be problematic in production environments.
Answer: Maybe this blogpost can help? https://gary.wenneker.org/sitecore-jss-using-a-custom-layout-service-configuration/
This is the markdown version of that blog:
Sitecore JSS: Using a custom Layout Service configuration
It's easy to change the output of the JSS Layout Service. You can either choose to use the out of the box Content Resolvers or build your own one as I have shown in my post Sitecore JSS: Extending the Layout Service. The outcome is that you need to define a Content Resolver and point it to your assembly and having your rendering making use of it. So far so good. But what if you have multiple renderings? Then you need to change them all to make them use your resolver. This creates the need of a global Layout Service Configuration!
Creating the configuration patch
The first thing you learn when you want to use the connected my is testing the configuration. This is done by accessing the endpoint /sitecore/api/layout/render/jss?item=/.

And we get the expected result from the Layout Service
Now I want to get the endpoint to use my Content Resolver for every rendering on my site. You need to do the following things:

Create a configuration patch file
Test the Layout Service configuration
Configure the app and client end point

JSS Configuration Patch file
The structure of the Layout Service is easy to explain. You need to set it up under /sitecore/layoutService/configurations/config. The configuration has two elements:

rendering - element holds the configuration for the placeholdersResolver, itemSerializer and the renderingContentsResolver. Tampering with the configuration of the two first ones will result in unwanted behaviour or even can break the JSS SDK. The renderingContentsResolver is the one I want to configure because I want to change the way the fields of my components are outputted. Because only data under the fields property has changed the structure stays intact and the SDK will not break.
serialization - this element has the configuration for the transformer. In my former post I didn't cover this piece of code. What happens here is that you can change the route part of the returned data. For me it was necessary to change the way the fields were returned.

It is a recommendation to use the ref attribute. It then "copies" the existing configuration and only alters the additions you do in your configuration. This way you will have less conflict when upgrading JSS in the future.
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
   <layoutService>
    <configurations>
    <config name="macaw">
        <rendering ref="/sitecore/layoutService/configurations/config[@name='jss']/rendering">
            <placeholdersResolver type="Sitecore.LayoutService.Placeholders.DynamicPlaceholdersResolver, Sitecore.LayoutService" />
            <itemSerializer type="Sitecore.JavaScriptServices.ViewEngine.LayoutService.JssItemSerializer, Sitecore.JavaScriptServices.ViewEngine" resolve="true">
              <AlwaysIncludeEmptyFields>true</AlwaysIncludeEmptyFields>
            </itemSerializer>
            <renderingContentsResolver type="Macaw.Sitecore.LayoutService.ItemRendering.ContentsResolvers.CustomRenderingContentsResolver, Macaw.JSS.Examples" resolve="true">
              <IncludeServerUrlInMediaUrls>true</IncludeServerUrlInMediaUrls>
            </renderingContentsResolver>
        </rendering>
        <serialization ref="/sitecore/layoutService/configurations/config[@name='jss']/serialization">
            <transformer type="Macaw.Sitecore.JavaScriptServices.ViewEngine.LayoutService.Serialization.CustomLayoutTransformer, Macaw.JSS.Examples" resolve="true" />
        </serialization>
    </config>
    </configurations>
   </layoutService>
  </sitecore>
</configuration>

Test the Layout Service configuration
But refreshing my endpoint did not give me the right result. Why?

The jss portion of this route refers to a particular configuration of the Layout Service, which is intended for use outside of JSS as well.

Looking at my configuration the name of it is macaw and not jss. This means I don't need to hit the endpoint /sitecore/api/layout/render/jss?item=/ but /sitecore/api/layout/render/macaw?item=/.

Configure the app and client end point
To make sure your app uses the right configuration you must add an extra attribute to your site configuration in your client solution and configure the client API in code. Otherwise it will try to use the jss configuration.
First add the layoutServiceConfiguration attribute and set it to your configuration name:
<app name="demo" layoutServiceConfiguration="macaw" sitecorePath="/sitecore/content/demo" useLanguageSpecificLayout="true" graphQLEndpoint="/api/demo" inherits="defaults" />

By default the service calls are still routed to the endpoint with the jss configuration and it is not done by the action above.
Diving into the server bundle I found out that there is a property called configurationName which is used to define if another configuration is used rather than the default jss one. You could also use the property serviceUrl, but then you need to construct it yourself.
if (options === void 0) { options = {}; }
    var _a = options.host, host = _a === void 0 ? '' : _a, _b = options.configurationName, configurationName = _b === void 0 ? 'jss' : _b, serviceUrl = options.serviceUrl;
    if (serviceUrl) {
        return serviceUrl;
    }
    return host + "/sitecore/api/layout/" + verb + "/" + configurationName;

Now open src/RouteHandler.js and search for the getRouteData function. Change the layoutServiceConfig object. next to the host attribute also add the configurationName attribute with your configuration name (macaw in my case).
function getRouteData(route, language, options = {}) {
  const fetchOptions = {
    layoutServiceConfig: { host: config.sitecoreApiHost, configurationName: 'macaw' },
    querystringParams: { sc_lang: language, sc_apikey: config.sitecoreApiKey },
    requestConfig: options,
  };

  return dataApi.fetchRouteData(route, fetchOptions).catch((error) => {
    console.error('Route data fetch error', error);
    return null;
  });
}

And the result is a connection to your configuration and data on your page!


Set different formatoptions for specific filetype

Question: I'm trying to turn on the c flag in formatoptions for all files except filetype vim. The following doesn't accomplish that:
autocmd BufRead,BufNew,BufEnter *.* set      formatoptions+=c
autocmd FileType vim                setlocal formatoptions-=c

Can anyone tell me what I'm doing wrong? Thanks.
Answer: What you are doing looks like that:
if foo == 1
    do something
elseif bar == "baz"
    do something else

One case is triggered by something and the other by something totally different so… the cases are not mutually exclusive.
Either you check for the same thing, like FileType, or you set a default value followed by a local value
set formatoptions+=c
autocmd FileType vim setlocal formatoptions-=c

With this, you have c for every filetype except vim.
Answer: FileType event was triggered when the 'filetype' was set.
the BufEnter *.* will be triggered when you enter that buffer, that is,  it happened after FileType event, and added c again.
You could just in vimrc set formatoptions+=c and use only one autocmd, if vim filetype, remove the c from the option.


How do residents of Vologda pronounce the name of their city?

Question: As far as I know, Russian people in the city of Vologda speak with an accent, in which the unstressed Russian 'о' in some words sounds like a stressed one. I wonder if it's also true for the name of their city. Is the way they pronounce the name of their city - 'Вологда' - different from how all the rest of Russians pronounce it?
Comment: Modern dialect is somewhat different from the classic one, or, more precisely, it is not truly described with those stereotypical features.
Comment: apparently it isn't easy to locate a live example or even a description of local pronunciation of this particular word
Answer: This video suggests that aside from the full Os, "classic" Vologda accent also realises hard л as a retroflex [ɭ] as opposed to standard Russian "dark" [ɫ]. So ['voɭogdə], vs. standard ['voɫəgdə].
However, not a lot of people generally speak with Northern Russian accents these days, and that video was specifically heritage-themed. Here's a vox pop on Vologda streets and everybody speaks Central Russian — akanye, [ɫ] and all.
Comment: а есть интервью на повседневные темы с этим акцентом, а не искусственная фольклорная сказка?
Answer: I personally haven't heard how they pronounce it but since a feature of Vologda group of dialects is full оканье (as apposed to partial оканье) they're expected to pronounce it as ВолОгда (as opposed to standard Волагда).
UPD: finally found a recording of the pronunciation, which sounds exactly as i described (not that it was a big mystery to me anyway) with л sounding as per Nikolay Ershov's description, with the only caveat that it's a recording of a villager and not of a city resident

Вот помнишь, к нам приезжали, ко мне, девки-ти, из
  Вологды-то?
Comment: let's wait for someone who've heard how they pronounce or. even more, for someone who is from Vologda )
Comment: @shabunc Their speech is somewhat different from that of Moscovites, but not in stereotypical way, for the distinction has developed very recently, in a few years, and it wasn't quite apparent during the Soviet era. One may probably notice a different tonality and temporal characteristics.
Comment: Can you, please, provide a time stamp of that phrase from the video?
Comment: To me it sounds as if she were saying "из Волёгды-то". :)
Comment: @brilliant hi, the link address contains the time stamp, it's 3 seconds into the video, this sounds like `Ё` because of the retroflex `Л` which is always palatalized, orthographically it may be expressed as `ВолЬОгды`


Joomla new version URL not possible with subdirectory?

Question: In my old version of joomla I used "menu-link" and named the subdirectory /xxx/
All the URLs are on that subdirectory also google knows that.
so :
/xxx/jantje
/xxx/pietje
/xxx/enverder
etc.

Now... a new version of Joomla (only "menu-alias" available) and a new website and it is not possible to place that subdirectory in front of all the menu items ... :(
And I dont want the urls to change.
Joomla makes from /xxx/ a name with a dash  --> xxx-
so :
xxx-jantje
xxx-pietje
xxx-enverder

Does anybody know how to solve this? I really like the URLS to stay with the subdirectoryname in it.
Thnks in advance!
Answer: The problem is solved by :
comment-out the line 95 from:  ./libraries/joomla/filter/output.php
//$str = trim(JString::strtolower($str));

and change to:
$str = trim($str);

comment-out the line 370 from: ./libraries/joomla/filter/language.php
//$string = JString::strtolower($string));

Now you can use in the alias also characters like /.


configurable product price not change on product page

Question: I have upload configurable product with different price. But i have select other size of my product so product price not change on product page any one resolve my problem. I have already create supper attribute but no solution.
Comment: Magento version ?
Answer: If you use magento 1.9.3 version
in your theme you need to add product_option.js
go to your app/design/frontend/[Your package]/[Your default]/layout/catalog.xml
find catalog_product_view
and in reference name="head" add this line
<action method="addJs"></action>

its become like that:
<catalog_product_view translate="label">
    <reference name="head">
      <action method="addJs"></action>
    </reference>
<catalog_product_view translate="label">

Comment: Can i get help regard configurable product price issue https://magento.stackexchange.com/q/291238/57334  @Rajan Soni


If we install the apk outside the Play Store, does it affect Google Play statistics?

Question: If we install the apk outside the Play Store, does it affect Google Play statistics?
Answer: NO, apps installed outside Google Play do not affect statistics.
Those apps are considered to be coming from Unknown sources,
and you cannot install them if you do not manually allow (or check) them in
Settings > Security > Unknown sources.


Radiator cap, / coolant flange and battery drainage issues

Question: I wanted to enquire regarding some work that my mechanic carried out recently. All issues appear to be resolved now but I need to assess what happened at each stage. Apologies in advance for the long message but here goes...
The problem originated whilst I was stationary with the engine running. There was a loud bang from under the bonnet, steam came out of the bonnet, and water leaked out onto the ground.
I had the car towed to my mechanic who, after some time, replaced the radiator and the water pump. (If I recall correctly, he had to return the first radiator he ordered as it developed a crack in it (or so he claimed)). Within a few minutes of picking the car up from him, I was driving along and heard a grating/grinding noise coming from under the bonnet again. Once again smoke/steam started coming out from under the bonnet. When I stopped the car, there was anti-freeze leaking out onto the ground.
I telephoned my mechanic who seemed to think the smoke was just from burning off excess anti-freeze that he had just added. He suggested that the problem should resolve itself in about 10 mins and I could continue to drive it.
The problem only got worse as the engine overheated with the temperature gauge up to the max. I managed to drive it home which was about 5 mins away, stopping and starting along the way. After some delay, my mechanic came to collect the car, applying a temporary fix to the flange in order to drive it back to his garage. He replaced the water / coolant flange and the radiator cap, both of which had broken.
On collecting the car from him, a new problem had emerged which he told me about just before releasing the car to me, which was battery drainage. He seemed to think this was due to the car stereo seemingly not turning off. I took the car to another mechanic to sort this issue out whose diagnosis resulted in disconnecting the car stereo; he considered there was an internal fault with the car stereo. I have replaced the car stereo with a new one and there is no further battery drainage.
I would like to know two things:
(i) Whether the failure of the flange and radiator cap has anything to do with the work of the mechanic who replaced the radiator and water pump - i.e. whether it could be due to him not testing the car properly before releasing it to me, or a failure to bleed the system after he had replaced the radiator and water pump, or something else he may have done. The car admittedly is about 25 years old (BMW Z3 1998 1.9L) but I can't help but think that it is too coincidental that the flange and radiator cap should break within minutes of picking up the car from him, particularly if he had checked and tested the system properly, and if the replacement radiator had been supplied with a new radiator cap.
(ii) Could my mechanic have done anything whilst carrying out the replacement of the flange and radiator cap, to cause the problem with the car stereo that then caused the battery to drain. I appreciate that replacing these items may be unrelated to the car electrics. If so, can you offer any thoughts as to why the car stereo could have malfunctioned in this way. The stereo is not new, but it is also not the original stereo that came with the car. It is probably about 10-15 years old.
Any thoughts / advice anyone can give would be much appreciated.
Many thanks
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: From what I'm seeing, if you buy a new radiator for your Z3, a new coolant reservoir comes with it, but not the cap. If the flange on the top of the coolant reservoir (which the cap affixes to) busts, it could affect the cap, but still, it would be a new flange which is bursting.
The parts of the cooling system which were changed should have no relationship to your electronics going bad. I don't think your mechanic is at fault here for either thing. I think it's just a coincidence. New parts do fail. If so, there would be no way the mechanic could have foreseen or anticipated it.
Comment: Thank you Paulster2 that's very helpful. Much appreciated :)


Why do we need to apply Laplace smoothing to all the words in Naive Bayes for text classification?

Question: I understood that we need to apply for Laplace smoothing to the words that are not present in our training data. But then why/what is the need to do Laplace smoothing for all the words (even the words that are present in the training set)?
Answer: Laplace smoothing is about adding a constant to all the counts and normalizing it.
$$
 \hat p_i = \frac{n_i+\alpha}{\sum_{j=1}^K n_j+\alpha}
$$
You can think of it as of adding a pseudocount $\alpha$ to each observed count $n_i$. So you observed $n_i$ words like this, but you transform it to $n_i+\alpha$.
Now imagine that you applied it only to the cases where the count was zero. In such cases, you would pretend that the count is $\alpha$. This could lead to a paradoxical situation where the words observed less than $\alpha$ times would be considered less frequent than the ones that you didn't observe at all. Only transforming all the counts preserves the relative frequencies. You are smoothing all the values instead of making up data.
Answer: Words that are not present in the training data are called Out of Vocabulary (OOV) words. You cannot apply laplace smoothing to words that are not in your vocabulary. You apply laplace smoothing to words that are in your vocabulary. This is because some vocabulary words that appear in one class may not appear in the other class. The maximum likelihood probabilities for the word in that other class would become 0. The following example illustrates the point.
Suppose you are doing sentiment analysis for positive or negative movie comments. Suppose your training set consists of one positive and one negative comment
+: "I like this alot"
-: "I don't like this"
You construct your vocabulary as ["I","like","this","alot","don't"] and you compute the respective maximum likelihood probabilities for each word belonging to each sentiment $P(w_i|+), P(w_i|-)$ where $w_i$ is a word in your vocabulary.
Suppose that in your test set, you encounter the comment "I don't think this is good". Now, we haven't seen the words "is" and "good", so we discard them away. Then we are left with the words "I don't think this".
To carry out Naive Bayes classification, we have to compute the posterior probabilities of the sentence belonging to either the positive or negative class.
$P(-|\text{"I don't think this"}) \propto P(\text{"I"}|-)P(\text{"don't"}|-)P(\text{think"}|-)P(\text{"this"}|-)P(-)$.
$P(+|\text{"I don't think this"}) \propto P(\text{"I"}|+)P(\text{"don't"}|+)P(\text{think"}|+)P(\text{"this"}|+)P(+)$.
Notice that if you don't use laplace smoothing, $P(\text{"don't"}|+)$ will be 0, because "don't" does not appear in a positive comment. Therefore, we apply laplace smoothing to give some probability mass to words in our vocabulary that may not have been seen in a positive comment, but may have been seen in a negative comment.
Comment: check this thread:  here we are not always droping  the OOV words.
it is one of the strategy.
[link](https://stats.stackexchange.com/questions/108797/in-naive-bayes-why-bother-with-laplace-smoothing-when-we-have-unknown-words-in)

The question is that we are applying laplace smoothing to train set, even if the words are present in  both the classes.

@calveeen your example here has assumed that the word "don't" is not present in the positive class.


How to measure the frequency of the audio output

Question: I was wondering how I can measure the frequency of the audio output of my raspberry pi. Currently I am trying to create a script to control an RGB led to the music that is being played through the arduino
Answer: In order to measure the frequency you will need to take an fft of the data .  http://en.m.wikipedia.org/wiki/Fast_Fourier_transform
First you need to sample the data coming out of the pi. (Or maybe you are playing an MP3 which is already sampled). Take about 1024 samples of data at time and run an fft. This will give you 1024 different "frequency bins". The bin that has the largest number is the loudest frequency.
Please post more information about what is generating sounds so i can help you further
Answer: This audio-freq-rpi git helped me out for my project of determining the freq of an audio file.
You can use the speaker_freq_db.py file to measure the frequency of the audio. You might have to increase the record time accordingly.
They have used PyAudio to record the audio and FFT method for the frequency.
Although the recorded file is in .wav format. If your sole purpose it just to see the freq of it then that won't be a problem.


Windows Powershell not showing anything but a blue screen; can't type in powershell

Question: Everytime I try to use Powershell, it just shows a blank blue screen with the blinking rectangle at top left corner of screen. I try the Ctrl+x then Ctrl+C, but that just closes Powershell (More specifically, Ctrl+c)
Answer: This is not really and PowerShell specific thing and not really a PowerShell code issue., which is why we are here. So, this sort of question really should be on the SuperUser Q&A.
Anyway, since you are here.
Somehow you or someone have/has that window resized to where it is not usable. There are tricks on the web regarding how to resize those oddball windows. Yet, you can do this, start PowerShell from cmd.exe using maximize switch.
So, start cmd.exe and look at this discussion/answer.

How to go fullscreen in PowerShell

<code>powershell.exe -noexit -WindowStyle Maximized
</code>
Once maximize, just change the windows properties as normal so you don't have to do this.
Even if you could not see the consoelhost, you could have just used the PowerShell ISE or download and install Visual Studio Code (you'll need to add the Powershell extension), or install the Windows Terminal app (if you are on Windows 10) from the MS Store, to do your PowerShell stuff.


Aftermarket stereo very loud

Question: I just installed a Sony xav-ax1000 in a WK grand Cherokee and it works well except that the volume for the radio is incredibly loud and I will never go beyond 4. I was hoping there is a solution to this. I used a wiring harness that allows the factory amplifier to still be used. Thanks
Answer: Lower the gain on the factory amp if you can, might also check and see if your headunit has a loudness setting. If all else fails you may just need to bypass the factory amp.

Aftermarket stereo very loud


18.04 x11vnc failed to start and password problems

Question: 18.04 Ubuntu and 9.13 x11vnc installed. I'm trying to set up my PC so I can VNC into my current session and have x11vnc run at startup. If I don't set a password I can vnc into my PC's current session fine on port 5900. When I set a password I cannot connect in. I can however connect into a new session on port 5901 which is not what I want.
On top of that, when I try create a service file to run at startup, I get a failed to start x11vnc message.
I'm using this blog: http://c-nergy.be/blog/?p=12220 as my guide.
Below is the output I get when I try to start the service:
<code>user@ubuntu-pc:/lib/systemd/system$ sudo systemctl enable x11vnc.service
user@ubuntu-pc:/lib/systemd/system$ sudo systemctl daemon-reload
user@ubuntu-pc:/lib/systemd/system$ sudo systemctl start x11vnc.service
user@ubuntu-pc:/lib/systemd/system$ sudo systemctl status x11vnc.service
● x11vnc.service - "x11vnc"
   Loaded: loaded (/etc/systemd/system/x11vnc.service; enabled; vendor preset: enabled)
  Active: failed (Result: exit-code) since Fri 2018-10-05 10:22:06 EDT; 1s ago
 Process: 7446 ExecStart=/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth guess -rfbauth /etc/x11vnc.pass (code=exited,     status=1/FAILURE)
Main PID: 7446 (code=exited, status=1/FAILURE)

Oct 05 10:22:06 ubuntu-pc systemd[1]: x11vnc.service: Service hold-off time over, scheduling restart.
Oct 05 10:22:06 ubuntu-pc systemd[1]: x11vnc.service: Scheduled restart job, restart counter is at 5.
Oct 05 10:22:06 ubuntu-pc systemd[1]: Stopped "x11vnc".
Oct 05 10:22:06 ubuntu-pc systemd[1]: x11vnc.service: Start request repeated too quickly.
Oct 05 10:22:06 ubuntu-pc systemd[1]: x11vnc.service: Failed with result 'exit-code'.
Oct 05 10:22:06 ubuntu-pc systemd[1]: Failed to start "x11vnc".
</code>
Any help is appreciated.
Edit 1 When I attempt to VNC in I get "connection attempt refused" then I run x11vnc and VNC in at port 5900 with no password, then I can see my current screen. After running x11vnc -storepasswd  /home/ then x11vnc -rfbauth /home/hudsona/.vnc/passwd I can VNC into my current session with a password.
This question helped me out: https://unix.stackexchange.com/questions/405185/password-problem-x11vnc
Edit 2 After creating that .desktop file from the question I linked in Edit 1, I can reboot, log in then VNC from another machine on port 5900 and get in. Without logging in I can VNC in from another machine on port 5901 but on my VNC viewer all I get is a grey checkered screen with an "X" mouse cursor.
Answer: After more research this question lead me to the fix for the grey screen issue: VNC grey screen with Xubuntu 17.04
Between this and the .desktop file create from Edit 2 my questions have been answered.


Lipschitz constant of continuous and piecewise linear functions

Question: I want to calculate the Lipschitz constant of a continuous and piecewise linear function $f:[0,1]^2\rightarrow R$, like this
\begin{equation*}
f(x_1,x_2)=\left\{
\begin{aligned}
2x_1+x_2, &\quad\text{if} \quad x_1+x_2\leq 1\\
x_1+1, &\quad\text{if} \quad x_1+x_2>1
\end{aligned}
\right.
\end{equation*}
I guess it is equal to the greatest Lipschitz constant among all pieces. Is there any textbook that contain related theorem?
Comment: Yes, but also check the case in which one point is in each piece.
Comment: @Ramita I don't know how to prove it. I'm looking for a textbook on this issue.
Comment: There is no well known theorem but it is not difficult to prove either. For the above it is $\sqrt{5}$ with the Euclidean norm.
Comment: @copper.hat I find a theorem of the vector-valued form for this issue, https://threesquirrelsdotblog.com/2018/03/16/lipschitz-constant-of-piecewise-linear-vector-valued-functions/, and I feel the proof not easy. I want to cite such results, but I can not find any textbook that contain this issue. And it is not proper for me to cite a website.
Answer: The problem has lots of structure, so there are many ways of approaching it.
Here is one way:
Note that $f(x_1,x_2) = \min (2 x_1+x_2,x_1+1)$.
To see that the $\min$ of Lipschitz functions is Lipschitz:
Suppose $f_1,...,f_m$ are Lipschitz with rank $L$, then
$f_k(x)-f_k(y) \le L \|x-y\|$ for all $k,x,y$.
Then $\min_i f_i(x)-f_k(y) \le L \|x-y\|$ and choosing $k$ such that
$\min_j f_j(y) = f_k(y)$ we see that
$\min_i f_i(x)-\min_j f_j(y) \le L \|x-y\|$. Swapping $x,y$ shows that $\min_k f_k$ is Lipschitz with rank $L$. (This result is true more generally, but the finite case contains the basic idea.)
Note that $x \mapsto 2x_1+x_2$ has Lipschitz rank $\sqrt{5}$ and
$x \mapsto x_1+1$ has Lipschitz rank $1$, so the smallest $L$ that
will work is $L= \max(1,\sqrt{5})$.


Exodus 25-27 Question

Question: Why would God want his people to build tabernacle and the sacred rooms, only to destroy them after Jesus dies on the cross? Does that mean God has changed his mind?
Comment: http://hermeneutics.stackexchange.com/ as this is not a denomination specific question.
Answer: This is a really interesting concept in Christian theology, known as typology. Essentially, it is a method of interpreting the Old Testament as a long series of "types" that prefigure aspects of the revelation in Jesus Christ, which are known as "antitypes".
This is mentioned in the Catechism of the Catholic Church:

The Church, as early as apostolic times, and then constantly in her Tradition, has illuminated the unity of the divine plan in the two Testaments through typology, which discerns in God's works of the Old Covenant prefigurations of what he accomplished in the fullness of time in the person of his incarnate Son. (CCC 128)

For instance, we might look at the story of Jonah, which is commonly read in  Christianity (especially in mediaeval Catholic and Orthodox theology) as a prefiguring of Christ's death, three days in the tomb, and resurrection. Similarly, the serpent lifted up on a pole by Moses in the wilderness in order that those who look upon it might be saved (Numbers 21) is read as a type of Christ's being lifted up on the Cross.
However, the example you mention in your question is possibly the canonical example of typology. The Temple, the dwelling-place of God, is understood as a prefiguring "type" of Christ, in whom God dwells on earth. The sacrifices of the Old Covenant are considered types of the one great sacrifice of the New Covenant, that of Jesus Christ on the Cross. The priesthood of the Old Covenant is considered a type of Christ's eternal high priesthood. If you read the Epistle to the Hebrews, you will see this language used extensively.
So the Temple and the Tabernacle are not a case of God changing his mind, but giving a way off understanding the greater event that is to come in Christ. Their role is to explain what happens in Jesus Christ. But when Christ's death happens, the Old Covenant is fulfilled, so aspects such as the Temple can pass away.
Comment: Hebrews specifically addresses the typology of the tabernacle/temple! So give it a read!
Answer: The issue you seem to be trying to address is that of 'progressive revelation'. It means that God tells Mankind what he wants him to know only a bit at a time. That's not because he wants to string him along, or lead him a dance. It's more about what Man can understand at any given time. It's the same line of reasoning that means we don't teach advanced physics to elementary school children - they won't understand it, and if you try to explain it they will get more confused than they were.
This is particularly tied to Romans 7, where Paul explains that the Law was given to man for a time. It was good that the law was there, and necessary at that time, but it wasn't God's final objective. The Tabernacle and the Temple were part of the journey towards where God wants Mankind to be. Saying that they were unnecessary would be like saying that there was no point in going to elementary school, because eventually you would leave elementary school and go to high school.
Comment: By the way, lonesomeday's answer is also true, just looking at it differently.
Comment: Indeed, this is also a very good explanation (and also entirely compatible with mine: the previous revelation gives a framework/building blocks for understanding the new revelation). Also related to [this question](http://christianity.stackexchange.com/q/26584/137).

Exodus 25-27 Question


How to calculate shear force on tubing wall?

Question: For my application, I have water entering a small diameter (D1) tubing (a hypodermic needle tubing) with pressure (P1) and exiting into the atmosphere.  The tubing is also very long with respect to it's diameter (Length/Diameter > 1000).
 How do I calculate the total force acting on the tubing due to the shear forces at the fluid-wall interface along the entire length of the tubing?  I would also like to be able to calculate the flow rate.  For now, I would like to just focus on the portion where the flow is fully developed.  If anyone can point me in the direction of the correct equations or some literature that you would recommend, I would very much appreciate the assistance.
Answer: This physical scenario can be described well by the Hagen-Poiseuille equation for incompressible viscous flow. See the formulae for $v(r)$ (i.e., the axial velocity of the fluid as a function of the distance from the center of the tube) and $F_{viscosity, top}$ (i.e., the force of one layer of fluid acting on an adjacent layer). These expressions can be combined and evaluated at the wall of the tube to determine the net shear force acting on the wall.
The flow rate can also be found by integrating the axial velocity over the cross-sectional area. An expression for this is found in the same article.


Would trans hydride ligands on a metal complex be beneficial for a catalyst?

Question: Would trans hydride ligands on a metal complex be beneficial for a catalyst?
Such as alkene metathesis or hydrodefluorination
Answer: In alkene metathesis you need large ligands that direct the stereoselectivity of the reaction, and a hydride ligand is very small.
Also for hydrodefluorination I don't see an advantage of a trans hydride ligand on the catalyst. cis hydride ligands could be beneficial, as they then take the place of the fluorine atom on the substrate.


Will start using cron jobs after two years result in problems?

Question: I would like to start using the magento cronjob to send out review reminders automatically. Cron jobs have never run before (since its installation two years ago) on this installation if I'm correct. I wonder what will happen. Can this result in problems?
Comment: hey @rxt, keep us updated on your question. You've posted a popular question so be sure to let us know what happened :)
Comment: I have the cron jobs working, and nothing strange has happened.
Answer: It shouldn't be an issue, check the table cron_schedule in the database. The uncompleted tasks that are in there will be executed so in case you want to make a fresh start just TRUNCATE that table.
After that you can set up either cron.php or cron.sh and it will rebuild the table with the current cron tasks.
I would recommend installing Aoe Scheduler if you want more insight in what cronjobs are running on your Magento installation.
Comment: Moral of the story, always set a cron job on the server to run Magento's cron.sh or cron.php trigger from the very beginning. Your customers will love you for not having the website speed decrease as the logs fill and your hosting provider will love you for not wasting disk space.
Comment: Depends on how large the log tables have grown to. They can be so large that running the log table maintenance can cause memory exhaustion. The log maintenance script in the shell/ folder may have to be run and if it crashes, then the tables will have to be manually truncated. If it's a reasonably active site, the log tables are going to be huge after not having been cleaned for two years.
Comment: You're right, might be smart to truncate those manually before running the first cron.
Comment: I had problems getting the cron jobs running. The linux cron did its job, but for some reason magento cron tasks were not executed. After installing the AOE scheduler all problems were solved, without doing anything else. I haven't noticed any problems with performance or anything since then.


Shall I use JSONB for integers based array?

Question: I need to store a list of ids in array per each row.
I thought to use JSONB, then store it as : {ids: [1, 2, 3, 4]}.
Then, I found Array type, that I can use to store ids directly into.
The question is, what is the recommended data type for my case?
Comment: Arrays are non-standard and a breach of the relational model. As @CraigRinger points out, it's well nigh impossible to join arrays to anything. IMHO, arrays in RDBMS's are the work of the devil :-)
Comment: Joining on arrays isn't *too* bad in Pg. But it's not particularly efficient or easy to optimise, you can't use FKs, etc.
Answer: Unless you have a very good reason to do otherwise, the recommended storage is always normalised.
Store the integers in a separate table of (other_row_id, the_integer) and join on them.
If you must use arrays, use PostgreSQL's native arrays ARRAY[1,2,3].
Storing them as jsonb is a spectacularly inefficient and clumsy way to do it with essentially no advantages.
Comment: @MTCoster I'd say efficiency is rather a side-effect of normalisation than its aim: modern DBMSes are optimised for normalised data *because* normalisation was seen as a good thing. The primary driving force for the invention of normalisation was consistency and integrity.
Comment: What do you mean by the recommended storage is always normalised?
Comment: @MohammadAL-Raoosh Presumably a reference to [database normalisation](https://en.wikipedia.org/wiki/Database_normalization), a method of exploiting the functionality of the RDBMS to achieve increased efficiency
Comment: @IMSoP Good point! Apparently I've got the whole thing backwards in my head somehow


How are secondary-education mathematics jobs advertised in the United States?

Question: A large portion of 4-year university mathematics jobs are advertised on mathjobs.org.
Is there a similar, centralized location for secondary education mathematics jobs? If not, what are the standard techniques to use in such a job search?
Answer: There are some good websites for specific states (e.g., edjoing.org for California and expanding to a few more states next school year. You can just find them through googling) but I never came across to a national secondary education mathematics jobs website (probably the closest website is indeed.com, which is more like a meta-search engine for job postings) . I think it is because of moving between states is not that easy once you have a teaching credential from one state  (it usually requires you to retake some classes and reapply through the state department of education) and such a website will not be very functional (especially for the hiring school district).
Given the unique landscape of US secondary education (i.e., independent school districts that can do whatever they want), I would expect every school district to advertise jobs differently and to have different recruitment procedures. In my experience, my current school district (a medium California central valley USD) puts all qualified applicants into a pool from where principals can start interviewing. My previous school district (a large Southern California USD) had the same procedures but, if you wanted a job, your best option was to contact directly a school with an opening and talk with the principal before going thorough HR. I also applied to a small school district which was accepting only paper application and the opening were just posted in the job bulletin board at the district office.
Comment: This is a great answer! Welcome to the site.
Answer: In Alabama, all public school jobs for Elementary, Middle, and High Schools are posted on Teach in Alabama located on the Alabama State Department of Education website. There is also a website/organization designed to certify people interested in teaching who already have a degree in an area of study called Teach for America, at teachforamerica.org. For other teaching avenues, such a private schools. Those are usually posted on the schools website, or can be found on indeed.com.


Is it appropriate to flip a coin hoping that Allah will influence it in order to make decisions?

Question: I sometimes flip a coin to make decisions and think that Allah (swt) would influence the coins landing so that I can make the right decision. Is this right, wrong, haram?
Comment: Allah is already influencing the coin and much else. It's called natural law.
Answer: From my knowledge and what I've read so far, it is haram to believe that a coin toss would be influenced by Allah because it is similar to using divining arrows during the time of the Prophet Muhammad (pbuh) where the Arab pagans would do this to make decisions thinking it is divinely inspired by God.
Here's another post similar to yours: What are "divining arrows" in Qur'an 5:3 and Qur'an 5:90?
And Allah knows best.


What chemicals are mixed together to cause chemoluminescence?

Question: My brother is supposed to do a science experiment at school for an open house. We found an interesting experiment in which you pour several chemicals together, causing the resulting concoction to glow brightly. You can make several colors in this way. Then you can dump them together, to demonstrate how white light is made up of several colors mixed together. Several questions.
1. Which chemicals are used?
2. How do you get the colors?
3. Where can you buy the chemicals you need?
Comment: "Where can you buy the chemicals you need?" Looks off-topic
Comment: I second what @Mithoron said. Also, as written, it's pretty broad. If you can narrow your query - what colors? what procedure(s) are you interested in investigating? - that will help us help you.
Comment: related http://chemistry.stackexchange.com/questions/35527/how-do-things-glow-in-the-dark https://chemistry.stackexchange.com/questions/14241/is-there-anything-funny-i-can-do-with-chemicals-in-glowsticks
Answer: If you want different colours, you might want to give the peroxyoxalate reaction, known from glow sticks, a try.
Typically, you will need three components:

a diaryl oxalate
hydrogen peroxide (to oxidize the diaryl oxalate, probably to a 1,2-dioxetanedione)
a fluorescent dye, which determines the final colour.

Wilhelm J. Baader has examined the reaction in great detail, and you'll find a lot of references on his website.


Why magnet is always a dipole?

Question: Why magnet is alway dipole
Even the atom of the magnetic substance is also dipole , how can small atom be dipole . Pls explain me
Comment: This is one of the big questions since the math seems to say that a monopole should be possible, we just can't seem to find or make any.
Comment: @DKNguyen Not the math but the physics says that a monopole is impossible.
Comment: I mean, the math doesn't say it should be possible, since the condition is the Div B is zero, any one could therefore say anything about any vector field "should be possible" as divergence is a property of any vector field
Comment: @jensenpaull I think there's math beyond Maxwell. The weird stuff.
Comment: @my2cts I'm pretty confident you could get a Nobel prize if you could convince people that magnetic monopoles are impossible. You may want to publish ASAP if you have evidence of this.
Comment: @d_b The Maxwell equations exclude a monopole and experiment is fully in agreement with these.
Answer: In short, the "why" is a tough question, we can only describe reality how we currently see it. Mathematically it is because $\nabla \cdot B = 0$ the magnetic field always creates closed loops as you can only create a curl in the magnetic field. This is an experimental fact
Answer: That there are no magnetic monopoles is mostly an arbitrary choice of coordinates (or gauge).
Maxwell's equations have a 'rotational' symmetry between the electric and magnetic fields, as described in this Stack Exchange question.
Through a 'rotation' of $\alpha$, the divergence (e.g. charge density / monopole density) of the electric and magnetic fields may be made to satisfy:
$$ \epsilon_0 \nabla \cdot \vec{E}' = \rho_e' =  \rho_e \cos \alpha + \mu_0 \epsilon_0 \rho_m \sin \alpha$$
$$ \frac 1 {\mu_0 } \nabla \cdot \vec{B}' = \rho_m' =  \rho_m \cos \alpha - \frac{\rho_e}{\mu_0 \epsilon_0} \sin \alpha $$
Clearly, adding $\pi$ to $\alpha$ makes each of the two densities above negative. By the intermediate value theorem, there is some value of $\alpha$ which will make the electric monopole density zero, and the magnetic non-zero:
$$ \alpha = \arctan \left(-\frac{\rho_e}{\rho_m} \frac{1}{\mu_0 \epsilon_0}\right) $$
$$ \nabla \cdot \vec{E}' = 0$$
$$ \frac 1 {\mu_0 } \nabla \cdot \vec{B}' = \rho_m' = -2 \frac{\rho_e}{\mu_0 \epsilon_0} \sin\left( \alpha \right) = \left[1 + \left(\frac{\rho_m}{\rho_e} \mu_0 \epsilon_0 \right)^{2} \right]^{-1/2}$$
Since in the traditional formulation of Maxwell's equations the magnetic charge density is set to zero, $\rho_m = 0$, we may rotate all of the electric monopole to the magnetic by setting $\alpha = \pm \frac{\pi}{2}$. Then:
$$ \nabla \cdot \vec{E}' = 0$$
$$ \nabla \cdot \vec{B}' = \pm \frac{2 \rho_e}{\mu_0 \epsilon_0} $$
(You may want to check my math with the exact coefficients)
My point is that asking why there are no magnetic monopoles is asking the wrong question. An arbitrary coordinate transformation can always make it appear that one of the two coupled fields has zero divergence (no monopoles) at any chosen point $\vec{x}$ in space. The right question to be asking is why do all monopoles come with the same (or negative) ratio of electric:magnetic charge?. This is what makes it possible to eliminate one of $\rho_m$ or $\rho_e$ through a change of coordinates.
I feel this is important to address because people can sometimes think that there is something special about the magnetic field having no monopoles. In fact that is a red herring. The fundamental symmetry is a common ratio of monopole charge in all observed particles.
The answer to the good question? I do not know.
Answer: The dipole of permanent magnets is not a mystery if you know that electrons are electric charges and magnetic dipoles in one.
There are two ways to macroscopically enhance these properties:

If you separate the electrons, you get a macroscopic electric field around the body of the charge.
If you align the magnetic dipoles of the electrons (and the other subatomic particles ), you get a magnet.

The amazing thing about permanent magnets is their ability to maintain the magnetic alignment of the subatomic particles against the action of the thermal motion of the atoms.

Why magnet is always a dipole?


OWIN Middleware's CurrentPrincipal.Identities have different claims set

Question: Today I was configuring authorization provider for Oauth middleware and trying to insert some guid value into Thread.CurrentPrincipal.Identity.Claims. But when I tried to call Thread.CurrentPrincipal's FindFirst I've got nothing.
Here is the example what I was trying to do:
public override Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
{
    var claimsIdentity = Thread.CurrentPrincipal.Identity as ClaimsIdentity;

    if (claimsIdentity != null)
       claimsIdentity.AddClaim(new Claim("TestClaim", Guid.NewGuid().ToString()));

    var claimValue = ((ClaimsPrincipal)Thread.CurrentPrincipal)
        .FindFirst(x => x.Type == "TestClaim"); //claimValue == null!
}

Checking inner properties, found that Thread.CurrentPrincipal.Identity still contains claim I've set before, but Thread.CurrentPrincipal.Identities[0] - doesn't. So there are two different identity instances with their own set of claims.
I tried to do the same steps inside Web Api controller's action and there Identity was referencing to Identities[0] which means that there is the same instance.
What is happening to OWIN middleware's Currentprincipal so it's Identity and Identities[0] refer to different instances? Can anyone explain me this, please?
Thank you!
Answer: I met the same issue. I don't know why the Identity property and the first identity of the Identities property are different instances...
But it seems that all methods relative to claims in the ClaimsPrincipal class (Claims, FindFirst...) are based on the Identities property, so updating the Identity property has no effect.
I prefer to keep the two identities consistent, so I use the following workaround to solve the problem :
principal = (ClaimsPrincipal)Thread.CurrentPrincipal
identity = (ClaimsIdentity)user.Identity;
identity1 = user.Identities.First();
identity.AddClaim(claim);
identity1.AddClaim(claim);


Is there an legal punishment for not wearing hijab according to sharia?

Question: If a woman refuse to wear hijab, is it allowed to inprison her or give her s legal punishment according to sharia?
Answer: There is no prescribed punishment but a Ta'zir can be given for it. A Ta'zir is legal punishment that is given for committing any sin for which there is no Hadd or Kaffarah in Shariah, that is  abstaining from an obligatory act or committing a forbidden act.

التعزير هو مشروع في كل معصية ليس فيها حد ولا كفارة
Ta'zir is prescribed for every sin for which there is no Hadd or Kaffarah
— Nawawi - Rawdat al-Talibeen

This comes under enjoining good and forbidding wrong, which is foremost the duty of the state.

الذين إن مكناهم في الأرض أقاموا الصلاة وآتوا الزكاة وأمروا بالمعروف ونهوا عن المنكر
Those who, if We give them authority in the land, establish prayer and give zakah and enjoin what is right and forbid what is wrong.
— Quran 22:41

Doing so has different stages, at first the offending person would be informed of their sin, then advised softly, then reprimanded, then warned, then a punishment would be given such as imprisonment, lashing, fine, exile and even execution depending on whatever the judge considers appropriate depending on the case.
Comment: Enjoining good and forbidding evil is obligatory.
Comment: Thanks for for the answer. Since there is no legal prescribed, can the punishment not be give to the woman if she does not wear hijab. Is it mandatory to give the punishment
Comment: does this ruling apply to non Muslims as well?
Answer: The sentence of punishment without hijab and bad hijab is in accordance with the meaning of some verses of the Holy Quran, it is stated in Surah Noor.
"Those who like to spread indecency among those who believe will have a painful punishment in this world and the hereafter, and God knows while you do not know.""Those who want ugliness to spread among the people by faith is a painful punishment for them in this world and the hereafter, and God knows and you do not know." (Surah Noor, verse 19) Since the lack of hijab is the basis for the spread of prostitution and corruption in society and has destructive effects on families and society.
Therefore, since one of the things that pollutes the atmosphere of the Islamic society is the non-observance of Islamic dress, and in fact, the lack of hijab, since it spreads corruption in the society, is a great threat to the mental security of the society and its consequences. To the detriment of society, the Islamic government is obliged to fight against this threat. Keep it healthy and ready for the growth and excellence of its people.
Ref: https://www.porseman.com/article/--%D9%85%D8%AC%D8%A7%D8%B2%D8%A7%D8%AA-%D8%A8%D8%AF-%D8%AD%D8%AC%D8%A7%D8%A8-%D8%AD%D8%AC%D8%A7%D8%A8-%D8%AF%D8%B1-%D8%A7%D8%B3%D9%84%D8%A7%D9%85--%D8%AD%D8%AC%D8%A7%D8%A8-%D8%AF%D8%B1-%D8%B1%D9%88%D8%A7%D9%8A%D8%A7%D8%AA--%D8%A2%D9%8A%D8%AA-%D8%A7%D9%84%D9%84%D9%87-%D8%B7%D8%A7%D9%84%D9%82%D8%A7%D9%86%D9%8A-%D9%88-%D8%AD%D8%AC%D8%A7%D8%A8-/23213


What is the Good in Aristotle's Ethics and how does it differ from Plato's?

Question: I may have asked the question in an odd way, but I am having trouble understanding the most defining differences when it comes to the Good.
Comment: Just for clarification. Is this homework? Either way, the first place you might want to look is *Nicomachean Ethics* BK I. Chapter 6 contains a specific reference to Plato's theory of the good.
Comment: I have an exam tomorrow and my professor listed this on the study guide. Another thing that I have been trying to find is the parallel between Socrates and Confucius. Do you have a recommendation of where I can find this?
Comment: Thank you so much by the way. I am going to check that out now.
Comment: @Michael Ramage. Are you still interested in an answer to this question. I realise the immediate occasion for it has passed ?
Answer:
Plato in the 'Republic' (VII, 532a-b, 534b-c) sees the best of all things - the Good - as existing separately in the Form of the Good (auto to agathon). The Form of the Good is a separate entity, transcendent of space and time; and everything else that is good to any degree is so by virtue of its 'imitation' of the Good.

Aristotle  (Nicomachean Ethics 1.6; Eudemian Ethics 1.8) criticises the Platonic Form of the Good. There are many things that are good, he explains : a quantity can be good, a quality can be good, a place can be good, a position can be good, a relation can be good, a time can be good. But there is no credibility in holding that the goodness of a time has anything in common with the goodness of a place or of a quantity. There cannot be a common property of goodness which all these diverse things share. What makes a place good is one thing, what makes a time good is another.

Aristotle differs from Plato in this way and, in what logically follows from this, in denying that the Platonic good exists at all. There is and could be no Form of the Good.

But he does believe that 'the good, that is, the best' (to agathon kai to ariston' - 'Metaphysics', 12.10) is real. It does exist, only it is nothing like Plato's Form of the Good (even if that did exist). At 'Nicomachean Ethics', I.1, he says :
If, then, there is some end of the things we do, which we desire
for its own sake (everything else being desired for the sake of this),
and if we do not choose everything for the sake of something else
(for at that rate the process would go on to infinity, so that our
desire would be empty and vain), clearly this must be the good and
the chief good. [tr. Ross]

What we desire purely for its own sake is 'eudaimonia', happpiness or (better) well-being or human flourishing.

Aristotle's view is that human beings have certain characteristic activities and that eudaimonia - our good - consists in exercising those activities as perfectly as possible. In doing so we fulfil our 'ergon' or function.

Our ergon or function is a practical life informed by reason. This leads to the doctrine of the mean (we observe the mean when e.g. we act courageously and not on the one hand in a cowardly way or on the other foolhardily). Phronesis or practical wisdom yields knowledge of the (rational) mean in our actions. Reason is capable of various forms of theoretical and not merely practical development, however : scientific knowledge, intuitive understanding of first principles not least.

One caveat is that Aristotle seems to be divided between a practical 'take' on the good - that it involves a practical life informed by reason - and a different, contemplative view developed or sketched in 'Nicomachean Ethics', X. Here contemplation (theoria) is projected as the ideal life. This is a crux in Aristotelian interpretation and can't properly be examined here.

What is the Good in Aristotle’s Ethics and how does it differ from Plato’s?


Ad classification problem, several binary vs. one multiclass model

Question: I have a website that shows 3 ad panels at a time. These ads can belong to three different classes (each ad can only belong to a single class, there is not multilabeling).
I want to build a model that gives me the probability of a user clicking (or not clicking) on the ad under the condition that the ad belongs to a particular class. In other words I want $P(click|C=1)$, $P(click|C=2)$ and $P(click|C=3)$.
Now, my first thought was to build one binary classifier for each one of these classes, using only the data relevant to each class at a time.
Someone told me I could probably use a multiclass classifier to do this (in particular, a multilayer perceptron). I think this will not work, since a multiclass classifier will have to learn how to predict the probability that the ad is of a given class AND if it was clicked on (a total of six classes).
My questions are:
1 - Does my argument make sense? I don't feel like it is convincing, can anyone help me put  it in more precise (mathematical) terms?
2 - More importantly, is there a way to build a single model that will accomplish the task (instead of building three), as this person suggested?
Thank you.
Answer: "my first thought was to build one binary classifier for each one of these classes, using only the data relevant to each class at a time."
so using 3 different models makes sense if different ad classes have different inputs.
otherwise you could just use the class as an input ( using dummy variables). if you know the class then you should use it as an input (or to select the model)


Is it written anywhere that one must stand up for what he believes is right?

Question: This may sound like a weird question, but I was wondering if it is written anywhere (Gemarah, Commentators, etc) that one has an obligation to stand up for something he believes is right, continuing to believe and behave accordingly, even in the face of peer pressure.  Is it?
Comment: The question is broadly worded. An example might help clarify what you mean.
Comment: מוטב לי להקרא שוטה כל ימי ולא ליעשות שעה אחת רשע לפני המקום Eduyos 5:6
Comment: A black hat is not halacha. The other things you mention which are machlokes haposkim, why do you call that beliefs. Unless you are a talmid chochom on their level you have no right to give an opinion. And certainly not to others. I am not sure how you quantify standing firmly. How you yourself should act. Certainly you do as you please. But as far as others. If you are among others there may be an issur of loi sisgodadu. And not standing amongst the sitting. One shouldnt make oneself stand out. Again please try and explain again to me the question.
Comment: @Bochur613 Isn't Modern Orthodoxy a subset of Orthodoxy? How can a subset of something be worse than the parent set?
Comment: @Bochur613 Ok, you should reword the question accordingly.
Comment: יקוב הדין את ההר?
Comment: @Fred My apologies. Lets say you hold that one must wear a black hat or that the proper height of a Mechitzah is in accordance to Reb Moshe as opposed to the Satmar Rebbe, or that one holds that Orthodoxy is better than Modern Orthodoxy, does it say that you must stand firmly in those beliefs?
Comment: @DoubleAA What does that mean and where can I find it?
Comment: @Bochur613 What do you mean by stand firmly? Not allow peer pressure to dictate your halachic and hashkafic paradigm?
Comment: @DoubleAA Not worse, just if you believe firmly in one(Not saying I'm on either side) over the other.
Comment: @Fred Exactly what I am referring to.
Comment: @Bochur613 You're missing my point. There is no dichotomy between a subset and a parent set. The former is included in the latter.
Comment: @Fred What part should I rephrase and what should I write to make it clearer?
Comment: http://www.shaalvim.org/yeshiva/torah/view.asp?id=439
Comment: I think its a mitzvah in mishpatim!
Answer: This comes to mind:

ולא יתבייש מפני בני אדם המלעיגים עליו בעבודת השי"ת
A person should not be embarrassed by people who jeer him regarding his service of God

(שולחן ערוך, אורח חיים א:א בהגה)
Answer: The two quotes that come to mind are:

מוטב לי להקרא שוטה כל ימי ולא ליעשות שעה אחת רשע לפני המקום
  [In response to requests that he change his rulings on certain issues:] I'd rather be called insane for all my days, but not be made evil in front of the Omnipresent even for a moment. (Eduyot 5:6 (English))

and

יקוב הדין את ההר
  Let the law cut through the mountain (ie. the strict ruling of the law will not be pushed aside). (Sanhedrin 6b (English))
Comment: These quotes are on the right track for your question, but be careful to understand their contexts before trying to apply them to a given situation.
Comment: As for the first quote: note that if we have a real Sanhedrin that votes and decides a majority position, the rabbi in the minority position is allowed to continue his own personal practice otherwise, or even to give lectures explaining the *theory* behind his view. But if others bring him practical questions, he may not rule in any way other than the majority opinion. (He could simply decline to rule.)
Comment: @Shalom Indeed, and in fact he would get capital punishment for ruling contrary to the court.
Answer: "In a place where there are no men strive to be a man." Pirkei Avot 2:6.
"Every single person is obligated to say, 'The world was created for my sake"' (Mishna Sanhedrin 4:5)."
These two quotes don't exactly say to stand up for what you believe to be right, but they do suggest the vast importance of an individual's individual action. You can't say, leave it to someone else to stand up for the truth.
I don't have it in front of me now, but in Orchos Tzaddikim the author emphasizes that one should forcefully combat heretics (rather than remaining humble or honoring them). After all, we are enjoined to "Know what to answer to an unbeliever." Avos 2:14. So this could include standing up for your beliefs.
Comment: אם אין אני לי, מי לי? וכשאני לעצמי, מה אני? ואם לא עכשיו, אימתי
Answer: A few commonly cited adages from Pirkei Avoth come to mind, which speak about doing that which is right, and doing your best at all times. Some of these may be more broadly applicable than your question, but I still think a lesson can be derived about persevering in the face of adversity.
Ch. 1:12,14

הלל אומר: הוי מתלמידיו של אהרן, אוהב שלום ורודף שלום, אוהב את הבריות
ומקרבן לתורה.
Hillel says: "Be of the students of Aaron, love
peace and pursue peace, love [all of G-d's] creatures and bring them
closer to the Torah."
הוא היה אומר: אם אין אני לי, מי לי? וכשאני לעצמי, מה אני? ואם לא
עכשיו, אימתי?
He used to say: "If I'm not for myself, who will
be for me? But if I am [only] for myself, what am I? And if not now,
when?"

Ch. 2:14-16

רבי אלעזר אומר: הוי שקוד ללמוד תורה, ודע מה שתשיב לאפיקורוס. ודע
לפני מי אתה עמל. ומי הוא בעל מלאכתך שישלם לך שכר פעולתך.
Rabbi El'azar says: "Be diligent to study Torah, and know what to respond to
an Apikoros. And know before Whom you toil. And [also know] who is the
Master of your work Who will reward your efforts."
רבי טרפון אומר: היום קצר והמלאכה מרובה, והפועלים עצלים, והשכר הרבה,
ובעל הבית דוחק.
Rabbi Tarfon says: "The day is short, and the
work is plentiful, and the laborers are lazy, [yet] the reward is
great, and the Master of the house is pressing [for the work to be
done]."
הוא היה אומר: לא עליך המלאכה לגמור ולא אתה בן חורין לבטל ממנה. אם
למדת תורה הרבה, נותנים לך שכר הרבה. ונאמן הוא בעל מלאכתך שישלם לך שכר
פעולתך. ודע מתן שכרן של צדיקים לעתיד לבוא.
He used to say: "The task is not upon you to complete, [yet] you are not free to be
absolved from it. If you learned much Torah, (they) give you much
reward. And the Master of your work is faithful that He will will pay
you the reward of your labor. And know [that] the giving of the reward
of the righteous is in the future [yet] to come."

Text is copied from Chabad.org (see links provided above); translation is my own.
Comment: Not sure if this is a perek shiur or an answer to the question. You have to read between the lines of what the questionnaire really meant hence my reply
Comment: @shulem, fair enough. Better?
Answer: Exodus 23:2

לֹא-תִהְיֶה אַחֲרֵי-רַבִּים, לְרָעֹת; וְלֹא-תַעֲנֶה עַל-רִב, לִנְטֹת אַחֲרֵי רַבִּים--לְהַטֹּת
Do not be after the majority to do ill and do not respond to an argument to lean after the majority to turn.

Onkelos on the verse:

לא תהי בתר סגיאי, לאבאשא; ולא תתמנע מלאלפא מא דבעינך על דינא, בתר סגיאי--שלים דינא.
Don't be after the majority to do ill, and do not refrain from explaining what is in your eyes concerning judgement, complete judgement by the majority.

Rashi brings this down as well, saying that the verse is abjuring the individual to judge with integrity, regardless of what others decide.


Can I get the same document authenticated both with an Apostille and by the Taiwan consulate?

Question: I have a document that will eventually require two different types of authentication - both an apostille and Taiwanese authentication. The document itself would be expensive and difficult to replace or to obtain a second original copy of. Does having one type of authentication certificate affixed to it invalidate it for another type of authentication? If so, what is usually done in this situation?
Comment: This is more of a question for law.stackexchange and not travel, since it is a matter of an official authentication of a document. Since the result is effectively an official copy of the original, the amount of official copies that can exist is irrelevant.
Answer:
I have a document that will eventually require two different types of
authentication - both an apostille and Taiwanese authentication.

These are sequential. The authentication is the primary event. Another name for an authentication (which is slightly more general) is a notarization. An apostille authenticates the authentication, verifying that, for example, the notary who authenticated a document was a genuine notary in good standing.
The purpose of an apostille is to prevent someone unfamiliar with foreign notarization from using a fake notary stamp to defraud someone abroad. This is done by having the notarization's validity confirmed by a single government office in the country where the notary is purportedly commissioned. Then, foreigners relying upon the document need only confirm that the single government office that carried out the apostille is bona fide. This could be done, for example, by getting on the phone with that government office.
For what it is worth, one of my very first cases as a lawyer involved authenticating a long chain of Taiwanese deeds to real estate located in New York State, since the deeds had never been recorded in New York State real property records, for real property previously owned by former President Millard Fillmore (before he served as the 13th U.S. President). The chain of title also contained an affidavit that Millard Fillmore didn't have anyone who could claim to be his common law wife at the time.
Answer: I think that the information provided by @ohwilleke is pretty accurate.
Considering that you did not specify where are you going to do the authentication, perhaps it would be relevant to share a particular situation that happened to me.
A few years ago I needed to authentication a document to send to another country. However, my country was not part of the Hague Apostille Convention at the time. So I went to the consulate of the receiving country and had the document authenticated by the Consular Officer.
Later, in a different situation, but at the same receiving country, I was required to present that document again, but it was necessary to have the Apostille. So I got the first document already authenticated by the Consulate back to my home country and had it authenticated with the apostille.
In the end, I have a document with both authentications, but due to a particular situation with my home country.
Nowadays, I know that it is not possible anymore to have the Consulate authenticate a document, only through the apostille.


Previous expats with expired Texas license

Question: How does an expat from Ireland returning to work in Texas for a long-term project with a refinery, with an expired TX license, go about renewing or obtaining a current license? Does he have to go through the entire application process again, as though it was his first time to work in TX, or are there some 'shortcuts'?
Answer: This Texas DPS webpage says Texas drivers license can be renewed up to two years after expiration:

Most driver licenses and identification cards can be renewed up to two years before and after the expiration date. You have several convenient options to renew your Texas driver license or identification card during this time, including:

Online
By Telephone
By Mail
In person at your local driver license office

The page goes on to state explicitly that if the applicant's TX license has been expired for more than two years, the license cannot be renewed. The page goes on to describe how those applicants can secure a new TX license, which requires applying as a new applicant with a personal appearance at a drivers license office and new testing.
The DPS site does not mention "exchange" of other states' or countries' drivers license for a Texas license. I conclude such exchange is not permitted.


Is Cartesian Product same as SQL Full Outer Join?

Question: Is Cartesian Product same as Full Outer Join found in Relational Database SQL?  I ask because I am taking a Discrete Mathematics course and I just want a better understanding of how what I am studying (Cartesian Product) applies to or maps to what I do when developing software (SQL Joins).
Answer: No: the Cartesian product is not the same as SQL FULL OUTER JOIN.
For example: if A = {1,2} and B = ∅, then A × B = {1,2} × ∅ = ∅, i.e. the Cartesian product yield the empty set. But, since FULL OUTER JOIN does not require each record in the two joined tables to have a matching record, if B is empty and A is not, FULL OUTER JOIN will still return some rows.
However, CROSS JOIN will return the Cartesian product of rows from tables in the join.
The link between is SQL and discrete mathematics is relational algebra (cf. Codd's theorem) if you want to check out more the maths behind SQL.
Comment: No, cross join is called "relational Cartesian product" but it it isn't Cartesian product. The output of cross join contains tuple union/join/concatenations of elements of input sets. Cartesian product of n sets returns n-tuples, which here would be 2-tuples where each element is an input tuple. Cross join returns a certain subset of the Cartesian product of certain projections of input tables.


Are researchers allowed to keep applying to various IRBs until they finally get a seal of approval?

Question: Let's say a researcher has a somewhat controversial research project (such as a vaccine challenge trial). Is it considered legal to keep applying for institutional review board (IRB) until you eventually get accepted? For example, you start from this list of independent IRBs and go down the line until someone finally approves what you're trying to do. Would the researcher be obligated to disclose rejection from other IRB boards or could they point to the latest approval and consider the permit is given to them to start the project?
Comment: Could you spell out IRB once, please?
Comment: If you are really seeking a legal opinion, then the Law SE is the place.
Comment: @John Custer that doesn't mean the question is off-topic here, though.
Comment: @Dirk The tag summary seems pretty good: "An IRB (Institutional Review Board), also known as an independent ethics committee or ethical review board, is a group that reviews and monitors research involving human subjects."
Answer: From the FDA:

If an IRB disapproves a study submitted to it, and it is subsequently sent to another IRB for review, should the second IRB be told of the disapproval?

Yes. When an IRB disapproves a study, it must provide a written statement of the reasons for its decision to the investigator and the institution [21 CFR 56.109(e)]. If the study is submitted to a second IRB, a copy of this written statement should be included with the study documentation so that it can make an informed decision about the study. 21 CFR 56.109(a) requires an IRB to "... review ... all research activities [emphasis added] ...." The FDA regulations do not prohibit submission of a study to another IRB following disapproval. However, all pertinent information about the study should be provided to the second IRB.

So, at least for research relevant to the FDA (which would include vaccine challenge trials in support of FDA approval), subsequent IRBs would have to learn of previous rejections. It may be possible to work around a particularly stubborn IRB this way, but I doubt an IRB is going to want to approve many studies that have a track record of repeated rejection by others.
For multi-site studies governed by the NIH, the new rule is that one IRB is chosen. It used to be that every site involved had their own IRB that had to approve the study; the new centralized scheme seems like it would be more open to choosing a permissive IRB as the single IRB, but as far as I can tell this has to be chosen ahead of time; you couldn't iterate through each of the site IRBs until you found one that was happy with the proposal. I haven't been through this process, though, so I'm not certain what the explicit protections are there.
At my own institution, and I imagine at most every major US research university at least (I have far less familiarity with human subjects research protections outside the US so I can't speak to that), there is only one IRB. Having a solid institutional process for ethical review is one of the criteria that funding agencies consider when awarding grants. You can't go to an independent IRB and overrule your local IRB. There may be different people who review applications but their selection is not up to the researcher. It might be possible for a researcher to shop around at different institutions to house the study, but that's far more unusual than doing the work at their home institution (and would require finding collaborators at all of those other institutions).
IRB approval is a bit of an exhausting process, and it isn't as simple as "submit your application -> approved or denied" - there can be a lot of back-and-forth with IRB over gritty details.
Comment: @JonathanReez Yeah, but I would argue that controversial research is in some ways much much more risky for a company than for an academic. You *really, really* don't want to tick off the regulators that approve your products. Shady research practices also don't look good in the newspapers. Companies and other researchers definitely do the "jurisdiction shopping" you mention (I hear whispers of this a bit because my own institution has a particularly strong reputation as a stickler - rumors go around that people avoid us because of that).
Comment: @JonathanReez Yeah, I'd group that in with the "jurisdiction shopping" as you term it, though; they didn't get rejected and then move on, they just chose to not continue the process that required more disclosure. Not excusing them by any means, but not quite the scenario you initially described in the question.
Comment: This is from the FDA. Other federal agencies have their own (similar) statements @JonathanReez, so the rules actually apply very broadly. There is also a federal database of IRB decisions.
Comment: Excellent answer! So sounds like IRB strategies are only available to companies doing clinical research *and* the only viable strategy is "jurisdiction shopping" where you have to guess in advance which IRB is most likely to stamp their approval.
Comment: From a quick Google search it [sounds like an actual thing](https://medium.com/@LetendreMartin/am-i-irb-forum-shopping-case-study-1-investigative-site-review-f3471df1a13d).
Comment: I'm waiting for someone to ask about the ethics of adding a useless co-author to the project, just to be able to use their university's "soft" IRB.
Comment: @AndreasBlass - from one perspective, that co-author would be quite useful...
Answer: I think this would be difficult to do for most, and also unethical unless changes were made to the proposal after each "try".
Difficult, since most researchers are associated with a university who has a single board (perhaps a few for different disciplines). The university won't like research that hasn't passed their own board.
There are other boards, of course, but if one of them tells you no and points out ethical flaws in the design, it would be an ethical lapse to try to "shop the proposal" around without change. The ethical flaws remain.
Better to modify the design to avoid the issues and go back to the same board.
Comment: The ground is shaky all the way down. If you have an emotional commitment to some line of research that other scholars feel is problematic, you are probably the one that is wrong.
Comment: @JonathanReez - that isn't going to change the fact that the places I know of have _one_ IRB that they use for a given field. If it doesn't pass that board, then it doesn't happen.
Comment: What if you honestly believe that the IRB is wrong and want to try your luck until you find a sympathetic soul?
Comment: @Buffy Your (excellent) comment should be part of the answer, perhaps the conclusion.


Including subdirectories in static routing for Bottle.py web framework

Question: I'm trying to use a bootstrap themed site with a lot of vendor plugins, and use bottle.py for a web server with a few API services built in.
I was wondering, if for static routing, is there anyway to call all the subdirectories in the routing request? I want to do something like this (instead of creating a seperate routing path for each subdir)
 @route('/vendors/*/<filename>')
 def vendors__static(filename):
     return static_file(filename, root='./vendors/*/')

Is this at all possible? Is there a lookup time cost involved? Thanks!
Comment: How are you planning on returning multiple files to the client?  `return *` doesn't make sense; maybe you want to concatenate the files?
Answer: Yes, Bottle does support globbing the URI path; see the :path filter.  Here's a complete example based on your original code:
from bottle import Bottle, route, static_file, response

app = Bottle()

@app.route('/vendors/<vendor_path:path>/<filename>')
def vendors__static(vendor_path, filename):
    vendors = vendor_path.split('/')
    responses = []
    for vendor in vendors:
        # you read the file here and insert its contents
        responses.append('<contents of ./vendors/{}/{} go here>'.format(vendor, filename))
    response.content_type = 'text/plain'
    return '\n'.join(responses)

app.run(host='127.0.0.1', port=8080)

Then, a call to http://127.0.0.1:8080/vendors/v1/v2/v3/myfile produces:
<contents of ./vendors/v1/myfile go here>
<contents of ./vendors/v2/myfile go here>
<contents of ./vendors/v3/myfile go here>

As an aside: static_file returns to the client the contents of one file.  You'll need to think about how you intend to "return" multiple files to the client.  Perhaps you can concatenate their contents (as in my example above)?  In any case, this is a separate question from the Bottle routing so I'll leave it at that.


Programmatically Add Features for Role assignment in Ubercart Drupal 7 product node

Question: I am trying to create a product programmatically and set it features for role assignment, that a user gets a specific role after he purchases, i tried all the ways i can but couldnt get it working. below is the code i used for adding it, but when i edit the feature for role assignment it doesnt hold the values i set in the edit feature form.
function add_product_feature($nid, $sku){
     // Insert new product into the uc_product_features tables
     $desc = "SKU: ".$sku."
Role:
     purchaser
Expiration: Global expiration
      (not overridden)
Shippable: No

      Multiply by quantity: No";
      $nid1 = db_insert('uc_product_features')
      ->fields(array('nid' => $nid,'fid' => 'role','description' =>
      $desc,
      ))
      ->execute();
}

Answer: Don't do that. Inserting into the DB directly can cause you problems down the road; there's already been code written to do what you're trying to do.
Look at the uc_roles functions/documentation and follow how it adds product features via uc_roles_feature_form_submit submission handler and its uc_product_feature_save() call.


"hook from which a body hangs" or "hook on which a body hangs"?

Question: Following a discussion on Russian facebook page, will you say "...hook from which a body hangs" or " ... hook on which a body hangs".  The claim was that both ways are acceptable, is it right?
Comment: Your word placement is non idiomatic. I'd say "hook which a body hangs **from/on**". Note that some people say sentences should not end with prepositions, but "that is the sort of nonsense up with which I will not put" *(Winston Churchill quote)*.
Comment: And what will be your answer after typo is corrected?
Answer: One subtle difference is whether the object is directly attached to the hook:

A fish is hanging on a hook. (The hook is physically in the fish.)
A mountain climber is hanging from a hook in the cliff.  (A rope connects them.)
A jacket is hanging on a hook.
A flowerpot is hanging from a hook in the ceiling.
Comment: I think you could still be directly attached to a hook, but not have it impale you, and still use **from**, e.g. if there's a hook in the cliff and my fingers are wrapped around it, I'd probably say I was hanging **from** a hook. So for me it's less about direct attachment, and more about impalement.


How do you search for new enzymes that are more stable for handling, immobilization?

Question: Noob here. I get that I should  deduce what characteristics the ideal new enzyme should meet, and then use tools such as PDB and blast to compare to the old enzymes, and use other tools such as pymol, but I have no idea on how to approach this. Where should I look for tutorials?
Comment: Please consider the answer and upvoting/accepting. It's good for site stats and its a good answer IMO.
Answer: From your title, you are after better immobilisation, i.e. your enzyme behaves poorly when bound.

Poor thermostability: Engineering enzymes for better thermostability, involves predicting mutations that improve its Gibbs free energy (∆G, negative potential = better). Finding mutations that improve a protein by going through the mutational landscape is called scanning.
Rosetta pmut_scan is a command line tool to do this, while Pross is a really nice webapp that also does it.
Poor catalysis: if your attachment is close to the active site, that is a design flaw and you need to attach on the other terminus or within a loop. Circular permutation may be an option.
Aggregation: your enzyme aggregates due to pI close to 7 (see protparam) or has a face that is hydrophobic (see the APBS plugin shipped within PyMOL). Rosetta supercharge is great at suggesting mutations to decrease the pI, but if doing it crudely by changing Gln -> Gln & Asn -> Asp, do check for surface exposure.