Can the moon's gravity influence be observed on the space station's orbit?

Question: In browsing through Astronomy Stack Exchange, I came across this question about orbiting the moon (Is it possible to achieve a stable "lunarstationary" orbit around the moon?).  In further looking, I came across (Can I measure the moon's gravity?) which seems to indicate that with sensitive enough equipment, the moon's gravitational pull could be measured on earth.  This prompted me to wonder if the moon's gravitational pull can be observed on the Space Station's or geosynchronous satellite's orbital path?  And if so, if any compensation (either short-term or long-term) needs to be performed due to the moon's gravity.  I would think it to be relatively inconsequential, but am not sure, hence the question.
Comment: a different question, but slightly related: ["Deep space" corrections in SGP4; how does it account for the Sun's and Moon's gravity?](https://space.stackexchange.com/q/23810/12102)
Answer: According to NASA, satellites in Earth orbit don't experience strong enough interference from the Moon to "whisk a spacecraft out of the game". To a satellite in Earth orbit, the gravitational pull of the Sun is actually ~160 times stronger than influence from the Moon. Source: A New Paradigm for Lunar Orbits (see EDIT note below for details).
However, gravitational pull from the Sun, the Moon, planets such as Jupiter (as well as other factors such as solar radiation pressure, atmospheric drag, etc.) do cause enough interference to slightly alter the orbital path of any satellite orbiting Earth. To compensate for the deviations all satellites must periodically fire their thrusters for brief periods of time in order to maintain the correct desired orbit. If a satellite has no fuel to perform these "orbital stationkeeping" maneuvers it essentially becomes space junk. Source: Is the ISS, and all other satellites, affected by the gravitational pull of the moon?
EDIT: Consider a satellite with mass of 3,000 kg rotating around Earth on geostationary (GEO) orbit of 42,164 km radius. Gravitational pull from the Earth is constant throughout the orbit and equals ~673 N (Newtons). As the satellite rotates around the Earth it gets closer or further away from the Moon as well as the Sun and, therefore, their gravitational pulls change. The pull from the Sun is about 17 Newtons but changes only by 0.02 N. The gravitational pull from the Moon varies between 0.12 N (when the satellite is between the Earth and the Moon) and 0.08 Newtons (when the satellite is furthest away from the Moon over the opposite side of the Earth). So even though the pull from the Moon is much smaller than from the Sun, the variation of the Moon's perturbation is about twice as large than from the Sun.
Note: the numbers above are computed under a simplified assumption that all orbits are on the same plane. In reality, due to the inclinations of orbits, the numbers can be somewhat lower, but the overall picture remains about the same.
Comment: Re *To a satellite in Earth orbit, the gravitational pull of the Sun is actually 160 times stronger than influence from the Moon.* I can't believe NASA wrote that. Since NASA **did** write that, I'm not going to downvote this answer. But that is very wrong. The Moon is actually a larger perturber of satellites in Earth orbit than is the Sun, by a factor of about two.
Comment: @DavidHammen that is a very good point that the Moon is a larger perturber of satellites in Earth orbit than the Sun. However, I think NASA is also correct, the absolute gravitational pull from the Sun is indeed stronger than from the Moon, it's just that the pull from the Sun does not vary as much as the pull from the Moon (due to the Sun being much further away). I added estimated numbers to the answer. Thank you for your comment!
Answer: The Moon's gravity perturbs the orbit of satellites, but for satellites in Low  Earth Orbit, the perturbation isn't much.
Consult the image below. (found at https://space.stackexchange.com/questions/32684/which-orbit-around-earth-has-the-least-perturbation)  The horizontal axis represents orbital radius, with the ISS being even closer to the Earth than the Iridium satellites.  The vertical axis represents the amount of acceleration resulting from different sources. It is a logarithmic scale, so each step from the top represents ten times less effect.  The top curve, marked GM, is the Earth's gravity, if the Earth was a perfect sphere with Newtonian gravity. That is the biggest acceleration on the ISS.
The next highest line is marked J2,0, it is a perturbing effect due to the fact that the Earth isn't perfectly spherical.  You can also see that drag is quite significant for the ISS
The perturbing effect of the moon is 10000 times less than the effect of J2,0, and 10 million times less than the Earth.
So yes, the gravity of the moon has a known and measurable effect on the orbit of the space station, but it is much less than you might expect.
This is due to the fact that although the ISS is pulled towards the moon, so is the Earth, so when the orbit is measured relative to the Earth, it is only the difference in gravity of the moon between the near and far side of the Earth from the moon that causes perturbation of the orbit relative to the moon.
Similarly, although the force of gravity from the sun is greater, the difference in the sun's gravity is less, so the sun perturbs orbits less than the moon.
Answer: While sun's gravitatonal influence is much larger it's governed under rotational motion of bodies around sun. Earth and moon should be considered as a system of their own and in that system moon's gravitatonal effects are more effecitve on orbiting sattellites
Comment: This answer needs improvement. add more details or explanation to your answer.


In photoshop CS6, what are the main differences between the stamp tool and content-aware tool?

Question: When using the content-aware and stamp tools in Photoshop, it appears to be using a similar method for determining the new fill for the specified area. What are the main differences between the two tools (i.e. different algorithms, effect possibility, uses, etc.), and are the instances where one will always be better to use than the other?
Comment: Which content-aware tool? Photoshop CS6 has several, including content-aware fill, content-aware spot healing, content-aware patch and content-aware move (in addition to content-aware scaling, which is not germaine to the question). Each of them work somewhat differently.
Answer: The clone stamp tool gives you direct control over what you are filling with.  The content-aware uses an algorithm to pick what to fill with.  Content-aware is faster when it works, but clone stamp gives you more fine grained control and can handle more difficult situations.


Are chromosomal microdeletions passed on?

Question: I've been looking around but can't find a clear answer: are chromosomal micro-deletions passed on (hereditary) or not?
Answer: Of course. Just like any other type of mutation.
If a mutation (incl. a chromosomal microdeletion) happens in the germ line, then the mutation can be passed on.
Comment: @TheNate I think (but might be wrong) it is a term mainly used in the medical field. I think it refers to a small chromosome deletion (a few kb say) that is too small to be detected by the simple colouring methods (such as FISH or G-banding) often used in medicine.
Comment: another question I may add/ask: if a parent has a chromosomal micro deletion, and uniparental disomy happens, then the child will inherit the deletion as well , right? Thanks for answering
Comment: Yes, necessarily. As both chromosome are passed (uniparental disomy), the one carrying the microdeletion will necessary be passed.
Comment: To be clear, microdeletion is the term for when a gene on one chromosome replaces its counterpart, yes?
Comment: Thanks. I'll go start some reading, then.


PWM generation for inverter by Arduino

Question: Can I generate a PWM signal for a Mosfet driver using a saw tooth wave and sine wave through Arduino ?
Comment: You could  add a DAC chip. Or use some resistors to create an R-2R resistor ladder.
Comment: PS I think most inverters use regular PWM (at a higher speed), and smooth the output. Using mosfet in a none-saturated is inefficient, and will make them run hot.
Comment: Read the datasheet of your inverter: What should the PWM signal look like? What frequency? Duty cycle? If you add this information to your question, it would be possible to provide a useful answer.
Answer: Yes you can very easy generate an PWM Output with an Arduino:
<code>void setup()

{

  pinMode(pwmPin, OUTPUT);   // sets the pin as output

}

void loop()

{

  analogWrite(pwmPin, yourWantedValue);  // analogWrite values from 0 to 255

}
</code>

On most Arduino boards (those with the ATmega168 or ATmega328), this
  function works on pins 3, 5, 6, 9, 10, and 11. On the Arduino Mega, it
  works on pins 2 - 13 and 44 - 46. Older Arduino boards with an ATmega8
  only support analogWrite() on pins 9, 10, and 11.
The Arduino Due supports analogWrite() on pins 2 through 13, plus pins
  DAC0 and DAC1. Unlike the PWM pins, DAC0 and DAC1 are Digital to
  Analog converters, and act as true analog outputs.

Visit quote origin for more Information.
Comment: Note that the PWM frequency is quite low: 490 or 977 Hz depending on the pin. The OP should check the datasheet of the inverter to make sure those frequencies are OK.
Answer: Currently, none of the boards have a DAC on them, with the exception of the arduino Due. Thus, Unless you have the Due board, it is not possible.
If you have a due board, and are interested in generating wave functions, then check out here: https://www.arduino.cc/en/Tutorial/DueSimpleWaveformGenerator

PWM generation for inverter by Arduino


Book where alien boy crashes on Earth and communicates with deer

Question: I am looking for a book I read in the 1960s about an alien boy who crashes on Earth and is taken in by a human family. He also communicates telepathically with deer.
Comment: Not nearly enough information for an identification: deer telepathy was one of the most popular tropes of the 1960s.
Comment: possibly the same as (one of the stories in) https://scifi.stackexchange.com/questions/149580/1970s-sci-fi-short-story-in-4th-grade-reading-anthology
Answer: The Forgotten Door by Alexander Key. 1965  Scholastic Books. A wonderful book that I just finished reading to my daughter and her friend. I had remembered it from when I first read it in 1968.
The boy falls through a forgotten "doorway" between worlds that had been long abandoned by his people. He loses his memory from the accident and is taken in by a family. He communicates telepathically with may animals and can read the minds of people with ease. His world is more advanced technologically and socially than ours, and has a back-to-basics lifestyle. The family tries to help the boy find the doorway so he can return home, while being harassed by the police and government who have their own interests in the boy.


When did the practice of lighting flames for Chanuka begin?

Question: It seems clear from the G'mara that the institution of Chanuka as a holiday began the year immediately following the seminal story - with praising of God and commemorating miracles, but there is no mention in that historical retelling of m'nora-lighting as part of the commemorative practice. Are there any records of when this started?
Answer: Josephus (Ant. XII:7:7) mentions that "from that time to this we celebrate this
festival, and call it Lights." So this association between Chanukah and lights existed already in his times.
In the Gemara, Shabbos 21b, we also find the schools of Hillel and Shammai - who were active from c. 30 BCE to c. 10 CE - debating the proper procedure when lighting more than one candle each night (whether to start with one and work up to eight, or vice versa). So we see from there too that the practice of lighting candles was already in place then, a bit more than a century after the original miracle.
It's quite likely, then, that this enactment was indeed made at the same time that the holiday was established - the year after the miracle.
Comment: Although note that Josephus gives a reason for calling the festival "Lights" which is not connected to the practice of kindling lamps, possibly suggesting that this was not, in fact, the practice in his time and locale.
Answer: living torah museum http://www.torahmuseum.com/ has a chanukah menorah dated back to the first century of the common era. http://www.ajspirit.com/spring_07_main.html
Comment: dead link................
Answer: Have to check other historical records; is it in Maccabees?  I don't know.  I was taught that the historical records say Chanukah observance was wildly popular at the time (this is suggested as a reason why the Mishna didn't mention it; it was really simple and everyone knew/did it).
The Chanukah narrative in the Talmud is just a quote from Megilat Taanit (the "shared calendar" of the Talmudic era), which was a list of dates and events they commemorated, with regard to either "fast/mourn on this day because it's sad", or "don't fast/mourn on this day because it's happy."  So Megilat Taanit just marks Chanukah as "don't fast/mourn; days of praise and thanks."  It wasn't the place for discussing its other observances.
Comment: Purely conjecture, but it's also possible it wasn't mentioned because it was controversial. I don't mean in the Rebbi-didn't-appreciate-the-Hashmonaim sense, but in the opposition-to-creating-new-Minhagim sense that we see today when some attempt to innovate ceremonies and/or add to the liturgy for recent events that affect/are part of Jewish history (eg., Yom HaShoah fasting; Yom Ha'Atzmaut and Yom Yerushalayim celebrations; saying additional Tehillim on behalf of terror victims and reciting Birkath Medinath Yisrael in Shul; etc.). (By the way, I'm not advocating anything, just observing.)


How can I restore a microsoft sql server database backup to postgres?

Question: I need to take a Microsoft SQL Server database backup (dump) file and import/restore into a PostgreSQL database.  Does anybody have some sort of transform script (maybe a perl/sed/awk script) that could be run on the MSSQL Server backup file, so that it could be restored to the PostgreSQL database?  Let's assume the tables have already been created in postgres, but they are all empty.
Answer: I would start with this article from the Postgresql site
Comment: We really do prefer that answers contain content not pointers to content. Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.
Answer: You could export data from MSSQL in CSV format (using MSSQL Enterprise Manager) and then import the CSV files into Postgresql (here there is an example).
I suggest to export one CSV per table, so you can better manage any constraint rule.


Dockable window close event

Question: Is there an event that fires when a custom dockable window is closed in ArcMap? My dockable window uses the Add-in pattern and hosts a WPF user control. It opens via a command button which is nested in an ArcGIS toolbar menu. I can listen to the OnUpdate() event of the command, however, this event will only fire when the menu is expanded. I need to know immediately when the window is closed so I can stop a background process.
Answer: This doesn't answer your question directly, but may be helpful.
Consider creating a timer that executes a method every X milliseconds. Then you can use this method to periodically check the properties of all kinds of objects, including the visibility of your dockable window.  This way you can know if your window was closed.
Below is some relevant code to give you the idea. (I use several static variables and methods that I am not crazy about, but it works.)
I create a static method in my custom BaseCommand class to expose the visibility of the dockable window. The variable m_dockableWindow must be made static as well.
public static bool MyDockableWindowIsVisible
{
    get { return m_dockableWindow !=null && m_dockableWindow.IsVisible(); }
}

I setup the Timer code in a custom IExtension class.
Timer timer = new Timer();
timer.Interval = 500;
timer.Tick += timer_Tick;
timer.Start();

The Timer Method checks the visibility of the Dockable Window.
void timer_Tick(object sender, EventArgs e)
{
    if (MyBaseCommand.MyDockableWindowIsVisible)
    {
      ....
    }
}

Comment: Thanks for your answer. I'm not a fan of the timer usage but it's a valid solution. I had to put a piece of code in my background process loop to periodically check if the window was visible. So basically it's a sort of timer.
Answer: I was able to get around this same problem by overriding the OnVisibleChanged event within the dockable window itself:
    protected override void OnVisibleChanged(EventArgs e)
    {
        base.OnVisibleChanged(e);

        if (base.Visible) // The DW will still be visible if it is being closed.
            ClearReportViewerSource(); // Whatever code you need to run.
    }

This works for me if closing the DW from the command button or X'ing it out directly.  In fact, seems that this event only fires when closing the dockable window and not when opening it.
EDIT
This is only for WinForms - not WPF.  It also seems that this event is called during docking and undocking the DW too so be aware of that when using this approach.
Comment: The OnVisibleChanged event isn't available in WPF dockable windows. This is a useful solution for WinForms though, thanks.
Comment: Sorry - I overlooked the WPF comment in your original question.  Also, I noticed today that this event gets called when docking the window too so I need to find a way around that.
Answer: I found this thread in the old esri forums. There are several suggestions.
Comment: Thanks Duncan, I saw that thread before posting and it does have helpful info. It seemed like there was mixed results with subclassing and I didn't attempt it. I was hoping that there was something new in 10.x add-ins that triggers the event. In the end I'm just using a combination of the OnUpdate() event in the dockable window's command button and the IsVisible property from the WPF window to achieve the desired results.
Comment: link broken here

Dockable window close event


Where are the towns of Hyrule in Legend of Zelda?

Question: On the first NES game, you only see a few people-merchants in caves-and other than that, you only run into Zelda. Where is the rest of Hyrule? Where is Kakariko village or even the main castle?
Comment: given that the original game, in the current canon timeline takes place well after and in a dark timeline after Ocarina of Time in which that Link was defeated, it's reasonable to assume that Kakariko village is long gone and swallowed by the sands (or waters, cliffs, forests) of time
Comment: The original NES legend of zelda
Comment: So, the map from BoTW is not valid for you? I mean, we've got the location from all of the places you mentioned in your question in the latest original entry in the series.
Comment: @FernandoRibeiro To be fair, BoTW doesn't clearly fall into any particular timeline or geography, and it contains elements of every timeline and Hyrule geography that we've seen so far, even though those are often mutually exclusive of one another.
Answer: Sticking only to canon facts from the game/manual:
The first game is set in "a little kingdom in the land of Hyrule". Ganon attacked this kingdom with his army, conquering it and stealing the Triforce of Power. The princess of the kingdom, Zelda, scattered the Triforce of Wisdom throughout the realm and commanded her nursemaid Impa to search for a hero to overthrow Ganon, an action with angered Ganon enough to imprison Zelda, and send a force out after Impa, who fled through mountains and forests to escape them. It's unclear exactly how much of Zelda's kingdom is depicted in the first game, but note that Hyrule itself is a larger land that the kingdom is set within; furthermore the kingdom has just been conquered by Ganon, and it's possible that any towns or strongholds it had were razed at the time. The game seems to be set in a wilderness area of the kingdom; there are several mentions to forests and caves in the manual. Either there never were towns in this area of Hyrule, or they were destroyed by Ganon's army. It is unclear exactly how much time passes between Ganon conquering the little unnamed kingdom, and Zelda putting her plan to hide the Triforce and send Impa for help into action; it's possible she has been living under Ganon's rule long enough for some time, enough for nature to start reclaiming any potential remains.
With the second game in the series, we get more of a look at the larger land of Hyrule. The overworld map shares areas showing the little kingdom from the first game, but also shows a much wider area including many towns (Saria, Ruto, Rauru, Mido, Darunia, Nabooru, Old Kasuto, New Kasuto). Death Mountain, with the distinctive Spectacle Rock, is found in both games, to give some idea of location - the second game is set mostly to the north of the first game, with Death Mountain being the overlap between them, and the entirety of Zelda 1's map being tucked down in the south west corner at a much smaller scale. The backstory tells us that at one time the entire land of Hyrule was a single country, ruled over by a single monarch, presumably from North Castle, which is where the second game begins and where the sleeping princess Zelda is located. It's unclear whether North Castle or any of the towns are still even a part of the smaller little kingdom at this time; they might all be outside its borders.
The question asks about Hyrule Castle and Kakariko Village. In A Link to the Past, these are found in somewhat central Hyrule, south of Death Mountain. Looking at the scale of the map in Zelda 2, there is a possibility they are found further south of the entire Zelda 1 map; either that, or they were destroyed at some time in the past.
Edit: I have put together the Zelda 1 and Zelda 2 maps to show the overlap:

Note the features that line up between the two areas. Death Mountain is in the north, containing Spectacle Rock (about a third of the way along). The distinctively shaped lake with a river running south is found in both maps, with a coastline to the east. The graveyard area lines up, with the lost woods to the south west, and there is a smaller pool surrounded by forest to the east.
Information from the Zelda 1 and Zelda 2 manuals, and the Zelda 2 overworld map:
Comment: A picture of the overlap would greatly improve this answer.
Comment: Death Mountain moves around a lot though. Most games it's in the North-East.
Comment: Added a picture showing the overlap to the answer: https://i.imgur.com/9GBtUqe.png
Answer: To add to Showsni's answer, I never thought to overlap Death Mountain from both legend of Zelda and Zelda 2.
Using Zelda 2's map: Turn Legend clockwise and slide it's death mountain into the same death mountain of Zelda 2. Take Link to the Past and turn it upside down, but tilt it's death mountain slightly toward the 2 and mash it in. There would be some overlap(and a slight stretch), but the 3 maps together do work, with separation by the mountains or sea.
And the part about Legends being a conquered kingdom was great. The remaining survivors gathered what they could to help and hid in caves/wherever they could. Ganon installs dungeons as bases to back him up using minions to keep the current kingdom conquered. Link comes along possible lone survivor and goes on a kill crazy rampage. It makes sense in this fantasy world!
Comment: A picture of the overlap would greatly improve this answer.


My cat gave birth yesterday and she keeps breathing heavily via her mouth

Question: Yesterday, while delivering her kittens, my cat kept breathing through her mouth and breathing heavily. We thought it's because she's just too tired. This is her second time. Last time, she gave birth to four but two kittens died and the other one died too, leaving one kitten behind. Now, four kittens are alive and it's the first time she feeds four kittens. Up until now, she's breathing heavily and one of her kittens has pooped. We don't have a vet here in town.
Comment: Is she still breathing through her mouth now? This is a serious issue. It is a sign of a lot of stress and potentially heart disease.
Comment: For your interest: [Question about Milk Fever in Cats](https://pets.stackexchange.com/questions/27913/is-there-a-way-to-treat-milk-fever-at-home)
Comment: You need to take your cat to the vet, she may be sick and in need of medical treatment.
Comment: Does this answer your question? [Is there a way to treat milk fever at home?](https://pets.stackexchange.com/questions/27913/is-there-a-way-to-treat-milk-fever-at-home)
Comment: Welcome to pets.SE! Did you changed her food while she was pregnant or now?
Answer: This is a summary of information originally given in comments.
If a cat keeps panting after giving birth, the most probable reason is that she has milk fever (a lack of calcium in the body). This condition weakens the mother and can be lethal to her, but it also keeps her from nursing her kittens.
If possible, please have your cat treated by a vet as soon as possible. If that is not possible, please have a look at this question:
Is there a way to treat milk fever at home?
Pregnant and nursing cats should eat either kitten food or special food for nursing cats. There are also calcium food supplements for cats (please never give a cat any medication or food supplement designed for humans without consulting your vet first, you could poison your cat). If no professional solution is available to you, you could crush egg shells or cooked bones in a mortar to a fine powder / paste and add it to her food, but you should always prefer a professional solution because they are better digestible and contain additional vital nutrient.
Answer: THIS IS A MEDICAL EMERGENCY!
According to https://www.greencrossvets.com.au/pet-library/articles-of-interest/why-is-my-cat-panting/, The only reasons why cats would be breathing through their mouth period would be because they are Hot, Stressed, or have an underlying disease.


CDN Fallback "library"

Question: Edit: Even adding a comment of "looks good to me" and up-voting that comment would be appreciated :) I just want the feedback! Thanks!
For the fun of it as well as professional development, I wrote a small "library" (single 24 line JavaScript function) that will allow a developer to double check that all external libraries loaded and to reload them with a local copy as a fallback if the CDN is blocked or down.
Double Take Script Loader

This is a simple way to load a local copy of a library as a fallback to an external CDN.
I'm looking for feedback on my methods. Here's the actual gist on GitHub. Is there any (obvious) way I could improve this function? I realize that everyone has their own style and such. I'm not asking about that. I'm asking about better performance/ease of use. See the specific questions on the lines of code.
dt-script-loader.js
var DoubleTakeScriptLoader = function(scripts) { //I have to use the global namespace if I want to let devs call it on their own right?
  if (scripts) { //Allows devs to call it with specific scripts
    if (Object.prototype.toString.call(scripts) !== '[object Array]' ) { //Is there a better way to check whether it's an array without using another library?
      scripts = [scripts]; //Allows devs to call with just an object and I'll change it to an array
    }
  } else {
    scripts = document.getElementsByTagName('script'); //If function is called without argument, we'll get the scripts from the document. I think this will only load the scripts that have been parsed thus far correct?
  }
  for (var i = 0; i < scripts.length; i++) {
    var script = scripts[i];
    var propName = script.propName || script.getAttribute('data-prop-name'); //For use without calling with an argument, I get a data attribut. Is getAttribute the best way to get attributes or should I use dot notation in the context? I have seen differing opinions.
    var localSource = script.localSource || script.getAttribute('data-local-src');
    if (propName != null && localSource != null) {
      if (!window[propName]) { //If the library was not loaded. Is there any way to be aware that the request to get the library failed so this can be responsive to failures rather than called regardless?
        document.write('

I, the student, thank you for your time and feedback and look forward to your constructive input.
Answer: I like the look of this in general. Its short, simple and I'd love to know how well its worked in the field.
I'm not a big fan of document.write but I don't think the alternative is much better. If you look in the jQuery source code you'll see they eval the script.
It comes from http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
In place of the document.write I might put something like:
var xmlHttpReq = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
xmlHttpReq.open('GET', localSource);
xmlHttpReq.setRequestHeader('Content-Type', 'application/javascript');
xmlHttpReq.onreadystatechange = function _readyStateChange() {
    if (xmlHttpReq.readyState == 4) {
        (window.execScript || window.eval).call(window, xmlHttpReq.responseText);
    }
}
xmlHttpReq.send(null);

This uses an ajax request to get the JavaScript instead of blocking your page load. Its all a matter of taste I believe. (Also any other scripts might fail if they are expecting your framework to have loaded.)

After some Google Searching I've found a few places that do the almost same as your framework in less code.

");</script>

It is shorter but requires one per script file.

CDN Fallback "library"


How is ozone formation form oxygen **spontaneous**?

Question:
DeltaH for process is positive and deltaS is negative. Then by thermodynamics,deltaG for process must be positive at all temperatures. Then how is ozone formation spontaneous?
Comment: '...a slow dry stream of oxygen is passed through an [electrical] discharge...'   (the picture cut off at the end of the line).   If an electrical current is required then the process isn't spontaneous at all, you're putting energy in
Comment: Do you regularly notice oxygen in the air spontaneously converting into ozone?
Comment: Why do you think it is spontaneous.
Comment: How long would it take you to either type out the contents of the text in your image or re-image it so the rest of us can see it?  I will then probably spend at least that much time working towards an answer for you.  I cannot promise that I will come up with an answer good enough for posting, but I'll try ;-)
Answer: It seems reasonable to suspect that some O2 molecules will dissociate in the discharge. Some of the resulting atoms will bond to other O2 to form O3 instead of recombining. To evaluate the thermodynamics of this process, one should therefore start at atomic oxygen.


How can we eliminate the effect of psychiatric medication on neuropsychological research with schizophrenic patients?

Question: It is delicate to conduct studies with schizophrenic patients, considering that the results may be altered by the medication factor. What strategies should be used to counteract this effect?
Comment: The only way I can envisage you could counteract the effect of medications they may be on would be to stop their medications for a set period before the study, but I would think it would be unethical to conduct studies on unmedicated schizophrenic patients in this manner
Comment: Chris, in this type of study and with this type of participant, stopping the medication (even temporarily) is not an option. Even for the reason you already said: there would be an ethical problem. But as serious as that, it's a clinical problem. However, strategies exist and I think the issue is relevant to the topic. I will await some response to the debate.
Comment: The question is confusing to me, maybe if you explain what you are researching it would become clear.

What do you mean by the medication factor?

Are you looking to study how the disorder unfolds, or how medication affect it without side-effects?
Answer: As far as I know, this effect cannot be eliminated by any practical means, other than stratifying the subjects into groups according to type of drug, dosage, duration of use etc. and use statistical testing to look for any differences between the groups with, e.g., linear mixed modeling.
However, a cursory search on Google Scholar yields multiple studies where unmedicated folks were successfully recruited into the study, e.g. Kraguljac et al. (2016).
Reference
- Kraguljac et al., Schizophrenia Bull (2016); 42(4): 1046–55
Comment: Another alternative is to...not worry about it. It all depends on what your research goals are, and a lot of them that concern clinical outcomes are best done in the circumstances the patients are in, which for many will include medication.
Comment: @BryanKrause of course, but it's a real problem for the basic scientists among us who wish to elucidate the etiology and other underlying pathologic mechanisms


Do OrthoRectified Images have shadow?

Question: Orthorectified images have removed relief displacements and tilt displacements. Since the assumption of orthorectification is to keep the light source at infinite distance so that the light rays are parallel to each other and perpendicular to ground. They should not have shadows. Is it true?
Answer: If there was a shadow in the raw image, say from a tree or tall building, it will still be in the image after the rectification process.  Essentially, parts the photo are being stretched or warped to match the position of visible objects in the photo to known places on a map; this will correct for the pitch, yaw, and roll of the plane during the flight, and also to eliminate the effects of ground relief, leaving an image which is "top down" and uniform scale.   It does not change the content of the image.
Here's an example of a raw image of Toronto taken in 2007 by First Base Solutions (http://maps.firstbasesolutions.com)
Compare to the same section of photo after orthorectification.  Note the shadow and image content are basically the same.
Comment: The image above was captured by aircraft at low altitude (short focal length), which causes far more radial perspective than say, satellite capture. Sides of very tall buildings or relief from mountains are generally visible in this type of image acquisition unless the camera is directly overhead of the particular building.  Flying a tighter grid and then mosaicking the image can help eliminate radial perspective in urban areas, but again, rectification itself does not affect the content of the image.
Comment: the top of the building should have been moved to hide the sides, leaving a no data area on the other side of the building, which can filled by another image. Only then can you talk of a true orthorectification. (otherwise it is a good geometric correction, but if you don't take the height into account it is less rigourous)
Comment: I agree with the answer, but not with the illustration. If the second image had been correctly orthorectified, you should not see the sides of the buildings. The light rays that are parallel to each others are those coming from the observed objects. The shadows are determined by the position of the sun.
Comment: Correct, you're referring to mosaicking, and applying a 3D model to correct for terrain variations, two processes often performed along with rectification.  In this case, a 40m spot height grid (+/- 40cm) of bare earth features was used to represent terrain.  This is a tiny clip out of a much larger mosaicked photo chosen deliberately because it does not show effects of the mosaic.  The question here is, after all, about how shadows are affected by rectification specifically, not about other processes. You can contact me directly if you have further questions about this image.

Do OrthoRectified Images have shadow?


How can I watch an address on Windows and Android?

Question: I want to be informed of transactions of my Bitcoin address on the Windows and the Android app. Can I use the same Bitcoin address on both? If yes, how can I backup the address on Windows and restore it on Android?
Comment: Quick note, blockchain.info lets you monitor transactions for a given bitcoin address without importing any private keys. It's under import/export "Watch Address"
Comment: Welcome to Bitcoin.SE. Please only ask about one topic per post: I've edited your question to refocus it on the second part, i.e. watching an address with two different apps. Your first question is answered for example here: [What's the difference between a wallet and an address?](http://bitcoin.stackexchange.com/a/13281/5406), [What is the role of bitcoin wallets?](http://bitcoin.stackexchange.com/a/21758/5406). Please feel free to edit this post if I didn't capture your intent for the second question. If you find your question about wallets not answered, please repost it as its own post.
Answer: Just use bitcoind
-walletnotify=    Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
in a script or for more details, access the bitcoind API via RPC  https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
Answer: You can add and monitor addresses in http://blockonomics.co
It can be used on both desktop and mobile


Why lord Shiva has a crescent moon on his head?

Question: Why there's a crescent moon over lord Shiva's head?

Image Credits : hdwallpapers.com
Comment: It is why he is known as Chandrashekhara.
Answer: First we should know that Moon itself is a form of lord Shiva through his Ashtamurti form! As described in the answer there, Kaushitki Brahmana of the RigVeda (chapter 6) itself states:

He answered, 'You are Rudra.' Since the moon is Rudra, thereby Rudra harms him not, nor his offspring, nor his cattle, nor any one claiming to he his

The Shatapatha Brahamana of YajurVeda (6th Kanda 3rd Brahamana) too states:

He said to him, 'You are MahaDeva.' And because he gave him that name, the moon became suchlike, for the moon is Prajapati, and Prajapati is Mahadeva.

So, the Moon is very closely related to Lord Shiva. In other words wearing moon means Lord Shiva wearing a reflection of himself. But still all these Vedic truths manifests through various incarnations and leelas of Lord Shiva in the physical form which are described in the stories present in the Itihasas and Puranas. In the Skandha Purana (Prabhasha Kshetra 1.18), Devi Parvati asks this same question to Lord Shiva:

॥ देव्युवाच ॥ ॥
Devi asked:
अयं यो वर्त्तते देव चंद्रस्ते शिरसि स्थितः ॥
कस्यायं कथमुत्पन्नः कस्मिन्काले वद प्रभो ॥ 7.1.18
Here this Chandra (Moon) is on your head. Of whom is he born and how? At what time? Do tell me, O Lord!

Then Lord Shiva describes why Moon is placed on his head:

॥ ईश्वर उवाच ॥ ॥
Ishwara said:
अस्मिन्काले महादेवि वाराह इति विश्रुते ॥
परार्द्धे तु द्वितीयेऽस्मिन्वर्तमाने तु वेधसः ॥ ११ ॥
द्वितीयमासस्यादौ तु प्रतिपद्या प्रकीर्तिता ॥
वाराहेणोद्धृता तस्यां तथा चादौ धरा प्रिये ॥
तेन वाराहकल्पेति नाम जातं धरातले ॥ १२ ॥
तस्मिन्कल्पे महादेवि गते संध्यांशके प्रिये ॥
प्रथमस्य मनोश्चादौ देवि स्वायंभुवस्य हि ॥ १३ ॥
क्षीरोदे मथ्यमाने तु दैवतैर्दानवैरपि ॥
रत्नानि जज्ञिरे तत्र चतुर्द्दशमितानि वै ॥ १४ ॥
तेषां मध्ये महातेजाश्चंद्रमास्तत्त्वसंभव ॥
सोऽयं मया धृतो देवि अद्यापि शिरसि प्रिये ॥ १५ ॥
विषे पीते महादेवि प्रभासस्थस्य मे सदा ॥
भूषणं मुक्तये देवैर्मम चंद्रः कृतः पुरा ॥ १६ ॥
शशिनाभूषितो यस्मात्तेनाहं शशिभूषणः॥
तत्र स्थाने स्थितोऽद्यापि स्वयंभूर्लिंगमूर्त्तिमान्॥१७॥
This is the period (Kalpa) well-known as Varaha. The second Parardha of
Brahma is current now. At the beginning of the second month, this is the Pratipada (first lunar day). Lord Varaha redeemed and lifted up Dhara (the Earth) on this day, O my beloved. Therefore, this Kalpa came to be known
by the name Varaha Kalpa on the Earth. In that Kalpa, O great goddess, O my beloved, the Sandhyamsa (twilight period i.e. interregnum of two Kalpas) has passed. The first Manu Svayambhuva was reigning, O goddess.The Ocean of Milk was being churned by Devas and Danavas. Gems, fourteen in number, were born (recovered) therefrom. Among them the highly refulgent Chandra (Moon) is one born of the Tattva (eternal principles). O goddess, O my beloved, he was held and kept on the head by me where he still continues to be. O great goddess, when the poison (Halahala) was swallowed by me while I was stationed in Prabhasa, Chandra was formerly made my ornament for the relief. Since I have been adorned with the Moon (Shasi), I came to be known as Shashibhusana (Moon-ornamented). Even today I am stationed in that holy spot in the form of Svayambhulinga.

So, During the Samundra Manthana when Chandra (Moon) arose from the sea. Lord Shiva used that as an ornament on his head. It also provided relief to Lord Mahadeva from the effect of poison (due to cooling nature of Chandra tatwa).
Moon also exudes Amrita (immortal nectar) on the head of Mahadeva and bathes Mahadeva with it. The heat produced by Vasuki causes the Moon to exude Amrita from it. Padma Purana describes one such incident:

एवं वदति संप्राप्तौ सुतौ स्कंदविनायकौ || २६ ||  तस्मिन्काले देवदेवो यतवागंगमर्दनम् | चकार च करैर्व्यस्तैर्वासुकिर्भूतलेऽपतत् || २७ || हेरंबवाहनस्याखोः पुच्छं ग्रस्तमथाहिना | स्वपत्रं ग्रस्तमालोक्य मुंचमुंचेत्युवाच ह || २८ || अत्रांतरे स्कंदवाहं क्षुब्धं वीक्ष्य महास्वरम् | तद्भयाद्वासुकिर्ग्रस्तमाखुपुच्छमथोद्गिरत् || २९ || अथारुह्य हरस्यांगं गलमावेष्ट्य संस्थितः | तस्य निश्वासपवनैरथ जातो हुताशनः || ३० || तस्योष्मणा चंद्र लेखा जटाजूटाटवी स्थिता | सार्द्रतां तु तदा सायात्प्लावितं तद्वपुर्यथा || ३१ || तस्याह्यमृतधाराभिर्ब्रह्ममस्तकमालिका | हरमौलिकपालानामभूत्संजीविता तदा || ३२ || पपाठ पूर्वमभ्यस्तं सर्वयोगश्रुतिक्रमम् | श्रुत्वा परस्पराधीतं विवदंति शिरांस्यथ || ३३ || (Padma Purana 6.10)
When he was speaking like this, the two sons of Shiva, Kartikeya and Gajanana came there. At that time, the god of gods was massaging his body with his hands. Due to his hands being tossed about, Vasuki fell on the ground. Then the serpent Vasuki seized the tail of the mouse, the vehicle of Gajanana (Ganesha). Seeing his vehicle seized, he said: "Leave it, leave it." In the meanwhile, seeing the agitated vehicle, of a large note, of Skanda, Vasuki ejected, through his fear, the tail of the mouse, which he had seized; and then mounting upon Shiva's body, he encircled his neck and remained there. Due to its heat, the crescent moon remained in the forest of his matted hair. She (i.e. the crescent moon) then became wet, and bathed his body with Amrita (ambrosia); the row of the skulls on Shiva's head was brought back to life. And they recited all the sacred texts in due order, which they had formerly studied. The heads, hearing recital (of the sacred text) done by one another, discussed it.

Thus as clear from the verses above Moon also bathes Lord Shiva with Amrita.
Answer: The waxing and waning of moon was used to calculate the days and months in earlier times. Thus, the moon symbolizes time and Lord Shiva wearing moon on his head denotes that Shiva has complete control over time and is beyond the measure of time and is eternal. There is also an interesting incident behind the waxing and waning of moon.
Chandra was once cursed by Ganesha to lose his light gradually. And the curse was reduced, upon Chandra's prayer, and he was made to wax and wane, each phase lasting for 14 days (Refer this answer).
Comment: No its related to Daksha's shrap
Comment: @AnkitSharma I know that too but forgot to add it.
Answer: Soma is the celestial Moon described in Atharva Veda 11.6.9 which says:

"Soma; whom the learned men call Chandrama the Moon making all
delight".

Atharva Veda Chapter 10 specifies that:

"The Supreme Being keeps making Soma, the eternal delight"

This is empirical to the expression of amṛta dripping from the crescent moon on Śiva's head in the later Puranas, but before we make this conclusion let's explore further. Sometimes, Soma is the full moon belonging to the Tiṣya/Pusya month, on this day oblations are given to Rudra. Monday is called Somavara and is the day of Śiva TS2.2.10. Similar to Rudra, the concept of Soma enters into various aspects of the Yajñá (Yagna). In this way, Soma enters into the offering of the Soma juice, into clarified butter called ghee used in Yagna, or the full moon, into medicines, into amṛta, and is the very ṛta. In other places, Somapavamana, meaning the purified/clarified/refined version of Soma, gave rise to both Indra and Viṣṇu during Yajñá RV9.96.5. Now if we move to Baskala Shaka of RV. then ' Since the moon is Rudra, so you are Rudra, thereby Rudra harms him not, nor children, nor cattle, .."
So, if we keep this link open and continue in later Vedas we can see "Shatapatha Brahamana 6.3 in the origin of Gayatri and Rudra:

"Prajapathi: my son you are the Great God (Mahadeva) I give you that title (Rudra), the moon became him, for the moon is Prajapati, and
Prajapati is Mahadeva"

So even before the Puranic literature came to be, Somashekara is a well-established iconification.


How to disable creating .Spotlight-V100 and .Trash folders on external drive?

Question: Everytime I put a USB Flash Driver the Mac OS X creates 2 folders .Trash and .Spotlight-V100. Is it possible to disable this operation?
Answer: Well, I know that there is utilities to do this, but I can't recall the name right now...
But my Google-Foo, is working today...
$ cd /Volumes/your\ target\ volume
$ sudo touch .metadata_never_index

This hidden file is recognized by both Leopard and Snow Leopard (Possibly Tiger too).
But it will not stop a spotlight index that is currently being created...  So add the drive to the privacy panel of Spotlight, add the file, and then remove it from the privacy panel.
Doing so will erase the contents of the spotlight index on the drive in question, prevent it from being re-indexed...
Comment: It answers half the question, the .Spotlight-V100 folder is the spotlight index for that drive.  Thus by creating .metadata_never_index, it will prevent the spotlight index for that drive from being created.
Comment: This answer does not address the *question* does it?
Comment: It is a shame we cannot downvote comments @conny
Answer: To prevent indexing your external drive, you can add it to Privacy rule in Spotlight (System Preferences).

To prevent .DS_Store files from being created, run:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Source: How to Prevent .DS_Store File Creation

Alternatively to prevent indexing create empty file .metadata_never_index on the drive.

Used by the OS X system as a settings file, the .metadata_never_index file extension is one of the only ways to prevent certain indexing programs like Apple Spotlight from automatically indexing the metadata. Other Apple devices such as iPod/iPad also uses the .metadata_never_index file extension. Another option is to create a drag-and-drop AppleScript to install the .metadata_never_index.
It must be located in a root directory to be ultimately functional.
It can be created from Terminal by touch .metadata_never_index command.

Other options for managing indexes - deleting, pausing and updating - are also available.

To disable indexing on all volumes, run:
sudo mdutil -a -i off

To re-enable:
sudo mdutil -a -i on

Following aliases can be useful to add to your bash rc files.
# Start/stop indexing on all volumes.
alias spotlight_off='sudo mdutil -a -i off'
alias spotlight_on='sudo mdutil -a -i on'

# Load/unload Spotlight Launch Daemons.
alias spotlight_unload='sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist'
alias spotlight_load='sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist'

Comment: It should be noted the `mdutil` command in this answer will disable indexing on all volumes including your main hard drive. If you use spotlight to open up applications or documents, this will break that functionality. You can re-enable indexing on your main HD again (but still keep it off other volumes) with `sudo mdutil -i on /Volumes/Macintosh\ HD`
Answer: At least on macOS Mojave (10.14) I found that the mdutil -h command was very much my friend... try:
sudo mdutil -X /path/to/volume

but you may also need to explore options such as -d and -i off because the help states that -X doesn't disable indexing.
Answer: No.
mdutil can turn off spotlight on network drives, but there's no way to stop it indexing removable drives (short of inserting the drive and then telling spotlight not to index that drive of course - but you're looking for something to stop it happening for all removable drives, always, not just the drives where you've manually turned it off)
For trash, there are similar workarounds to make OS X not actually use the trash folder - eg, create a file called .Trash so that OS X can't later create the directory called .Trash. Again, this only works for devices you've manually exempted, it isn't a blanket ban on OSX doing this on all deices.


Enterprise level analytics software to test and monitor usability

Question: We are developing a hospital management software,We need to monitor that software after the deployments..What are the best tools we can use..Better it can host our server and test...
Answer: Welcome aboard. The golden rule here is that the more details you give us, the better  that we can help you. From your profile, I am guessing that the software is browser based, but it helps if you tell us that.
Are there any desktop PC components (windows / Linux)? Andy handheld devices (Android/iOs)?
What are you trying to monitor? If it is network activity, then you probably can't beat Nagoios.
This excellent (and free) software is stable, well supported (about 4,000 questions on https://stackoverflow.com/) and well documented .
Its key features are:

System Monitoring
Protocol Monitoring
Application Monitoring
Database Monitoring
Log Monitoring
Bandwidth Monitoring

From Wikipedia :

 Nagios /ˈnɑːɡiːoʊs/, now known as Nagios Core, is a free and open
  source computer-software application that monitors systems, networks
  and infrastructure. Nagios offers monitoring and alerting services for
  servers, switches, applications and services. It alerts users when
  things go wrong and alerts them a second time when the problem has
  been resolved.
 Nagios was originally designed to run under Linux, but it also runs
  well on other Unix variants. It is free software licensed under the
  terms of the GNU General Public License version 2 as published by the
  Free Software Foundation.

Read more there and on the Nagios web site.
Since your question is extremely broad, you might have meant to ask something else. If so, please update your question and we will do our best to help you.


Is a large change in radon test results normal?

Question: I am selling my home in Georgia and just had a Radon test result of 7.0 as part of the buyer's inspection. When I moved in 10 years ago the test result was only .9. Is this much change normal or should I question the result?
Answer: You can get the test re-done, they generally aren't very expensive, but avoid the home testing kits, they aren't as reliable, and any buyer will probably have the test done themselves anyway professionally. It is a significant jump, it definitely crosses the threshold of "safe" and "needs correction". Any smart buyer will want you to correct a value this high, too. A test result >= 4 pCi/L warrants some kind of radon abatement according the the EPA.


Adjustable Voltage Regulator behaving weirdly

Question: I'm using a IFX27001TF adjustable voltage regulator from Infineon.  Here is a link to the datasheet and the useful schematic is on page 16.  I would like to get about 5.3V from the output so I've calculated my resistor values to be R1=100, R2=330.  I'm using a 1uF cap on the input and 10uF cap on the output.  Instead of giving me a steady 5.3V output, it outputs whatever the supply voltage is minus 1V.  I've tried it at voltages up to 10V.  I'm using a bench power supply that can output several amps so I don't think that is a problem.  I've tried with 1 led at the output, 3 leds at the output, and 3 leds a 3.3V regulator and a arduino Uno board doing stuff.  The current draw on that last one was about 100mA so I don't think it's an issue of drawing enough current for it to be stable.  Anybody have any idea what is going on or what my next step might be?
Comment: X7R or X5R tempco I take it, and what voltage rating?
Comment: What type of capacitors are you using?
Comment: I'm using ceramic 0805 caps.
Comment: The symptom sounds like the ADJ pin is not connected, or the bottom resistor (R2 in Figure 5) is too high in value.
Answer: Page 17 of the datasheet specifies that the regulator you are using requires at least 100mΩ of output capacitor ESR for stability -- I suspect the control loop is out of whack because the output capacitor ESR is too low.  Try sticking a resistor of anywhere between 1Ω and 10Ω in series with the output cap and seeing if that fixes it -- if it does, that indicates the capacitor's the problem.  (Note that modern tantalum and polymer electrolytics can have ESR values that are too low to stabilize an older LDO like yours, so it's not purely a ceramic cap problem.)
Of course, you could also try switching to a more modern regulator that doesn't have such annoying requirements on output capacitor ESR.
Comment: I'll try that tomorrow.  You mention that it's an older LDO.  Are there newer parts that would be better to use?
Comment: @mwwalk Indeed! What are your requirements?


Finger strengthening Exercises

Question: I have been trying for months but still not able to get my pinky perpendicular or to apply significant pressure with it.  I've tried a few basic exercises, repeated hammer ons, etc.  Does anyone have any ideas on how to make progress?  I'm a beginner who has taken up the instrument fairly late in life. The instrument I'm using is a Fender CF-60.
Comment: I don't think the perpendicularity is important. I do lots of scales and it takes a LOT of time to get it. Don't get discouraged.
Comment: The scales aren't such a problem; it's mainly with chords, but I'll keep at it.
Answer: To get your pinky perpendicular to the fretboard, the geometry of your hand as it relates to the neck must permit the proper orientation of your pinky to the fretboard.  For example, if you hold your guitar too low and your forearm is below parallel to the ground, you may not be able to get the heel of your hand below the neck to facilitate the proper attack angle of your pinkie.
Be sure your playing position allows the heel of your hand (particularly on the pinkie side) to rotate to a position below the neck of the guitar to allow you to get your pinkie perpendicular to the fretboard.  The higher above your waist you position the neck, the easier this will be.
Also, in most cases it will be easier to get your pinkie perpendicular to the fretboard if you position your thumb closer to the center of the back of the neck as opposed to wrapping your thumb over the top of the neck.
As far as strengthening exercises, your best bet is to play chords that require the use of your pinkie often.  The strength will come with time and practice (with emphasis on time).
Proper form is essential.  If you are not sure about your playing position, hand position and form, it might be a good idea to have a qualified and experienced guitar teacher evaluate your technique and how you hold your guitar and position your fretting hand.  It may be that an adjustment in technique or position may be all you need.
Good luck and have fun improving your playing skills.
Comment: Thanks for your answer, getting the right form is something I've been thinking about.  I hold the guitar what I'd call the regular rock/blues style rather than with a high neck and on my knee, seated.  I try always to have thumb behind the neck, also to keep my wrist flat and close rather than out and L shaped, but my hands aren't big and it sometimes shapes that way, like this morning doing chromatic scales on the low E.
Comment: @pawnsinagame  when fretting the low E with your pinkie while playing a scale it should not be necessary to have your pinkie perpendicular.  I have  really short fingers myself but I have friends with very tiny hands.  Your hand and finger size will impact the way you need to position your hand in order to play certain chords.  I have to rotate my hand (around the high e end of the fretboard) such that the palm is almost above the fretboard to play some chords .
Comment: Yes position seems to be important.  i do worry about the L shaped  angle of wrist, which seems to happen automatically when bringing the hand above the fretboard.  Working on it on it just now though  this doesn't need to be so, tucking the elbow in and curling the fingers while keeping the hand close works fine.  Thanks for your answers which have been very helpful.

Finger strengthening Exercises


Off-the-shelf Computer Software Depreciation

Question: For the 2018 tax year, I'm looking to take 100% bonus depreciation on software expenses for my US (California) based LLC. While the tax code states that "Off-the-shelf computer software" is eligible property for the section 179 deduction, it's vague on what "off-the-shelf" actually means. Does the definition include software purchased online? Are there cases where it might include subscription based software (where access is provided for 1 or more years)? Does it include web apps (that run in the browser as opposed to being downloaded to local storage)? Please help clarify this for me.
Comment: The close votes that are accumulating and labeling this a pure accounting  question are off the mark. This is a practical tax question about small business owned by the OP. Don't let the word "depreciation" fool you. I will refer you to the [these](https://money.meta.stackexchange.com/questions/15/are-small-business-questions-on-topic) [two](https://money.meta.stackexchange.com/questions/1910/are-questions-about-single-person-family-businesses-on-topic-or-not) meta discussions about small business questions.
Comment: Agreed. I closed and reopened to clear the votes to close. In case we (mods) don't catch it, and it closes.
Answer: In contracting Non-off-the-shelf software is software that has been modified or developed  for you. Microsoft office is off the shelf. Paying a company to develop an add-on to MS office would not be off-the-shelf.
How it is delivered isn't relevant. It could be purchased from a physical store, or delivered by the post office, or downloaded.
A subscription based model would be the same, though the payment frequency would be an issue. If you pay $x per month then only those months for this year would apply for this years taxes. If there is an annual or multi-year subscription it might have to be split the same way.
Comment: Look at subscriptions like rent. There's no depreciation there, just recurring costs.
Comment: @JanDoggen Your suggestion is that no type of off-the-shelf software is eligible for depreciation if it's subscription based (regardless of the subscription duration)?
Comment: @JWK yes - because you don't buy a license, you _rent_ it. You cannot depreciate rent, you can deduct it.
Comment: If you're talking about taking a 179 deduction versus deducting rental cost, the net effect is the same: You deduct the full amount paid in the year that you paid it. Technically you should write it on a different line on the tax form, but as the effect on your taxes is the same, I'd be surprised if the IRS gave you a hard time if you did it wrong anyway. :-)


Why does Bitcoin-QT not seem to be catching up on my Mac?

Question: I've had Bitcoin-QT running for about six total hours, and the rate at which it's catching up is glacial at best. It takes about an hour to advance a week, which would make the process take about 4 days to complete. It didn't take nearly this long on my PC; I started and finished the process while my Mac was still running. I'm running Bitcoin-Qt v.0.10.1 64-bit on a 2011 MBP, 8 GB of RAM, on 10.10.4. Is this normal, or is there something wrong?
Comment: I actually solved this problem just a second ago, by manually deleting the block chain and starting over. It's going much faster now.
Comment: It's perfectly normal. It doesn't have anything to do with the fact that you're running it on a Mac. If you're feeling lucky, you can stop it and restart it (it will continue where it left off) and hope that it will randomly choose faster peers.
Answer: Sadly Bitcoin-Qt's (and bitcoind's) default DB cache size is very small for systems like yours.
You should definitively add <code>-dbcache=4000</code> (use 4GB of RAM for UTXO-set-database [etc.] cache).
This should speedup your sync significant.
Answer: By the sounds of things and your fix, I would say that you had a blockchain created by an earlier version of Bitcoin-QT and something in the migration process in making that work with newer versions is causing it to take longer than to download the whole blockchain fresh with the latest versions. It's always advisable to keep a backup of wallet.dat (so you don't lose access to your wallet) but you can dump the rest of the application support directory which is mostly blockchain.


How can I pump a large lake of lava?

Question: I have a quarry set up, and it has encountered a rather large pool of lava. I can collect it and use it with cells, but that would be a waste of my time. Is there a machine I can use to collect it? I have looked into the IndustrialCraft and RedPower pumps, but none of them seem to have what I'm looking for. What can I use to pump large lakes of lava?
Answer: In addition to using the various pumps from IndustrialCraft, RedPower, and BuildCraft, what I usually do in my quarries is place a water source block in one of the top layers that are mined out.
As the quarry keeps mining the water will fill the entire surface of quarry and will instantly transform any lava to obsidian, which can be mined out without problem, and when the quarry is done you can remove the water with a single bucket.
If the quarry has already mined far down and is stuck on the lava putting a source block in the center of the lava (or multiple blocks in multiple places if it's a really big lava source) will also do the trick rather fast.
Comment: Then build an Ender tank and drain the Nether for every last drop =p. Or create a Mystcraft age with a single biome of lava ocean and try to drain that :)
Comment: But what if I want the lava? Free energy!
Answer: The pump from Buildcraft 3 will take care of lava and output it to any tank nearby.
Comment: Can this be set up for the generic situation of setting up a quarry and ensuring that it's not stopped by lava should it encounter it, or is it only possible to fix once the lava's exposed?
Comment: I believe that it will work with the quarry, so long as you supply it with MJ.
Answer: An easy way to solve this is to drop a Buildcraft pump directly above the lava (it doesn't matter how many blocks above it, the pump will create a pipe going down into the lava). Give the pump four Redstone Engines to power it and connect piping from the pump to a tank you wish to store it in or to a Liquid Transposer from Thermal Expansion if you wish to automatically can the lava.

How can I pump a large lake of lava?


Do I need to buy an SD card with an OS preloaded on it?

Question: I finally got accepted to place a pre-order, and one option to "add" is the OS on the SD card preloaded. Is this needed, or can I download the OS elsewhere? Could I just put on my own version of Linux instead?
Comment: The main thing is that you need an SD card of 2GB or more and that the SD card is [compatible](http://raspberrypi.stackexchange.com/questions/5/which-sd-cards-are-compatible/11#11) if you intend to use your own SD card
Comment: Good to know... I can get the Kingston cards :) I'll be happy I think. It should ship in 12 weeks apparently
Answer: You will need an SD Card with a Pi compatible operating system on it. Several options are available from the official Raspberry Pi downloads.
You may not need to buy one. Assuming you already have a compatible 4GB or larger SD Card and reader/writer you can create your own and save a few dollars. Directions for creating your own card can be found in How do I install an OS image onto an SD card?.


Hashing function for session

Question: I need to verify the users session of Drupal on a Node.js server. The session ID has been hashed and it is stored in the Drupal 8 database. How can I hash the browsers session ID to compare it with the one stored in the database?
Comment: Check out lib/Drupal/Core/Session/SessionHandler.php, specifically the read function.  It uses Drupal\Component\Utility\Crypt::hashBase64($sid).
Comment: Do you mean compare it with Node.js code? I am not sure you can.
Answer: I see that no one has put up an answer for quite a while, so I will put it up here. This has been correctly answered by RaisinBrainCrunch above.
Drupal 8 hashes its session ID before it puts it in the database. The hash function used is hashBase64($sid) under Drupal\Component\Utility\Crypt.
Therefore, I am guessing you will have to write the same function in Node. This is the full function:
public static function hashBase64($data) {
  $hash = base64_encode(hash('sha256', $data, TRUE));
  // Modify the hash so it's safe to use in URLs.
  return str_replace(['+', '/', '='], ['-', '_', ''], $hash);
}

Hashing function for session


My cat's food is filled with ants: should I throw it away or is there a method to remove them?

Question: My cat's food bag is filled with ants and I'm sure I'm not supposed to give him ant filled food. So is there a method to remove the ants from the original bag or should I throw it away and get a new bag of food? Also are there any methods to keep ants away from their food bag in the first place?
Comment: Depending on how "filled" it is, and how expensive your cat food is, you can separate out the ants by shaking the food in a colander. I don't think any stray bits and pieces will matter; cat and dog food has more insect matter in it than we'd like to consider. I agree with @rib.usa that the infestation needs to be addressed, though. This is just a stop-gap measure.
Comment: Put it in freezer bags and freeze it?
Answer: Throw it out.
I think the bigger problem is getting rid of the ants in your house, the ants in the cat's food are only a symptom of this root issue.
Ants are attracted to food smells, so try putting the (new!) food in an airtight container like a freezer-bag or a plastic container. That will also help the food to stay fresher.
Comment: Be aware if ants ingest poison and get into the cat food and the cat eats them, you will be feeding poison to the cat (via the ants), this is a [significant concern with reptiles](http://pets.stackexchange.com/questions/1788) but should also be considered with mammals
Comment: Thanks @JamesJenkins in my head I felt like ants could also be disease vectors but couldn't think of any evidence to support that
Answer: Ants got into a fairly new $50 bag of prescription food, and I'm in no financial position at this time to throw it out. I immediately poured the food into a zip loc bag, which killed the ants (avalanche!). I was not about to pick out every ant carcass from 6-7 lbs. of food! Colander wouldn't work completely since the ants were sticking to the food and to every surface they touched, so I ended up pouring the food from one container to the next, with dead ants sticking to each container as the food was transferred to each one. Then I wiped the ants out of the containers and repeated the process until I felt the amount of ant remains was small enough. PS: I tried using compressed air, but it was about the same as the colander.
I don't use ant poison so there's no issue there, but that is a very important thing to consider if you find yourself in this position.
Answer: Put the food in the freezer (outside if you are in cold weather like i am now) the ants will either die or be paralzyed and fall to the bottom. Then remove the food on top to an airtight container.
Comment: How long should the food be frozen? Will the condensation (from frozen food thawing) create any spoilage issues?


Why aren't heuristics for Connect Four Monte Carlo tree search improving the agent?

Question: I've created an agent using MCTS to play Connect Four. It wins against humans pretty well, but I'd like to improve upon it. I decided to add domain knowledge to the MCTS rollout stage. My evaluation function checks how "good" an action is and returns the best/highest value action to the rollout policy as the action to use.
I created a "gym" application for one agent, who's not using the evaluation function, to play against an agent who is using the evaluation function.
I would have expected the agent using the heuristics to perform better than the agent who isn't, but the inclusion of the heuristics doesn't seem to make any difference! Any ideas why this might be the case?
Answer: It might be the case that if you perform a large number of random rollouts, the "best action" as chosen by the agent without the domain knowledge, is same as the agent with the domain knowledge. I guess what you can do is try to reduce the number of rollouts and see if the performance changes.

Why aren’t heuristics for Connect Four Monte Carlo tree search improving the agent?


Mesh Smoothing My Model

Question: So I know this has been asked a million times but I am pretty new to Blender and not finding a resolution that works for me. How can I smooth out these ridges in the attached image? I have tried sculpting and modifiers, etc and feel like I am just missing something, so asking for some clear direction to solve this. Basically as you see this is a pig face, and needs to be rounded out and playing with edges, faces, etc is just not working out either. Please help a brother out!
Comment: Hi. It would be helpful if you could describe why other solutions didn't work.
Comment: Hey! Besides playing with faces, verts, edges I have tried using smooth brush in sculpt mode along with a few others to even it all out to no avail. Subdivision modifier as well as LoopTools. I feel there are many ways this could be accomplished but looking for some direction on how to actually do so from someone with some experience.
Comment: have you tried a subdivision modifier ?
Comment: Yes and when doing so it ended up breaking other areas of the model by separating along the mirrored edge
Answer: If you want to smooth out the whole mesh you can do it by clicking on the mesh, going into the modifiers tab, adding a Subsurface modifier and increase it's value from 1.
On the other hand if you only want to make a certain area smoother I know a couple of other options:
1) In object mode select the mesh, go into Edit Mode, click 2 to use edge selection, select the edges than you want to smooth, press CTRL+B to apply a bevel to them.
2)In object mode select the mesh, go into Edit Mode, press 3 to enable face selection, select the faces you want to smooth, press W to bring up the Specials tab, select subdivide, press 1 to enable vertex selection, press W again and click smooth.
Of these 2 options it's probably best to use the first one to keep better topology.

Mesh Smoothing My Model


How big do I frame the door entrance for a closet sliding door

Question: i have a 72x80 sliding closet doors how much bigger do i am the opening. I am framing a new closet
Comment: Hello, and welcome to Stack Exchange. Your question is a bit hard to understand; a few more sentences, and perhaps a diagram, would really help.
Answer: although every situation is different, generally when you frame the opening, add:
horizontal
3/4" to each side for the jamb (or whatever the jamb thickness is)
1/2" to each side for the gap for shimming the jamb
1/4" extra for bifold or french doors
vertical
3/4" to the height for the jamb (or whatever the jamb thickness is)
1/2" for the shimming at the top
3/8" to the bottom for the gap between door and floor (we usually do 1/2", or 3/4" if there are carpets or matts being used in winter
so for a 72 x 80 bypass door, your RO will be approx 75 x 82.  since its a bypass door and the floor could be out of level, i would do 75 x 82 1/2.
remember too that trim will cover a lot of stuff up, particularly now when most casings are in the 4" or wider range.


What if you get denied entry into the US while holding a residence permit for studies in Europe?

Question: I am a student visa holder in Europe with a US B1/B2 visa. I am originally from Sri Lanka and I was wondering that if I travel to US and in the unlikely scenario that I get denied entry by the CBP, where will I be sent off to? Back to Sri Lanka or back to Europe where I hold residence permit for studies?
Comment: Travel from where? If from Europe likely to Europe since you have a permit. If from Sri Lanka, back to Sri Lanka.
Answer: You're sent back to where you flew from, provided you can enter that country.
So in your case, it would be to Europe.


Is the eccentricity of a planets orbit relevant to finding whether the distance between said planet and its host star determines seasons?

Question: The tilt of the Earth is the main factor that determines the seasons. It's also true that the eccentricity of Earth's orbit is very close to zero, implying that aphelion and perihelion distances are relatively close. If the eccentricity of Earth's orbit were close to but less than one, then would the distance between the Earth and the Sun become a dominant factor in determining the seasons?
Comment: Related question here with some good answers:  https://astronomy.stackexchange.com/questions/1184/why-dont-we-have-2-summers-and-2-winters?rq=1  And you wouldn't need to push the eccentricity close to 1 at all.   An eccentricity of 0.2 would give 2.25 times the solar energy at Perihelion than Aphelion which should be enough to overtake the tilt and govern the seasons.    An eccentricity of 0.3 would certainly overtake the tilt with the possible exception of perhaps the very Northern and Southern tips of the planet where the sun would still stay out for months then set for months.
Comment: Interesting question, but perhaps better worded as "is eccentricity or axial tilt the main factor in total irradiance?"    Then consider that any planet sans atmosphere doesn't care at all about axial tilt.
Answer: Yes it would. If the sun was much further away the season on earth would certainly be more winter-like. The reason distance is not the deciding factor for earth is the variation in distance is fairly small.


My Granddaughter is 8 and is having trouble sleeping. She seems to have a lot of unfounded fears and I am worried about her

Question: She can usually fall asleep but awakens in the night afraid. She says she doesnt feel safe in her house.  She also says she worries about school because sometimes she cant get her work done "fast enough".  She can do all the things she is suppost  to do but has little self confidence and fears the teacher will "yell at her".  I dont know what to tell her or how to make her feel better.  It is breaking my heart.
Comment: Have you spoken with her parents?
Comment: Is she involved with a Counselor, if not I strongly suggest taking her to see one :)
Comment: Her parents are aware and they are not sure what to do either. They also have a good relationship with teacher and she has seen a school Counselor in the past.  I will suggest that again because from what I know my granddaughter has to be the one to go to the teacher and say I want to talk to a Counselor.
Answer: Talk a lot to her. I know you already do that, but she needs to put her feelings into words. This way she will begin to self-diagnosis for the roots of those confidence issues. Everyone, specially girls, need to be able to talk their worries out of their chests.
Get everyone in the house involved. If she has siblings, constant teasing won't do much good. Her parents should be supportive also.
Show her what she already accomplished. Does she procrastinate when doing her work? If she broadens her view and see that she is capable, she will be more confident and lose less time worrying before tackling the workload.
Also, you need to get acquainted to the behavior of that teacher, and assess their relationship. Is your granddaughter's teacher stern, friendly? Do her fears have any foundation? How does he treat her classmates? Be warned that teachers (specially the abusive ones) are masters at hiding their stuff under scrutiny.
Comment: She is any only child.  I talked to her today and asked "Did you wake up in the middle of the night last night?" Only for a second and I went right back to sleep.  So I said :the talking helped?  Yes Nana I am thankful for you.
Comment: @Katherine wonderful! When we put stuff outside our minds, it becomes easier to understand and process. The earlier your GD learns this, more confident of an adult she will be.
Answer: You should absolutely probe deeper into why she feels unsafe at home, as that's very disconcerting.
Regarding her relationship with her teacher and academics - I had a first grade teacher who was honestly the most negative and critical person I've ever met.  For example, she would call her first grade students 'failures' for not coloring in their drawings 'properly', and she would yell unprovoked.  It really made me miserable and messed with my entire world view for a month or two.  Thankfully I had very supportive parents who I knew I could talk to.  They immediately had me transferred to another class with a great teacher.
It's possible that one or both of these issues are the cause of her anxiety.  I will certainly say that you are in a great position to get her to confide in you to determine the root cause.  As she seems very concerned about disappointing others or not 'measuring up', you should be especially clear in letter her know that you will love and support her no matter what and that you want to help make things better.
Answer: Some of my kids went through phases like this, some didn't. I saw the same with friends and their kids. In fact, I do remember one such phase when I was a child. It came, made my parents struggle a bit helplessly, and it went. I have no idea where it came from and what it was.
I think this mostly isn't about the fears they experience, but something beneath that. Maybe the child truly realizes that there are indeed things to fear in the world, and needs to test that feeling. Maybe some other fear is underneath that she cannot voice, and that seeks an outlet this way. If so, you (and/or her parents) should try to get at that, finding the real cause of the problem.
What's making her feel unsafe in the house? Is she really slower than others? Do the teachers actually yell at her? If there's something behind that, it would be good if you could find it.
Yet, what I as a parent found helpful in such phases was the (universally helpful) advice to not to make this into a spectacle in front of the child: Keep calm. Be reassuring. Be comforting. Listen. Ask. Explain. Try to sooth the fears.
I remember my mother getting out the flashlight and the two of us looking under the wardrobe and into other dimly lit corners of my room before I went to bed. I got a small light in my room, and she left the door a bit ajar. And a month later all this wasn't necessary anymore. Interestingly, I remember no underlying fears, just the ones I was expressing. (Which doesn't mean there weren't any. But there was nothing I could have expressed myself.)
I remember one of my kids around the age of 4 or 5 being afraid of wolves. I blame Grimms' fairytales for this. (That was Germany, in the late 90s, where there were probably less than a dozen wolves in the wild which had come over the Polish border. There's a few more nowadays, but you will never even see them while hiking through the woods.) In the end I bought books about wolves, read about them, and explained to the child what I had learned. We talked about the role wild animals had at the time those fairytales were invented, and how they later got hunted into extinction. How dogs were bred from wolves. All that talk helped the child. (And it gave me a fascination for the creatures that lasts until today.) After a few weeks, the fears were gone. Again, we found no underlying cause.


Significance of Captain Kirk's name?

Question: Is there any significance documented regarding his last name in light of the fact that "Kirk" means "Church"?
Answer: To the best of my knowledge, no.  This was never brought up in TOS, it's not been mentioned in any documentary I've seen, and I haven't found a single reference to that factoid in any interviews with cast or crew.
Also, by the time of Kirk's birth in the ST Universe, English (US) was apparently the default language of everyone.  Other languages (especially sub-dialects like Scottish-English) were retained in a purely local sense, if at all.
Kirk's family was primarily North American, with any European roots being multiple generations back.  He was Iowa born and bred, and was almost certainly unaware of that factiod himself.
Out of Universe, the name 'Kirk' was chosen becasue it was similar to Captain Cook, an inspiration for the character.
Comment: It was the out of universe reason I was looking for.  Thanks
Answer: People believe that Kirk word comes from Greek word "Kuriakon" but I think Turkish word "Kırk" is already totally fit and there is a Turkish country called "Kirkız" means We are Kirk , as Kirk is the most holiest word in Turks , Kirk=40 in Turkish and 40=forty in English ,Fortifying means to strengthen Castles on behalf of central authority , and every Turk be fortified being washed by water having 40 stones in and blessings at the 40th day of his/her birth .
Comment: Can you provide any sources to back up that a) what you say is true, and b) the show's creators had any such thought in mind when they named Kirk?

Significance of Captain Kirk's name?


How to learn endgame theory

Question: Related: How to improve on the early endgame?
How exactly do I study or learn endgame theory? Is it just memorizing certain positions that are quite common and knowing how to attack and counter?
Comment: If you are looking for books, you can check these questions:
https://chess.stackexchange.com/questions/29027/which-endgame-manual
https://chess.stackexchange.com/questions/14530/endgame-books-or-web-sources
Comment: Have you looked into endgame theory books?
Answer: How to learn endgame theory
The endgame, as said by many top-level players, is the most difficult part of the game. It decides whether you will win, lose or end up drawing the game. This is the only reason why Magnus Carlsen ends up grinding the win in almost every endgame (except those which are drawish).
Endgames require a lot of practice or I should say concept-building practice. There are tons of endgame theories out there, like Lucena, King Square, Rook vs knight or bishop, equal pawns, etc. One must understand the concept behind that theory and not memorize that particular position. Instead, one should try to memorize the pattern, because you will not get the same position every time (just like tactics). The best way to study endgames is by practicing the endgame positions. This way people will build the habit and required intuition for the endgame.
One cannot become Magnus Carlsen in the endgame in a month or two, not even a year. It requires you several years of daily practice and an intuition-building process to master it. After lots of experience in practicing and playing endgames, you will find out that the moves will automatically come to you, and you won't have to think long to find the best move.
It looks like you want to know how to play endgames.
Some common points to keep in mind:

The King is one of the most important pieces in the endgame. Learn how to use it to block or shoulder another king from entering your territory. This is basically applicable in King-pawn endgames.
Learn the use case of bishops in open positions and knights in closed positions. Try to exchange if the piece does not adjust to the type of position. Don't think about this too much! You'll learn it slowly as you practice.
Blocking the king from entering the territory helps in winning most of the games. The Rook is the most useful piece for this purpose.
Learn the Rule of +2. One needs to have at least two more pieces than your opponent to attack them. This is applicable for both defending and attacking.
Opposition plays a major role in endgames. One must know where to keep the piece to get the upper hand in the position. This is why one must never try to be passive in endgames.

Sources for study:

Endgame books or web-sources
Lichess study and General endgame
Lichess Puzzles and Chess.com Puzzles
Lichess Practice and another useful source
Eric Rosen's endgame video
Answer: The reason that Magnus Carlsen is a superb endgame player is not because he has memorized a lot of standard positions or that he has memorized "the patterns behind them". It is that he has a wonderful imagination and nobody can tell you how to acquire that. Like a sculptor, he sees the statue inside the stone and knows how to release it. I am not completely sure that you do want to "Learn endgame theory". You may want to "learn how to play endgames" which is a bit different.
There a great many posts related to this. As far as I can see, they mostly contain good advice that I will not try to replicate, but there are a few rules to follow if you are to avoid common mistakes.

Realize that the King is a strong piece. If there is no risk of being mated, his fighting power is roughly that of a minor piece, but unlike either a Bishop or a Knight, there are no gaps in his armor. From an early stage, ask yourself how your King will be used. As the endgame approaches, whenever you have a spare move, consider nudging him a square closer to the action.

Avoid passivity, unless there is really no choice. This applies especially to Rooks, which can get bogged down in a maze of Pawns. Rooks need open lines to display their power. If a Rook is the only piece that can defend a weak Pawn, and if doing so would reduce its mobility, you should always try to find a counterattack instead.

Remember the "Rule of Two Weaknesses". One weakness (isolated Pawn, exposed King) can often be defended, but if there are two, the attacker can often switch between them, and the defender may not have have enough manoeuvrability to keep up. Good endgame players know how to do this. Great endgame players know how to create the situation.

Never make an unmotivated Piece exchange. Weak players often exchange a piece for no better reason than that it is possible and will result in there being "less to think about". Strong players usually prefer to leave all options open, at least until the strategic objectives have clarified.

Having said this, there is some indispensable theory, available in many books. When can you win with your last Pawn, under a variety of conditions? What is, or is not, mating material? But above all, teach yourself to enjoy endgames.
Answer: "Checkmate ends the game". So, the first step in learning endgame theory is learning the basic checkmates - KRR vs K, KQ vs K, KR vs K, KBB vs K and KBN vs K.
There is no point in reaching a simple theoretical won endgame if you can't finish it off. A cruel opponent will refuse to resign and you will be embarrassed by the 50 move rule. This first step is vital and fortunately it is also the easiest.
The second phase involves learning what kinds of positions you can turn into one of these basic mating combinations and how to get there.
There are three key components:

material
position
turn

Taking the simplest combination of K+P vs K the result depends on where the pieces are and whose turn it is. For example white king on e1, pawn on e2 and black king on e8. Is it a white win or a draw? The correct answer is that we don't know until we know whose turn it is. White to move is a win. Black to move is a draw.
There are key squares in relation to the position of the pawn which the white king must be able to reach to force a win. If black can prevent that then the result will be a draw. Like the simple mates you just need to learn this stuff.
KRB vs KR is a theoretical draw but there is a difficult way to win if black goes wrong. It is important to know the ideas involved so that you can win with the RB when your opponent goes wrong and similarly when you just have the R so you don't throw away half a point. With the extra bishop there are positions from which you can win. You need to know what they are and how to win from there. That way you know what you are aiming for if you have the extra bishop and you know what to avoid if you just have the rook.
In my opinion the best endgame resource is the two DVD volume set which GM Nick Pert produced for Ginger GM. I thikn it has all the endgame knowledge you will ever need in audiovisual format which many of us find easier to absorb than books.
Here are two YouTube trailers for the series, one from DVD 1 and one from DVD 2.
Answer: Start with the most fundamental endings such as king and pawn vs. king, king rook and pawn vs. king and rook.
Then learn how more complex endings are made of combinations of simpler endings.  For example, you may see how to exchange a complex ending into a winning king and pawn ending.
Finally learn how to transition from a complex middle game to a complex winning ending.
practice -> study -> practice -> study -> practice -> study
Answer: For a beginner, probably working backwards is most productive:

If you have K and Q and the opponent just has their K, you should know how to checkmate in a short amount of time (and avoid stalemate).
1b. This means if you have K and P against K, and can queen the P (without stalemate), you will win.

If you have K and R against K, you should win in a small number of steps, but it requires more thought than K and Q. But it should be known to you like the back of your hand.

Everything beyond this is more complicated... K and one or two minor pieces against another K and minor piece is complicated.
But/and if you can see how to simplify to one of the easy cases, then you have won. (And try to avoid allowing your opponent to reach that: e.g., if your opponent is ahead by one pawn, don't allow them to trade all pieces to leave the situation at K+P against your K!)
Answer: Get a good endgame book. I would reccomend Silman's but any book that teaches the basics is probably fine. Even Reuben Fine's book is probably Fine...sorry for that. Fine's book is what I started with but it's pretty dense and more of a reference work than instructive.
Also, learn to analyze the position.
Look at the pawn structure. You should be mostly concerned with passed pawns and potential passed pawns. The pawns will dictate how the endgame goes.
Bring your king to the center as soon as the endgame starts
Advance the unopposed pawn
Create a passed pawn
Principle of creating a secondary weakness
This is a very instructive endgame I saw in a book once. It will teach you everything I said above. In this case the unopposed pawn is the b pawn. You want to advance it and create a passed pawn on the queenside. Black will be forced to stop that pawn but you will then move over to the king side and raid his pawns creating a secondary weakness. It's impossible for black to cover both weaknesses.
Practice against a strong engine until you get it. This is a forced win for white so you should be able to beat any engine of any strength. Once you get it you'll be better at the endgame than 90% of the players out there.
<code>6k1/p4ppp/8/8/8/8/PP3PPP/6K1 w - - 0 1
</code>
Answer: End-game is the easiest part for learning and everyone should start learning chess from end-game and then can migrate to middle and start-game, you can solve some puzzles, read books(Lasker method is recommended) and chess magazine, watching videos and also chess.com and lichess websites has some good training materials for learning end-games.

How to learn endgame theory


why do we get continuous intensity in spectra?

Question: we know energy levels of a molecule is discrete. So we should get only sharp peaks for any spectra. But in most of the spectra I see a continuous intensity? why is so? In the following spectra the peaks are understood but why the tail of the peaks don't touch zero intensity line?
Comment: Related http://physics.stackexchange.com/q/80743/26076
Comment: Possible duplicates: http://physics.stackexchange.com/q/46080/2451 , http://physics.stackexchange.com/q/89138/2451 and links therein.
Answer: I should say that the comments and answers so far have nothing to do with the effect that is shown on the plot. Note, in particular, how the intensity of broadband background depends on the wavelength of the laser used for Raman scattering. This indicates that the background is not related to the properties of the molecule itself, but rather to its environment.
One of the common reasons for such strong background in Raman spectroscopy is fluorescence of aromatic molecules. It is more prominent for visible light (which is consistent with the plot), whereas 244 nm is already too high in energy to excite most of the organic molecules.
Answer: The spectra are actually always continuous if the resolution in frequency of the spectral analyzer and sensitivity in intensity of the detector is high enough. The spectrum of radiation emitted by hot atomic gases and molecules is called discrete because it has very sharp spectral peaks and looks as if formed of lines. But they are actually peaks with non-zero width $\Delta \omega$ and finite height. This is because the radiation of the atom or molecule is never a perfect sinusoidal wave; rather it consists of many such waves damped down to zero, added with various phases. When such signal is decomposed in to its Fourier components, typically it has non-zero intensity at each frequency.

we know energy levels of a molecule is discrete.

Yes, but energy levels are not the only thing that determines emission spectrum.   Eigenvalues of the Hamiltonian predict positions of the peaks in the spectrum fairly well. But to get width, height and in general the shape of these peaks, more complicated theory is required, describing better the action of the EM fields on the molecules. In order to describe spontaneous emission, some relativistic theory of radiation is needed, for example, neoclassical theory or quantum electrodynamics. In these theories the energy eigenvalues are discrete, but the peaks in the emission spectrum will have non-zero width and finite height.
Comment: I am not taking about Heisenberg uncertainty principle. The finite width of each band is okay with me. But why doesn't the tail go to zero?? For example let's take the fig as example. In the blue trace at about 1450 (1/cm) we can see a peak and again at 1300(1/cm) we see another peak. In between them how are we getting that much intensity even though we don't have any state there.
Comment: Why should the tail go to zero? Most models of lineshape have non-zero intensity for all frequencies. Sudden drop to zero intensity for some interval of frequencies would be unnatural. Also, as gigacyan says, the intensity in between the peaks may be due to broadband fluorescence radiation. In practice it may also be due to bad calibration of zero-level of the detector, or insufficient subtraction of the solvent spectrum...


I'm unable to copy to executable (ollydebug)

Question: I just finished up with cracking this crackme I found off the net and it's cracked and everything,but the problem is that in ollydebug I don't happen to see a option to copy the modified code and save it as a executable. I tried googling this up but no answers were in the slightest bit useful. I right clicked the CPU window and hovered over edit but it wasn't there. However when it did show up it was under the module ntdll instead of the actual exe. To be specific I'm simply trying to copy my modified code to a executable that's already cracked but the option to perform such a action isn't there it only pops up when I'm under ntdll but not the exe. Many thanks to whoever can solve this problem
Comment: Ok but how do I stop ntdll from popping up when I either press attach or open the exe directly?
Comment: Hello? I'm using ollydebug v2 and I don't even see copy to executable under the edit menu
Comment: if you have modifications in exes address space you will see it dont expect the modification you did in ntdll appear in your exe added an answer below with screen shots check it out
Answer: f your code pops up in ntdll you have added your code in ntdll do not do that dont modify system dlls you may destabilze your os add code only to your executable and use copy to executable
Dbg break is the first break for any process called system breakpoint andcit is ntdll step or run to your executable code viz address of entry point or start or main
see snap shot

copy to executable if you have modification in the executable will be available here
(if you do not have any modifications in the executable address space this wont appear
the modification that you have in ntdll wont appear here
you need to modify / add / delete / nop / do whatever in exes physicallly available space
you cant save to exe if you have code in page alignment / section alignment padding space