Reboot problem in my S3 GT-I9300

Question: I got S3 GT-I9300 and it requires to restart the device to update the software and when accept that it says will reboot for a while , I leave it for two hours and its keep frozen on Samsung logo , I tried the hard restart with up volume + home button + power button and try the factory setting but it still give me the same result , when press the volume down + home + power , its asked me if I wish to continue and I said yes and its still downloading but it take a while now , what should I do to get my phone working back again .
Answer: You may have to re flash the firmware. There is a program called ODIN you can use to do this.
First of all install ODIN and the firmware for the S3 and your country on this site http://www.sammobile.com/firmwares/ (search for GT-I9300). You will be able to find many tutorials online on how to use ODIN but it is relatively simple. Here is a good YouTube tutorial https://www.youtube.com/watch?v=-CANyNo5qNE (It's quite hard to hear him over the music but it should help). He uses the S2 but it is the same process.
OR
Use the written instructions on sammobile (note this is the firmware for Germanu, so don't use this firmware unless you are in fact German) http://www.sammobile.com/firmwares/3/?download=29037.

Reboot problem in my S3 GT-I9300


How work done by a force on a body is negative?

Question: The work done is the product of force acting on a body and the displacement of the body in the direction of the force.
The gravitational potential $\text{energy}=Mgh$ is the negative of the work done by gravitational force. But actually, it is the person who applies force against gravity and does work, right?
I am confused with the concept of work done, and it's relation with energy.
Comment: related? [When you lift a box from the floor, the potential energy changes but kinetic energy does not change. Does it violate conservation of energy?](https://physics.stackexchange.com/q/302077/)
Answer: If you move an object from a height $h=h_1$ to a height $h=h_2$ then the difference in gravitational potential energy is
$\Delta \text {PE} = \text{PE}_{end} - \text{PE}_{start} = mgh_2 - mgh_1 = mg \Delta h$
Note that $\Delta h$ is in the *opposite * direction to the force of graivity on the object. $\Delta \text{PE}$ is positive when $\Delta h$ is positive i.e. when $h_2>h_1$. So $\Delta \text{PE}$  represents the work done by the object (or by whatever is moving the object) against the force of gravity $mg$. If the change in PE is negative (i.e. $h_2 < h_1$) then its absolute value $|\Delta \text{PE}|$ is the work done by gravity on the object.
Answer: For a constant force, the work done on an object is the product of the force, distance moved, and the cosine of the angle between them. See the figure below.
If the angle is zero, the cosine is 1 and the work done is positive. If the force is in the opposite direction of the displacement, the angle is 180$^o$ and the cosine -1, making the work done on the object negative. If the work done on an object is positive, then the agent performing the work transfers energy to the object. If the work done is negative, then the agent performing the negative work takes energy away from the object.
If you, an external agent, lift an object of mass $m$ a height $h$ you do positive work of $mgh$ if the object begins and ends at rest. It is positive because the force you apply is in the same direction as the distance $h$ moved. It is $mgh$ because there is no change in kinetic energy of the object.
At the same time, however, gravity performs an equal amount of negative work of $-mgh$, because the force of gravity is opposite to the distance moved. Gravity takes away the energy you transferred to the object. The net work done on the object is zero. According to the work energy theorem, the net work done on an object equals its change in kinetic energy. Since the object began and ended at rest, the change in kinetic energy of the object is zero.
So where does that energy you gave the object go?
Gravity has stored it as gravitational potential energy of the earth/object system. It is important to realize than an object alone does not possess gravitational potential energy, though it is commonly stated that way. Every form of potential energy, including gravity, is a system property. That's because potential energy is the energy of the position.  In this case it is the position of the object relative to the surface of the earth. That makes gravitational potential energy a property of the combination of the object and the earth.
Hope this helps.
Answer: The total work done by all the forces is equal to the change in the kinetic energy (KE).  The work done by a particular force contributes part of the total work, but total work considers all the forces.
The total work is $\int_{a}^{b}\vec F_{net}\cdot d \vec r$ where $\vec F_{net}$ is the total force. We can consider the contribution to work done by a single force $\vec F$ as $\int_{a}^{b}\vec F\cdot d \vec r$. Since gravity is a conservative force, we can express the portion of total work done by gravity as $\int_{a}^{b}\vec F_{grav}\cdot d \vec r = - mg(h_{final} - h_{initial})$, the negative of the change in potential energy (PE).  Regardless of the complexity of the path taken, the work done by gravity is easily evaluated as the negative of the change in PE.  If other forces besides gravity act, they must also be considered in evaluating the total work.
Consider two simple cases.
Consider a ball of mass $m$ thrown upwards with an initial velocity $v$.  After the ball is thrown, the only force acting on the ball is gravity (neglecting air resistance).  At maximum height $h$ the force of gravity has does work on the mass equal to $-Fh = -mgh$; negative since the force is down and the displacement $h$ is up.  The change in KE, final minus initial, is $ 0 - {1 \over 2} m v^2$.  Equating the total work done to the change in KE, $-mgh =-{1 \over 2} m v^2$.
Now consider a ball lifted very slowly upwards to a final height $h$ by a person applying a constant force $F_a$ upwards, just very slightly greater in magnitude than the force of gravity.  The net force upwards is $F_a -mg$, the total work done by all the forces is $(F_a -mg)h$, and the change in kinetic energy is zero.  So $(F_a -mg)h = 0$. The work done by $F_a$ is positive, $F_ah$, and the work done by gravity is negative, $-mgh$, but the total work is zero.
Answer: Both the person and gravity apply a force to the lifted box. So both do work on it.

Gravity does negative work on it while it is being lifted, because its force is downwards (against the motion)
The lifting person does positive work on it while it is being lifted, because his force is up along with the motion.

These two works are equal in magnitude but opposite in sign.


Need help with RFI issue

Question: I am running an IMax 2000 antenna with a President Lincoln 2 plus radio. I am having a lot of issues with ac noise coming through my antenna. I ruled out the noise coming from my home by turning off my main breakers and running my radio on a battery and noise was still present. Had my power company come and they fixed 4 areas around me that noise was found.The noise level is less but still showing up at S-5. I would like to know what type of RFI filter would help quiet the remaining noise. I have been checking into an MFJ-915 filter but not sure if it would work. 73s K2JEG
Answer: You generally can't filter out in band noise very effectively.  You need to find the source of the noise and fix it.  Put your radio on a battery to make it portable, and use a short piece of wire as an antenna, and walk around and see if you can find the source.  If you can't hear the noise, use a longer wire.   A loop antenna is directional and is a big help for this.  Use it to get a bearing from a couple of different locations to triangulate where the source is.  Lamp dimmers and touch lamps are big suspects in your neighbor's house. Noise from these can couple into power lines and radiate quite a ways, making it seem like the noise comes from everywhere near AC wires.

Need help with RFI issue


Does a bitlocker pin become part of the key?

Question: I recently added a pin to my bitlocker encryption and this seemed to be pretty much instant. In what way is this pin an actual part of the key that is needed to decrypt the hard drive? Or is it used to decrypt the actual key itself (in combination with information from the TPM) before decrypting the actual hard drive?
Answer: Bitlocker uses an encrypted key stored on the disk, wrapped with one or more encryption keys.  This could be a key stored in the TPM, protected with the PIN, or the full Bitlocker encryption passphrase (startup password).  Which keys are available depends on the configuration you have setup.
I'm not aware of any FDE scheme that derives the actual encryption key from any user input (passphrase, PIN, etc.).  Doing so would make it impossible to change the passphrase without re-encrypting the data, which is time consuming, not great for SSDs (wear leveling) and not to mention the mess created if your computer crashes mid re-encryption!
For example, Truecrypt has a header area including the master key that is encrypted with another key derived from the passphrase.  PBKDF2 is used on the user passphrase to derive an AES key.  This AES key is used to decrypt the header and receive the master key, which encrypts all of the data.  If the passphrase is changed, only the header needs to be re-encrypted.
Comment: Oh that's interesting, I thought with Truecrypt it used to be the case that the key was derived from the passphrase, indeed making it something that couldn't be changed. But even there the actual key is not dependent on the passphrase then? And what exactly do you mean with 'wrapped'? How is this encryption key protected?
Comment: I've added some details on the Truecrypt format to my post.


Can a civilization develop Urban Centers without Agriculture?

Question: Say I wanted to create a civilization of people who, in accordance with a vow to never harm plants, refuse to practice agriculture or animal husbandry, instead relying hunting and fishing for all of their needs. Is it conceivable that this society would ever produce a city with tens of thousands of people?
Comment: [Nuuk](https://en.wikipedia.org/wiki/Nuuk), population 18,000, is the capital city of Greenland. For obvious reasons, agriculture is not really a big thing in Greenland. (Please note that humans absolutely *have to* eat vegetables. Our bodies cannot make vitamin C, for example, and if we don't eat green vegetables we die of [scurvy](https://en.wikipedia.org/wiki/Scurvy). Very modern humans can get their vitamin C from pills, but I presume that you are not asking about a modern city; after all, the inhabitants of large modern cities do not practice agriculture anyway.)
Comment: For me, what entails "harming" plants? Intentionally uprooting or damaging them? Are naturally fallen trees fair game? As @EveninginGethsemane noted, can they trade with other societies? I imagine they'd be stuck with the "hunter" part of "hunter-gatherer" status for quite a while either way.

Logistically, we have a LOT of plant-derived tools and building supplies that may not be usable in this society, depending on how strict the religion is. Wood is the obvious in that you need it to build houses and make fire, but fire is also extremely important as a "tool" for society itself.
Comment: @AlexP https://www.discovermagazine.com/health/the-inuit-paradox points out that humans don't need vegetables; for Vitamin C "Fediuk compared the vitamin C content of 100-gram (3.55-ounce) samples of foods eaten by Inuit women living in the Canadian Arctic: Raw caribou liver supplied almost 24 milligrams, seal brain close to 15 milligrams, and raw kelp more than 28 milligrams. Still higher levels were found in whale skin and muktuk."
Comment: @M.A.Golding: If plants are interpreted as a component of the Earth itself, considered something people are responsible for preserving, while animals are just an infestation of sorts, and you don't make distinctions like we do on "ability to feel pain" or "capable of complex thought" (a distinction many societies did not make for most of history, and many still don't), I could see such a system of ethics arising. It would be hard to make it consistent, what with the various symbiotic relationships between plants and animals, but it's not as unbelievable as you seem to think it should be.
Comment: So, you are asking for a civilization of [obligate carnivores](https://en.wikipedia.org/wiki/Carnivore#Obligate_carnivores) who don't accept husbandry?
Comment: @ Nicholas Bostelman  What kind of a warped and twisted ethics would say that it is right to harm animals but wrong to harm plants?
Comment: Welcome Nicholas. Please take our [tour] and refer to the [help] for guidance as and when. Could you tell us a bit more, like if there's any trade with other cities/civs.? Also, the planet - is it Earth-like, the city, is it near the equator, the poles... etc.
Comment: @prosfilaes: And that "kelp" is not a vegetable?
Comment: @AlexP Kelp is not a plant, so technically no. Besides that, caribou, seal and whale, all of which are listed as having high amounts of vitamin C are clearly not vegetables. There are non-vegetable sources of vitamin C human cultures have used.
Comment: @M.A.Golding Another possibility might be "animals can defend themselves so are fair game (when hunted), but plants can't". It doesn't hold water, but might convince someone. :-P
Answer: Historically cities have developed first in those place where the agricultural production exceed the needs of the farmers, allowing also to feed those covering "non productive" roles (non productive in the sense that do not directly produce food) like priests, guards, scribes and so on.
When relying on hunting and fishing that step has never been taken: while farming requires being stationary in a certain place, hunting and fishing has to follow the preys, and the larger group it has to sustain, the more frequent the movement has to be to prevent depletion of the locally available resources.
By the way, tens of thousands of people are also challenging for a simple state city which do not have a developed trade with neighboring communities.
And it is also very hard to build a city without harming any plants: trees and grass are not going to get out of the way just because a bunch of noisy humans are there, like most animals would do.
Comment: The society that made Poverty Point in the Americas is an exception to the "agriculture is the base to make cities" idea. It appears to have been a city of hunter-gatherers!
Comment: @PipperChip: Eurasia has numerous Stone Age large scale structures, such as, for example, the famous Stonehenge in England. The question is about cities not large scale structures in general. We *know* that Stone Age people were perfectly able and willing to build large scale structures, although we don't always know for what purpose.
Comment: @AlexP The ancient structures at poverty point was, as my sources characterize it, a full city without any evidence of agriculture nearby or supporting it. The idea is they went into nearby lands for hunting/gathering and they were bountiful enough to support a full city of people.
Answer: Trade and Fishing
Humans have developed high population densities in the absence of agriculture.
In the Pacific Northwest of the United States and Canada the Chinook, Salish, Tlingit, Haida, Makah and other indigenous peoples had large villages (up to 400 or more people)  with hierarchy (kings rather than chiefs in Nootka Sound) and social stratification (including a widespread slave trade)
These nations had no agriculture prior to European contact, instead relying on the seasonal salmon runs to support their large and sedentary populations. They supplemented the salmon with berry collection, whaling and hunting.
Trade was extensive amongst these nations and included everything from obsidian extracted in the Cascade mountain range to slaves taken as far south as what is today California.
You could conceivably have much larger polities forming from alliances of villages that could make actual cities based on especially productive fisheries and hunting grounds that are also located somewhere that trade is lucrative
Edit: Short Answer is you can get decent sized sedentary  communities but not in the tens of thousands. Consider altering the flora or fauna to justify  even more lucrative fishing and hunting or having your cities be in the low thousands or a few fortified villages (think Celtic Oppidum) so that your hunter gatherers have settlements and an administrative core ruling over a rural populace
Comment: This is useful as a plausible upper bound, but I think you should more explicitly state the answer to the title question is no: Even a coalition of *many* 400-person villages is at least an order of magnitude smaller than OP's city of "tens of thousands"
Comment: Note that the Pacific Northwest is the region in the world with the highest population density without agriculture. This was achieved through a lucky combination of climate and local flora and fauna. So unless you provide higher technology from some other agriculture using civilization this is the upper bound for earth.
Comment: @Bear You're right, tens of thousands of people as specified  is just too high. But you could have politically powerful  and fortified villages that acted as military and administrative centers for a population that was large but rural.
Comment: @quarague Good points
Answer: I think that it is a really nutty ethical system which permits hunting animals but forbids harming plants.  But it is your story.
It is possible to use plant products without harming plants.

"Lemon tree is very pretty, and its flower is very sweet,

but the fruit of the poor lemon is impossible to eat."

And at first sight one may wonder why the lemon tree - if it had consciousness and desires - would want pieces of it to be broken off and eaten.
But if there are no nerve connections between a plant and its fruit - which is easy to achieve since plants have no nerves - the plant will feel no pain when a ripe and ready to fall off fruit is picked, or when a fallen fruit on the ground is picked up and eaten.
The function of fruit is to be an edible container for inedible seeds.  Animals eat and digest the fruit, and then excreate the undigested seeds in their poop.  Thus the seeds are carried far from the parent tree and are deposited in a little bit of fertilizer.
And I think that berries also function that way, from the point of view of berry bushes -if berry bushes could have a point of view.
And grapes include seeds, except for seedless varieties developed by agriculturalists, so they should function like fruits and berries, and maybe your hunter-gatherers will think that way.
What about nuts?  Every nut which a human eats will never grow up to be a tree, so being eaten will not be good for that particular nut if that nut needs to become a tree.  But if humans have a habit of picking up and collecting nuts to eat, they will lose a percentage of those nuts which might land in spots good for sprouting.  So if a nut is not considered to be an entire plant, but a tiny part of its parent tree, and if that tree is considered to have some sort of need to reproduce, and get some sort of benefit from having growing offspring, then collecting nuts to eat and sometimes losing some of them can be considered to be good for the nut trees.
And considering a nut, a stage in the life cycle of a nut, to be not a tree and thus not a plant, might seem like thinking up a goofy loophole to blatently violate an ethical rule.  But humans do that all the time.  For example, humans constantly violate the rule against murder by killing embroyos and fetuses, despite them being just as obviously human as a person in any other stage of the human life cycle.  And technologically challenged hunter-gatherers like the desired group would kill or abandoned to die unwanted newborn infants.

Many Neolithic groups routinely resorted to infanticide in order to control their numbers so that their lands could support them. Joseph Birdsell believed that infanticide rates in prehistoric times were between 15% and 50% of the total number of births,[7] while Laila Williamson estimated a lower rate ranging from 15% to 20%.1: 66  Both anthropologists believed that these high rates of infanticide persisted until the development of agriculture during the Neolithic Revolution.[8]: 19  Comparative anthropologists have calculated that 50% of female newborn babies were killed by their parents during the Paleolithic era.[9] From the infants hominid skulls (e.g. Taung child skull) that had been traumatized, has been proposed cannibalism by Raymond A. Dart.[10] The children were not necessarily actively killed, but neglect and intentional malnourishment may also have occurred, as proposed by Vicente Lull as an explanation for an apparent surplus of men and the below average height of women in prehistoric Menorca.[11]

https://en.wikipedia.org/wiki/Infanticide#Paleolithic_and_Neolithic
Thus your hunter-gatherers might think that nut are not yet plants and so it is right to eat them.
What about mushrooms?  Fungi are classifed as a separate kingdom of life from plants.  The visible parts of mushrooms are just the parts they use to spread their spores, and the main bodies of mushrooms are underground or inside infected tree trunks.
Would the hunter-gathers be aware that mushrooms aren't plants, or aware that the visible mushroom caps are disposable spore containers and that eating them will not harm the mushrooms if they think mushrooms are plants?  I don't know.
If the hunter-gathers see mushroom caps growing out of living trees, will they think that the mushroom caps are parasites harming the trees and that picking and eating them will be helping and not harming the trees?  I don't know.
And it is possible to build a city in a rather barren area with little or no plant life growing, and perhaps to build around any widely scattered plants which do grow there.
The ground floors of buildings can be made of dirt, or sod, or stones.  The walls can be made of stones.  The roofs (and ceilings and upper floors, if any) of low technology buildings are usually made of wood.  To get wood without harming trees and thus plants, they would have to carefully trim away superflous branches as modern tree doctors sometimes do, or collect fallen branches and trees from the forest, or collect driftwood on the banks of rivers, lakes, and seas.
And it is perfectly possible to build vaulted and domed ceilings and roofs out of stone or bricks.  Wooden centering is often used while building arches, vaults, and domes, but they could collect dead wood or build vaults without wooden centering, which has been done.  Legends claim that some vaulted buildings were built by making giant sand or earthcastles in the desired shape, covering the sides and top with stone or bricks, and then digging out the sand or dirt from beneath.  Those are just legends, but that could possibly be another real life technique to build vaults without centering.
Any bricks used would have to be inferior, but widely used, sun-dried bricks instead of fired bricks.
Or buildings could be roofed with tent roofs.  If they hunt, they can make leather out of animal skins and sew a lot of leather pieces together and suspend them over the rooms in the buildings, perhaps using poles made out of dead wood they found to support the leather roosm.
Possibly the city dwellers could advance enough to become herders and domestic animals, keeping them in walled meadows to graze.  Of course that would be harming the plants the animals eat.  But maybe they could think up a sneaky loophole to the rule agaisnt harming plants, for example claiming that it was the livestock that hurt the plants.
Or possibly they drive herds of wild animals into a wide and fertile valley and wall up the only pass into the valley so the animals can't get out, and then enter the valley to hunt them, and build their city nearby.
Possibly they follow nomadic herds of prey animals on their regular migration routes.  Possibly there are a few places where the herds stop for long periods of time each year, and the hunters build seasonal tent cities at those places and eventually replace the tents with stone buildings used during the seasons while they are there.  So they would live in several different cities in different seasons of the year.
Late Medieval Ethiopia was a civilized society with agriculture and permanent villages, towns, and cities.  But the king of kings, his court, and many soldiers, usually travelled constantly, forming a vast tent city with thousands of people wherever they stopped for the night.  The permanent capital, Gondar, wasn't founded until about 1635.
And I guess that a travelling tent city with many thousands of persons could support itself by hunting if they followed vast herds and had riding horses to go hunting far from where ever they were camped at the moment. The Sioux sometiems formed travelling camps with thousands of men, women and children for months at a time, so you need to make hunting somewhat easier for your people than it was for the Sioux if you want them to live in vast tent cities all year round.
Answer: Consider the requirements of a city of tens of thousands. That requires significant movement of resources into the city just so that the people can cook and eat. In order to have that movement, thousands of people have to be motivated to be hunting / gathering firewood and carrying that into the city. You also need water brought in. You are talking about some kind of slavery or religious movement.
When we look at history prior to agriculture, there were places where thousands gathered. Places like Stonehenge were gathering places. But they were for special gatherings, not settled cities.
If you want a city, one way is to make it a place of religious pilgrimage where only a few religious professionals live, but where nearly everyone comes several times a year. It would need to have the places for people, but most of the year, those places are empty. Add a justice system and small groups of people will visit throughout the year. Food, firewood, and water can be brought in for those large gatherings without major harm to the environment.
Comment: Lewis and Clark estimated that the population of Celillo Falls was between 7000 410,400 people in 1806. Celillo  was a gathering point where the Columbia River goes through narrows&falls facilitating salmon spearing and netting, and for trade between down and upriver tribes. At least two large villages on either shore, but almost certainly >>1000 per village. https://www.yakimaherald.com/news/local/remembering-celilo-falls-62-years-after-it-was-silenced-by-the-dalles-dam/article_be6c698a-93a9-11e8-b4d1-538eaf5535d0.amp.html
Answer: Gleaned from this history.se question: What surface area per person is required for hunter-gatherers? the answer cites the following:

Clark and Haswell (1970) estimate that at least 150 ha of favorable habitat per person is needed to secure an adequate food supply. In a moderately favorable habitat, these scientists estimate that 250 ha per person would be required. ... In marginal environments, such as the cold northwestern Canadian region, each person needs about 14,000 ha to harvest about 912,500 kcal of food energy per year (Clark and Haswell, 1970).
— David Pimentel and Marcia H. Pimentel, 'Food, Energy, and Society', third edition, (Boca Raton, FL: CRC Press, 2008), p. 45-46.

So assuming a highly favourable environment, and further assuming the area to sustain strict hunters is equal to that of hunter-gatherers, a city of 10,000 would need an area of 150,000 hectares (~370,000 acres, ~1,500 km²).
That isn't a completely unreasonable area, but as the population grows those hunters will need to travel farther and farther out to find prey and bring it back. Anything above 10,000 I think would begin to test the concept of city; there would be enormous pressure to undergo fission and split the population into smaller clusters scattered within the hunting area. And once split, they would begin competing with each other.
Answer: The current answers all base themselves on historical realism, but the OP does not specify this as a requirement.
The obvious answer is therefore mega-fauna. A city requires large amounts of food, your carnivorous civilization gets this from humongous creatures that cross the region the city is based in frequently and in large enough numbers to provide that food, while also being huntable by a small, rag-tag band of heroes.
This is essentially an extension of the Greenland/ whale hunting society in a comment on the question, but with fantastic beasts thrown in.
For bonus points, this migration could take place through natural portals so the local area does not have to support these creatures out of its own resources. Much like the Perfectly Normal Beasts in the 5th Hitch-hikers book.
Comment: Harvesting giant dinosaur eggs because those dinosaurs' survival strategy is "produce too much offspring for pesky humans to eat them all". Or a city floating in the ocean/giant fish farms. Or a bunch of yoga practitioners able to enter hibernation at a whim. Plenty of non-historical options!
Comment: Food issues are indeed a big problem, but a logistics problem that got touched on is how to even BUILD a city, if your doctrine insists on "not harming plants." Wood and plants are used for all sorts of things like fire and tools, to say nothing of how many dwellings that a "city" would need.
Answer:
Say I wanted to create a civilization of people who, in accordance with a vow to never harm plants, refuse to practice agriculture or animal husbandry, instead relying hunting and fishing for all of their needs. Is it conceivable that this society would ever produce a city with tens of thousands of people?

The direct answer is very likely "no", as many others have laid out. Agriculture is the easiest and most efficient way to convert solar energy into ... abundance of something we can eat, basically.
But let's just say we want a "yes":
An inferior or vassal civilization is doing agriculture for them
Your people don't do agriculture. However, they're good at conquering people living in their outskirts that just happen to have significantly different characteristics: blond instead of brown hair, blue instead of black eyes, speaks a different language, practices different sets of belief, etc. In short: another civilization, for any practical purposes.
You enslave them and tell them to provide for you, or else. They eventually resorted to agriculture, for the same reasons above. Strictly speaking, you don't harm plants, the vassal civilization do. Your civilization then can just keep having (pretending) the moral high ground ever since.
Answer: You can get around the thou-shalt-not-harm-a-tree mandate if you allow the collection of produce that has fallen to the ground (i.e. "That which Nature hath offered, directly").
In addition to the answers above, this lets you extract marginal nutrient content from non-animal sources, especially nuts/seeds which are decently high in fats that a lot of game animals will be lacking. Cultivation of those trees would be a form of agriculture, but more like landscaping than active farming.  There's a number of fruits that are okay to harvest from the ground as long as you're checking every day to avoid fermented/rotting examples.
This avoids the whole "harming by harvest" angle, unless they understand that dropped fruit/nuts/seeds are how plants propagate themselves and find the interruption of that cycle objectionable.


Since the formation of diamond from Graphite is endothermic and the entropy decreases for this process, how is it possible to make diamond?

Question: Surely G would always be positive and thus would make it impossible to make diamond. Clearly this is not the case. But how? Would an increase or decrease in temperature aid it's formation? I think a decrease in temperature would favor diamond but wouldn't this contradict le chatilier's principle?
Answer: Diamond is significantly denser than graphite.
atomic densities:

$1.14  \times 10^{23}$ cm$^{-3}$ for graphite
$1.77  \times 10^{23}$ cm$^{-3}$ for diamond

This suggests that higher pressure would favor the formation of diamond.  Indeed, as the following phase diagram shows, diamond is the most stable allotrope of solid carbon at high pressures.  Temperature has little effect, as long as the pressure is high, diamond is favored over graphite at all temperatures up to the point of liquefication.
Answer: If you have a look at this phase diagram, you can see the main condition at which diamond is the favourable structure: high pressure. The Gibbs free energy is dependant on pressure, in addition to temperature: $$dG = -SdT + Vdp$$
With a little math and assuming the temperature is constant, the gibbs energy moving from one pressure to another: $$G(p_2)=G(p_1)+\int_{p_1}^{p_2}Vdp$$
In practice, one method of making synthetic diamonds relies on high pressure and high temperature: carbon dissolved in a molten metal precipitates out onto small seed diamonds.
It's not really necessary to calculate anything to rationalize why diamond would be the favoured allotrope at high pressure—diamond has a much higher density than graphite. At high pressure, the side of the equation with less volume will be favoured by Le Chatelier's principle.
Comment: Enthalpy is also dependant on pressure. ∆H of formation at standard state (which is what you'll find in a table) is not the same as at very high pressure.
Comment: if you take the definition G=H-TS how is it possible for the reaction to happen because surely G is always positive?
Answer: Thermodynamics gives two possible solutions: you make $\Delta G$ positive through appropiate choice of reaction conditions (i.e. high pressure), or you couple the diamond-formation reaction with another reaction, so that the total $\Delta G$ becomes positive.  There are processes for gas-phase deposition of diamond films on surfaces, and those don't depend on high pressure.
Answer: You're forgetting the key - enthalpy is defined at constant pressure. You need to be thinking about Helmholtz, not Gibbs. If we say that the reaction from graphite to diamond is caused by pressure, chances are the pressure will not be constant throughout.
Comment: Welcome to Chemistry.SE! Take the [tour] to get familiar with this site. Mathematical expressions and equations can be [formatted](http://meta.chemistry.stackexchange.com/q/86/4945) using $\LaTeX$ syntax. For more information in general have a look at the [help]. At the moment this reads more like a comment than an actual answer - could you elaborate a little more. With a bit more rep, [you will be able to post comments](http://chemistry.stackexchange.com/privileges/comment) on any question/answer.


Sizing a powersupply for a gate driver

Question: Let's says I have a gate driver and a MOSFET.  I have made the decision to drive my FET using 5V.  The gate driver peak current is 2A.  Do I size my 5 volt power supply at 2A plus my other stuff?  Do I need more or can I get away with less but at the price of, say, max permissible switching frequency?
Answer: The PEAK driver current is 2A, not the continuous current. Your power supply needs to supply the continuous current to recharge the decoupling caps and the caps are what actually supplies the peak currents to the gate-source capacitance in the MOSFET since the power supply is too slow (or unavailable if it's a high-side bootstrap)
Also, it's not actually your gate driver peak current you need to be concerned about. As long as its high enough to turn your MOSFET on and off fast enough then what you really need to be worried about is your gate charge \$Q_{gs}\$ and switching \$f\$ frequency which determines the actual current your power supply needs to be capable of.
\$I_{average} = \frac{Q_{gs}}{T_{switch}} = Q_{gs}\times f\$
Comment: Wow, this makes a lot of sense.  I don't normally think about a chip pulling over 2A from a capacitor so it didn't occur to me.
Answer: If use of a gate-driver requires peak-performance (minimum switching times, quickest possible charging of the FET gate, minimum of ringing), then you need to design a LOW INDUCTANCE power supply.
That means
(1) you use a Ground Plane under the gate-driver and under the FET;
(2) you have 0.1uF SMT from the gate-driver VDD lead to the underlying Ground plane
(3) you bring a clean rail-rail logic-drive signal from the pulse-source with sharp edges and low over/undershoot; you may want to source terminate this pulse trace on the PCB.
(4) you include Miller Effect Plateau in the FET gate drive requirement

Sizing a powersupply for a gate driver


Regular carburettor vs chainsaw carburettor

Question: Could someone explain their differences? By regular carburettor i mean the one which you usually find on motorbikes
Answer: They are different because chainsaw engines and carbs are used at much more extreme angles than car engines.
Unless you want to do vertical in your car.
There is plenty of info about both types of carbs available so I won't add that info here.
Comment: And chainsaw carbs "suck" the fuel supply where motorbikes are normally gravity feed.


Is a savings account that earns 0% interest tax-free?

Question: If I can find a savings account that doesn't earn interest and doesn't come with any sort of bonus, will my savings be tax-free?
Comment: Please define what you mean with tax free. You always only pay tax on interest, so not having interest means tax free (unless you live in a country with wealth tax). Guess waht - paying part of something is better than not having something. I.e. interest. Or do you mean that money you put into such a saving account is not taxed as income first - well, bad news: interest on the account has no correlation to your income tax. I.e. once you pay tax you can make with the money what you want (also put it into a savings account). Tax free/Deferred Tax schemes notwithstanding. Totally unclear question
Answer:
my savings be tax-free

Savings are always tax free. Only the interest earned [if any] needs to be included as income [and combined with other ordinary income] and taxed as per tax brackets.
So if you have an account that generates no interest, there is no additional income to report or tax to pay.
So if you keep 10,000 in savings account. There is no tax on this 10,000. If it generates an interest of say USD 200 a year, then this 200 will be added to your other income and taxed at your bracket between approx. 10% - 40%; i.e. USD 20 to USD 80 in additional taxes.
Essentially one need not search for a savings account that earns 0%; unless you believe that filing taxes is more complicated that earning the additional interest.
Comment: You can pay no income tax by having no income, but that seems like a rather foolish tradeoff.
Comment: Most likely, the OP will have to file and pay taxes regardless. The difference is whether they write a 0 or a positive number on the line for taxable interest on the tax form.


Getting SQL Server instance name in WIX?

Question: Using WIX i would like to know what instance of SQL Server is installed on target machine. If installed, get the name and set it as one of the property value to be displayed in my custom dialog.
I am using the following code to find if SQL Server is installed and using SQLSERVER property to set the my control's value, but its coming up as empty:
<Property Id="SQLSERVER"><RegistrySearch Id="SQLServer" Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server" Type="raw" Name="InstalledInstances"/></Property><Condition Message="Error: This application requires Microsoft SQL Server 2005/2008 to be installed. Please install Microsoft SQL Server 2005/2008 and run this installer again.">SQLSERVER</Condition>

Custom Dialog:
<Control Type="Edit" Id="txtInstanceName" Width="150" Height="15" X="22" Y="139" Property="SQLSERVER" Text="[SQLSERVER]" />

Can someone please guide me what am I doing wrong here? Thanks!
Answer: It's a bug documented here: http://support.microsoft.com/kb/897026


Why we need to repalce the ScriptSig with the previous ScriptPubKey when calculate the per input signature hash?

Question: I'm reading Programming Bitcoin. And in Chapter7, the author talked about the way how signature hash is calculated by replacing the transaction's ScriptSig with the corresponding previous ScriptPubKey. I understand that we can't calculate the signature of a transaction with the signature inside it. But why not just drop the ScriptSig part instead of replace it with the previous ScriptPubKey? And by the way, the same confusion arise on me with the p2sh , where the ScriptSig is replaced with the corresponding RedeemScript.
Answer: Any data that is included in the sighash must be revealed to the signer. It also means that the signature itself directly commits to that information and so must be truthfully provided to the signer as otherwise an invalid signature would be created.
By including the scriptPubKey or the redeemScript, we ensure that the signers are aware of the script that their signature will be involved in. This removes a class of potential attacks where the signer is lied to about the script that is involved in that input. It may be that the signer does not want to sign for certain scripts, and so having the script be part of the signature means that the signer will always know what script it signed for.
Comment: @AntoinePoinsot The point isn't commitment (which is indeed true regardless of whether this replacement happens), but making it cheap for signers make sure their information is correct (without it, signers would need to be given the full transactions creating the outputs to know the scriptPubKeys being spent). Of course, as we now know, the substitution in legacy sighashing isn't sufficient, and even the segwit one (which includes more information directly) isn't.
Comment: As long as the prevout is committed to, it's just a shortcut though: the Script is already indirectly committed to?


Why Aptana when they are based on Eclipse?

Question: I'm not sure if I'm missing something. If Aptana is entirely based on Eclipse, why would anyone choose it, when they can get the original Eclipse (especially that the Eclipse development is not lagging in anyway)? I understand why/benefits Aptana started their project, but why would I use theirs instead of Eclipse? I don't know much about this IDE and I'm still trying to choose, so maybe I'm missing something that's obvious to the rest.
Answer: NetBeans isn't based on Eclipse -- it's from Sun, who traditionally haven't been a supporter of Eclipse (look at the names).
Aptana is a helpful packaging of a variety of useful web and scripting development tools.  The nice thing about Aptana is that you just download it and it works.  Aptana also provides a commercial version with a variety of additional features.
You may also want to look at Genuitec's MyEclipse, which packages up a variety of other components and provides some support for minimal cost.
Answer: I think they come with proprietary plugins that you can't necessarily get with a stock install of Eclipse.  Same with the Zend IDE.  You can get most of the same functionality with Eclipse but you have to install it yourself and you get no support that way.
Answer: Netbeans is not based on Eclipse.
Answer: As has already been stated, Aptana simply provides a nice set of plugins that work together to ease development. That's one reason to use it. Not only do you get the advantage of the Aptana plugins, but you get the Eclipse platform itself, which is still extensible, even beyond what Aptana does.
I have another reason as well: I run a dual boot system, XP/Ubuntu, and for development I like to use the same software in both OS's. I ran into problems using PHPEclipse on Ubuntu, so I switched to Aptana.


After installing Ubuntu 20.04 on Dell XPS 7390, integrated camera is not working

Question: After installing Ubuntu 20.04 on Dell XPS 7390, integrated camera is not working. Can anybody help to resolve the issue? Thank you.
Answer: Not supported according to this https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1
So I doubt that this guide below will work but worth a try:
https://linuxconfig.org/how-to-test-webcam-on-ubuntu-20-04-focal-fossa
Another option is to try installing Windows drivers using Wine and/or ndiswrapper.
https://itstillworks.com/convert-windows-drivers-linux-9821.html
Intel develops Clear Linux I wonder if it works under their OS? Create a Live-USB drive and test it out.
https://clearlinux.org/downloads
Any of those help?
Comment: Thanks for sharing the details. Unfortunately none of the options resolved the issue. I think I need to wait until Ubuntu includes new drivers for this camera.
Comment: does anyone know if pre-releases of ubuntu 22.04 (or ubuntu 21.10) have fixed this?


How to map/bind mouse button as keyboard button in Windows 7?

Question: I'm trying to map/bind my mouse button 4 and button 5 to behave as kayboard num pad 1 and 2, does exist some way to do that? Maybe with some specific software?
Answer: Try X-Mouse Button Control:

X-Mouse Button Control is a Windows application to remap your mouse buttons and expand the capabilities of your mouse!
The extensive list of functions available to map to your mouse buttons includes options such as:

Send any keys using the simulated keystroke editor
Launch any windows application
Copy/Cut/Paste
Media control (play/pause/stop/volume/mute etc.)
Capture screen (or active window) image to clipboard
Click-Drag [Sticky buttons/keys]
Vista (and Windows 7) support with some Vista/7 only features such as 'Flip 3D'
And much more!
Comment: Once you've installed X-Mouse Button Control, to set up a key mapping, right click on the mouse icon in the notification area ('system tray'), and choose Setup. Then, from the drop down list for the mouse button you want to map, pick the "Simulated Keys" option; that will open the dialog shown above, and you can enter a code for the keys you want pressed as explained there.
Comment: Unfortunately, it cannot be used in a remote desktop session.
Answer: If I understand your question correctly I would recommend looking into a program called AutoHotKeys. It will allow you to creat scripts that enable customization over what happens when certain keys are pressed together, how many times they should be pressed, if the mouse should be clicked(left or right), where the mouse should move, and so on...


Where's Footnote in Loki?

Question: In Freya I used Footnote all the time and I thought it would come installed by default in Loki but instead I can't even figure out how to install it.
Answer: It appears that there hasn't yet been a stable release of this app. You could install Footnote from elementary-daily. Fair warning, though: adding elementary-daily may cause your OS to be unstable.
As an alternative, you could use Notes or GNotes (both available in AppCenter), or take notes in Scratch.

Edit: It looks like there isn't a Loki-compatible version of Footnote in elementary-daily. In this list of apps, neither of the Footnote packages ends with ubuntu16.10.1 or ubuntu0.4.1. You may be able to check out the source code and build Footnote from source, but the app may behave unexpectedly on Loki.
The last non-translation update to Footnote was in October 2015, so it probably needs some love in order to work well on Loki. If you're interested, this would be a good opportunity to get involved with elementary! :)
Comment: Ah, got it. I've updated the answer with more detail.
Comment: I was not able to install it from elementary-daily in loki, only in freya.

Where's Footnote in Loki?


Can Sack suffocate someone by covering them?

Question: In the Marvel Comics, one of the Gene Nation members is simply known as Sack, a mutant who can cover an opponent with his transparent, gel-like body and make them fight for him, due to his body being very weak. I am curious: has he ever used this ability to try and suffocate someone? After all, if their face is covered in a thick, gel-substance, I imagine it would be very hard to breathe.
Answer: The very short answer to this one is no. Sack's mutation isn't that he's strictly a liquid, but rather that he can turn into a sort of ethereal energy and merge with another being, allowing him to operate their body like a meat-puppet.
That being said, the process of absorption is 100% fatal to anyone who doesn't have a mutant healing factor.

Uncanny X-Men #324


How to get rid of subsurface shading artefacts

Question: I notice this radial striping often when I use the subsurface modifier on shapes with curved segments. How can I prevent it or remove it?
Comment: maybe related: http://blender.stackexchange.com/questions/47934/forcing-subdivide-to-create-non-zig-zag-edges/47938#47938
Comment: @kimholder - cegaton's link is still pretty related, although I would say that you could select the big n-gon in face selection mode, and use the "i" key to do some inset operations on the face. The problem really comes down to a big flat face trying to smooth out to a whole bunch of vertices. When that happens you are going to see the rippled influence.
Comment: @cegaton I tried the accepted solution, and while it helps, it's just reducing the problem, not eliminating it. So i tried extruding the inner edge loop without moving it, like you suggested, and that worked. But in this figure, that made that edge loop really sharp, which isn't what i wanted. So, i scaled it inwards. Then it looked great. I'm not sure what to take from this - subsurf has trouble with angles on the edge of a large n-gon?
Comment: That makes sense. I'll keep that in mind.
Answer: Your problem is the huge ngon on the top. Try filling it with a grid-like patch of mesh.
Check out this topology guide especially the part about Cylinder Caps
Answer: The issue is how the subsurf modifier will subdivide an ngon (a polygon or face made of more than 4 vertices)
The rest of your object is made of quads and subdivides nicely and regularly with the subsurf modifier, whereas the ngon creates a subset of polygons arranged in a way that will create the artifacts you are experiencing.

There are a few solutions:
add a number of subdivisions or loop cuts to make the ngon smaller and the issues less evident:

You can delete the ngon and fill the surface with quads using the grid fill tool (this requires that you have an even number of vertices on the loop ring)


Why does H2 react with O2?

Question: We know $\ce{H2}$ is formed with covalent bonds (just as $\ce{O2}$ is formed via covalent bonding). Hence, these molecules gain some stability. In spite of this stability, why do they react with each other to form $\ce{H2O}$ or $\ce{H2O2}$?
Comment: Burning hydrogen in oxygen is a hugely exothermic reaction. Hence, they gain even more stability by combusting.
Comment: That is, they gain even more stability by breaking those bonds and forming other bonds instead.
Answer: Indeed, much of the chemistry that takes place in the universe involves the breaking of covalent bonds and the formation of new covalent bonds. The key is that the energy of the products needs to be in a lower state than that of the reactants. This is the thermodynamic requirement anyway. Lets consider one of your examples:
$$\ce{2H2(g) + O2(g) -> 2H2O(g) + \pu{572kJ}}$$
Although we had to break the covalent bonds of hydrogen and oxygen, the new bonds that were formed are even stronger, thus the reaction is thermodynamically favored.
The complicating point of the above example is the fact that there is a large kinetic barrier to the reaction. This basically means that there is an intermediate product in the steps of this reaction that is energetically very high (unfavorable), so some catalyst is required (say, a spark) for this reaction to get over that energetic barrier and proceed on any reasonable time scale.
Summary, TL;DR:
The breaking and creating of covalent bonds plays a major role in chemistry. The criteria for covalently bound compounds to participate in a chemical reaction is that the products have a lower energy state than than the reactants. If this is not the case, the reaction will not happen. Even if it is the case (that the products are lower energy / more stable than the reactants), there may be kinetic limitations requiring a catalyst in order for the reaction to proceed. But, no catalyst can make a reaction proceed if the above criteria is not met, that the products be more stable than the reactants.
Comment: You suggest in your summary paragraph that endothermic reactions do not happen, 'if this is not the case, the reaction will not happen'.
Comment: @porphyrin , thx for the input. What I'm shooting for is a statement referring to the Gibbs free energy of the reaction needing to decrease for the reaction to have a chance. I hope the way I've re-worded gets that across.
Comment: I suppose it depends on what you mean by 'stable' in your last line. The point is that the Gibbs energy must be negative for a spontaneous reaction, rather than just the enthalpy, so entropy change is crucial also. The rate does not matter as far as the thermodynamics goes, and, as you write, the catalyst does not change the reactants or products but only the mechanism of  how one gets from one to the other.

Why does H2 react with O2?


Should I use my primary Apple ID for that or create another one to use with Apple Developer account?

Question: I'm thinking about getting an Apple Developer account. But not sure whether I should tie it to my primary Apple ID that I use on all my devices. Will this has an effect on beta testing, or anything?
Answer: From the Apple Developer Program page:

Enrolling as an Individual
If you are an individual or sole proprietor/single person business, get started by signing in with your Apple ID with two-factor authentication turned on. You'll need to provide basic personal information, including your legal name and address.

If you use a different Apple ID, you need at least one device with this Apple ID signed-in to authenticate your login, because of mandatory two-factor authentication. Switching your Apple ID on a device is not something you want to do regularily.
Answer: The only downside I can see for this is two:

If you want to not share your legal name and address with Apple (who will share your legal name but not your address when you publish any app online) you should form an LLC and use that for your development.
If you are not willing to enable TFA for your account, you'll be forced to do that as a paid developer.

I don't see any real reason to not go ahead with keeping your same AppleID initially. You can always transfer things later if you need to.
So, yes - I think people should use their primary AppleID to start developing.


LM2664 can I use the ceramic capacitors instead of the electrolytic ones?

Question: I need the negative voltage for my OPAMP and I use the LM2664 inverter. I have a very limited space available on my PCB. Is it OK to replace the electrolytic capacitors with the ceramic ones?
Comment: There is a selection on capacitor selection in the datasheet, but ultimately it looks like it's happy with low ESR, so ceramic caps should be ok.
Comment: Strange, but where do you find ceramic caps that are smaller than elec. caps for the same capacitance.
Comment: @MarkoBuršič  for example here http://uk.farnell.com/c/passive-components/capacitors/ceramic-capacitors?capacitance=3.3uf&ceramic-capacitor-case=0402-1005-metric-
Comment: Why invent warm water, if they provided the EVAL board with all details for caps and design.
Answer: I've had a look through the datasheet and all it seems to say about the capacitors is that they must have a low ESR. I can't find anywhere that it specifies a minimum ESR or states that they must be electrolytic.
Therefore, I think you can safety use ceramic capacitors as these have a very low ESR.
Hypothetically, if the datasheet did require a minimum ESR (as some devices do), you could still use a ceramic capacitor instead. All you'd have to do is place a small resistor in series with the ceramic capacitor (around 0.5 ohms, or whatever value the minimum is in the datasheet).


Intel Wireless N 5300 - Personal Area Network Support

Question: My wireless card supports what Intel calls "MyWifi" which means that it can act as an access point for other computers. How can I discover if this is supported in Ubuntu?
Answer: My best bet would be to do the following in a terminal:

turn off network-manager
try to enable master mode for your card

Here's the terminal commands:
sudo service network-manager stop
sudo iwconfig wlan0 mode master

If this gives an error, you will probably need a patched driver to enable it. I get this error:
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Invalid argument.

I don't know how to make an accesspoint with a GUI, as I've never had a network card that supports it.
You can turn on network-manager again by running
sudo service network-manager start

Comment: Thanks. I do indeed get that error. What resources can I use to locate a patch?
Comment: I'm not sure that is an easy task. I've only tried to patch to enable monitoring and injection, and I've usually found these through the aircrack-ng community.


Exclusively Rejoicing on Sukkot

Question: Sukkot is z'man simchatenu -- the season of our rejoicing.  But the megilla associated with it is Kohelet (Ecclesiastes), which is a downer and somewhat depressing.  Why?  Sources say it is to provide a counterweight to unbridled rejoicing.  Perhaps so, but the problem is that the Torah says: Vesamachta bechagecha, vehaita ach sameach -- You will rejoice in your holiday, you will ONLY rejoice. [Deuteronomy 16:14-15] The word "only" seems to exclude "counterweights".  So what is the resolution? (Note: Most Sephardim don't read Kohelet on Sukkot.)
Answer: There is an explanation of the meaning of simcha that is appropriate to Kohelles. Kohelles - the wisest of men – explains in vivid detail, that all of the temporal pleasures and enjoyments of this world are vanity and futility. When all is said and done, it is only Fear and Love of Hashem and fulfillment of His Will that grants a sense of inner joy and purpose. And therein lies the message of Succos. Kohelles is not a counterweight, it is an explanation of what actually causes simcha.
Malbim explains that simcha refers to internal gladness which is continual, while sasson is the external expression of one's inner happiness. In other words, sasson denotes what a person does to show that he is happy, for example wearing special clothes for holidays or playing music at happy times, while simcha is the happy feeling inside of him. Thus, Kohelles teaches us that only recognizing that only following Hashem leads to simcha.
Chabad points out that succos is also chag ha-asif, the festival of the harvest. This can lead to complacency and an attempt to find simcha in the results of the harvest (whether it be good or better) which is olam hazeh. Kohelles reminds us that everything is from Hashem, and that is the only lasting simcha.
Why Do We Read Kohelet on Sukkot?

A major theme of Kohelet is the futility of mundane pursuits and
  pleasures, and the search for deeper meaning to life. Sukkot is also
  known as Chag ha-Asif—the Festival of Ingathering. It's the time of
  year when the harvest has ended, and the crops are gathered and stored
  for the coming year. It's a moment of great satisfaction, as one can
  see the fruits of his labor before him.
Kohelet shakes our contentment with the reminder that mundane
  accomplishments are fleeting and empty. Even at the close of the
  harvest, we must seek real achievement and fulfillment.
Sukkot itself demonstrates this theme by the commandment to live in
  temporary dwellings. We move outside our home, which provides a sense
  of permanence and comfort, and instead dwell in a flimsy hut. This
  recalls the transience of physicality, as does the book of Kohelet.

There are also a number of answers at Why do we read Kohelet on Sukkos? which use this theme to point out the connection of succos and Kohelles

Exclusively Rejoicing on Sukkot


Ransomware that attacks only mapped drives

Question: Is it possible that ransomware attacks only mapped drives and not the local drive?
Answer: This is entirely possible, although it would be a bit too specific for most ransomware out there unless it's targeting specific organizations that are known to use mapped network drives. It'd be more useful for the attacker to target both local and network drives if the aim is ransoming as much data as possible.
Ransomware is software, so it can be written to target anything it wants that other software is capable of using.
Answer: The goal of ransomware is to make money. The programmers do what they can to maximise the money they can make. So, it makes sense for ransomware to check if the infected device is connected to mapped drives. If it is, then it is likely part of a business, and it is more profitable to encrypt the shared business files and demand ransom from the business instead of encrypting the local files, which limits the impact. An infected machine can be isolated and contained. the shared files on a mapped drive are far more difficult to isolate and contain. The goal is maximum reach with maximum impact so that the business is more likely to pay the ransom.
The other reason to leave the local drive alone is that the machine's anti-virus might pick up the encrypting activity even if it did not detect the infection. But many businesses do not run anti-virus on the file servers (because of the performance hit). So the ransomware can remain hidden for longer to increase its impact.
If there are no mapped drives, the ransomware can look to the local drive to demand ransom of the user.


Particle Motion/Mean Value Theorem

Question: Here's a two-part question:
"Consider the function $f(x)=2x^3−9x^2−24x+1$ on the interval $[−6,8]$. Find the average or mean slope of the function on this interval."
What I did in my initial attempt was derive the first function, which I assumed to be $s(t)$, and then set slope equal to $v(8)-v(-6)\over14$. This came out to $m=-6$, which was incorrect.
"By the Mean Value Theorem, we know there exists a $c$ in the open interval $(−6,8)$ such that $f′(c)$ is equal to this mean slope. For this problem, there are two values of c that work."
For this part, I set $v(t)$ equal to -6, and solved for $t$. The values were obviously not correct.
Where did I go wrong?
Answer: Mean slope on the interval $[a,b]$ is defined by $m=\frac{f(b)-f(a)}{b-a}$ and not $\frac{f^\prime(b)-f^\prime(a)}{b-a}$. so $m$ should be 62 ...

Particle Motion/Mean Value Theorem


Python threading script is not starting/working properly

Question: I quickly wrote this example script for stackoverflow so ignore the functionality aspect of it (my version looks alot better than this), but:
from threading import Thread
from msvcrt import getch       #I'm using Windows by the way.
from time import sleep
import sys

def KeyEvent():
    while True:
        key = getch()
        if key.encode('hex') == '03': #^C
            y = raw_input("Are you sure you want to quit? (y/n): ").lower()
            if y == 'y':
                sys.exit(0)
            else: pass

def main():
    t = 0
    while True:
        print "The count is {0}".format(t)
        t +=1
        sleep(1)

if __name__ == "__main__":
    mainthread = Thread(target = main)
    kev = Thread(target = KeyEvent)

    mainthread.daemon = True
    kev.daemon = True

    mainthread.start()
    kev.start()

What this script is supposed to do is run both loops at the same time, one counts up in seconds, while the other checks for ^C. Please don't recommend that I use a different method, because this is an example.
My problem is, that the script just doesn't start. It displays "The count is 0" and exits, but if I comletely omit the .daemon = True parts, the script runs, but it doesn't run sys.exit(0) correctly. How can I make this script run correctly AND exit when prompted?
Answer: Threads marked as daemon automatically die when every other non-daemon thread is dead. In your case, the main thread dies just after calling start() on your two daemon threads, bringing the python process with it. That anything gets done in your thread is a matter of luck and timing.
sys.exit(0) does not kill threads other than the main thread. You need a way to signal your threads that it's time to stop. One way to do that is through an Event object.
You shouldn't use getch to try to catch Ctrl+C, try using a signal handler instead:
from threading import Thread
from threading import Event
from time import sleep
import signal

stop = Event()

def handler(signum, frame):
    y = raw_input("Are you sure you want to quit? (y/n): ").lower()
    if y == 'y':
        stop.set()

def main():
    t = 0
    while not stop.isSet():
        print "The count is {0}".format(t)
        t +=1
        sleep(1)

if __name__ == "__main__":
    signal.signal(signal.SIGINT, handler)

    mainthread = Thread(target = main)
    mainthread.start()

    while mainthread.is_alive():
        try:
            mainthread.join(timeout = 0.1)
        except IOError:
            pass #Gets thrown when we interrupt the join

Comment: "*Threads marked as daemon automatically die when every other non-daemon thread is dead*" this saved my life.
Answer: You have two problems. First is that your program ends too early. Second is that you try to quit the program in your KeyEvent thread.
Your program terminates early because you didn't hold your main thread. Your main thread ends right after your last statement kev.start() and your daemon threads die with it.
You need a mechanism to hold the main thread infinitively (because you expect the user to type "y" to quit.) There are several ways of doing this. One is add
mainthread.join()
to the end of your code.
Second, sys.exit(0) in your KeyEvent thread obviously can not terminate your whole program. Please find your answer in the following post: Why does sys.exit() not exit when called inside a thread in Python?


Installing expansion tank at washing machine valve?

Question: I own a condo with a terribly cramped water heater closet (it sits underneath the air handler with about 6 inches of clearance). I need an expansion tank, but it really will not fit in that closet (not to mention I really don't want to have to touch that again after having just changed the water heater). Is it reasonable to tee the expansion tank into the washing machine's cold water valve? My laundry room has a lot more space than where the water heater is, so there's plenty of room to support it, and easy access if I need to change it out.
Comment: @k4kfh  How did you come to the conclusion that you need an expansion tank.
Comment: Expansion tanks are for the expansion (and contraction) of HOT water has it is heated. Why do you want to add it to the COLD water line? It is used on hot water heaters sometimes but mostly for  boilers.
Comment: AM, no. they're to reduce the frequency of well pump engagement and make water volume more uniform.
Comment: @isherwood that would be a pressure tank, NO? The question referenced Hot water heater.
Comment: @AlaskaMan my temperature and pressure relief valve on my hot water heater is discharging, and it's brand new so I know it's not just a bad valve. There is no check valve between the hot/cold sides of the water heater, and hot water is actually harder on the bladder in the expansion tank, so I see no reason to install one on the hot water side rather than the cold side.
Answer: So long as you do not have any check valves between the hot and cold supply, an expansion tank can be located anywhere in the system.
Thus, if you have a check valve or PRV (which acts effectively the same as a check valve from the system point of view) on the main inlet to the house, you can put the expansion tank wherever it is convenient if there are no other check valves in the system. All the water (hot and cold) experiences the same pressure throughout the system, and the expansion tank will work wherever you put it on the system.
This appears to be a widely misunderstood concept, as can be seen in the comments.
Note that if you put it on the far side of a valve, (i.e. not a check valve) it will not work when the valve is closed (but that will also make servicing it easier, if needed.)
Comment: There are no other check valves in the system between the water heater's cold inlet and the washing machine valve. The only valve in the way would be the shutoff valve for the washing machine, but this would never "accidentally" get turned off, so I think that's good enough. It also means that I can shut off the valve when I have to replace the tank so I only have to deal with a little water dripping when I unscrew it.
Answer: Reasons for expansion tanks on a domestic water systems:

Required by code/bylaw. Some municipalities may require one be installed so that the municipality's water system does not receive back pressure caused by the expansion of water when heated.
Use of backflow prevention devises. When using a backflow devise, as may be required by some codes/bylaws, the pressure caused by the expansion of water when heated may cause the temperature and pressure relieve valve on the tank to open. This is not always the case as it depends on multiple variables.

Location of expansion tanks on domestic systems:
When required, the expansion tank is located on the cold feed to the water heater after the shutoff valve. However in your case, installing it somewhere else on the cold side should be fine so long as there are not isolation valves in-between.
Typical install:

Source for above drawing
Answer: As a retired practicing chemical engineer, you can install the expansion tank ANYWHERE in the system as long as not isolated by any back-flow preventer, etc. I am amazed at all the answers saying it MUST be on the hot water line. The cold and hot water are almost always located in a continuous path to each other and reducing the pressure in one location passes over to the others. Many times in condos the only place to add one AFTER construction is at the washing machine. Usually a lot of room and can easily be installed with a simple "Y" connector like so many wrinkle guard washers are being equipped with. Just be sure to use a good quality hose ("burst proof") with for all lines and same goes for any valves or couplers, etc. Might even put a pressure gauge in there somewhere to monitor you system pressure easily. Usually a 2.5 gallon expansion tank is sufficient for a regular home.Should be a DIY project for around $100-$150.Mine was.
Comment: As @pdd indicated above, the expansion tank goes on the COLD side. That directs overheated water that want to go out the cold line to flow into the expansion tank....and NOT into the public system.


Dropbox - how to retain files but reinstall dropbox?

Question: I have to reinstall windows and I have a lot of data on dropbox (~30 gb). I'm afraid dropbox will start syncing all over again. I want dropbox to keep the current files in my harddisk after I reinstall windows. (files are in a different drive, obviously)
Answer: Probably late, but because I was looking for that as well, here is the official procedure from the Dropbox documentation.
https://www.dropbox.com/help/1941/en
Answer: It looks like Laurent's answer is the right way.  I seem to remember that SE likes the core part of the answer to actually be posted on SE, so here is what the DropBox documentation says, from the same link (https://www.dropbox.com/en/help/1941).
Basically, on the new computer or in the new location that you want DropBox (DB) to put the new DB folder:

Start a DropBox Sync from scratch to the new location, so that DB actually starts downloading all the online files to the new location.
Pause the Sync, to stop the downloads.
Copy your existing DB files into the new location (overwrite anything that was just downloaded).
Resume Syncing - DB will first check the DB folder, be astounded to find all the files magically there, and proceed to only sync the latest updates, if any.

To clarify how to start a DB sync from scratch in a new location (for example, in the event of already having all the files on a hard drive but in a different location, like myself & the OP), I had to actually

Unlink my DropBox (Prefs>Account>Unlink).
Re-Link it and point to the new desired location.
Pause the Sync
Move all the DB files from the old location onto the new location,
overwriting anything already there.
Resume Syncing

In my case this worked perfectly, and DB was "up to date" after a short while.
Again, thanks to Laurent for the link with the answer.
By the way, on DB v3.0.3, simply changing the DB folder location to whereever my existing folder was (as per the other answer) did not work; DB stated "There is already a DropBox folder in that location" or something to that effect.
Comment: uh... can't unlink, because of Dropbox's stupid new 3 machine limit.  So... need to retain the existing link.
Answer: Dropbox path should be same before/after reinstallation.
I just made the same thing, I bought a new laptop.
I moved my old dropbox folder into my new laptop.
By using settings in dropbox, select the dropbox folder --> you should show your actual folder to the new dropbox setup.
Note : DO NOT FORGET to backup actual dropbox folder into external hdd in order to avoid bad results.
Comment: problems with duplicate copies occur with ownership and permission issues. use the same account name when formatting.
Comment: You mean just point dropbox to the previous folder where dropbox synced files? Are you sure, because I've heard there are problems with conflicted copies?
Comment: I had no problems when I did this. Conflicted copies may however occur, if you change the data in the folder between the last "old" and the first "new synchronization". And as NT already said: Make sure top copy the Dropbox folder somewhere save before reinstalling Dropbox.
Comment: It's should not be mark as answer, i just do that. All files is mark as conflict, and dropbox client sync all file again.
Comment: may be 99 people does it well but you (1/100) fail...So %99 it's working...if you try again,I hope it works for you too...
Comment: @Shiba not really, I already had this issue twice - one when upgrading windows from 8 to 8.1 and now when refreshing 8.1... all files were marked as duplicates and renamed - very annoying!
Answer: this is how i did it on SAME computer after reinstalling windows
windows go on C: drive, dropbox files are on D: drive in subfolder "Dropbox"
i renamed that subfolder to "Dropbox OLD" and, after installing new Dropbox app, i chose same destination as before and call it the same "Dropbox". since i changed old subfolder name, there will be no conflict. I close dropbox app and MOVE (CUT/PASTE) everything from subfolder "Dropbox OLD" to new one.
then start dropbox again and let it sync. you shouldnt get any probs except if you changed some files from another computer (both will be preserved)


How to block personal devices on corporate network

Question: Currently we are working to secure our internal LAN and due to this we are planning to stop mobile devices (such as personal laptops and mobile phones) to connect on corporate network. Our key area of interest is to counter such users who manage to change MAC address of home devices with the allowed one and bypass LAN security. There can be many cases but this is the one we shared as an example.
Answer: The closest one can get to perfect security for network access is issuing corporate devices with provisioned TPMs and using 802.1X with key material in the TPM.
A proper TPM should never let the user exfiltrate the network access keys from the TPM.  They then cannot be copied to a new device.
There might be expensive processes and hardware (relative to doing nothing) to get this to work.  So depending on the balance of security and corporate fiscal responsibility, MAC whitelisting tends to be a solution despite it's obvious drawback.
Comment: I don't remember my original reasons for that sentence.   I have softened the wording.
Comment: What hardware? Most computers have TPM's.
Comment: It's been awhile since I researched this answer but if I remember correctly there was a premium on the networking hardware which could support this TPM facilitated authentication procedure.
Comment: Wouldn't that be normal RADIUS with a certificate stored in the TPM? Windows supports that out of the box afaik?
Comment: It's anyway a good answer worth an upvote :)
Answer:
Our key area of interest is to counter such users who manage to change
mac address of home devices with the allowed one and bypass LAN
security.

Note that this may not be intentional or malicious (I hope so). Some network components such as Network Manager may be configured to randomize the MAC address, especially when scanning for access points, because the MAC addresses can be sniffed over the airwaves.
It is also conceivable to allow users to use your connection for personal use but keep them in a guest VLAN separate to the rest of your corporate infrastructure. If you really don't want that, then you should consider monitoring the logs to catch offenders on the spot.
If you implement NAC, on wired connections the switch can tell you which port failed authentication, in fact the switch can even block the port, forcing manual intervention. Then it's rather obvious who the culprit could be.


What if I do not Explicitly close the sys_refcursor in oracle?

Question: What if I do not Explicitly close the sys_refcursor in oracle? will it give a open cursor issue, and results in slow speed of application??
Answer: It should be discarded / automatically closed once it goes 'out of scope'.
However, what 'out of scope' means can vary depending on the client technology (JDBC, PL/SQL, etc). Within PL/SQL, for instance, it can depend on whether the cursor is held as a package variable or local variable.
As Dave's answer suggests, each open cursor will count against the total limit - eventually you will hit this limit and get an application error.
I would say that best practice is to explicitly close when you are done.
Answer: As long as the cursor is open it will count against the limit defined by OPEN_CURSORS, so it could cause issues if you repeatedly open cursors and don't close them.
It will also continue to consume some memory until it is closed.  I don't think it's likely to degrade performance significantly though.


exporting procedural landscape

Question: hi guys sorry if this is a repeat question but I haven't found the answer and I've been trying for days this is driving me nuts. So I am new to blender and I have created a procedural landscape and would like to export (.glb format) it so I can import it to three.js. When I export simple objects aka a cube with a texture everything works fine but when I try to export my landscape I get a plane with no textures. I am obviously missing a step or two that I should be doing before I export. If you need more info let me know.
Comment: i would really appreciate some help on this should i be creating a landscape a different way such as ANT
Comment: When you say "procedural landscape" did you use a displacement modifier? or use shader nodes connected to the displacement socket?
Comment: I've done both using a noise texture in the displacement node and baking the image then using it with the displacement modifier in both cases when I export i get a plane with no displacement or materials
Answer: Using node based shaders and modifiers is something that is specific to blender, neither of these export well to other programs.
For node based materials, you can bake the shader nodes to an image that can be used in other programs. This only applies to the surface appearance; such as colour, specularity, glossiness...
A normal map used in a shader can also be used in other programs, but mesh displacement in shaders will not export.
When you are using a displacement modifier, as well as any modifier except armature, you will need to apply the result of the modifiers when exporting. Most exporters provide an option to do this for you during export. For gltf, look for the Apply Modifiers option, in 2.80 it is under General, in 2.81 it is under Geometry.

exporting procedural landscape


Re-enabling Buttons, Link Buttons, Links

Question: I've scoured for a solution to this, but, oddly, I can find nothing related to this potentially very serious issue as I see it. When I disable a button, link button, or link, I do so with the intention that a user cannot click that link and perform the underlying action because it's against my business rules. However, I've found that I can simply hit F12, open developer tools, and modify the disabled button in order to enable it. It doesn't matter whether I disable the button in JavaScript or in code behind, the end resulting tag is pretty much the same. All I have to do is to remove the "disabled" attribute and, in the case of an ASP button, also remove the class attribute. And presto! I can now click the button. Scary. Does anyone have a solution to this?
Answer: You have no control over what HTTP requests will be sent to your server.
Always do your security / sanity / data integrity / authentication / authorization / business rule enforcement / etc checks on the server.
Anything you do on the client is only there for the convenience of the user. You cannot make the browser enforce your security because the user owns the browser.
Answer: The solution is to have some form server side security in place as well as client side 'control'.
For example, you would perhaps authenticate the user and pull a set of functions they have access to from a database. These you could store somewhere server side, perhaps in session during the duration of the users visit.
When they attempt to perform an action, you need to check that action against the list of available actions to see if they have permissions. They cannot tinker with the server side security in the same way as they could enable a button.
In ASP.Net this is commonly done with attributes or different types, perhaps only allowing users in a certain role to access particular pages, controllers, actions, methods etc.


Why is positive (semi-)definite only defined for symmetric matrices?

Question: When we are defining positive (semi-)definite matrices, we do so for symmetric matrices only.
Why do we need symmetry in the definition?
Comment: See related: http://math.stackexchange.com/questions/253713/non-symmetric-positive-definite-matrix
Comment: Related: https://math.stackexchange.com/questions/1555039/what-is-the-agreed-upon-definition-of-a-positive-definite-matrix
Answer: It's actually defined more generally for Hermitian matrices (matrices equal to the complex conjugate of their transpose).  If a Hermitian matrix has at least one entry with a (nonzero) imaginary part, then the matrix is not symmetric, but it could still be positive (semi-)definite.
There are two reasons I can think of why we wouldn't extend the definitions to non-Hermitian matrices.  The first is that if the matrix is not Hermitian, then we could have complex eigenvalues.  In that context, "positive" has no meaning.
Another reason why I think we wouldn't has to do with quadratic forms.  If $A$ is a real symmetric matrix, and $x$ is a vector of variables, then $f(x)=x^TAx$ is called a quadratic form.  $f(x)>0$ ($f(x)\geq 0$) for all nonzero $x$ if and only if $A$ is positive definite (semi-definite).  We could relax the condition that $A$ is symmetric, and define quadratic forms in the same way for a general real matrix.  But the resulting quadratic form is the same as the one defined by the real symmetric matrix $(A+A^T)/2$.  The quadratic form is positive definite if and only if $(A+A^T)/2$ is, so positive definiteness is not a property of $A$ as much as it is a property $(A+A^T)/2.$  In other words, we would end up studying symmetric matrices anyway, so wouldn't get anything new by extending the definition to non-symmetric real matrices.
Comment: isn't this a counter example https://math.stackexchange.com/questions/1954167/do-positive-semidefinite-matrices-have-to-be-symmetric
Answer: Unfortunately, not everybody does it this way, which can produce some confusion.
And in the case of complex matrices, what you want is Hermitian, not symmetric.
Basically the answer is that with the symmetry assumption, positive (semi)-definite matrices have some very nice properties, and without it they don't.
Answer: A simple intuition is that positive definite matrices are matrices which eigenvalues are all strictly greater than zero. If the matrix is not symmetric, it might not even have
eigenvalues in $\mathbb{R}$.
Answer: (semi)-definiteness is usually associated with symmetric bilinear forms (and sometimes sesquilinear  forms), and the Gram matrices for those forms are symmetric (or Hermitian, as they case may be.)
The condition can be studied outside of bilinear forms, but in that case it is particularly useful and natural.