Had the centrifugal force of the rotation of Earth in the past forced liquid, hot Pangea to be positioned near the Equator?

Question: Had the centrifugal force of the rotation of Earth in the past forced liquid, hot Pangea to be positioned near the Equator? Maybe also a question for 'GSE' but if we deal with centrifugal forces and liquids as my opinion, it is better as a 'PSE' question. Also, would this centrifugal force force Pangea to be shorter in N-S direction than E-W direction and, to not forget, should it also had forced Pangea to be thicker at the Equator than at North and South locations?
Comment: For some reason I read "liquid hot Pangea" to the tune of "funky cold Medina"
Answer: About the centrifugal effect:
Before contracting into a planet the proto-Earth was a proto-planetary disk. As the planet formed this disk slowly became more spherical. Because of the rotation it did not contract all the way to spherical.
Currently the equatorial radius is about 20 kilometer more than the polar radius. That means that to move from the Equator to the poles is to move downhill.
At 45 degrees latitude the local plumbline does not point towards the Earth's center; there is an angle. The angle is about 1/10th of a degree.
In order to circumnavigate the Earths axis a centripetal force is required. The downhill slope provides that force. At 45 degrees latitude the ratio is about 1/580. Take your own weight, divide that by 580. That gives the amount of required centripetal force (the amount of force in the direction perpendicular to the local plumb line.)
That is why the water of the oceans doesn't all flow to the equator. Around the equator the oceans are not deeper. They're not deeper there because the Earth itself has an equatorial bulge.
Plate tectonics
The forces that move the tectonic plates are due to drag from convection cells underneath the plates.
The plates are effectively floating on top of the earth layers underneath. The equatorial bulge of the Earth is such that there is no tendency to drift to the Equator, nor a tendency to slump to the poles.
Equatorial bulge
The equatorial bulge is just right because the Earth contracted until a point was reached where further contraction would cost more energy than would be gained.
When a rotating celestial body contracts the angular velocity increases. The energy for that acceleration comes from release of gravitational potential energy. Prior to equilibrium state the amount of gravitational energy released (due to contraction) exceeds the energy cost of increasing angular velocity. When that excess dwindles to zero the contraction stops.
Answer: Earth is slightly bulged at equator side due to centrifugal force, so it's not perfectly round as shown in globe:

And about Pangea, it is fair to assume that the centrifugal force has some effect; yet I think more geological factors should be considered. This Wikipedia article is also useful for your question.
Answer: Without detailed knowledge of the involved material properties (which I don't have, sadly) it is difficult to say for sure. But I see several points that make this scenario seem unlikely to me.
Since the earth's crust is mostly solid, this is not just a question about the liquid state. First, the centrifugal force would have to be strong enough to exceed the ultimate strength of the crust material (probably something involving large proportions of Silicon Dioxide, but of course this doesn't tell much about ultimate strength, due to varying other components and microsctructure) for tangential redistribution to take place.
Then the known plate tectonic motion is driven by convective flow in the earth's mantle, which is affecting lithospheric plates due to some (effective, because the mantle is also quasi-solid) viscosity. If the centrifugal force were to have an influence on plate tectonics, it would have to be stronger than these viscous forces. On the other hand, the liquid water on the earth's surface is certainly experiencing orders of magnitude smaller viscous forces than the mantle. So it is much easier for water (i.e. the Tethys ocean) to accumulate at the equator, if tangential redistribution were a topic.
However, the most important point is, that centrifugal force does not only affect the earth's crust, but also the mantle, and since the crust has only a tiny thickness and the mantle is "more liquid" than the crust, it is more likely that the mantle will just buckle subject to the centrifugal load, which is already enough to restore force equilibrium. This slight ablation of the earth is what can actually be observed today, and I would see no reason why it should have been qualitatively different in the past.
Finally, if Pangea were forced to the equator, why are today's continents obviously not forced to the equator.
Given all that, I would say it is rather unlikely that Pangea was drawn to the equator.


MCMC: sampling or optimization?

Question: I need a conceptual clarification on Markov Chain Monte Carlo (MCMC). I have read that MCMC is used to sample from a posterior distribution when the shape of the likelihood distribution $p(x | \theta)$ can be roughly estimated.  However, the applications I have seen so far are used to find the parameters that better describe this likelihood distribution by an iterative stochastic process. According to this, we iteratively propose parameters that are accepted if a specific requirement is met, e.g. the ratio between the unnormalized posterior distribution given the proposed parameters $p(\theta' | x)$ and the posterior given the current parameter $p(\theta' | x)$ exceeds a certain threshold (this is the Metropolis algorithm). If what I am saying is correct, we are not trying to sample from the posterior, but we are trying to optimize the underlying distribution that could have generated the data.  What am I missing?
Answer: You are referring to the Metropolis algorithm. What it does, at each iteration it proposes a new value $x'$ that is accepted with probability $\min(p(x') / p(x), 1)$ what enables us to sample from the distribution $p$. This may look similar to simulated annealing, an optimization algorithm, but they are not the same. First, Metropolis generates a sample at each step, simulated annealing just cares about the current value. After using the Metropolis algorithm, you are left with multiple samples from the distribution $p$. You can use those samples to find a region of the distribution with the highest concentration of the samples, the mode of the distribution (the maximum), but you can also use them for other purposes. Moreover, the acceptance criteria used in simulated annealing leads to exploring the possible values first, but as temperature $T$ decreases, it focuses on exploiting the most promising values and ultimately finding the optimal one. The Metropolis algorithm does only the exploration, so if you care only about finding the mode of the distribution, it wouldn't be the most efficient way to do it.
Comment: My confusion is related to your first sentence. Based on what I have seen, the proposed values are the distribution parameters (e.g. mean and std dev. for a Gaussian likelihood), not the data points. That is, we collect multiple values for the mean of the distribution. Isn't this trying to optimize the mean then? And if so, why don't we just store the x: argmax p(x)?
Comment: @maurock we are collecting values from the distribution, not from its mean. So there's nothing "optimal" about them.

MCMC: sampling or optimization?


Kali linux aircrack

Question: I have AirPort Extreme network card and when I try to use airmong-ng on kali linux in a virtual machine this does not work. I know I need a usb-network card if I want to  make this work but if I boot kali from a cd or usb do I still need this because then I won't be sharing internet with my macbook and it saves 30 bucks.
Comment: It's never wise idea to run hardware operations via a virtual machine. Try Kali LiveCD instead that should operate fine. If you really want to use it within a virtual machine you'll need to bridge it across correctly.
Comment: The bootable OS should work fine, like @Paul said. Sometimes a VM has trouble sharing hardware with its host OS, but when only Kali is using the network card everything ought to go smoothly.
Comment: https://www.thinkpenguin.com/gnu-linux/wireless-n-m2-ngff-card-v2-tpe-m2ncrd2
Answer: Unfortunately not all WiFi cards / drivers work well on Kali.
Especially for monitoring... Please have a look on this link

A common problem in pentest distro such as Kali or BackTrack Linux is
  when users trying to use a card which is not supported or there just
  isn't a supported driver. Most of the following cards are priced below
  $50USD and they take care of a massive headache and saves time to
  troubleshoot driver issues rather than investing time to actually do
  something.

In my case, I had to purchase a TP-Link WN722N as I experienced too many issue with my PCI-E WiFi

Kali linux aircrack


Seeking Geodata on German Roads

Question: I am looking for a free datasource (or a possibility to extract that data from OpenStreetMap) on Germany`s roads. I need this data for the purpose of routing/ calculating the travel distance between several points. The programs available to me are QGIS, ArcGIS and R Studio. Unfortunately, I do not know python language, thus the geodata should be readable in one of those programs for the purpose of my calculations.
Answer: I would suggest to start with https://download.geofabrik.de/europe/germany.html. You can download the .pbf files and import lines & multilinestrings into your GIS software (at least QGIS). In OSM roads have a key = highway. For details please check https://wiki.openstreetmap.org/wiki/Highway. In R you can use osmdata library to access the data via Overpass.

Seeking Geodata on German Roads


Unity3D : Where to put external files?

Question: I want my game to be user-translated friendly.I put .text file to Data folder from where strings will be read. What is Editor alternative for data folder ? Also i know compiler ignore some files, how i can tell compiler to include this one ? thanks.
Answer: Look at StreamingAssets.
When you build your projects, all folders and files are packed, making it difficult, or even impossible, to edit.
All except one folder. The StreamingAsset folder. Retrieve its path with
<code> Application.streamingAssetsPath
</code>
This folder is not put in the package when you compiled, but stays next to it, letting anyone edit its content
Comment: Yes. This is exactly what i need. Thanks a lot, I didn't know about this.

Unity3D : Where to put external files?


How do you tell if a cheese rind is edible?

Question: When I buy a cheese from a type I don't know, I usually discard the rind, just because I'm not sure it is edible. Is there a way to tell if it is edible, other than researching the cheese type?
Comment: Make someone else eat it. If they don't fall over. It's safe.
Answer: So this link and this link suggest that there are 3 kinds of rinds.  Summary below:
Bloomy: Appears white, soft, maybe fuzzy.  Can also be reddish/brownish.  Comes on softer cheeses that have a more custard-like flavor.  Formed by a spray of penicillium candidum before aging.  Edible, but the flavor changes and may taste ammoniated over time (consume so long as it's palatable)
Washed: Color ranges from pinkish red to orange or brown.  Caused by bathing the cheese in some kind of solution, be it a salty brine, beer, brandy, wine or some other alcohol.  Contributes to the flavor in some cheeses, and tastes unpleasant in others.
Natural: Formed by letting the cheese age on its own, drying out and growing whatever molds might be present in the cheese or air.  Tends to have a concentrated flavor of the cheese, but may not be palatable.  Examples: Stilton, Montgomery Cheddar, Parmigiano-Reggiano.  Sometimes comes under a cloth cover.  Should be edible, minus the cloth.
Additionally, there are two other possibilities
No Rind: There should be no guessing here.  You've probably had cheeses with no rind...because they might come in a container.  Ricotta, fresh mozzarella, and creme fraiche come to mind.
Wax/Twig/Cloth: Inedible.  Should be discarded
My personal takeaway from this quick research is that I should learn to distinguish artificial covers (cloth/wax) from rinds.  It seems like those that separate from the cheese will either be an artificial cover or an old rind, both of which are undesirable.
If it's indeed a rind, then I'd taste it, both alone and with the cheese, to determine if it's palatable.  For Parmigiano-Reggiano specifically, I've read that it goes well in soup.  Perhaps this is because it's unpalatable-y hard, but still contains the concentrated flavor.
TLDR: look for cloth/wax.  If none, is it tasty?  Does it feel good in the mouth?
Comment: @hippietrail It's not always completely obvious. One thing I'll do from time to time is dig my fingernail into the rind and see if I can pull/pry it away from the rest of the cheese. Sometimes it just crumbles and sometimes it pulls away as a sort of coarse, waxy cloth.
Comment: FYI: Parmesan cheese rind has lots of MSG and fat, but because it's so dried out doesn't melt completely when you simmer it in soup.  That's why you use the rind.  Cheese which has dried out completely also works.
Comment: *Should be edible, minus the cloth.* You forgot to also mention the box and the label, while we are at it. The answer is really good (+1), I just laughed at that detail.
Comment: Is it always completely obvious when a cheese rind is wax, or does some wax rind resemble the other types of rind in some circumstances?


Use of sunlight in biological processes

Question: Sunlight is used by green plants in photosynthesis, but it is also used by animals in the synthesis of Vitamin D. Are there any similarities between the two processes and how is the light energy actually used?
Comment: Radiation being the source of energy for photosynthesis and vitamin D synthesis seems a reasonable correlation to someone having obviously very limited knowledge about the most important biochemical reaction.
Comment: It's synthesized from a type of cholesterol that is converted to vitamin D by uvb exposture. So nothing like photosynthesis really. See https://ods.od.nih.gov/factsheets/VitaminD-HealthProfessional/#h3 for more.
Comment: [This source](http://www.news-medical.net/health/Vitamin-D-Biochemistry.aspx) explains it really nicely if you have the science background to understand it. Basically, the ultraviolet light of a certain wavelength - or high energy photons - breaks a particular bond in a precursor normally made in the skin. From there, the body takes over.
Answer: We don't get it from the sun, it's synthesized.
Humans can get it...

via nutrition.
via synthesis in the skin, which depends on UV radiation. Sun is the major source of it (the radiation, not the vitamin), and synthesis in the skin the major source of the vitamin. However, it needs further modification in the liver or kidney to become bioactive. UV radiation is necessary and directly causing the opening of a cyclic molecule structure, changing a cholesterol to a previtamin D3.

For more details see chapter 'Biosynthesis' at https://en.wikipedia.org/wiki/Vitamin_D
Comment: At a guess, it's because you start by saying we don't get vitamin D from the sun, then go on to explain how the body makes it.  Maybe it's just bad wording: of course vitamin D molecules aren't literally part of the solar wind :-)
Comment: @jamesqf I think it's legitimate to re-use the phrase from the question and to point out that things are different.
Comment: What is the down vote about?
Answer: Similarities
Despite major overall differences, there are some basic similarities in the two processes:

Light energy excites an electron to a higher energy level.
A covalent bond is broken as the electron moves elsewhere. This
process is called 'photolysis' and is purely chemical.

Differences
The difference is in what happens to the excited electron and the extent of involvement of cellular proteins and lipids:

In Vitamin D synthesis the electron just moves 'spontaneously' to
another bond in the new molecule that is formed. That is the end of
the matter and enzymes are not involved in this reaction.
In photosynthesis the light is first captured by photoreceptors and
funnelled to the site of photolysis. After photolysis, the
co-operation of many proteins in a complex process within a
membrane-bond system ensures that the excited electron is transferred
to NAD+, forming NADH, the reducing power for then subsequent
conversion of carbon dioxide to phosphoglycerate. (An
electrochemical membrane potential is also generated, allowing ADP to
be converted to ATP, the hydrolysis of which is used for formation of
the C-C bonds of the phosphoglycerate.)

Vitamin D synthesis
The photolysis step in Vitamin D synthesis is shown below:

The precursor molecule is formed from cholesterol in a series of enzymic reactions and the Vitamin D3 produced (actually resulting from a spontaneous rearrangement of the initial product molecule) may be metabolized further in enzymic processes (see Berg et al. for more detail). However the photolysis of the bond indicated in red is purely chemical.
One may ask why no other electrons are raised to a higher energy level and the  corresponding bonds broken. Other electrons may conceivably be excited, but in the absence of a suitable reaction pathway to a compound of lower thermodynamic free energy the electron will fall back to its original energy level, liberating heat. In the case of 7-dehydrocholesterol the co-ordinated double-bond system provides a suitable reaction pathway to a product of lower free energy. One can think of light (of appropriate wavelength) providing the activation energy of the reaction (overcoming the energy barrier resulting from the higher free energy of the reaction intermediate).
Photosynthesis
The reactions of photosynthesis that utilize light energy (the so-called 'light reactions') involve two complex photosystems that are described in standard texts, e.g. Berg et al.. The simplified diagram deals only with the overall photolytic process.

The molecule undergoing photolysis here is water — the two H–O bonds are broken and oxygen is produced. However in this case the product is incidental to enabling the electron to reduce NAD+. (Chemically oxidation is removal of electrons, and reduction their addition.) As mentioned above, this complex series of reactions also results in an electrochemical gradient within the chloroplast. The movement of hydrogen ions through an ATP synthase in the thylakoid membrane of the chloroplast stroma converts ADP to ATP (in a similar manner to that of oxidative phosphorylation).
The result of the photolysis in this case is the provision of molecular reducing power and 'energy' that will be used to convert 1-C carbon dioxide to the 3-C reduced sugar in a separate series of reactions that do not themselves involve light energy (these are referred to as 'dark reactions', although they obviously do not have to take place in the dark).
Coda
Although one often hears loose reference to light energy being used to 'make' Vitamin D or sugars, this can be quite misleading. I would suggest that it is better to express what the light energy is achieving in chemical terms and then place this in the context of the relevant synthetic process.

Use of sunlight in biological processes


External GPU vs. internal GPU for machine learning

Question: What are the pros/cons of using external GPUs (e.g., connected through thunderbolt) vs. internal GPUs for machine learning?
Answer: Here is a good discussion on a similar question on reddit:
https://www.reddit.com/r/MachineLearning/comments/twnz1o/d_which_external_nvidia_gpu_should_i_buy_for/
Essentially, when connecting an external gpu, it depends a lot on the pc you're connecting it to. You need a good cpu and general hardware in that pc, in order for the gpu to function properly. that's why many recommend to build a powerful gpu home computer right away instead of buying an external gpu. this however comes at much higher cost. an advantageous use of external gpus may also be using cloud gpus from services like colab or better ones. It comes at a monthly fee, but may be easier, quicker and cheaper than building your own pc ^^.
Answer: External GPUs are often more easy to swap out than internal GPUs. Thus, there will be more options for hardware and software upgrades for external GPUs.
Internal GPUs may have better connections. Thus, moving data is will be less likely to be a constraint (i.e., GPU starvation).


Making a plant as energy efficient as possible

Question: Essential Question : what adaptations can be made to a crawling vine that would allow them to obtain as much energy as a top level consumer if the vine was on a planet 1 au from a sun sized star?
Answer: Typical Earth plants convert about 1% of the solar energy into useful "work", which explains why we need about one acre of cropland to feed one person under ideal conditions.
The typical "top" of the food chain creatures are omnivores (like us) or carnivores (like our house cats) gain advantage by concentrating the diffuse solar energy gathered by plants through the mechanism of eating creatures which eat plants (the typical retort to an obnoxious vegetarian is to say "my food eats your food", which summarizes the process).
So your plant would have to somehow become far more efficient at collecting and using solar energy.
The first modification would be to make the energy collection mechanism work at more than one wavelength of light. In a plant, this might require using multiple different molecules of Chlorophyl analogues, so the resulting leaves would be black, as they would absorb light rather than reflecting many wavelengths.
The internal mechanisms of energy collection and transfer would also have to be made more efficient, although our current understanding of photosynthesis is incomplete, so exactly how this would be done isn't entirely clear.
One issue with a high efficiency plant would be waste heat rejection. Absorbing and converting a higher percentage of energy from the sun will potentially heat the internal structure of the cells to the point that biological structures could fail. A highly energy efficient plant might need to invest in some sort of active cooling system. You could imagine a series of leaf like radiators which always turn edge on to the sun and pump hot sap for cooling. In an aquatic environment, plants might have "open cycle" cooling and transpire a great deal of water to reject waste heat. Other mechanisms might be evolved to take advantage of the local environment.
Other adaptations might be to make more use of fruiting or tuber like bodies as energy reservoirs for the plant metabolism, rather than for the seed. In this case the plant could consume the fruit or tubers during periods of winter, in order to remain active and "alert".
What the plant does with the extra energy is up to you, but "warm blooded" plants would certainly thrive in an arctic environment, while regular plants are already adapted to most of the existing biomes of the Earth.
Comment: Fun fact thermogenic plants already exist! https://en.wikipedia.org/wiki/Thermogenic_plants For instance the skunk cabbage uses heat to melt through snow around it, the most of these plants seem to use it for other more mundane purposes like attracting pollenators.
Answer: They would essentially need to have high end solar panels converting sunlight to electricity for the needed energy transfer.
Answer: Have Dark Plants
Have it be completely black. Black plants absorb more light, meaning less,is reflected to your eyes and it looks dark.
Make Them More Efficient
Make your plants have a more efficient chemical in them, other than the normal clorophyll.
Store Energy
Make the plant have certain growths, coverings, or just parts of the plant which store energy for later use in times of need. In animals, fat would store a lot of energy. You could have something similar in your plants, or draw sustenance from your fruits in time of need.
Don't Kill The Whole Plant
There are some trees, such as a juniper/cedar tree, which, when water is scarce, cuts off nutrients to parts of itself. That way, instead of the entire tree withering, a single limb dries out and dies, allowing the rest of it to go about its business.
Comment: The second and third sections come from @Thucydides I hope you don't mind. I didn't go as in depth, and I added a little bit of different things to storing energy.


THE utility patent

Question: I have been thinking of submitting a utility model in USA however i want to know what is the difference between utility model and utility patent and if the USPTO has utility model?
Answer: No, there is no concept of a Utility Model in the U.S. patent system. Many, many other places, Germany, China and Japan, for example, have utility model or petty patents that can have a lower bar for patentablity, a shorter term and often a lower assumption of validity than normal innovation patents. Unlike other places, the U.S. does have Design Patents for the protection of the ornamental aspects of a manufactured product. They have a shorter term than U.S. Utility Patents but are not really analogous to a petty patent since they cover the "look", rather the functioning or structure.
Utility Models are also usually confined to certain areas of technology - typically devices and excluding processes and systems.
Comment: thanks - added to answer
Comment: Just to add a little bit on what you have explained, only devices may be protected by utility models or petty patents. Some countries also allow the protection of compounds. However, methods and, in principle, systems cannot be protected with such industrial property right.

THE utility patent


Can insight be gained at any point in insight meditation, or do you have to go through all 7 purifications of insight?

Question: Can insight into impermanence suffering and not-self be gained at any point in insight practice or do you have to go through all 7 purifications of insight?
Answer: The seven purifications are not all related to insight; only the sixth specifically deals with the realization of three characteristics. The first purification is related to morality, and the second to concentration. The seventh is super-mundane, so is not related to realization of the three characteristics. The fourth and fifth do somehow relate to the three characteristics, but the fourth has more to do with understanding cause and effect, and the fifth to do with finding the path rather than walking it.
Answer: Some insight into 3 characteristics is gained at every stage, though the depth (and thus the transformative power) of this insight is different, and also type of objects in which 3c are seen are different as one moves through the stages of insight. One goes forward through the stages by understanding more and more of 3c.


Synonym for "proud parents"

Question: I'm looking for a synonym for "proud parents" or "thrilled parents" (of a newborn child) but don't want to use proud as it looks bit show-offy.
Comment: Well, if you don't want to use *proud*, you've already got your *thrilled* option.  But honestly, the phrase *proud parents*, when used to refer to parents of a newborn, is generally understood to mean *happy* parents.  They are beaming because they are overjoyed, not because they are proud, per se.
Answer:
Delighted/well-pleased/joyous/elated/ecstatic parents
Comment: Delighted is very good, thanks. not enough rep yet
Answer: "Recently reproduced?"
"Delighted dad" and "Merry mom"
"Excited ancestors?"  (not quite alliterative, but hey)
"Pleased progenitors?"
"Beaming begetters?"
Comment: I should have been clear - only looking for the "proud" or "thrilled" part
Comment: @romesub - In that case may I suggest: [http://thesaurus.com/browse/proud](http://thesaurus.com/browse/proud)
Comment: yes i did that, but could not find "delighted" which suits me perfectly from the other answer
Comment: @romesub - My point is that in your question you asked for a synonym for the *phrase* "proud parents".  If all you wanted was a synonym for a single word, then this is basically a thesaurus lookup.
Answer: Instead of being proud parents we are "Blessed parents" and also I've substituted "being a proud American to Blessed American.
Comment: That introduces a religious connotation of course, which is fine, but may not always be appropriate.

Synonym for "proud parents"


Can the Apple Watch be Worn While Bathing?

Question: Can you wear the Apple Watch during bath time? What is it's resistant to both water and soap?
Answer: The Apple Watch is splash and water resistant, not waterproof. Although it would likely survive a quick dip, long submersion isn't recommended and could kill your watch. If you want to wear it in the tub while playing with your favorite toys, you can (even though Apple says not to), but keep it above water. You're to probably better off keeping it away from water though, especially if your watch and corresponding band gets sudsy.
Comment: That is correct if you have the Apple Watch series 1
Answer: I use it in the shower because it is waterproof for 30 minutes at a maximum depth of 1 metre and soap won't affect it just don't use REALLY hot water or you might overheat the watch and plastics/rubber
Comment: What a splendid idea! You are really useful!


How do I change the font size to export the pdf in datatables plug in

Question: How do I change the font size to export the pdf at datatables plug in?
I looked at the sources and could not find where does it!
any body can help me??
thanks
Answer: As Adam stated, you must modify the action script. In TableTools 2.0.1 the file i the one that Adam stated.
In the action script Fonts are defined on line 212 for the title:
        pdf.setFont( new CoreFont(FontFamily.HELVETICA), 14 );//14 is the font size
        if ( title != "" )
        {
            pdf.writeText(11, title+"\n");
        }

and on line 218 for the other text
        pdf.setFont( new CoreFont(FontFamily.HELVETICA), 11 );
        if ( message != "" )
        {
            pdf.writeText(11, message+"\n");
        }

There is full reference for the library used to generate the PDF (i point out the font-part) here : http://alivepdf.bytearray.org/alivepdf-asdoc/org/alivepdf/fonts/FontFamily.html
After you have modified the action script you must compile a new copy_cvs_xls_pdf.swf with the command found on top of the action script file:
Compile using: mxmlc --target-player=10.0.0 -static-link-runtime-shared-libraries=true -library-path+=lib ZeroClipboardPdf.as
You'll need the Flex 4 SDK to build the SWF - which you can get free from the Adobe open source pages.
I tried it and it works.
You should always check out http://datatables.net/forums/ also, i found this that helped me compile the file!
hope it helps
Comment: hey great ,,, but i am new in this .. can you guide me how i can edit " .as " file and save it in " .swf " file ...because i download main " .as " file and edit some front etc and save it in swf file ..but nothing happens...
Comment: In addition: for Flex SDK version 4+ change --target-player part to `--target-player=11.1.0` and also change filename from ZeroClipboardPdf.as to `ZeroClipboard.as`
Answer: The font text is rendered  directly in Flash, and can not be modified with CSS. You would need to modify the ActionScript file for TableTools to change the font size.
It is located in
<Datatables Location>/extras/TableTools/media/as3/ZeroClipboardPdf.as

Comment: @bungdito Unfortunately I don't know ActionScript, sorry.
Comment: yes, but in that file (/extras/TableTools/media/as3/ZeroClipboardPdf.as) i can't find "font.size". how do i change the font size for the pdf, thx
Answer: May be its to late to answer this,but i really didnt find any supporting documents from the author or in any other website regarding tabletools syling techniques...no shame to say i really didnt had much knowledge on actionscript at that point and was searching for a solid document online.But all was in vein.In a nut shell this what you have to do to change styling to the generated pdf
1.Download and install flex sdk 4.
2.Take latest AlivePDF.swc
3.Set path and edit the AS file
Answer: I would like to share my experience as well. It might help someone like me who doesn't any background in ActionScript.
Key thing is that the there are two versions ZeroClipboard class in as3 folder

one in ZeroClipboard.as file
other in ZeroClipboardPdf.as file

It's obvious that we would be working with ZeroClipboardPdf.as file, if we want to change the font size for Pdf exports. However, when I tried the command given at the top on this file
mxmlc --target-player=11.1 -static-link-runtime-shared-libraries=true -library-path+=lib ZeroClipboardPdf.as

Changed --target-player to 11.1 as per comment above
I got the following error
Error: A file found in a source-path 'ZeroClipboardPdf' must have the same name as the class definition inside the file 'ZeroClipboard'.

So here is what I did

changed file with name 'ZeroClipboard.as' to 'ZeroClipboardNonePdf.as'
changed file with name 'ZeroClipboardPdf.as' to 'ZeroClipboard.as'

Then, used this command
mxmlc --target-player=11.1 -static-link-runtime-shared-libraries=true -library-path+=lib ZeroClipboard.as

and it generated a file named ZeroClipboard.swf in as3 folder and I renamed this file to copy_csv_xls_pdf.swf and used in my project.
Dev Env: Windows 7, Adobe Flex 4.6


How to increase Username Limit

Question: Can anyone recommend the file I need to hack in order to increase the username limit?  I believe it is 25 characters and I need it increased.
Answer: I'm not at my workstation, so I can't search for you, but here is a technique I've used for tracking down code specifics inside a code base. SSH in to an EE app server and navigate to system/expressionengine. If you can figure out a specific expression that is related to limiting user name length (such as count($username) >) you can use grep to search through text/PHP files for instances of that expression:
grep -nr . -e "count($username) >"

You probably have to escape the expression because it is a regex search. But that command should recursively search and return what file and line number the expression is found in.

How to increase Username Limit


How does Windows 7 login work?

Question: What are the involved processes in Windows 7 login authentication and what do they do?
Comment: Unfortunately, the edits to not make the question any less broad.
Answer: Like the most secure logins, Windows uses an hash function to check if the password is correct. When you set the first time your password, it was saved in an hash format. Every time you login into Windows, your input password will be hashed and then it will be compared with the hash saved the first time you choosed your password. If the two hashes are equal, then the password is correct.
EDIT:
First of all, Windows locate the SAM file at C:/Windows/System32/config, reads it and searches the row corresponding to the user who wants to login. Then hash the input password and save it into a variable. Then compare the value of this variable with the hash string of the SAM file. Are the two hashes egual? Ok, you can login.

How does Windows 7 login work?


Is a fox/hyena/jackal/wolf classed as as being of the dog family according to Islam?

Question: Are we able to touch a fox, hyena, jackal or wolf? Are they classed as being of the dog family?
Comment: Do you mean in terms of taharah?
Answer: Initially, before explaining regarding those 4 animals which you mentioned, I ought to illustrate regarding dog and state how it is Najis; According to Islam:

It isn't impermissible(haram)to touch dog even though it is najis,
  so, the only way one's hand becomes najis by touching them is if at
  least 1 of the 2 (hand or dog) has sufficient moisture for it to be
  transferred to other. But in case both surfaces are dry or only damp
  to the extent that no moisture is exchanged and transferred from one
  to the other, the hand or whatever else that has come in contact with
  the dog will not become najis.

Those four animals which you mentioned, actually Fox, Hyena, Jackal and Wolf have the same condition with Dog. e.g. look at the site below regarding the Hokm of Wolf (which has named the condition of wolf as the condition of dog):

www.islamquest.net

Or for further info. regarding eating the meat of wild animals (such as fox, hyena,...), read the following text which has named different kinds of animals and actually it could be helpful for you :

Eating the meat of wild predatory animals that are predatory in
  essence, have strong and sharp nails, claws and fangs such as, lions,
  leopards, cheetahs, wolves, or animals with less sharper fangs such
  as, foxes and hyenas as well as rabbits, even though they are not part
  of the predatory category, are considered haram. Also insects and
  reptiles, such as snakes, mice, lizards, hedgehogs, fleas, lice, etc.;
  the examples for which are uncountable, are all haram. Animals who
  have undergone maskh (metamorphosis) such as, elephants, monkeys,
  bears, etc. are haram as well.

To see the detailed answer, please refer to the sources.
Sources:

www.islamquest.net
www.islamquest.net (2)


Every real number is a sum of irrational numbers

Question: Let $A = \mathbb{R}\setminus\mathbb{Q}$. Then it can be shown that $A + A = \mathbb{R}$, for example by using the fact that $A$ is $G_{\delta}$. Let $q\in\mathbb{Q}$. This means that $q = r_1+r_2$ where $r_1,r_2$ are irrational numbers. But this is not too surprising, as every rational can be written $q = \left(\frac{q}{2} + r_1\right) + \left(\frac{q}{2} - r_1\right)$. The question is, is this the only way? More precisely, if $q = r_1 + r_2$ is rational and $r_1,r_2$ are irrational, does this mean that there exists $r\in\mathbb{R}\setminus\mathbb{Q}$ and $q_1,q_2\in\mathbb{Q}$ such that $q_1+q_2 = q$, and $r_1 = q_1 + r, r_2 = q_2 - r$?
Comment: Yes, take $q_1=0,q_2=q$ and $r=r_1$.
Answer: Yes, the set of solutions to your equations are:
\begin{align}
q_2 = q - q_1 \\
r = r_1 - q_1
\end{align}
where $q_1$ is a free variable allowed to be any rational number.
Answer: You are engaging in a slippery terrain.
When you write $r_1=q_1+r$, do you imply that $r_1$ is the sum of a rational $q_1$ and a "rational free" irrational $r$ ? We shall see that this concept is not so simple.

In fact since $(\mathbb Q,+)$ being a normal subgroup of $(\mathbb R,+)$ we can define the quotient space $\mathbb R/\mathbb Q$ of the reals modulo the rationals.
And thanks to the axiom of choice we can construct a Vitali set $V$ such that $V\subset[0,1]$ and $V$ contains exactly one representative for each class of $\mathbb R/\mathbb Q$.
This may seems a convenient construction but this set belongs to a freak show, it is not measurable and we have no way of knowing what's exactly inside.
Let the representative of a real $x$ be noted $[x]$.
Obviously for any rational $q$ then $0$ seems a suitable choice for $[q]$.
But what would be $[\sqrt{2}]$ ? Would this be $\sqrt{2}-1\in[0,1]$ or maybe $\sqrt{2}-\frac 34$ which is also an element of $[0,1]$.
We could say then that since $\mathbb Q$ is countable, let just have an ordering $\phi$ based on the bijection with $\mathbb N$ and select $[x]=x+\phi(\min\{n\mid x+\phi(n)\in[0,1]\})$.
Unfortunately $[\sqrt{2}]$ and $[\sqrt{2}+17/113]$ would not have the same representative via this process although they belong to the same class and this is quite annoying. This is why the axiom of choice is required to pick a suitable representative for every real.
Now let's come back to your question:
First let's notice that for $(v_1,v_2)\in V^2$ then $v_1+v_2$ is a rational means that $[v_1]=[-v_2]$ ($v_1+v_2=q\iff v_1=q-v_2=-v_2\pmod{\mathbb Q})$
Thus if you have two irrationnals $r_1+r_2=q$ then $\begin{cases} r_1=[r_1]+q_1\\r_2=[r_2]+q_2\end{cases}$ and $[r_1]+[r_2]=q-q_1-q_2$
So $[r_1]=[-r_2]$, let's call it $v$.
Consequently we have $\begin{cases}r_1=v+q_1\\r_2=(q_3-v)+q_2\end{cases}\iff\begin{cases}r_1=q_1+v\\r_2=(q_3+q_2)-v\end{cases}$ with $q_1+q_2+q_3=q$
So indeed the construction you have envisaged with $r_1,r_2$ being the sum of rationals and $\pm$ the same irrational number makes sense.
However, as we have seen there is no way in practice to exhibit $v\in V$. All we can access are elements in this class which are already $q_i+v$.
You should really see $r_1+r_2=q$ as $[r_1]=[-r_2]$ which is just $r_2=q-r_1$ and nothing more really that can be said about the "inners" of $r_1$ or $r_2$. They just sum up to a rational...


Setting a droplink default in a branch template

Question: I'm creating a branch where my home item has three drop link fields for navigation. I'm also creating the starting point for the three navigation paths in my branch. However, pre-setting the drop link fields to these navigation paths doesn't work correctly, because when the branch is created, it's referencing the original branch item, not the solution item. I'm looking for a way to properly replace these datasources at branch creation time.
Answer: There isn't an OOTB way to achieve this.
But. I always use Alen Pelin's SmartCommands.  Included in this package is "Smart Create From Branch" which does what you need.

Having this branch template
my branch
      $name: linkField -> branchChild
        branchChild: linkField -> $name
by default, the item created from this branch template becomes
createdItem: linkField -> branchChild
      createdChild: linkField -> $name
With smart link replacement it becomes expected:
createdItem: linkField -> createdChild
      createdChild -> createdItem
Comment: Well I run my own customised set of these commands. I think Alen originally only made these to solve some issues around Item Cloning - and as extra commands. But I patch these commands in to replace the default item:copy and item:duplicate commands and have never had an issue. If indeed they do mess with buckets, it would be very little code to just abort if item.IsBucket or whatever that property is.
Comment: This looks cool; I've never used it. Does it really break Item Buckets? Is there any way to use some of it without breaking bucketing?
Answer: There are two possible solutions:
Not great: change the fields' type to Drop List
This will work because the names of the items underneath the relative navigation paths will be the same.
Disclaimer: This has a bad code smell. The home item no longer relates directly to an item with ID. If the selected item is moved or has its name changed, the reference is lost. (It's also more expensive to get the related item because you have to get the parent and then find the child by a specific name, vs just getting the item by ID for a Drop Link.)
Better: update the home item with code after it's created
You can attach to the item:created event and add your own code to set your field values.

Create a custom class to perform the reference updates:
public class SetHomeItemNavigationItems : EventBase
{
    public void ItemCreated(object sender, EventArgs args)
    {
        var itemCreatedArgs = Event.ExtractParameter(args, 0) as ItemCreatedEventArgs;

        Assert.IsNotNull(itemCreatedArgs, nameof(itemCreatedArgs));

        if (itemCreatedArgs?.Item == null)
            return;

        // If this item is being created in a different database (e.g. "web" because it's being published), ignore it
        if (!"master".Equals(itemCreatedArgs.Item?.Database?.Name, StringComparison.OrdinalIgnoreCase))
            return;

        using (new DatabaseSwitcher(itemCreatedArgs.Item.Database))
        {
            if (itemCreatedArgs.Item.TemplateID == new ID("{home-page-id}"))
            {
                itemCreatedArgs.Item.Editing.BeginEdit();
                itemCreatedArgs.Item.Fields["Navigation Field 1"].Value = // get navigation item 1
                itemCreatedArgs.Item.Fields["Navigation Field 2"].Value = // get navigation item 2
                itemCreatedArgs.Item.Fields["Navigation Field 3"].Value = // get navigation item 3
                itemCreatedArgs.Item.Editing.EndEdit();
            }
        }
    }
}

Add a patch config file to enable your event handler:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
    <sitecore>
        <events>
            <event name="item:created">
                <handler type="Custom.Events.ItemCreated.SetHomeItemNavigationItems,Custom" method="ItemCreated" />
            </event>
        </events>
    </sitecore>
</configuration>


How do I read the PAN from an EMV SmartCard from Java

Question: I need to read account number from Maestro/Mastercard with smart card reader. I am using Java 1.6 and its javax.smartcardio package. I need to send APDU command which will ask EMV application stored on card's chip for PAN number. Problem is, I cannot find regular byte array to construct APDU command which will return needed data anywhere...
Answer: You shouldn't need to wrap the APDU further. The API layer should take care of that.
It looks like the 0x6D00 response just means that the application did not support the INS.
Just troubleshooting now, but you did start out by selecting the MasterCard application, right?
I.e. something like this:
void selectApplication(CardChannel channel) throws CardException {
  byte[] masterCardRid = new byte[]{0xA0, 0x00, 0x00, 0x00, 0x04};
  CommandAPDU command = new CommandAPDU(0x00, 0xA4, 0x04, 0x00, masterCardRid);
  ResponseAPDU response = channel.transmit(command);
  return response.getData();
}

Comment: I'm not quite understand your answer. my response always hit 0x6D00. what should I do if my card doesn't support INS just like you said ?
Answer: here is some working example:
CardChannel channel = card.getBasicChannel();

 byte[] selectMaestro={(byte)0x00, (byte)0xA4,(byte)0x04,(byte)0x00 ,(byte)0x07 ,(byte)0xA0 ,(byte)0x00 ,(byte)0x00 ,(byte)0x00 ,(byte)0x04 ,(byte)0x30 ,(byte)0x60 ,(byte)0x00};
  byte[] getProcessingOptions={(byte)0x80,(byte)0xA8,(byte)0x00,(byte)0x00,(byte)0x02,(byte)0x83,(byte)0x00,(byte)0x00};
  byte[] readRecord={(byte)0x00,(byte)0xB2,(byte)0x02,(byte)0x0C,(byte)0x00};

  ResponseAPDU r=null;

   try {
     ATR atr = card.getATR(); //reset kartice

      CommandAPDU capdu=new CommandAPDU( selectMaestro   );

       r=card.getBasicChannel().transmit( capdu );

      capdu=new CommandAPDU(getProcessingOptions);
      r=card.getBasicChannel().transmit( capdu );

      capdu=new CommandAPDU(readRecord);
      r=card.getBasicChannel().transmit( capdu );

This works with Maestro card, I can read PAN number, yet now I need to read MasterCard's PAN number. I do not know should I change the read record APDU or select application APDU. Anyone familiar with APDUs?
Comment: It is the select application command you need to change. The last part of that command is the AID of the application you want to select. Changing that to the MasterCard AID should work. Or you might want to just shorten the AID. If you supply A400000004, ...
Comment: ... it should match all AIDs starting with A400000004.
Answer: atr = open();
prints(atr);

prints("[Step 1] Select 1PAY.SYS.DDF01 to get the PSE directory");
cmd = new ISOSelect(ISOSelect.SELECT_AID, EMV4_1.AID_1PAY_SYS_DDF01);
card_response = execute(cmd);
prints(card_response);
SFI = NumUtil.hex2String((byte)((1 < < 3) | 4));

// try SFI 1 record 1
prints("[Step 2] Send READ RECORD with 0 to find out where the record is");
read = new EMVReadRecord(SFI, "01", "00");
card_response = execute(read);
prints(card_response);
byte_size = NumUtil.hex2String(card_response.getStatusWord().getSw2());

prints("[Step 3] Send READ RECORD with 1C to get the PSE data");
read = new EMVReadRecord(SFI, "01", byte_size);
card_response = execute(read);
prints(card_response);
// the AID is A0000000031010
prints("[Step 4] Now that we know the AID, select the application");

cmd = new ISOSelect(ISOSelect.SELECT_AID, "A0000000031010");
card_response = execute(cmd);
prints(card_response);
prints("[Step 5] Send GET PROCESSING OPTIONS command");

cmd = new EMVGetProcessingOptions();
card_response = execute(cmd);
prints(card_response);

// SFI for the first group of AFL is 0C

prints("[Step 6] Send READ RECORD with 0 to find out where the record is");
read = new EMVReadRecord("0C", "01", "00");
card_response = execute(read);
prints(card_response);
byte_size = NumUtil.hex2String(card_response.getStatusWord().getSw2());

prints("[Step 7] Use READ RECORD with the given number of bytes to retrieve the data");
read = new EMVReadRecord("0C", "01", byte_size);
card_response = execute(read);
prints(card_response);

data = new TLV(card_response.getData());

close();

Comment: Hi Grandie, Can you add TLV class here
Answer: You need to do construct a CommandAPDU object and pass it to the transmit()-command.
You should be able to find the precise command in the documentation for your smartcard, but here is one example:
byte[] readFile(CardChannel channel) throws CardException {
  CommandAPDU command = new CommandAPDU(0xB0, 0x60, 0x10, 0x00);
  ResponseAPDU response = channel.transmit(command);
  return response.getData();
}

Answer: Did you try looking up in your documentation what 0x6D00 means? It looks like it might mean that the ENVELOPE command is not supported. Have you tried using T=0 protocol instead of T=1?
I would not expect my example to work on your card. I don't know which APDUs the Maestro/MasterCard-supports, so I couldn't give you a working example.
Try giving the command an explicit expected length like this:
byte[] readPan(CardChannel channel) throws CardException {
  CommandAPDU command = new CommandAPDU(0x00, 0xB2, 0x5a, 0x14, 250);
  ResponseAPDU response = channel.transmit(command);
  return response.getData();
}

Answer: what about using a  scanner, getting a picture of the card, scanning the content of the picture with a good java ocr library ( like http://ocr4j.sourceforge.net/ for example ) and search for a (usually) 16 digit sequence XXXX-XXXX-XXXX-XXXX , then you will get the PAN from any EMV card using java.


If I were to publish a book series, each having 100 pages, would it be considered a children's book series?

Question: I had an idea for something like a light novel of some sort, but I have a creeping concern. If I published a fantasy book series, each book has 100 pages each, would it be considered a children's book for being too short?
Comment: That would largely depend on the context. You could write a single _sentence_ wholly inappropriate for children (for any number of reasons). Sounds like your real question is whether your series would be unpublishable. That said, if it was treated as a children's series by the publisher, would that be a problem for you? Could you combine the books into one?
Comment: Combining the stories would basically ruin the purpose of the books. I want to create something like the Japenese novella.
Answer: At 100 pages, they would not necessarily be considered books, but novellas. I do not believe length alone would place it as a children's series; it is up more to your writing and content. Sometimes, despite author's and publisher's intentions, (and despite content or length) books can end up being shelves wrong- I believe this has happened to Jay Kristoff with his Nevernight Chronicles,which he has repeatedly expressed contains adult content, and yet it gets shelved as YA because he often writes YA. Victoria Shwab deflected mistakes like this by changing her name- Victoria Shwab for her children's/YA books, and V.E. Shwab for her adult books.
For reference closer to your own project, I think you could look at Seanan McGuire's series, Wayward Children. They are very short novellas which do contain adult content, and are often shelved with adult fantasy, but it does happen sometimes that it is shelved as YA/ Children's.
It is not so much down to legnth as just mis-coordination within the industry, I believe.
Comment: thanks i understand it better now
Answer: Length doesn't determine categorization, it's the other way around. Figure out your target audience first, and then determine ideal word count. Children's books are generally shorter than adult's books, but an adult book is not just a long kids' book, there are differences in vocabulary, tone, themes and content.
In any case, however, it is never pages that are counted, but always words. Adult novels should be at least 50k words and probably closer to 60k. Children's books can be much shorter, depending on how young the audience is.
If your book is better targeted at adults, but shorter than 50k, package two or three of your installments together and sell them as one book.


How the COP differs for a Vapor Compression Chiller without the U*A values of Evaporator/Condenser?

Question: I am trying to find the COP of a VCR system. I can reach the COP with using the EES(Engineering Equation Solver), without dealing with the UA values, i.e. just with the energy balances for the cycle. How the COP can differ, if I incorporate the UA values of the Heat Exchangers into the model? Is there any need for this?
Answer: My opinion is, no, there's not any need to incorporate UA into your calculations. Think about it this way:
The cooling provided by the evaporator really only comes from boiling refrigerant. The heat absorbed by vapor is almost negligible.
To absorb more heat, you need to boil more refrigerant rather than getting refrigerant to boil sooner.
To boil more refrigerant, you need to run your compressor at a higher speed, which means adding more work.  Since: $$COP = \frac{Q_{evaporator}}{W_{compressor}}$$, you won't gain much clarity adding UA to the model.
Caveat: if refrigerant is not exiting the condenser as pure liquid, efficiency improvements can be made by increasing UA of the condenser.
Comment: a great answer. thank you very much! A second question; what would be the difference between steady(with energy balances only, which I did already) and the quasi-steady (dynamic) model? And do you know how should I dynamically model a chiller system? A third; as you know there are unique COP's for the different loads, how can I obtain the unique COP's for the part loads? And according to your answer, the COP won't change in the part-loads since as Q is reduced the W also will be reduced, doesn't this then make the part-load analysis redundant?
Comment: A couple of thoughts on "pseudo-dynamic" models:  $ COP_{carnot} = \frac{T_{H}}{T_{H}-T_{C}} $.  Also, EES will give you a P-h diagram with isotherms for many refrigerants.  You want to boil your refrigerant at a pressure where the saturation dome is widest.  In other words, so that you receive maximum enthalpy of vaporization.  If you have a compressor map, you'll have a better idea of what sort of pressure ratio you can maintain, and what it'll cost you in work. I don't think you should do a dynamic model, these systems are very nonlinear and difficult to control.


anxious word for frowning

Question: Is there a word to say when someone frowns anxiously?
Example: You just wrote a song and sang it for the first time for your best friend. By the end of the song you look at your friend, unconfident and with your forehead wrinkled and eyebrows on a /\ shape, anxious to hear his opinion about it.
Comment: I don't understand how frowning and being *anxious* or *unconfident* can be synonymous with *happy* or *eagerly* here. A "happy word for frowning" sounds like an oxymoron to me . . .
Comment: Jason, I know it did sound oxymoron. I edited for a clearer understanding. What I'm trying to find out isn't a variant of frowning, but a word to describe the action of furrowing one's forehead as commonly to express anxiety. Like in the example I used, when you are unconfident and really want an opinion/answer and your face seems to hover with a hesitant "So... what you think?"
Comment: Your own term *anxious* seems to fit.
Comment: Isn't the term 'anxious frown' contradicting? I think "frown" particularly imposes disapproval, or do you mean only the word anxious would fit?
Comment: Sample sentence, please!
Comment: indeed ... sample sentence(s) pls
Answer: Facial features are complex and often display mixed emotions.  You could use words like "contorted" or "paradoxical" to describe the facial feature(s) that you want highlight (along with anxiety) for the best resulting effect.
For example:

"I looked at her anxiously with a contorted frown (or smile) to
  receive her response, but the paradoxical strain on her brow gave it
  all away."

https://www.thefreedictionary.com/contorted
https://www.thefreedictionary.com/paradoxical

anxious word for frowning


Number of acyclic digraphs on $[n]$ with $k$ edges and each indegree, outdegree $\leq 1$

Question: How many (labelled) acyclic digraphs are there on the vertex set $[n]$ with exactly $k$ edges and each indegree, outdegree $\leq 1$?  The answer is $${n \choose k} {n-1 \choose k} k!.$$  Is there a bijective proof?  I imagine the ${ n \choose k}$ would represent choosing the set of vertices that have outdegree one, and the $k!$ could represent putting an ordering or cycle structure on these vertices, but I'm not sure what the other factor might represent.
Comment: Where did you get this formula ? It looks too big.
Comment: Note: This is [OEIS sequence A089231](https://oeis.org/A089231).
Comment: Note: The expected number of edges in a graph uniformly randomly drawn from all graphs of this type on $[n]$ is discussed [here](http://math.stackexchange.com/questions/264698).
Answer: Any acyclic digraph on the vertex set $[n]$ with exactly $k$ edges and each indegree, outdegree $\leq 1$ will consist of $n-k$ components, each of which is essentially an ordered list, or tuple.  (Starting with no edges and $n$ tuples, adding edge $(i,j)$ to the graph is equivalent to concatenating the tuple beginning with $j$ onto the end of the tuple that ends in $i$.  Thus increasing the number of edges by $1$ decreases the number of tuples by $1$.) Thus the problem is equivalent to counting the number of ways to partition $[n]$ into $n-k$ nonempty tuples.
To construct $n-k$ nonempty tuples from $n$ elements, first choose a permutation of $n$ elements.  This can be done in $n!$ ways.  Then choose $n-k-1$ of the $n-1$ possible cut points in the permutation to create $n-k$ nonempty tuples.  This can be done in $\binom{n-1}{n-k-1} = \binom{n-1}{k}$ ways.  However, since there are $(n-k)!$ ways to order the tuples, there are $(n-k)!$ permutations that create the same set of $n-k$ nonempty tuples.  Thus the number of ways a set of $n$ elements can be partitioned into $n-k$ nonempty tuples is $$\frac{n!}{(n-k)!} \binom{n-1}{k} = \binom{n}{k} \binom{n-1}{k} k!.$$
(Incidentally, the number of ways to partition $[n]$ into $k$ nonempty tuples is known to be the Lah number $L(n,k)$.)
Comment: Perfect, thanks!  That was very helpful.
Answer: Here's another way to count. As you say, $\binom nk$ can be viewed as the number of ways of choosing $k$ vertices as heads of the $k$ edges. Now choose tails for these heads one by one. There are $n-1$ possibilities for choosing a tail for the first head. In choosing a tail for the $i$-th head, $i\gt1$, there are two cases. Either the $i$-th head has not been chosen as a tail yet; then $i-1$ vertices are excluded because they've already been chosen as tails, and the $i$-th head is different from them and also excluded, leaving $n-i$ possibilities. Or the $i$-th head has already been chosen as a tail; then the $i$-th head is one of the $i-1$ vertices excluded for already having been chosen as a tail, but there is exactly one additional vertex at the head of the chain leading to the $i$-th head that hasn't been chosen as a tail but is excluded because choosing it would create a cycle. Thus in either case there are $n-i$ possibilities, so in all there are
$$
\binom nk(n-1)\dotso(n-k)=\binom nk\binom{n-1} kk!\;.
$$
Comment: Nice!  Very convenient that the two cases give the same number of possibilities.
Comment: @Jair: I'm not sure that there really are two cases.  In both scenarios you cannot choose as a tail the vertex at the head of the chain for which $i$ is the current tail, and that's the reason for the $n-i$ possibilities.  The first scenario just has $i$ as its own chain.  (+1, by the way.  I think I was the second upvote on this answer.)
Comment: Ah, that makes sense.
Answer: This problem may also be answered by using the bivariate (mixed) generating function
$$ G(z, u) = \sum_{n\ge 1} \sum_{k=0}^{n-1} q_{n,k} \; u^k \frac{z^n}{n!} $$
where $q_{n,k}$ is the count of the acyclic digraphs on $n$ nodes and with $k$ edges that we wish to find, and hence is given by $$ q_{n,k} = n! [u^k z^n] G(z, u).$$
As pointed out the graphs in question are essentially sets of ordered lists, so that their combinatorial class specification is
$$\def\textsc#1{\dosc#1\csod}
\def\dosc#1#2\csod{{\rm #1{\small #2}}}
\mathcal{G} = \textsc{SET}(\mathcal{L})$$
where $\mathcal{L}$ is the class of ordered lists. With $L(z, u)$ being the mixed generating function of ordered labelled lists this translates into
$$ G(z, u) = \exp L(z, u).$$
But $L(z, u)$ is easily obtainable in closed form, we have
$$ L(z, u) = \sum_{n\ge 1} n! u^{n-1} \frac{z^n}{n!} =
z \sum_{n\ge 1} (uz)^{n-1} = \frac{z}{1-uz}$$
and thus
$$ G(z, u) = \exp\left(\frac{z}{1-uz}\right).$$
To complete the calculation, we recall that
$$ [z^n] \frac{1}{(1-z)^s} = \binom{n+s-1}{s-1}$$
giving $$ n! [u^k z^n] G(z, u) =
n! [u^k z^n] \sum_{m\ge 0} \frac{1}{m!} \left(\frac{z}{1-uz}\right)^m =
n! [u^k] \sum_{m=0}^n \frac{1}{m!} [z^n]\left(\frac{z}{1-uz}\right)^m $$
which is
$$n! [u^k] \sum_{m=0}^n \frac{1}{m!} [z^{n-m}] \frac{1}{(1-uz)^m} =
n! [u^k] \sum_{m=0}^n \frac{1}{m!} u^{n-m} \binom{n-m+m-1}{m-1} \\=
n! [u^k] \sum_{m=0}^n \frac{1}{m!} u^{n-m} \binom{n-1}{m-1}.$$
Now switch variables in the sum to obtain
$$ n! [u^k] \sum_{m=0}^n \frac{1}{(n-m)!} u^m \binom{n-1}{n-m-1} =
n! [u^k] \sum_{m=0}^n \frac{1}{(n-m)!} u^m \binom{n-1}{m} =
n!\frac{1}{(n-k)!} \binom{n-1}{k} =
\binom{n}{k} \binom{n-1}{k} k!. $$
There is more on this beautiful method at this link at INRIA.
Comment: +1, indeed a very beautiful sledgehammer for this nut :-)
Comment: Very nice.  I was trying something along these lines, but I wasn't able to quite work it out.
Comment: $H(z,t) = G(tz,1/t)$, the o.g.f.. for the Laguerre polynomials of order -1. See https://oeis.org/A111596, https://oeis.org/A105278, and the refinement https://oeis.org/A130561. Cf. also https://oeis.org/A008297 and https://oeis.org/A066667.


Using virtual disks or create RAID volumes to combine multiple disks in Windows

Question: In Windows Server We can use Disk Management and create striped,mirrored or raid5 volume on multiple disks also we could put all the disks in a storage pool and create a virtual disk then create volume on top of it in Server Manger.
What would the advantage of one of these method over the other?
Comment: I know you just downvote because my reputation is 1 .Be happy friends and enjoy downvoting.
Answer: Using disk management and software based RAID doesn't give you the same performance, reliability or flexibility as Storage spaces in Server 2012 and Server 2012 R2.
Storage Spaces offer features such as dual parity, Storage tiers, Write-back cache, Enhanced support when use with failover clustering.
check out this link:https://technet.microsoft.com/en-us/library/hh831739(v=ws.11).aspx
In short I would always go with Storage Spaces over the traditional software based RAID offerings from Microsoft.
Answer: Disk Management is simply that, it manages a set of disks and lets you create volumes, be they RAID or not.
Storage pools is a completely different method of organising storage.  Storage pools can also utilise more disk types than "disk management" allows.  This link will give you the lowdown on the RAID aspect (one portion) of storage pools
https://blogs.technet.microsoft.com/yungchou/2013/04/11/windows-server-2012-storage-virtualization-explained/
In answer to the "advantages" question directly; I suppose to sum up, storage pools are more flexible.  I guess the underlying software RAID will be the same on either (from a practical point of view).
One caveat, bare metal restore is "interesting" for storage pools (you do need to mess about a little more with WMI scripts to attach and detach (you cannot reconfigure storage pools during bare metal restore in the same way regular drives can), I would not recommend keeping system essential material (i.e. stuff you need to get back into windows following a bare metal restore) - you cannot mount system volumes on storage pools anyway but you could easily MOVE data to one.
Of course, if you want to host your OS on a software RAID then you cannot use storage pools for this anyway.


How to make gpg prompt for passphrase on CLI

Question: The encryption tool of gnuPG package gpg prompts for passphrase using a GUI dialog box when invoked by a regular user, however when invoked by root it prompts on CLI. How to make it use the CLI even when invoked by a regular user.
 version:GnuPG 1.4.12
Answer: On a debian box:
sudo apt install pinentry-tty
sudo update-alternatives --config pinentry

(and set it to pinentry-tty)
Comment: I think this is the best method, but the answer could be improved with a little explanation
Comment: This will change pinentry mode system-wide for all accounts on your device which might not be desirable. Providing pinentry option to gpg-agent or to single invocation of gpg does not impact the whole system
Comment: A simpler one, in the second line: sudo update-alternatives --set pinentry /usr/bin/pinentry-tty
Comment: After much searching, this is the only solution that worked for me. Thanks!
Answer: This kind of password prompt is not done by gpg itself, but by the gpg-agent.
You can configure your gpg-agent which pinentry program should be used. There are options both when starting the agent and in the gpg-agent config file -- please have a glance at the man page.
So I see two options:

Configure your gpg-agent to use the desired method
Disable the gpg-agent; you can do that for a single gpg invocation by unsetting the environment variable GPG_AGENT_INFO like GPG_AGENT_INFO="" gpg .... gpg used to have a --no-use-agent option, but this has been marked deprecated and has no functionality in recent gpg version.
Comment: Use of GPG_AGENT_INFO is not working as of 2.1, since it has been obsoleted.
Comment: I created ~/.gnupg/gpg-agent.conf and wrote `pinentry-program /usr/bin/pinentry-curses` in it.
Didn't work for me !
Using `gpg --no-use-agent` did the trick.
Comment: @MayankPundir this option is obsolete for some time now; I updated my answer accordingly.
Comment: GPG_AGENT_INFO="" gpg ... worked for me, the --no-use-agent did not.  Ubuntu 14.04
Comment: For MacOS, you can go to  > System Preferences > GPG Suite, then  disable both "Store in macOS keychain" and "Remember for ### seconds" AND "Delete stored OpenPGP passwords." That last part is super important because if your password is already stored in the keychain disabling the other 2 options won't be enough! Hope this helped, it took me a couple months after I updated gpg and I accidentally enabled these options before figuring out how to revert it just now. I'll also add a post below for easy visibility
Answer: I'm on GPG 2.2.13, and the gpg-agent man page reads:

You should always add the following lines to your .bashrc or whatever initialization file is used for all shell invocations:
GPG_TTY=$(tty)
export GPG_TTY

It is important that this environment variable always reflects the output of the tty command. ...

This doesn't explain the "why" (I also don't understand the "why"), but setting this in my .bashrc worked: it caused my gpg-agent to ask for my passphrase via the pinentry-curses interface. I didn't need to set any other configuration (I don't even have a ~/.gnupg/gpg-agent.conf file).
Edit: it seems that this works whenever no DISPLAY is available, e.g. in an SSH session with no X11 forwarding. But when I'm on the desktop and DISPLAY is set, it still brings up the GUI dialog. unset DISPLAY (BASH) in this case makes it use curses instead of the GUI.
Comment: Works like a charm if pinentry is installed. The command could be even shorter: ```export GPG_TTY=$(tty)``` ;)
Answer: In newer versions of gpg, >= 2.x, you can use this
stty -echo; gpg --passphrase-fd 0 --pinentry-mode loopback --decrypt filename; stty echo

The stty makes sure your password is not echoed as you enter it.
A tad smoother than fiddling with configs if all you want is a quicky on say a desktop workstation you ssh'd into.
You will need, though, pinentry sudo apt install pinentry-curses or possibly sudo apt install pinentry
It's a far cry from the olden days of gpg 1.x where all you needed was --no-use-agent.
Comment: In my case, just specifying `--pinentry-mode loopback` was enough and no `stty` was needed. Tested under `gpg 2.2.20` on Arch Linux.
Comment: @ynn `stty` is not needed, it just makes your password not visible on screen
Comment: GPG 2.2.27: `pinentry` is not required for this recipe
Answer: You can set the following environment variable to disable the graphical prompt
export PINENTRY_USER_DATA="USE_CURSES=1"

Comment: Not working on Debian Stretch either (gnupg 2.1.18).
Comment: This works on macos
Answer: If you're on MacOS and using pinentry, you can go to  > System Preferences > GPG Suite, then disable both
Store in macOS keychain

and
Remember for ### seconds

AND click the Delete stored OpenPGP passwords button.
Deleting OpenPGP passwords part is super important because if your password is already stored in the keychain, disabling the other 2 options won't be enough!
I tried most other things mentioned on this thread, including adding export GPG_TTY=$(tty) to ~/.bash_profile, using gpg --no-use-agent (got the deprecated message, but still didn't work), looking at the ~/.gnupg/gpg-agent.conf and ~/.gnupg/gpg.conf files (neither one really had anything that looked like it would change anything), and nothing really made the CLI pinentry GUI prompt for the password until I did this.
Hope this might help anyone in the future who runs into this problem! It took me a couple months after I updated gpg and accidentally enabled these options before figuring out how to revert them back just now.
To clarify, if you WANT pinentry to prompt you to enter your password anytime you're doing something that you want to verify with your PGP keys, make sure you don't have the options to remember your password enabled AND make sure you delete any PGP passwords you might have stored in macOS keychain.
EDIT: found a similar answer on Ask Different: How to use GUI pinentry program for GPG
Answer: My requirements is to create the keys in a remote server thru SSH connection.

My requirements are not about scripting everything

no one mention this approach. But it works for me and it satisfies my requirements:

create keys in a machine with X11 (UI) available

gpg2 --gen-key

...output omitted...
Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
Your selection? 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) Enter
Requested keysize is 2048 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) Enter
Key does not expire at all
Is this correct? (y/N) y

GnuPG needs to construct a user ID to identify your key.

Real name: Abd Tm
Email address: firstname.lastname@example.com
Comment: Enter
You selected this USER-ID:
    "Abd Tm <email@example.com>"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O

Export keys:

# export private key
gpg2 --export-secret-keys --armor --output myfile email@example.com

# export public key (same command above except --export arg)
gpg2 --export --armor --output myfile.pub firstname.lastname@example.com

Copy the 2 files to the server where i want really to install the keys:

scp myfile* user@remote-server:/home/user

SSH to the remote-server and import the key

ssh user@remote-server

[user@remote-server] $ gpg2 --import /home/user/myfile
[user@remote-server] $ gpg2 --import /home/user/myfile.pub

Validate it works:

[user@remote-server] $ gpg2 --list-keys

Credits to this article
Answer: I tried all the suggestions above, and more.
The "--pinentry-mode loopback" option works.
This command I now use:
gpg --pinentry-mode loopback -q -d file.gpg

I'm using gpg 2.2.27
Answer: For me, I did the following and it worked:

Install the pinentry program:

sudo apt-get install pinentry-curses

Since I was using SSH Connection, pinentry-curses is recommended, you can install any other variant,

pinentry-curses: For console or terminal-based environments.
pinentry-gtk-2 or pinentry-gnome3: For GTK-based environments.
pinentry-qt: For Qt-based environments.
pinentry-tty: For basic TTYs.

Configure your gpg-agent.conf

Edit your ~/.gnupg/gpg-agent.conf file, if there isn't one, create it, and then add the following line:
pinentry-program /usr/bin/pinentry-curses

Change the path as per the variant you used.

Reload the GPG Agent

You can kill the existing agent, and restart it using the command below, it'll make sure it uses the right config
gpgconf --kill gpg-agent

Now, you can try signing again and see if the password prompt comes in.
Answer: You can do this :
gpg --batch --decrypt --passphrase-fd 0 gpgfile < passphrase-file

Comment: I had to add `--no-use-agent` on Ubuntu Linux 14.04 - otherwise you get error gpg: can't query passphrase in batch mode\ngpg: error creating passphrase: invalid passphrase\ngpg: symmetric encryption of `[stdin]' failed: invalid passphrase


Why to use 思っていました instead of 思いました?

Question: I found this sentence in this link: http://watanoc.com/post-1608-gozira
So there's a part where it says:アメリカの映画だと思っていました but why to use the て-form instead of the ます-form?
The meaning wouldn't be the same if I use the ます-form?
Comment: Related: https://japanese.stackexchange.com/q/62826/7810, https://japanese.stackexchange.com/q/40145/7810
Answer: There is a clear difference in meaning.

「思いました」

means "(I) thought".  You thought (or felt) something momentarily in the past (including the immediate past "just now").

「思っていました」

means "(I) have/had been thinking/feeling".  The thinking lasted for some time.  That time period could be quite short or it could be very long such as multiple years or even your whole life so far.
In very informal conversations, however, some native speakers might use 「思いました」 instead of 「思っていました」, but not the other way around.
Comment: Thank you so much

Why to use 思っていました instead of 思いました?


How do I spend this prepaid debt mastercard with one cent on it?

Question: AT&T decided they owed me money after changing cell phone providers.  They sent me a prepaid debt mastercard for what they felt they owed me in the amount of one cent.  How can I spend this?  I tried to load the value onto my amazon gift card, but there is a minimum of 50 cents for a transaction.  I know stores also have minimum transactions.  Is this even possible to spend?  I really just find it funny that they did it to begin with...evidence this is not a joke:
Comment: It's stupid, and they wasted more money on the card than they sent you, but it was probably cheaper to just send out every card than to 1) spend the money to craft and send you a letter saying it was not cost effective to reimburse you, 2) subdivide the refunds into cards and checks, or 2) ignore you silently and deal with calls wondering where there penny was.
Comment: @littleadv can you do that on such a small amount?  The transaction fee is greater than what is on the card.
Comment: go to a supermarket and ask to split payment methods.
Answer: Look at the bottom right of your scan. Convert the card into a bank transfer or paper check.
Comment: sounded like a great idea (wish I read the whole thing).  I tried to do it (out of amusement), but the site doesn't recognize the card and I have to contact support.  They probably disabled it realizing how stupid it was.  Now they can pay someone to answer my support request.
Answer: At minimum wage the time you spent writing this question would have earned you far more than one cent. Throw the card away. It's not worth it to you.


what is the intensity of photon before and after striking the glass prism?

Question: during dispersion we all know that white light enters in to the prism and disperses into the visible radiation, my question is whether a glass prism can eliminate other wavelengths and allow only visible radiation if so the energy of the photon passing the prism decreases or not?
Answer: An ideal prism does not do this, a device which passes some frequencies and allows others to pass is called a filter.
Some prisms can also be filters.
Filters tend to selectively pass some photons and not others, so if there are a lot going through the overall intensity will reduce.
Certain glasses can allow visible but filter parts of non-visible spectrum out, yes.
If you have a prism, you can mask off different physical locations and achieve filtering that way. You can know where the visible light will emerge from the prism.
(Intensity is not a property of individual photons, which have a certain amount of energy. This energy is dependent on frequency/colour. Thus a prism sorts photons out into different energies. )


How to create a view that outputs an HTML list?

Question:
I want to create a menu like this so I create a new view and I make some change in format (html list) and fields but I can not do it like the original one !
Answer: It looks like you need to group the rows by your "File Usage: Entity Label (Assurance particuliers)" field.
To do that go to the "HTML List" settings and select that field in the dropdown of the "Grouping field Nr.1" setting.
You will then want to hide the field from display, and you do that in the field's own settings, "Exclude from display".
You can also add "File Usage: Entity Label (Assurance entreprises)" and "File Usage: Entity Label (Assurance de personnes)" fields and set them as Grouping fields Nr.2 and Nr.3 in the HTML List settings to give you the second and third columns in your list. Don't forget to hide these also!
I hope this helps.


add javascript dependencies like java dependencies in maven 2?

Question: I'm using apache maven for build project, so i want to add  my dependency javascript frameworks automatically  based  their version , organizing  javascript frameworks , and  download  only  modifiying  label version .
Exist some plugin similar like java dependencies or alternative with maven ?
Answer: There is standard way of doing this using a feature of the servlet api version 3.
Any jar can expose web resources (javascripts, css, images, etc.) that are located under META-INF/resources.
To solve your problem I would create a maven project of type "jar" for every javascript framework that you want to re-use in your webapp projects.
The only caveat is that the servlet-api v3 requires Tomcat 7, which in turn requires Java 6, but this is usually not a problem.
See this blog:
http://alexismp.wordpress.com/2010/04/28/web-inflib-jarmeta-infresources/
Servlet api 3 reference:
http://download.oracle.com/otndocs/jcp/servlet-3.0-fr-eval-oth-JSpec/
Comment: Thanks for comment, so another alternative i found , using [yeoman](http://yeoman.io/)  and bower get all dependencies, i'm doing SPA application using angular and the dependencies problem is fix :D .
Answer: It is possible to include javascript frameworks as <dependency> via WebJars:
http://www.webjars.org/documentation
You could then include e.g. AngularJs like that:
<dependency>
    <groupId>org.webjars</groupId>
    <artifactId>angularjs</artifactId>
    <version>1.4.8</version>
</dependency>

WebJars are also hosted on maven central repository:
http://search.maven.org/#artifactdetails%7Corg.webjars.bower%7Cangularjs%7C1.5.0-rc.1%7Cjar


How to get config.xml for jenkins pipeline job

Question: I have a requirment, need to backup config.xml for my jenkins jobs. Here i have created lot of pipeline jobs and build them using docker slave. Please help how to get config.xml for those pipeline job to backup purposes?
Comment: There is probably a way to do this, but may I ask why you don't generate your jenkins jobs through code? That way you don't need those backups! To generate jobs through code you simply need the amazing job-dsl plugin => https://github.com/jenkinsci/job-dsl-plugin
Answer: It is in your Jenkins installation folder: jobs -> "Your Job's Name" -> config.xml
Answer: One way to get the file is to append config.xml at the end of the job url, e.g.
<code>Job URL:   http://YOUR_JENKINS/job/YOUR_DEPLOY/
Conig URL: http://YOUR_JENKINS/job/YOUR_DEPLOY/config.xml
</code>


Why is mass defect calculated by the rest mass (energy)?

Question: I'm a high school student, and I have a question about the mass defect.
I learned that when nuclear reaction occurs, the total rest mass (or rest energy) of reactants is greater than that of products, and the missing rest energy is released as a form of kinetic energy etc. But considering the fact that those reactants and products are moving, why should the missing mass (energy) be calculated by the rest mass(energy), not the relativistic mass? What would happen if you use the relativistic mass when calculating the mass defect?
Comment: Generally one looks in the center-of-mass frame of reference, so overall system motion goes away. (In the lab frame, of course, one needs to put motion back in.)
Comment: @JonCuster Even in that reference each atom is in motion, thus having relativistic mass. If not, the atoms would not have collided(?) in the first place
Comment: Yes, they are in motion, and yes, if relativistic, you need to account for that energy. So?
Comment: @JonCuster But then why my textbook and other websites only consider the rest mass and then calculate the energy derived from the mass defect? Here's my thoughts. 1) The mass defect accelerates the products, therefore making the relativistic mass heavier. 2) Then if you compare the energy of products with that of ractants, the former has greater kinetic energy, and more mass. Then where did the mass and energy come from?
Comment: The mass defect is for the various ins and outs, at rest and isolated with respect to each other. How the experiment can actually be done, and how the energy output is measured (say, kinetic energy of the products) is a different question.
Answer: $E = mc^2$ where m is the relativistic mass.  For evaluating a nuclear reaction we can use
E = $m_0c^2 + T$ where $m_0$ is the rest mass and T is the kinetic energy. In a nuclear reaction E is the same before and after the reaction and m is the same before and after the reaction.  Consider the reaction a + X -> b + Y where a and X are the reactants and b and Y are the products: $E_{reactants} = E_{products}$ and $m_{reactants} = m_{products}$.  We define the Q value of the reaction as the difference between the initial and final kinetic energies: $Q = T_B + T_Y - (T_a + T_X)$. So Q is also $[m_0a + m_{oX} - (m_0b + m_{oY})]c^2$.  If Q is positive the reaction is exothermic ; if Q is negative the reaction is endothermic.  For an exothermic reaction the sum of the rest masses of the products is less than the sum of rest masses of the reactants and we have concerted rest mass into kinetic energy.
The sum of the relativistic masses of the products is equal to the the sum of relativistic masses of the reactants; its just that the partitioning between rest mass energy and kinetic energy has changed.  Some discussions of a nuclear reaction are sloppy in nomenclature and do not distinguish between the rest mass and the relativistic mass.
The same equations apply to a chemical reaction, but the change in rest mass energies is much less for a chemical reaction than for a nuclear reaction.  Classical thermodynamics accounts for the change in rest mass as the "heat of formation" for the reaction.
Answer:
But considering the fact that those reactants and products are moving, why should the missing mass (energy) be calculated by the rest mass(energy), not the relativistic mass? What would happen if you use the relativistic mass when calculating the mass defect?

What would happen:
relativistic mass of reactants = relativistic mass of products
Why we do not calculate mass defect that way:
For reaction A the relativistic mass defect = 0, also for a very different reaction B the relativistic mass defect = 0.
If we are given a table of relativistic mass defects of different reactions, we are not given any information.
Comment: So you mean that the relativistic mass is always conserved, whereas the rest mass isn't?
Comment: @DH K is correct; in a nuclear reaction the relativistic mass is conserved, the rest mass is not conserved.  See my Dec 4, 2020 answer.
Comment: @DHK   No.  Both are conserved. Cooled nuclear reactor loses mass, heated cooling water gains mass.


Jquery Tooltips Edit

Question: I always wanted a page where user can leave comment to me in tooltip. after much seraching i wasnt able to locate one suiting my need.
I learnt this can be done in Language Jquery. I made a tool tip after learning on website but how can i enable "double click on tool-tip" to edit a and save that data via ajax, Is there any one available.
I want to be able to hover on a div to generate a tooltip which should display some text and on double click of that text it changes to text editor(an input box)
here is jsfiddle. Thanks
Answer: That functionality is called "Edit In Place". Take a look at the Jeditable plugin.
Also, jQuery is not a language. JavaScript (aka ECMAScript) is the language. jQuery is a library for JavaScript.

Jquery Tooltips Edit


How long does it typically take to distribute malware signatures?

Question: Are there industry-wide measures that identify how long it typically takes to identify, develop and distribute new malware signatures?  I want to understand how long organizations are typically exposed to new malware before a signature is available to them.
Comment: I know it depends on the level of risk, which takes into account the number of vulnerable users, number of incidents seen so far, and sensitivity of targets (think Stuxnet vs. Word macro virus).  I imagine this is how antivirus analysts prioritize their reverse engineering efforts.  In fact, PR probably plays a big part since dumb acronyms and logos spawn excessive FUD for end users that may question the effectiveness of their AV.  I don't think there's a published industry standard.
Comment: [CVSS](https://www.first.org/cvss) with its temporal score tries to standardize ranking tho not response time
Comment: More important nowdays is how accurate their heuristics engines are at noting past behaviors, unwanted and malicious behaviors,  and matching up against variants to block activity before a signature is available. Signature only based malware detection is dead. You can custom order malware, each instance sold is recompiled to break signatures. There is no period of time at which you are ever safe. Exposure across the malware spectrum is continuous.
Answer: Exact information on how long it takes organisations to detect and publish signatures to their AV products  will be proprietary and closely guarded by the various AV vendors.
There are number of clues to the general time frame dotted around though. Kim Zetters book Countdown to Zero Day, conducted thorough research to tell the story of stuxnet, in the book she goes into great depth about the workings of the malware industry. In a passage specifically about Symantec she says the following;

"When the company first entered the antivirus business, it was
  considered a good response time to turn around a threat -from
  discovery to delivery of signatures- within a week. But Symantec aimed
  to reduce this to less than a day. To accomplish this the company
  needed analysts in multiple time zones to spot viruses in the wild
  when they first appeared and to get signatures out to customers in the
  US before they woke up and began clicking on malicious e-mail
  attachments."

So Symantec and I presume their main competitors in the market have a very fast turnaround, when they successfully detect new malware or new strains of malware.
In 2010, which in technology terms may as well be a lifetime ago, there was certain circumstances when at least a week was still  possible for signatures to be published to some AV products for known malware.
Kaspersky Lab created 10 harmless files and flagged them to malware aggregators VirusTotal that Kaspersky considered them as malicious.
According to the Reuters news agency;

"Within a week and a half, all 10 files were declared dangerous by as
  many as 14 security companies that had blindly followed Kaspersky's
  lead, according to a media presentation given by senior Kaspersky
  analyst Magnus Kalkuhl in Moscow in January 2010."

Another organisation admitted to conducting a similar experiment 3 years ago, they also quoted a week until they saw signatures being published. So not much had changed from the 2010 experiment, which suggests that the procedures and practices of some AV companies don't change that much over time.
Based on this I would suggest that AV signatures from malware detection to the publishing of a signature could be anywhere between 1 day to 1 week, depending on the AV vendor. Clearly this includes a lot of assumptions though.


Can putting frozen food in a hot ceramic pan cause a thermal shock?

Question: Can putting frozen food in a preheated ceramic coated non-stick pan cause a thermal shock and ruin the pan?
Answer: I'm gonna risk getting chastised and answer from first principles, rather than any referenced sources!
The pan will not be affected at all from this.  A home freezer will chill foods down to around -20C, a refrigerator to around 5C and the stovetop can heat your pan up to around 350C.  Putting food from the fridge into your preheated pan (its most common use-case) could expose the pan to a mass 345C cooler than it, from the freezer 370C.  The temperature differential between the two cases is really not that different (~10%) and well within the ability of any pan to withstand.  If it were possible to damage a pan with such a small variation from its most common use case, it would also be just as likely that a more efficient/higher temperature stovetop would also damage it.
In short, the only pan that would be damaged by this would be a pan that was not fit for purpose.
Comment: Don't put it into a preheated ceramic (not coated, but clay) or glass casserole dish, though.  That can cause cracking.
Answer: It depends. As @RadioRaheem has said, any pan that would be damaged by this is probably not fit for purpose. However, many non-stick pans should not be placed on direct heat without any oil or liquid in them, as this can cause the coating to detach or deteriorate. So while I doubt frozen food would actually cause your pan to fail, preheating it is probably much more likely to do so.


Serving static files with amazon s3 vs nginx

Question: Let say I have an django application
Will it be better (performance-wise) to serve the static files with s3 or to setup an nginx server on a ec2 instance?
Answer: Nginx is going to be faster for site assets like CSS, nav images, etc. If the client browser already has an open connection for the dynamic page, and keepalives are setup it will use the same connection.
You can now back CloudFront with EC2 hosted content so S3 is no longer a requirement at that level.  In addition you can use cloudfront with django generated, but not frequently changing content.  You can use nginx's built in caching for semi dynamic content.  If you are going to have to run a server for the django portion anyway, it is not much extra work.
If the files you need to host are larger, then S3 starts to look better because the disk performance on smaller EC2 instances is not ideal.
In the end, unless you are dealing with dozens of requests per second, both options are going to be close enough that it will be difficult to measure the differences.
Answer: There are many things that can play into this, but if it's an option, I would just serve directly out of S3 if you can. Performance would be at least as good or possibly better than using nginx, and it gives you an easy path to start using AWS's CloudFront CDN in the future if need be.
Answer: As Coeus Blue mentioned above, it depends on your use case scenario. If your site needs to load as quickly as possible, all resources should be on the same domain (subdomains are separate) as DNS queries can take 1-2ms on a very fast connection or 40-50ms on a bad connection.
DNS calls are normally cached, so on any site with multiple external resources this wouldn't make a massive difference in speed because of DNS lookups.
However, S3 is likely to be faster than an EC2 instance serving the same file with nginx/Apache. S3 storage is cheaper than EBS (and you'd need EFS for a cluster of nginx/Apache webservers) and S3 internet outbound transfers are cheaper than EC2 outbound transfer if I'm not mistaken