How to calculate the position of the sun in long/lat?

Question: I have a world map, and I want to know, given a timestamp, where is the sun located right now, in terms of long/lat.
Here is a website that does that:
https://www.timeanddate.com/worldclock/sunearth.html
But they do not share the calculations.
How can I calculate the sun's position in earth gps terms given a timestamp?
Edit: some context
I have a plane that is determined by 2 points on earth, and that plain is perpendicular to the earth in those points. I want to know where is the sun relative to that plane, so I can know if the sun is to the right of it, or to the left of it.
Instead of working in 3 dimensions, I decided to work in 2. I already have that plane in 2D (just a line on the map), now I need to know where the sun is
Edit2: Using the wiki page here, this is what I got so far
Note: The interesting part is getCurrentPosition
class Sun {
    private julianTime(timestamp: number) {
        // Source: http://stackoverflow.com/questions/466321/convert-unix-timestamp-to-julian
        return timestamp / 86400 + 2440587.5;
    }

    private convertEclipticEquatorial(lambda: number, beta: number, R: number, n) {
        const epsilon = 23.439 - 0.0000004 * n; // Obliquity of the ecliptic
        console.log("epsilon", epsilon);
        const alpha = Math.atan2(Degrees.cos(epsilon) * Degrees.sin(lambda), Degrees.cos(lambda));
        console.log("alpha", alpha);
        const delta = Math.asin(Degrees.sin(epsilon) * Degrees.sin(lambda)); // declination
        console.log("delta", delta);
    }

    getCurrentPosition(timestamp: number) {
        const JD = this.julianTime(timestamp);
        console.log("JD", JD);

        // Source: https://en.wikipedia.org/wiki/Position_of_the_Sun
        const n = JD - 2451545;
        console.log("n", n);
        const L = (280.460 + 0.9856474 * n) % 360;
        console.log("L", L);
        const g = (357.528 + 0.9856003 * n) % 360;
        console.log("g", g);
        const lambda = (L + 1.915 * Degrees.sin(g) + 0.020 * Degrees.sin(2 * g)) % 360;
        console.log("lambda", lambda);
        const R = 1.00014 - 0.01671 * Degrees.cos(g) - 0.00014 * Degrees.cos(2 * g); // Distance
        console.log("R", R);

        this.convertEclipticEquatorial(lambda, 0, R, n);
    }
}

class Degrees {
    static sin(angle: number) {
        return Math.sin(angle / 180 * Math.PI);
    }
    static cos(angle: number) {
        return Math.cos(angle / 180 * Math.PI);
    }
}

console.log(new Sun().getCurrentPosition(new Date().getTime() / 1000));

Running this now, gives:

JD 2457844.130512928 (can confirm, this is correct)
n 6299.1305129281245 (simple math)
L 9.181612328272422 (simple math)
g 85.95292328111373 (simple math)
lambda 11.09465308568091
R 0.9990992788207762
epsilon 23.436480347794827 (can confirm, that is roughly correct)
alpha 0.17801325468993906
delta 0.0766106706512887
Comment: Glad I could help. I didn't know there was a wiki page with the relevant equations so that's good to know. Feel free to answer your own question and accept it if that information is sufficient for you.
Comment: @zephyr I'll answer it once I have some code taking a timestamp and returning the sun's position
Comment: What tools do you have access to? How are you calculating this? If you're trying to do this from scratch, you're in for a rough time.
Comment: @zephyr Well, I have internet access, not much more. I love cracking tough problems. Perhaps can you point me in the right direction?
Comment: This is a really tough problem though. There are people at NASA whos entire job is to do just stuff like this. There's no single source I could point you to that would help you do this yourself. Basically though, you'll need an ephemeris for a particular time period, the ability to progress that ephemeris forward in time to your specific date, and then lots of math to convert the ephemeris info into what you need. Your best bet might be to look at some code by someone who's already done something like this (e.g., http://www.clearskyinstitute.com/xephem/) and copy what they've done.
Comment: @zephyr That really helped! In their source code, I found references to VSOP87, and in a page mentioning VSOP87 I read about VSOP. apparently, someone already did all of the hard work, here https://en.wikipedia.org/wiki/Position_of_the_Sun
and those equations have 0.01 degrees precision, until 2050, so I am set for the next 30 years.

Thanks for the point in the right direction!
Comment: There is an Excel spreadsheet authored by Greg Pelletier that might get want you want.
Answer: By latitude and longitude of the sun, I think you mean latitude and longitude of a point on the earth's surface where the rays of the sun fall perpendicular to the surface.
In astronavigation, this point is called the Geographical Position (GP) of the sun and terminology to describe this point is slightly different:-
Latitude of the GP is called Declination, and it is numerically equal to what one might call "Latitude". It is measured in degrees North or South the equator.
Longitude of the GP is called Greenwich Hour Angle (GHA). Just like longitude, GHA is measured East or West of Greenwich Meridian.
Describing the sun's position in this way is called the Equatorial Coordinate System.
The Wikipedia page you have used gives the additional formulae below to convert from Ecliptic Coordinates (the steps you followed) to Equatorial Coordinates.

Follow these steps to determine Declination $\delta$ (Equivalent to Latitude).
To get the sun's GHA, you need to first calculate $RA$ (Right Ascension) as shown above and then convert this to GHA by these= rules...
$SHA° = 360 – 15 · RA[h] $
$GHA_{Aries}° = 15 · GST[h] $
$GHA = SHA + GHA_{Aries}$
For the second step, you will need $GST$ (Greenwich Sidereal Time) which is you can calculate if you know UT (UT can be obtained from the time shown by a clock). Use this link to convert directly from UT to GST
If you want a simple, concise way to be able to calculate the positions of all manner of celestial bodies, the sun, moon, planets, stars, then I highly recommended the book Astronomical Formulae for Calculators by Jean Meeus. It is the simplest, most comprehensive collection of astronomical formulae you are likely find anywhere on earth.
Comment: Isn't the longitude the negative of the GHA of the Sun? https://en.wikipedia.org/wiki/Hour_angle says hour angles are negative-to-east, but longitudes are typically negative-to-west, right?
Answer: If you don't need this precisely, the easy way to figure this out would be the following:
You can assume that at noon UTC on one of the equinoxes, the Sun will be directly over (0N, 0E). The longitude of the sub-Solar point will then progress evenly over the course of a day: 4 hours later it's at 60W, 12 hours later at 180W, 18 hours later 90E, etc.
The latitude of the sub-Solar point will either increase or decrease (depending upon the starting equinox) as a sine curve with a period of year and an amplitude equal to the axial tilt of the Earth (23.43705 degrees).
That will be good to ~5 degrees over the course of the year.
To get a more precise answer, you'd need to calculate the Analemma over the course of the year, and position the sub-Solar point accordingly. Formally, this would mean calculating the Equation of Time and transforming the resulting time offset into a position offset for the sub-Solar point. E.g., what's happening in this image.
I'm not familiar with how to do that, so hopefully someone else can help - or the simple way above works.
Comment: Thanks for the answer! That indeed is a way to calculate this, and I will use it in case I fail the current route (as this is more or less a rough approximation). I have edited the question, with some code, and the result, however, I'm failing to understand what do I need - ecliptic/equatorial/horizontal coordinates. Given the numbers in the result, what do I need to do to get long/lat?
Comment: Amit, once you get the equatorial coordinates, you should be there. Equatorial coords are for objects in the sky, but you can "project" them down onto the surface of the Earth to find the sub-Solar point. That is: alpha = long., delta = lat.
Answer: I've implemented what Thomas suggested as an approximation. It seems to do its job for a small rendered globe toy in JavaScript.
function getSunEuler(date) {
        const now = date || new Date();

        // The boilerplate: fiddling with dates
        const soy = (new Date(now.getFullYear(), 0, 0)).getTime();
        const eoy = (new Date(now.getFullYear() + 1, 0, 0)).getTime();
        const nows = now.getTime();
        const poy = (nows - soy) / (eoy - soy);

        const secs = now.getUTCMilliseconds() / 1e3
                + now.getUTCSeconds()
                + 60 * (now.getUTCMinutes() + 60 * now.getUTCHours());
        const pod = secs / 86400; // leap secs? nah.

        // The actual magic
        const lat = (-pod + 0.5) * Math.PI * 2;
        const lon = Math.sin((poy - .22) * Math.PI * 2) * .41;

        return new THREE.Euler(0, lat, lon, 'YZX');
}

The returned Euler angle can be used to transform an X unit vector to find a point on a sphere where 0 N 0 E is at (1, 0, 0).
I got curious how accurate the solution is and fiddled with Skyfield a bit to get closer to the truth:
from skyfield.api import Topos, load
ts = load.timescale()
planets = load('de421.bsp')
sun = planets['sun']
earth = planets['earth']
t = ts.utc(2019, 6, 21, 12, 0, 0)

# A rather correct answer can probably be obtained from
earth.at(t).observe(sun).apparent().position.au
# but I ended up being too lazy to calculate the angles myself

# This serves as a convenient workaround for manual verification
np = earth + Topos('90 N', '180 W')
np.at(t).observe(sun).apparent().altaz()

The approximation seems to be indeed accurate within a few degrees, but is in an different coordinate system. I'd love it if someone could provide a clean solution using skyfield.


Do full flow rocket engines still use injectors? If so, how? How exactly are the oxidizer and fuel sent into the combustion chamber?

Question: I'm learning about rocket engines and full flow engines, and I'm a little confused about what goes on in the combustion chamber. It was my understanding that injectors were pretty much necessary to diffuse the oxidizer and fuel and maintain a stable reaction. How is the hot gas from the preburner or turbopump sent into the combustion chamber?
Answer: Yes, they still use injectors. They are gas injectors instead of the liquid or mixed phase ones in other engines. The gas injectors serve the same purpose of metering and mixing the propellants that liquid or mixed phase ones do.

Schematic source from SpaceX reddit (validity unknown, but it looks convincing).
Elon Musk also mentioned the Raptor injectors in a tweet.
The SSME wasn't a FFSC engine, but the H2 came into the main combustion chamber mixed with steam as a gas. It went through the main combustion chamber injector as a gas, and the O2 went through it as a liquid.
Answer: Injectors are still used, or the propellants will at some point seep backward. Kaboom. A lot of engine options would be possible if we could get rid of injectors, and their head loss, thermal constraints, corrosion issues, manufacturability and testing, etc. but we can't- kaboom.
Comment: That issue could theoretically be fixed by making the turbopumps powerful enough and the pipes narrow enough that the flow velocity prevents any backwards propagation. However, injectors are also there to ensure rapid and thorough mixing of the two streams. Just using a massive wye to join the two flows would result in half of the combustion chamber running very fuel rich, the other half running very oxidizer rich (often also called engine-rich), and the stoichiometry pretty much uncontrolled overall. The PC term for that is "combustion instability", but "kaboom" will do as well.
Comment: Let's see, severe power gradient, across narrow pipes… that's an injector, t. And since turbopumps cannot be made arbitrarily powerful (often the constraining/pacing component of its project), something that would be called 'an injector' by a reasonable person is called for. Except for some trivial cases, which would likely skip turbopumps anyway (hard to generalize for these outliers).
Comment: Right, I wanted to add "(at which point you have reinvented an injector)" into my first comment but couldn't squeeze it into the character limit :)


Is this the example of polymorphism?

Question: I kinda know what polymorphism is but failed to understand it clearly. Also my code is following:
class Human
{
   public virtual void CleanTheRoom()
   {
   }
}
class Woman:Human
{
   public override void CleanTheRoom()
   {
     //women clean faster
   }
}
class Man:Human
{
   public override void CleanTheRoom()
   {
     //men clean slower, different code here
   }
}
class Child:Human
{
   public override void CleanTheRoom()
   {
     //empty ... children are lazy :)
   }
}

Should I explain this is polymorhism because all derived classes from base class Human contain method CleanTheRoom but each of them it implements differently?
Comment: It's definitely an example of sexism.
Comment: Better stil would be to put the CleanTheRoom method definition in an `IClean` interface and implement that for the types of humans that can clean. Then you get free polymorhpism from being able to cast these humans to this interface.
Answer: The benefit of polymorphism comes when you want to invoke the method on some type of Human, but you don't care which one specifically.
By having CleanTheRoom() defined at the base class level, Human, you can write shorter, cleaner code elsewhere in your application whenever you are working with an instance of Human, whether it be a Child or otherwise.
Polymorphism, for example, lets you avoid lengthy conditional statements where you explicitly check for each type of Human and call a different method:
Good:
private void SomeMethod(Human h)
{
    //some logic
    h.CleanTheRoom();
    //more logic
}

Bad:
private void SomeMethod(Human h)
{
    //some logic
    if (h is Adult)
        CleanTheRoom();
    else if (h is Child)
        GoofOff();
    //some logic
}

Comment: Also a good answer, for the same reasons expressed in the comment to JacobM.
Answer: What you have is a good example of inheritance.  Polymorphism refers specifically to being able to refer to objects of different types by using a single type (the parent class or interface), something this type of inheritance makes possible.  Like so:
List<Human> humans = new ArrayList<Human>();

humans.add(new Woman());
humans.add(new Woman());
humans.add(new Man());
humans.add(new Child());
humans.add(new Child());

foreach(Human hum in humans) {
   hum.CleanTheRoom(); //I don't know the type of hum, but I don't care
}

Say I've been collecting instances of Human from various locations -- I don't know what type each one is.  But I can still iterate over them and call CleanTheRoom(), because they share a parent class.
I'll add a real-world example.  Say I have an Invoice class with various subclasses for different types of Invoices -- maybe there are different kinds of Invoices for service clients versus customers who make one-time purchases.  Sometimes I care deeply about the differences, and I only deal with one type.  But sometimes I want to loop through all of the invoices for this month and print them out.  If the parent class has a print() method (which may well be implemented differently by different types) then I can do that.
Comment: This is the best answer in my opinion. The value of polymorphism becomes apparent when you see it being *used*, not when you see it being *defined*.
Comment: Polymorphism that's based on parent classes is sometimes called "subtype polymorphism" in computer science.  In the context of an object-oriented programming language, I've never seen the word "polymorphism" used to refer to anything other than subtype polymorphism (generics are also a form of polymorphism, technically, but we never refer to them that way).  And going from the other side, I've never come across a form of inheritance that wouldn't permit polymorphism.  So the word "polymorphism" seems sufficient within an object-oriented context.
Comment: I wish there was a succinct term to describe inheritance with polymorphism.  Is there one?
Comment: I'll add that in a real-world setting I doubt I ever use the word "polymorphism" aloud, although I will use "polymorphically", as in "Hey, we should factor out a parent class, so we can refer to all of these types polymorphically."
Answer: Yes, that is correct. And you can call the method CleanTheRoom() without knowing which "kind" of human is it.
Here you have some basic examples.
Answer: I think you fail to see the benefit, that's the key you're missing to fully understand polymorphism. I will try to make an example:
Let's say you have a simple CRUD form. This is the code of the save button:
var Client = PopulateDTO(); //put all the values in the controls, to an object

if(Action==Actions.Create){
  _repository.Create(Client);
}
else if(Action==Actions.Update){
  _repository.Update(Client);
}
else if(Action==Actions.Delete){
  _repository.Delete(Client);
}

this.Close();

This code works, but it's bad code, and difficult to read. Let's use polymorphism (and the strategy pattern):
public abstract class BaseStrategy{
  abstract void Do(ClientDto Client);
}

public class CreateStrategy:BaseStrategy{
  public override void Do(ClientDto Client){
    _repo.Save(Client);
  }
}

public class UpdateStrategy:BaseStrategy{
  public override void Do(ClientDto Client){
    _repo.Update(Client);
  }
}

public class DeleteStrategy:BaseStrategy{
  public override void Do(ClientDto Client){
    _repo.Delete(Client);
  }
}

So, we have an abstract class, and 3 implementations, each one doing something with the client object. Now, the code of the save button in the form will be:
BaseStrategy stg = GetCorrectStrategy();

var Client = PopulateDTO();

stg.Do(Client);

this.close;

And the method GetCorrectStrategy() will instantiate the correct Strategy implementation, depending if the user is creating, editing or deleting the client.
I hope this answer will help you. But if didn't help you, I suggest you read about strategy pattern, It's one of the best uses of polymorphism in my opinion
Answer: Since several people have already given fine examples of polymorphism, I'll offer a different perspective that really helped me to grok it.
In functional programming, functions are the first class concepts in contrast to OOP where objects are supreme.
Polymorphism is to OOP what pattern matching is to FP. Here is a function that uses pattern matching (using an ML style syntax).
 let f x =
        match x with
        | T -> //do stuff with a T to return some value
        | S -> //do stuff with an S to return some value
        | U -> //do stuff with a U to return some value
        | V -> //do stuff with a V to return some value

So when you use the function f, you can pass it an object of either type T, S, U, or V. In strongly typed FP languages like F#, the type of x is denoted T|S|U|V. Such types are commonly referred to as Sum types or Tagged Unions.
If we fix up your example to make Human an abstract class, then it will become clear that polymorphism in OOP just gives you a way of expressing a sum type.
Thus, CleanTheRoom is a function that takes a type Human. But Human is just the name for the type Man|Woman|Child which is a sum type. The big difference between languages like C# and functional languages like F# is that one treats objects as top level things while the other treats functions as top level things. Also, everything in OOP languages like C# must have names. In a functional language we could denote the type Man|Woman|Child without having to explicitly name it.
The key is not to think of the code as having different CleanTheRoom methods, but rather think of CleanTheRoom as one method that takes a type Man|Woman|Child (which is named Human). Polymorphism is just the implementation detail.
In summary, polymorphism (especially with abstract classes) basically just give you a way to name sum types and do pattern matching.
See:

http://en.wikipedia.org/wiki/Tagged_union
http://en.wikipedia.org/wiki/Algebraic_data_type
Answer: An example in C#:
This is my class file
class parent
    {
        public virtual string saySomething(string s)
        {
            return s+":Parent";
        }
    }
    class man : parent
    {
        public override string saySomething(string s)
        {
            return s+":Man";
        }
    }
    class woman : parent
    {
        public override string saySomething(string s)
        {
            return s+":Woman";
        }
    }
    class child : parent
    {
        public override string saySomething(string s)
        {
            return s+":Child";
        }
    }

Create Four Buttons and a label.
Here is the implementation on a simple form1
private void Form1_Load(object sender, EventArgs e)
        {
             p1= new parent();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            label1.Text = p1.saySomething("I am parent!");
        }

        private void button2_Click(object sender, EventArgs e)
        {
            p1 = new man();
            label1.Text = p1.saySomething("I am man!");
        }

        private void button3_Click(object sender, EventArgs e)
        {
            p1 = new woman();
            label1.Text = p1.saySomething("I am woman!");
        }

        private void button4_Click(object sender, EventArgs e)
        {
            p1 = new child();
            label1.Text = p1.saySomething("I am child!");
        }

Is it run-time polymorphism?
P1 is an object. Depending upon the situation (Context), a button click, it is executing different piece of code. So, p1 is behaving differently depending upon the click event.
Comment: If you look at this example side-ways it is polymorphism.  But this example does not really show the power of polymorphism.
Answer: class Program
{
    static void Main(string[] args)
    {
        List<ICleanTheRoom> cleanerList = new List<ICleanTheRoom>
            {
                new Child(),
                new Woman(),
                new Man()
            };
        foreach (var cleaner in cleanerList)
        {
            cleaner.CleanTheRoom();
        }
    }
}

internal interface ICleanTheRoom
{
    void CleanTheRoom();
}

// No need for super type

//class Human : ICleanTheRoom
//{
//   public virtual void CleanTheRoom()
//   {
//   }
//}

internal class Woman : ICleanTheRoom
{
    public void CleanTheRoom()
    {
        throw new NotImplementedException();
    }
}

class Man: ICleanTheRoom
{
    public void CleanTheRoom()
    {
        throw new NotImplementedException();
    }
}

class Child: ICleanTheRoom
{
    public void CleanTheRoom()
    {
        throw new NotImplementedException();
    }
}

Answer: Is it a new object created  each time at runtime, clearly inheriting but no polymorphing.

Is this the example of polymorphism?


Unable to catch 403 error in Application_Error

Question: I have asp.net mvc 4 site hosted in IIS 7.5. I'm handling all the http errors manually in the Application_Error handler. Everything is fine except the 403 error(for example when navigating to the http://mysite/App_Data). The problem is that the Application_Error doesn't catch this error. Could someone tell me how to get it working?
EDIT
I found out that the Application_Error catches only exceptions thrown in the managed modules. Since 403 error (in my case it's 403.14) is thrown by the DirectoryListingModule which is unmanaged, this error cannot be caught by the Application_Error. Also, it might be 404.7 or 404.8 errors handled by the RequestFilteringModule(also unmanaged). The only way I found to customize the handling of these errors is to use the following settings:
  <httpErrors errorMode="Custom" existingResponse="Replace">
      <error path="/Error/Forbidden" statusCode="403" subStatusCode="14" responseMode="ExecuteURL"/>
      <error path="/Error/NotFound" statusCode="404" subStatusCode="7" responseMode="ExecuteURL"/>
      <error path="/Error/NotFound" statusCode="404" subStatusCode="8" responseMode="ExecuteURL"/>
  </httpErrors>

having the ErrorController with the NotFound action. But there is one drawback with this approach for me - the original request data that causes the error is lost(because a child server-side redirect is performed) and I have no way to get it(at least I don't know how).
So, now I'd like to change my question: Is it the only way to handle such errors ? And are there ways to get the original request data when using the httpErrors approach?
Answer: Set runAllManagedModulesForAllRequests to true in web.config in modules under system.webServer.
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    ...
</system.webServer>

Comment: Can you please explain what does mean  `runAllManagedModulesForAllRequests="true"` ?
Comment: @ManirajSS http://stackoverflow.com/questions/11048863/modules-runallmanagedmodulesforallrequests-true-meaning


2004 LEXUS GX470

Question: I have a 2004 Lexus GX470.  I am having this problem where as I accelerate, my RPM goes up to like 5/6 and my speed is not going up.  If I back off the pedal and try again it sometimes will accelerate.  It doesn't happen every time I accelerate, but has all of a sudden started happening.
Comment: Automatic or manual trans?
Comment: @mikes ... I bet it's a clutch as well.
Comment: It is an automatic transmission.
Answer: It could be one of several things, all of them pertaining to the transmission. Whatever the issue turns out to be, it is slipping. Either something is worn out, or is not doing it's job. Just rattling things off, this is what I've come up with, but do not consider the list exhaustive.
First of all, it could be fouled transmission fluid. You can pull the transmission dipstick and check the fluid. If it looks brownish and/or has a burnt smell, this could be an issue. You could quite possibly get the fluid flushed, but this could provide other issues, depending on how often it has been changed in the past. If routine maintenance has been done, you shouldn't have any fears about changing it now. If it has never been changed, it may lead to problems. When you flush an automatic transmission, it can clean out sediments which are actually helping it to work. By removing these, you can cause the death of a transmission. Only cure after that is complete rebuild.
Second, it could be one of the servos is getting weak. The servos cause the bands to grip tightly. If one is losing it's power, it could be allowing it to slip. Getting a servo replaced is a relatively inexpensive item (when you consider a transmission rebuild). Along these lines, sometimes the computer can cause problems. You might want to have it checked to see if has a recall for transmission issues. A reflash can sometimes cure these types of problems.
Thirdly, it could be the pump failing. If the line pressures go down during operation, it could allow the bands or clutches to slip. If the transmission fluid filter is plugged, it could be exhibiting the same type of issue. Transmission could just be due some maintenance, but if the pump is going out, it would entail a rebuild.
Fourthly, your transmission could just be worn out and need a rebuild.
EDIT:
Something else which could potentially be the issues is, your car may be low on transmission fluid. While this sounds like an easy fix (just add fluid), it would mean there is a leak somewhere. Transmissions don't lose fluid unless there is a leak (it doesn't burn/eat it like an engine can engine oil). If you've seen any spots on the driveway or in the garage, this may be what you're looking at. In this case, it could be a leaking seal or a pan gasket. Depending on where the leak is originating from, it could be an inexpensive fix or moderately expensive (the amount of labor directly affects the cost).

2004 LEXUS GX470


Do I need a software firewall?

Question: I have a router, that has built in hardware firewall capabilities, do I need to install an additional software firewall on my Windows 7 PC like ZoneAlarm?
Answer: I agree with AlexN.  For most home situations a personal firewall on your machine is totally not needed.  This is a different case if you were to put the machine into the DMZ of your network to act as a server(one that can be accessed from the outside like a webserver or a ssh server).  Though in most cases NAT would be more appropriate.  As stated above just make sure that that the firewall on the router is enabled, and keep the firmware up to date.  Exploits against the router are occasionally still possible, and the only way to patch them would be with a firmware update.
Comment: NAT routers protect against a lot of potential attacks. But run a virus scanner on your computer no matter what. I used to think I didn't need one, until the end of last year when I was innundated with malware. Viruses have become commercially viable and recently more than half of the Fortune 1000 companies globally were infected with a Spanish controlled botnet. It's not a matter of if, but when, your computer will be attacked nowadays.
Comment: In general the efficacy of virus scan software is very poor.  I should qualify that my comment was meant for a non commercial setting.  I do agree with the use of virus scanning software is a good idea in a business.  The reality is most people will get a copy of something, not update it or not keep there subscriptions of definition files up to date, think that they are protected, and make poor choices instead of really thinking about what they download or open.  I know that this is very simplistic and ignores a few classes of attack.
Answer: Unless you want to do advanced things with it, don't bother.
Just make sure your hardware firewall blocks anything except what you explicitly allowed to enter your network and you will be fine.
Answer: If you have your router properly configured, the Windows Firewall that comes with your Windows 7 will be good enough for most cases. Generally, I'd be more worried about malware sending out stuff then anything getting in, which I believe Windows Firwall will handle (it gives a pop "do you want to give ... access to the internet")

Do I need a software firewall?


Observing bank and public holidays while working remotely for a foreign company

Question: Which countries bank and public holidays do I observe if I work remotely in one country for a company in another country and where both countries do not have identical holidays? Do I observe the holidays for the country I live in or the country the company is based in?
Comment: When you say you remotely in country B for a company in country A, do you mean the company sent you to work at the company's office (or client's office, etc.) in country B, or you work at your own place in country B?
Comment: @UchihaMadara My own place in country B.
Comment: Are you a contractor or an employee? If you're an employee all the existing answers are wrong.
Comment: Please note that the accepted answer at this moment is wrong. Your government decides about public holidays, not a company in a random foreign country.
Answer: Only your reporting manager/HR can answer this
Would likely differ on a case-by-case basis
You should consider consulting your reporting manager/boss on this. Depending on the work culture and your roles/responsibilities, HR personnel may need to be consulted/involved in the decision making too.
By leave, a general understanding is that you would be taking a day (possibly paid) off. The number of leaves you'd take would also need to be in line with the total allowed number of days of leave in a given period (month/year) as per the norms defined by the company for your role.
The exact answer would also vary depending on the leave type. For example, if it's a festival/national holiday in the company's country of operations, it would be a day off, and you'd not be expected to work. But it it's a festival/holiday in your country of work/residence, you'd have to request a leave explicitly (if needed).
A general advise when confronted with such a situation is to discuss the same with your manager well ahead of time, so the necessary action could be planned appropriately.
Comment: This is wrong. Not your HR department decides about holidays, but the government of the country you're working in. If it's a holiday in the county you live in, you need special approval to work.
Comment: @Chris That depends entirely on where the OP lives (and possibly where the company is). You don't need special approval to work federal holidays in the United States, for example.
Comment: @BSMP That means the answer is at least partially wrong, because the question isn't country-specific.
Answer: Ask your manager.
The two companies will have these things set out in the contract. If they don't, your manager is still the one to figure this out.
Answer: It happened to me once. I asked the company at home and the guys I worked with for four weeks in the foreign country. We decided that what makes most sense is working the same days as the people you are currently working with (I wouldn't have been able to work in an otherwise empty office anyway), and your amount of available holiday is calculated based on the rules at home. Whether that's legal or not, I have no idea, but everyone involved thought it was reasonable so that's what we did.
If you are forced to take a holiday you didn't want to take, you need to discuss this with your manager or HR at home.
Answer: This is something which has no clear answer but needs to be clear from the start, so if you want to settle this right, you do this before you start working for the company in your contract negotations.
In these negotiations you can see what the company expects from you and at which days they expect you to work and at which days they don't expect you to work.
You on the other hand, you can tell them your requirements: what salary you want, and what holidays you really can't miss.
After negotiating, you and the company reach a deal and that's when you know which days to work and which days you are free.
Don't leave these things implied.
Answer: The correct way is you take your leave based on the norm there = for example in the UK Scotland and Northern Ireland have different public holidays.
All the answers don't seem to realise that if you working in country A you have to follow that countries rules - we do this at my place with teams working in the UK, Russia and Ukraine
Comment: @Chris - Workplace is extremely biased against America not towards it.  I see numerous users say extremely negative things about the USA.


Is it possible to limit clipboard access on a per application basis in windows?

Question: Hopefully this one is easy enough to understand, but is it possible to limit clipboard access on a per application basis, specifically in Windows 7, but I'd assume it would apply to most other versions of windows as well.
Basically, if I were to copy something to the clipboard, it seems that nearly every running application has access to that information.  Most don't seem actually do anything with it unless you push ctrl+v or click something.  However, I've noticed some applications being able to automatically fill in information with data from my clipboard before I actually paste it.  I'm assuming that most applications would then be able to access the clipboard contents at anytime.  I've seen "monitoring" applications that log/send clipboard contents periodically so what's to stop anyone from doing the same with a popular application for data mining purposes?
Is there any way possible to prevent this or have some sort of allow/deny system on a per application level?  Essentially a "clipboard firewall".
Comment: clipboard access does not require eslated permission so outside out a sandbox there isn't a way to prevent access to it
Answer: Maybe Sandboxie, a sandboxing software, which has this capability.


Adding a single file to a Subversion repository but not other files along the path

Question: The context is that I have an on off-the-shelf CMS which I want to make customizations to; so I want to keep the files I modify under version control, but I don't see the need to put the whole file tree under version control.
My problem is that I need to add a file to be kept under version control which is located a few subdirectories down, but I don't want to add anything else to the repository asides from the file and its parent folders.
To illustrate, say I have the following file in my project:
project/folder1/folder2/file.txt
I want to add file.txt to the repository, and folder1 is under version control but folder2 is not. There are existing files in folder1 and folder2 which I do not want to all put under version control.
Doing an svn import folder1/folder2/file.txt doesn't seem to work, as then I need to check out the file, and even if I delete the local version first, SVN complains that its parent folder exist. I presume that this means that if I use the --force option this would just clobber the contents of these folders.
The problem with svn add folder1/folder2/file.txt is that it requires each parent folder to be in the repository already (I gather from the fact that it can't find the folder2/.svn/entries file), but only folder1 is in the repository. So I figured I could do svn add folder1/folder2 first. The problem is that this puts the entire contents of folder2 into the repository, which I don't want. It seems the solution would be to do svn add --depth=empty folder1/folder2 which just adds the folder and no contents, but the --depth option is a new feature in Subversion 1.5, whereas I'm using 1.4.2 and it would good to avoid upgrading at this point.
So I'm wondering if there is a way around the lack of a --depth option in older versions of Subversion? Or is there another way of solving this problem" I'm also wondering if perhaps the way I went about setting it up in the first place was not so helpful.
Answer: You should add the folder with the option "--non-recursive":
svn add --non-recursive folder1/folder2

Comment: I saw that option but for some reason thought it would mean add each sub item, but don't descend any further. But it did exactly what I was after, thanks :)
Answer: If your client version is 1.5 or above, you can simply use
svn add --parents folder1/folder2/file.txt

to have the file and its parent directories added.
Comment: This answer deserves more attention.  These days, this is a _much_ faster solution than the other answers.
Answer: You can also use the quick version, "-N", which is the short form of "--non-recursive", as in
svn add -N folder1/folder2


How to overcome a spiritual rut and a feeling of emptiness in my heart?

Question: وَبَرَكاتُهُ اَلسَلامُ عَلَيْكُم وَرَحْمَةُ اَلل
I am a good Muslim, or so I hope. I always prayers on time, read Quran, don't listen to music, and am kind to my family and friends. However, recently I have been feeling nothing in my heart when I am reminded of Allah SWT unlike how I used to before. I feel like I'm looking for the approval of people now more than ever before. And recently I had sinned, yet I felt nothing. I still repented, of course, but I fear where I'm heading if I stay like this. I felt no guilt for the sin I committed and had to force myself to feel any sort of emotion. I really need help on this matter.
جَزَاكَ ٱللَّٰهُ خَيْرًا
Answer: Wa`alaykum ussalam warahmatullahi wabarakatuh
May Allah SWT accept your sincerity in wanting to be closer to Him. Being stationary in one's spirituality is a difficult place to be, but it's a good sign that you want to remedy it. He SWT wants you to turn to Him.
See what you can change up. If you're praying on time, can you learn something more about the prayer to be more mindful during it? Can you memorize some more Qur'an to recite in your prayers? Can you add sunna prayers? Can you wake up before Fajr and tell Him exactly what you wrote above while you are in sajda? He alone is the one that can change hearts - and if He doesn't will it, neither you nor anyone can make it happen.
When you're reading Qur'an are you also reflecting on it? Are you listening to how people have understood those ayat? There is so much content available now in English even that we can benefit from. Heart-softeners, explanations of the unseen and afterlife, and things like that.
Are you doing your daily morning and evening adhkar and reflecting on them? Are you striving to learn about the Prophet (saws) and do you have long-term goals in improving your character and habits based on his sunna?
If you're feeling too comfortable, it's time to change it up and take it to the next level. We Muslims are always balanced between fear and hope. If you're not really feeling either, then learn and reflect until you bring them back into your life.
May Allah SWT soften our hearts and allow us to meet Him in a state where He is pleased with us.


Running multiple UF wires in a single trench

Question: I'm taking power from a 100 amp subpanel in an outbuilding and running three branch circuits: two to small outbuildings for lights, one to a horse waterer that draws 1.5 amps. Two questions: can I run the three UF wires in a single trench for the first 50 feet?  Do I bring all three UF wires into the power source building in a single LB or do I put in three LBs?
Comment: I would conceiter putting in a small sub panel then you can have local breakers and will only take 1 larger feeder and can be taken to the separate locations from the box.
Comment: He already has a sub panel, the problem I think he has is that he is wiring to 3 different locations, and wants to run the cables to a point of divergence which presumably is in the middle of his yard somewhere.  There wouldn't be a place there to put a sub panel.
Answer: IME, IMHO, UF is a terrible idea, but you can certainly put 3 UF in one trench, and you COULD bring them in through one (HUGE) LB - the LB needs to be HUGE because oval wire is treated as round wire of the largest dimension of the oval for conduit fill purposes, and 3 wires does not get the one-wire higher fill percentage. Also practically speaking you'll appreciate having the space to get the job done with less swearing.
I would STRONGLY recommend conduit and individual (wet rated) wires. The trench is the expensive part. Conduit means never having to dig the trench again, while direct burial means you might have to do that. Not infrequently conduit and wire is competitive with or actually cheaper than direct burial wire.
Comment: Seconding the conduit recommendation -- not having to oh, tear up a driveway because something broke or you needed more wires is a lot nicer than the alternative!
Comment: Yes, certainly if any of this goes under something paved, it should be all conduit.


Help with finding a Windows RT port

Question: So far I've been getting a good bit of non-answers by other linux forums for a port (that works) of ubuntu for a Surface RT. I just want a dl link or a detailed walk through on how to make one myself, seeing as I am not a dev. I understand how to install ubuntu, and that's about the extent of my knowledge on the subject.
Answer: As far as I'm aware, there is no Ubuntu port for Surface RT, though you can run Ubuntu on Surface Pro
Those are completely different types of computers that are entirely incompatible with each other.

Help with finding a Windows RT port


How to finalize manual and automation scenarios during sprint

Question: I have to finalize manual and automation scenarios and give it to the client at the start of the sprint. How to finalize manual and automation scenarios in this scenario?
Comment: Welcome. What do you mean how to finish it? Why not? What's holding you back from finishing it?
Comment: Why vote to close after only 1 hour? Let's try to be a welcoming community and give the OP a chance to clarify before voting to close.
Comment: @LeeJensen https://meta.stackexchange.com/q/98022/248731. If you think it should be closed, vote to close it - it's not an irretrievable state, and the OP gets prompted to edit for reopening.
Comment: Surely this encourages new people to raise questions in near future! And by the way...just downvoting without giving a reason is not polite. This guy is new - pavelsman did the rigth way, asked him a question and giving him a chance to modify/add his question.We should do the same.
Comment: Upvoted since this hopefully can lead to an interesting discussion
Answer: Note that a test is a performance, not an artifact.
One does not "delivers a test".
I can interpret your question in two ways:
1 - An estimation problem: You feel you don't have the tools and skills to understand your scope and grasp an idea of the effort necessary to do a professional job, although probably you are capable of doing the work itself.
2 - A communication problem: You don't have the skill to communicate properly with some person that matters what the results of your investigations were (aka testing).
An answer to both problems will be: It depends on your context (which we can help if you give more details).
Generally speaking, for starters, I would suggest Bob Martin "Effective Estimation (or: How not to Lie)" talk (here is a nugget of this presentation) for the problem (1) and Michael Bolton's "Breaking the Test Case Addiction" 9-part blog post series, where he talks about the problem of considering tests/testing as artifact generation and alternative ways to understand and communicate your testing (as a performance).


The relationship about sub-unit ball and sub-elliptic ball

Question: Let $\Omega$ be a bounded open domain in $\mathbb{R}^{n}$ with smooth boundary.$\{X_{1},\cdots,X_{m}\}$ be smooth real vector fields on $\Omega$ Which satisfy the Hormander condition. If $\gamma$ is an absolutely continuous mapping of of an interval $[a,b]$ to $\Omega$, we say that $\gamma$ is a sub-unit mapping, if for almost all $t\in[a,b]$ on has
$$ \gamma'(t)=\sum_{j=1}^{m}a_{j}(t)X_{j}(\gamma(t)) $$
with
$$\sum_{j=1}^{m}|a_{j}(t)|^{2}\leq 1$$
The Carnot-Caratheodory 'distance' between two points $p,q\in M$ relative to the vector fields $\{X_{1},\cdots,X_{m}\}$ is then defined to be the infimum of those $\delta>0$ such that there is a sub-unit mapping from an interval of length $\delta$ to $\Omega$ joining $p$ and $q$.that is
$$ d(x,y)=\inf\{b-a|\exists \gamma(t)~~\text{with}~~ \gamma(a)=x,\gamma(b)=y. \gamma~~\text{is a sub-unit mapping} \}  $$
Due to vector fields $\{X_{1},\cdots,X_{m}\}$ satisfy the Hormander condition on $\Omega$. we always have $d(x,y)<0$. we can define the sub-unit ball as
$$ B_{d}(x,r)=\{y\in\Omega| d(x,y)<r\} $$
Let $\{Y_{1},\cdots,Y_{q}\}$ be smooth real vector fields choose from
$$ \{X_{1},\cdots,X_{m},\cdots[X_{j},X_{k}],\cdots,[X_{j}[X_{k},X_{l}]],\cdots\} $$
and satisfy the following condition:
(1) For every $x\in \Omega$,the vectors $\{Y_{1}(x),\cdots,Y_{q}(x)\}$ span $\mathbb{R}^n$
(2) For every pair of indices $1\leq k,l\leq q$,there are functions $c_{k,l}^{1},\cdots,c_{k,l}^{q}\in C^{\infty}(\Omega)$ such that

$$ [Y_{k},Y_{l}]=\sum_{m=1}^{q}c_{k,l}^{m}(x)Y_{m} $$
For $1\leq m\leq q, c_{k,l}^{m}(x)=0$ if $d_{m}>d_{k}+d_{l}$

here $d_{i}$ means the degree of $Y_{i}$ like N.S.W <Balls and metrics defined by vector fields I: Basic properties> defined . Then for $x,y\in \Omega$ let $AC(x,y;\delta)$ denotes the set of all absolutely continuous mappings $\phi:[0,1]\to \Omega$ such that for almost all $0\leq t\leq 1$.
$$\phi'(x)=\sum_{j=1}^{q}a_{j}(t)Y_{j}(\phi(t)) $$
with
$$ |a_{j}(t)|<\delta^{d_{j}} $$
The metric $\rho$ can be define
$$ \rho(x,y)=\inf\{\delta>0|AC(x,y,\delta)\neq\varnothing\} $$
and for the metric $\rho$, we can define the sub-elliptic ball
$$ B_{\rho}(x,\delta)=\{y\in\Omega|\rho(x,y)<\delta\} $$
In N.S.W <Balls and metrics defined by vector fields I: Basic properties> , we know that the sub-elliptic ball has the ball-box theorem that can estimate the volume of $B_{\rho}(x,\delta)$. but in many articles such as Feffermann and Phong's article <Subelliptic Eigenvalue problems> and Jerison and Sanchez-Calle's article <Estimates for the heat kernel for a sum of squares of vector fields>  it relate the volume of $B_{d}(x,\delta)$. Now, What's the relationship between sub-unit ball $B_{d}(x,\delta)$ and sub-elliptic ball $B_{\rho}(x,\delta)$ ? Are they equivalence ? if not, Can we have some property's like ball-box theorem for $B_{d}(x,\delta)$ ? Can we compute the volume of $B_{d}(x,\delta)$ ?
On the other hand, in a old article wrote by David Jerison and Antonio Sanchez-Calle < Subelliptic, Second order differential operators>, the third part  the ball $B_{L}(x,r)$ he defined in the article is sub-unit ball $B_{d}(x,r)$, then it wrote "In the Hormander-type case Nagel,Stein, and Wainger have proved that the ball $B_{L}(x,r)$ is comparable to the image under the exponential mapping of an appropriate cube $\cdots$", That confused me so much, because in N.S.W's article , it just deal with the sub-elliptic ball $B_{\rho}(x,r)$ not the sub-unit ball $B_{d}(x,r)$. Can anyone help me? Thank you very much in advance!
Answer: If I understand your question correctly, I think the fact that the balls you call "sub-unit" and "sub-elliptic" were proved to be comparable in Theorem 4 of Nagel, Stein, and Wainger's paper.


unetsim: Is there a functionality to move a node from one coordinate to another by specifying the coordinates only and not velocity or direction?

Question: I'm trying to move a mobile AUV (node) on a particular path by specifying coordinates in the form of (x,y,z). As far as I have explored, UnetSim only offers nodes to move by specifying velocity and directions. Is there any way to make a node move to a particular set of locations in order after being deployed?
Answer: The MobilityModel in UnetSim Nodes has a mechanism to define piece-wise location information for various times in the Simulation.
The node.motionModel property is a List of HashMaps which can contain any of the following keys:

time: Time at which the mobility action is valid.
location: Coordinates ([-50.m, -50.m, 0]).
speed : Speed in mps (1.mps).
heading : Heading in degrees (30.deg).
turnRate: Rate of turn (1.dps).
diveRate: Rate of diving (-0.1.mps).

So using the time and location key we can achieve what you are trying to do.
The UnetIDE comes bundled with an example for simulating mobility. In this example, there are 4 sub-examples of various ways mobility can be simulated.
The 3rd example, Triangular motion (with diving), can be easily updated to indicate coordinates at various points of time during the simulation as follow.
println 'Simulation AUV-3: Triangular motion (with dive)'
simulate 15.minutes, {
  def n = node('AUV-3', location: [-50.m, -50.m, 0], mobility: true)
  n.startup = trackAuvLocation
  n.motionModel = [[time:  0.minutes, location: [-50.m, -50.m, 0] ],
                   [time:  3.minutes, location: [-100.m, -50.m, 0] ],
                   [time:  4.minutes, location: [-100.m, -100.m, 0] ],
                   [time:  7.minutes, location: [-50.m, -100.m, 0] ],
                   [time:  10.minutes, location: [-50.m, -50.m, 0] ]]

}

This will give the following plot if plotted using the plot-tracks.groovy tool.
Comment: I think this should solve my problem! Thanks a lot :D
Comment: You're welcome. Please accept the answer so other users can find this useful. https://stackoverflow.com/help/someone-answers


Is storing the hash of a key together with ciphertext encrypted with that key secure?

Question: Is it secure to store the hash of a symmetric cipher key along with data encrypted with that key? Are there any circumstances or algorithms in which this combination could lead to potential weaknesses -- or is it always a bad idea? Assume the cipher is AES-128 or -192 and the hash is SHA-256, and also assume that the key was derived from a pass phrase.
Comment: How was the key derived from the passphrase? If done poorly (e.g., `SHA-256(passphrase)`), then storing the hash of the key alongside the encrypted contents is a comically bad idea.
Comment: Also, *why* would you want to store the hash of the key alongside the data it protects? If it's to identify the key that was used to encrypt the data, better is to create a mapping of synthetic IDs (e.g., randomly-generated UUIDs) onto keys. This way, there's no direct link whatsoever between the identifier and the key that protects the data.
Answer: I think this is generally not a good idea, for two reasons.
First, do not generate a key as a hash of a passphrase.  Where possible, you should try to avoid deriving cryptographic keys from passphrases, as passphrases rarely have enough entropy to make a secure crypto key.  If you must derive the crypto key from a passphrase, then be sure to use PBKDF2 (or similar key derivation function), which is specifically designed to mitigate (but not eliminate) some of these risks, by making key derivation a slow process.
Second, if the key is derived from a passphrase, I do not recommend storing a hash of the key.  This may make it easier to mount exhaustive passphrase-search attacks, including facilitating construction of rainbow tables that map from the hashed-key to the original passphrase.  Instead, simply use authenticated encryption.
If you use authenticated encryption, there's no need to store a hash of the key.  You can tell whether a key is correct by trying to decrypt and seeing whether the decryption is authentic.  If it is authentic, you're good; if it isn't authentic, you've got the wrong key.
And you probably want authentication anyway, so this kills two birds with one stone.
Comment: @StephenTouset, agreed, good point!  If that's the issue, then my proposal should be combined with your proposal: store a UUID that uniquely identifies the key together with the ciphertext.  Let's hope that user4328 returns to clarify the nature of his/her requirements.
Comment: Well, if there are large numbers of possible keys, it's probably not feasible to simply use trial decryption against every key.
Comment: @D.W., I would propose that they only need a key ID, and that the key ID is not generated in any way based on information in the key.  (It could be random, sequential, or even a name.)  Having a UUID to identify the combination of key & ciphertext does not help identify which key to use to decrypt.  Having a Key ID tells the decrypting party exactly which key to select (think index in a database).  This is similar to the function of a Subject Key ID OID on an X.509 certificate.  The difference is that a SKID can safely be a hash of the public key without compromising security.
Comment: @JohnDeters, yes, I agree, that's a good scheme -- I thought that's what Stephen Touset was talking about/proposing.
Comment: Indeed it was. :)
Comment: In some scenarios decrypting the data can have a significant cost for a user if he mistakenly enters incorrect passphrase. The solution would be to check if passphrase is correct in advance, though might take reasonable time, but not requiring to process all data.
Answer: It is secure.
I should stress that there is no good reason to do this and several bad ones( i.e. trying to authenticate your data or protect against some kind of attack). You should read D.W.'s answer for a bunch of reasons why you might try to  this and why it doesn't actually solve your problem.
However, it is secure assuming sha256 is hard to invert. If this is the case, than the best an attacker can do is simply try keys and see if they match the hash. This is slightly faster than doing a trial decryption, but not anywhere near fast enough to make it feasible to try all of the $2^{128}$ possible random keys.  If your key is not random, than your construction isn't secure, but it wouldn't be secure even if you removed the hash(because doing trial decryptions instead of a hash compare to find the key is not that much harder).
Formally, if you want a definition in terms of provable security, its secure under the random oracle model (where we replace sha256 with a call to a truly random "function")


revoke and apply privileges on current active sessions

Question: I am revoking some privileges to a user like this:
REVOKE INSERT, UPDATE, CREATE, ALTER ON `name`.* FROM 'user'@'%'

I verify via:
SHOW GRANTS FOR 'user'@'%';

And see that privileges really have removed, but the problem I am now trying to solve is that even after flushing the privileges FLUSH PRIVILEGES;, if the user still logged in, the user can do inserts therefore wondering how could I force the new permissions to users with a current session open.
If the user reconnects the permissions take place, I can not kill the connection since I have only access remotely, any alternatives, suggestions?
Answer: Assume that you revoke a privilege when the user is executing some long-time query which needs in this privilege for successfull execution. This will cause unpredictable break and may result into data unconsistence. So privilege altering cannot be applied to existing session. You can reset the user's connection to force him to reconnect, new privileges will be applied in that case. Of course the best way is to do that only when user's connection is idle. – Akina
If you have suitable permissions, you can kill his connection. Local vs remote is not relevant. Do SHOW GRANTS; for yourself.  From the commandline mysql tool: SHOW PROCESSLIST; to see what the id is, then kill <<that id>>; – Rick James


How do I auto-refresh eww pages?

Question: If I load a local file, I'd like eww to refresh when the source is changed. This would be similar to auto-revert mode. Is there any way to do this? Right now I have to manually refresh by hitting g in the *eww* buffer.
Comment: You should probably fill a bug report requesting `eww` to respect `auto-revert-mode` for local files (also `file-buffer-name` for that matter).  If you don't want to that you can try to combine `(info "(elisp) File Notifications")` and `eww-current-url`.  You might have to map through all `*eww*` buffers when something changes to find the right one.
Comment: If you're comfortable with elisp, then [How can I make ibuffer auto-refresh the list of buffers?](http://emacs.stackexchange.com/a/2179/454) has some useful details on implementing custom support for `auto-revert-mode`, which may point you in the right direction.
Answer: Solution

Start a file-notify watch when opening a file in eww.
In the callback function for that watch, do 2 things:

Reload the *eww* buffer every time the function is triggered by file-notify event.
Log the event descriptors specific to file opening actions in eww. This is because you need to know which file-notify watches to remove when you quit eww (especially if you use the watches for other purposes than this too).

On quitting eww remove all the watches related to eww. You have to make sure that you call this specific function to quit eww and clean up the now-not-required watches.

How to use

Copy the below implementation to your init.el.
Launch any file you want to load in eww using C-u M-x eww-open-file.
Make sure you quit eww by calling modi/eww-quit-and-update-fn-descriptors. For convenience, the default binding q in eww-mode-map is now bound to this function. If you use any other binding to quit eww or to kill windows, make sure you call this function. modi/eww-quit-and-update-fn-descriptors ensures that the eww-specific file-notify watches are removed.

Implementation
(defvar modi/eww--file-notify-descriptors-list ()
  "List to store file-notify descriptor for all files that have an
associated auto-reloading eww buffer.")

(defun modi/advice-eww-open-file-to-auto-reload (orig-fun &rest args)
  "When `eww-open-file' is called with \\[universal-argument], open
the file in eww and also add `file-notify' watch for it so that the eww
buffer auto-reloads when the HTML file changes."
  (prog1
      (apply orig-fun args)
    (when current-prefix-arg ; C-u M-x eww-open-file
      (require 'filenotify)
      (let ((file-name (car args)))
        (file-notify-add-watch file-name
                               '(change attribute-change)
                               #'modi/file-notify-callback-eww-reload)
        ;; Show the HTML file and its rendered form in eww side-by-side
        (find-file-other-window file-name))
      ;; Redefine the `q' binding in `eww-mode-map'
      (bind-key "q" #'modi/eww-quit-and-update-fn-descriptors eww-mode-map))))
(advice-add 'eww-open-file :around #'modi/advice-eww-open-file-to-auto-reload)

(defun modi/file-notify-callback-eww-reload (event)
  "On getting triggered, switch to the eww buffer, reload and switch
back to the working buffer. Also save the `file-notify-descriptor' of the
triggering event."
  (let* ((working-buffer (buffer-name)))
    (switch-to-buffer-other-window "eww")
    (eww-reload)
    (switch-to-buffer-other-window working-buffer))
  ;; `(car event)' will return the event descriptor
  (add-to-list 'modi/eww--file-notify-descriptors-list (car event)))

(defun modi/eww-quit-and-update-fn-descriptors ()
  "When quitting `eww', first remove any saved file-notify descriptors
specific to eww, while also updating `modi/eww--file-notify-descriptors-list'."
  (interactive)
  (dotimes (index (safe-length modi/eww--file-notify-descriptors-list))
    (file-notify-rm-watch (pop modi/eww--file-notify-descriptors-list)))
  (quit-window :kill))

Assumptions

You have only one *eww* buffer open.
This solution requires emacs 24.4 or newer.
Comment: Awesome. Unfortunately file notification doesn't work yet on OS X. I'll give this a shot on my other machine which runs Linux.
Answer: I fixed the same issue with a noob solution so here it is:
I basically added a hook that calls eww-reload on the "other frame" -that supposedly has the web page open- once the markdown gets saved.
This works fine for me as I usually have my window split into two frames only when I'm writing in markdown, one for md and the other for preview -using either doc-view or eww-
So here is the snippet I added to my init.el, please read carefully and edit according to your situation:
(defun compile-md ()
  "Run available makefile that should compile markdown to whatever."
  (interactive)
  (when (derived-mode-p 'markdown-mode)
    (shell-command "make")); that make file uses pandoc to compile md to html
  (windmove-right); supposing the eww frame is on the right
  (when (derived-mode-p 'eww-mode)
    (eww-reload))
  (windmove-left); get back to the md buffer
 )

(add-hook 'after-save-hook #'compile-md)

Comment: You can probably advantageously replace the `windmove-left` with `save-window-excursion` (or even better `save-current-buffer` if you can replace the `windmove-right` with a function which changes the current buffer rather than the selected window).

How do I auto-refresh eww pages?


What are the effects of hebephilia on victims?

Question: Following the Milo Yiannopoulos shebang, I had a discussion with a friend over the effects on a sexually maturing teenager (14ish) engaging in sexual behavior with a significantly older adult (at least 23 years old). In the discussion, we both realized that in fact we were just spewing opinions at each other, and in reality couldn't point to a fair study showing either the negative or positive effects of such practice.
So, I am wondering: Are there any fair studies exploring the effects? (I expect that social attitudes might sway the victim's feelings toward the experience, but hope that studies can somehow control for that.)
Comment: Related question: [What is the effect of viewing pornography on children?](https://psychology.stackexchange.com/q/4229/7001)
Answer: I thought I would edit to add a bit of information.  First of all for those who don't know, (I didn't until I looked it up when I saw this question for the first time), the term hebephilia has been proposed to split pedophilia and denote the erotic preference for pubescent children (roughly, ages 11 or 12-14), but it has not become widely used. Along with hebephilia, there is also Pedohebephilia which is erotic preference on both pedophilic and hebephilic levels.
I would also like to address the issue of Milo Yiannopoulos who seems to have been a topic of discussion, which raised this question.  In the Wikipedia page I linked here and in my edit of the OPs question, it says:

Yiannopoulos stated that sexual relationships between 13-year-old boys and adults can be "perfectly consensual," because some 13-year-olds are, in his view, sexually and emotionally mature enough to consent to sex with adults; he spoke favourably both of gay 13-year-old boys having sex with adult men and straight 13-year-old boys having sex with adult women. (Source 1) (Source 2) He used his own experience as an example, saying he was mature enough to be capable of giving consent at a young age.

The page also states that

Defending himself in a press conference, Yiannopoulos alleged that he had been the victim of child abuse, and that "his comments were a way to cope with it".

I am not going to enter into any debate or express any opinion on what Yiannopoulos said or didn't say — or even what he may have been trying to say — as this is not the forum to do this, but speaking from the standpoint of someone who has, over a period of over 17 years, supported many who have been sexually abused and raped, I can categorically say that different people use many different ways to "cope" with the effects of the past events.  Was he using repression or projection as an ego-defence mechanism? It's difficult to say.
I have been drafting my answer and editing the draft many times in order to make sure I try not to add anything which might inflame the already heated debate over Yiannopoulos, so here goes.
The question raised here is

Are there any fair studies exploring the effects of a sexually maturing teenager (14ish) engaging in sexual behavior with a significantly older adult (at least 23 years old)?

In The Journal of Criminal Law and Criminology there is an article which examines behavioural scientific research on the subject (McCord, D. 1986).

A researcher reviewing the literature on the subject, came to the conclusion that little had been learned about child sexual abuse during the preceding twenty-five years.  He also noted that the literature dealing with the sexual abuse of minors, was "scant, unintegrated, and ambiguous. Books on the topic are rare. Articles are scattered and hidden among a wide range of journals, many in non-accessible medical and legal journals."
One reason for the lack of solid research is simply that the subject is a very difficult one to study. Only a small percentage of cases is ever reported. In those cases that are reported, the participants are often reluctant to discuss the situation. As a result of problems like these there are methodological difficulties virtually built into most research projects in the area.

Comments from research state the following

"Children can exhibit the entire gamut of behaviors in response to a sexual assault, ranging from the negative to the positive." (Burgess, et al., 1978)
"Children's immediate reactions to an assault vary." (Leaman, 1980)
"Incest victims show a wide variety of symptom complaints or may show none at all." (Stuart & Greer, 1984; Sgroi, 1975)
"Even those professionals who have a clinical definition with which they are comfortable will still have problems in identifying sexually abused children." (Mrazek, 1987)

The reason that such a wide variety of symptoms has been noted is that child sexual abuse is very complex situation from the point of view of the victim.  This can perhaps best be illustrated by comparing it with adult rape, which is, by contrast, very unambiguous from the victim's perspective. In adult rape the victim is often but not always coerced by physical force or threats of physical force to engage in sexual activity which he or she does not desire. Under these circumstances, even when there is no physical violence, or threat of physical violence, there is no possibility of the victim enjoying the activity or emerging from the situation with any positive psychological emotions, as consent has not been given. Accordingly, it is not surprising that the reactions of adult victims to forcible rape are remarkably similar to each other and are drastically negative. By contrast, a child sexual abuse victim's feelings may be, and often are, ambivalent. The victim's will is usually much more malleable than an adult's, particularly when the perpetrator may be assuring the child that the activity is normal and even possibly suggesting that it is teaching them what they need to know.
Another point of note which can cause problems for the child in later life is that, although not in all cases, the child may even feel physical pleasure during the activity. As one researcher put it:

Contrary to the stereotype, most victims in our study readily acknowledged the positive as well as the negative elements of their experience. They talked about the times the physical sensations felt good, or they remembered how their sexual experience with an adult or family member satisfied a longing for affection and closeness that was rarely met at any other time. (Finkelhor, 1981)

While this researcher found that 60% of adult women who had been sexually abused as children remembered the experience as primarily negative, only 7% remembered it as primarily positive.
The effects of statutory rape, and childhood sexual abuse is complex and whether or not it may be perceived to be consensual, it is generally believed that informed consent cannot be given by someone under the legal age of consent. (Abel, et al., 1984).
References
Abel, G. G., Becker, J. V., Cunningham-Rathner, J., 1984. Complications, Consent, and Cognitions in Sex Between Children and Adults. International Journal of Law and Psychiatry, 7(1), pp. 69-103. http://dx.doi.org/10.1016/0160-2527(84)90008-6
Burgess, A. W., Groth, N. A., Holmstrom, L. L., & Sgroi, S. M., 1978. Sexual assault of children and adolescents. Lexington, MA: D.C. Health.
Finkelhor, D., 1981. Sexually victimized children. New York, NY: Free Press; London: Collier Macmillan.
Leaman, K. M., 1980. Sexual abuse : the reactions of child and family in U.S. Dept. of Health and Human Services, Sexual Abuse of Children: Selected Readings.
Mrazek, P. B., 1987. Definition and recognition of sexual child abuse: historical and cultural perspectives in Sexually abused children and their families. Oxford; New York: Pergamon Press.
McCord, D., 1985. Expert Psychological Testimony about Child Complainants in Sexual Abuse Prosecutions: A Foray into the Admissibility of Novel Psychological Evidence. The Journal of Criminal Law and Criminology, 77(1), pp. 1-68.
Available Free from: http://scholarlycommons.law.northwestern.edu/jclc/vol77/iss1/1/
Sgroi, S. M., 1975. Sexual Molestation of Children: The Last Frontier in Child Abuse, Children Today, 4(3) pp. 18-21.
Stuart, I. R., Greer, J. G, 1984. Victims of Sexual Aggression: Treatment of Children, Women, and Men. Publisher: Chapman & Hall.
Comment: Re "In adult rape the victim is coerced by physical force or threats of physical force to engage in sexual activity which he or she does not desire." Actually this has been subject of a lot of law changes recently. Simply not giving consent is now considered enough in many legislation for the act to be classified as rape. Famous recent case in Spain: https://www.bbc.com/news/world-europe-46566754
Comment: @Fizz - That is interesting seeing the Spanish case.  Here in the UK, it has always been rape if consent has not been given, unless it is against a man, in which case it is "sexual assault by penetration".  The only other difference I am aware of in law is that marital rape was not accepted but that changed in relatively recent times.  I made a slight change to my wording to reflect non violent rape and sexual assault as you made a good point there and it was a little badly worded.
Comment: _it is generally believed that informed consent cannot be given by someone under the legal age of consent_ – Odd how the capability of informed consent changes when one crosses jurisdictional borders.
Answer: Most recent reviews have been fairly decisive on the negative impact of child sexual abuse in general (though noting much variability in outcomes), but uncertain as to the specific effect of age of onset (hebephilia vs pedophilia):
Beitchman et al (1992):

The existing literature on the long-term sequelae of child sexual
  abuse is reviewed. The evidence suggests that sexual abuse is an
  important problem with serious long-term sequelae;
  ...
  The relation between age of onset of abuse and outcome is still
  equivocal.

Kendall-Tackett et al (1993):

A review of 45 studies clearly demonstrated that sexually abused
  children had more symptoms than nonabused children, with abuse
  accounting for 15-45% of the variance. ... Research is insufficient to
  permit any conclusions about whether early versus late age of onset is
  more likely to lead to greater symptomatology.

Paolucci et al (2001):

A meta-analysis of the published research on the effects of child
  sexual abuse (CSA) was undertaken ... The analyses provide clear
  evidence confirming the link between CSA and subsequent negative
  short- and long-term effects on development. There were no
  statistically significant differences on ds when various potentially
  mediating variables such as ... age when abused ... were assessed.

Maniglio (2009):

Fourteen reviews, including more than 270,000 subjects from 587
  studies, were analyzed. There is evidence that survivors of childhood
  sexual abuse are significantly at risk of a wide range of medical,
  psychological, behavioral, and sexual disorders. ... the results of
  this systematic review do not confirm suspicions that ... age when
  abused ... influence the outcomes of child sexual abuse.

So at this time, there is no reason to believe that hebephilia is any different from pedophilia in terms of impact.
One notable exception is the Rind et al (1998) review, that pointed out some methodological problems with prior research, notably that subject populations are typically non-randomized - they rely on clinical and legal populations who expectedly report negative outcomes.  However, more recent research has attempted to address this issue using population studies, and comes to the same conclusions, for example Nelson et al (2002):

... general population studies have confirmed findings from these
  samples including increased risk for psychiatric illness ... and other
  adverse outcomes ... associated with self-reported CSA.

Good survey techniques in such population studies attempt to control for factors such as stigma (as mentioned in the question), by asking independently about child sexual abuse and potential adverse outcomes, rather than asking victims to self-assess those outcomes.  Nonetheless, there may be additional factors to consider, such as grooming method, cooperation level, perception of harm, etc.


Should I keep my fridge supply valve off or on with it being capped off?

Question: I'm brand new to this page so bare with me. I bought a new fridge over the summer in my home,and it didn't have an ice-maker in it,
so I didn't run any water line from the valve to the fridge since it wouldn't serve any purpose. The old supply valve leaked so I put a new one on,no leaks on the new one,and I also put a cap on it just for safe measure even though I have it shut off. That is my question though for this,is if it's okay that the fridge valve stay closed like this? There is no ice-maker nor any water dispenser on this fridge,so the valve is just there staying shut off until I may add an icemaker to it in the future. I just want to make sure I'm not hurting my plumbing by keeping that valve off? I'm sorry if the question is dumb,I'm a new homeowner.
Answer: Saddle valves (the self-puncturing valves often used to feed water to icemakers, mostly because they're easy and quick to install) do have a bad habit of coming loose over time and leaking. Your new one, if it's that type, may eventually do the same thing. You could replace it with a more serious valve next time a leak develops.
... but for now, you've got a perfectly reasonable fix in place. No, it isn't doing any harm.
Enjoy the new house (and the new hobbies you're going to acquire while taking care of it)!


Photolysis in the Light Reactions of Photosynthesis

Question: I'm a bit confused concerning photolysis. During the light reactions, photons are used to excite the chlorophyll molecules so they are passed to the primary electron acceptor. The electrons initially come from a split water molecule. Is water split by the photons?
Comment: Does this answer your question? [Photolysis of Water?](https://biology.stackexchange.com/questions/31499/photolysis-of-water)
Comment: @tyersome the post you link to *is* about photolysis, but that post is about the chemistry of the process. Another post, [Photosynthesis: What Powers the Splitting of Water?](https://biology.stackexchange.com/q/14063/16866), appears to also ask about photolysis but from the perspective of the role of ATP. This current post, though related to the aforementioned posts, seems to be -- at least in my understanding -- more focused on the mechanism involved. I have provided an [answer](https://biology.stackexchange.com/a/89184/16866) below that reflects this interpretation of the OP's question.
Comment: Regardless, the OP should sufficiently have received a response to their question from any of these three posts which are now linked as being related. Thanks.
Answer: A catalytic site on a subunit of Photosystem II is responsible for splitting water via photo-oxidation. This site, called the Oxygen-evolving complex (or OEM), uses energy from sunlight (which is converted to electrochemical potential energy in the photosystem's reaction center) to accomplish this task.

 Source: Wikimedia
See Barber (2012)1 for an explanation. The abstract (my emphasis):

The oxygen in our atmosphere is derived and maintained by the water-splitting process of photosynthesis. The enzyme that facilitates this reaction and therefore underpins virtually all life on our planet is known as photosystem II (PSII), a multisubunit enzyme embedded in the lipid environment of the thylakoid membranes of plants, algae, and cyanobacteria. During the past 10 years, crystal structures of a 700-kDa cyanobacterial dimeric PSII complex have been reported with ever-increasing improvement in resolution--the latest at 1.9 Å. Thus, the organizational and structural details of its many subunits and cofactors are now well understood. The water-splitting site was revealed as a cluster of four Mn ions and one Ca ion surrounded by amino-acid side chains, of which seven provide ligands to the metals. The metal cluster is organized as a cubane-like structure composed of three Mn ions and the one Ca2+ ion linked by oxo bonds. The fourth Mn is attached to the cubane via one of its bridging oxygens together with another oxo bridge to an Mn ion of the cubane. The overall structure of the catalytic site provides a framework to propose a mechanistic scheme for the water-splitting process and gives a blueprint for the development of catalysts that mimick the reaction in an artificial chemical system as a means to generate solar fuels.

My understanding is that we are still not totally certain how this actually works...

Cady et al. (2008)2 wrote a review in 2008 of various functional models trying to explain the chemistry of the oxygen-evolving complex of photosystem II.

A quick Google Scholar search reveals plenty of proposed mechanisms published since.

Most currently proposed mechanisms do, however, incorporate the 4 oxidation steps proposed by Kok et al. (1970)3 (now referred to as the Kok Cycle, or Kok's S-state cycle).

From Kern et al. (2013)4:

The oxidation equivalents generated by the absorption of four photons by the PS II reaction center are stored in the four consecutive redox states of a Mn4CaO5 cluster, known as the Si (i=1 to 4) states. The accumulated energy is used in the concerted oxidation of two molecules of water to form dioxygen (1) returning the catalyst to the most reduced S0 state in the Kok cycle (Scheme 1).

 Scheme 1 from Kern et al. (2013) explaining states of Kok Cycle.

You can learn more here.

Works Cited:
1 Barber, J., 2012, January. Photosystem II: the water-splitting enzyme of photosynthesis. In Cold Spring Harbor symposia on quantitative biology (Vol. 77, pp. 295-307). Cold Spring Harbor Laboratory Press.
2 Cady, C.W., Crabtree, R.H. and Brudvig, G.W., 2008. Functional models for the oxygen-evolving complex of photosystem II. Coordination chemistry reviews, 252(3-4), pp.444-455.
3 Kok, B., Forbush, B. and McGloin, M., 1970. Cooperation of charges in photosynthetic O2 evolution–I. A linear four step mechanism. Photochemistry and photobiology, 11(6), pp.457-475.
4 Kern, J., Alonso-Mori, R., Tran, R., Hattne, J., Gildea, R.J., Echols, N., Glöckner, C., Hellmich, J., Laksmono, H., Sierra, R.G. and Lassalle-Kaiser, B., 2013. Simultaneous femtosecond X-ray spectroscopy and diffraction of photosystem II at room temperature. Science, 340(6131), pp.491-495.


macbook pro rendering issue

Question: I have a macbook pro early 2013 model with i7 processor and nvidia m650 graphics but when i go to the settings to enable gpu rendering there is no option to select it only cpu rendering can anyone tell me why this is?
Comment: I have worked it out I needed to install the cuda add-on from nvidia for mac. once this is installed the options for cuda show up in the settings panel
Answer: You need to install the latest Nvidia Driver for you graphics card. You can download them from  the nvidia website here: Mac Nvidia Drivers. After you have done this you need to restart blender and the CUDA option should be available under the System Tab in you User preferences.

macbook pro rendering issue


What is the duration of a spell from a magic item?

Question: In my case I have a Celestial Armor (CL5) and a Celestial Shield (CL7)
The armor lets me fly once per day (as the spell) and the shield gifes me feather fall once per day and because I have both I could use overland flight rather than fly.
Do I use my caster level to determine the duration of those spells or the CL of the magic-items? fly=5 min., feather fall=7 rounds, overland flight=5 hours or do I use my own or the highest of the two?
Answer: You use the item's caster level. The only exception to this is for staves, which you use your stats if they are higher.
Answer: For determining duration, as well as any other CL dependent variables such as DC for dispel magic, you'll use the Caster Level of the item as laid out in the stat block.

Caster Level (CL): An item's caster level indicates its relative power. It also determines the item's saving throw bonus, as well as range or other level-dependent aspects of the item's powers (if variable). It also determines the level that must be contended with should the item come under the effect of a dispel magic spell or similar situation.

From the PRD Magic Item page
So, for your specific cases:
Celestial Armor Fly: CL 5 for 5 Minutes 1/day
Celestial Shield Feather Fall: CL 7 for Until landing or 7 rounds 1/day
Celestial Armor Overland Flight: Cl 5 for 5 hours 1/day
Comment: Note that if the text of the magic item specifies a different duration to the one the caster level would indicate, the text takes precedence.


Pixel Add/Remove Software not working

Question: Pixel Add/Remove Software not working.
Pixel version on Pi 3 contains and Add/Remove Software Gnome app which does not seem to work when I attempt to install eclipse CDT? Is there any thing special that must be done before using the Add/Remove Software app?
Any one else having success?
Answer: You need to be connected to the internet so the Pixel can download the packages you have requested from the Add/Remove Software library.
Enjoy Pixel :)

Pixel Add/Remove Software not working


Absolutely continuous but not monotone

Question: I don't want to comment on an old question, so I'm asking a new one. The question I'm referring to is Absolutely Continuous and Strictly Increasing on a Subinterval. Specifically, I'm concerned about the second part of the question. I can easily see that $G$ is absolutely continuous, but I'm having a bit of trouble proving that it's not monotone on any subinterval of $[0,1]$. Would a proof by contradiction work? Any hints would be much appreciated.
Answer: $G(x)=\int_0^x \chi_A(t) - \chi_{[0,1]\setminus A}(t)\,dt $, so $G'(x) = \chi_A(x) - \chi_{[0,1]\setminus A}(x)$ almost everywhere.  (Are you familiar with this?)  By the hypothesis on $A$, this implies that in every subinterval of $[0,1]$, $G'$ takes the values $1$ and $-1$.  This implies that $G$ is nonmonotone in every subinterval of $[0,1]$.
Comment: Beautiful. How did you think of this solution? I probably would've never thought of something like that no matter how hard I tried.
Comment: Absolutely continuous functions are precisely those that are the integrals of their derivatives, and that's one of the most useful things about them, so it's always on my radar when they come up.  I was initially thinking of working explicitly with Lebesgue measures of sets, but hadn't gotten far in terms of turning intuition into an actual argument before using the derivative occurred to me.
Comment: Ahh I see. Thanks for the insight.

Absolutely continuous but not monotone


Is there a way to keep ssh authentication open for several scp commands?

Question: I need to copy several small files from a remote machine to a local one. I need to do this several times a day. Currently, I use a script that use scp to copy the files. However, this is slow as every time, I need to authenticate. Is there a way, beside mounting, to do one authentication and keep it alive until I finish the copy?
Comment: why not copy the individual files into a folder, zip and then send it across in one go?
Comment: They are scatter over several folders on a computation cluster which I don't wish to run script on. I guess that this is an option con consider though.
Answer: Just use the ControlMaster feature of SSH. For this purpose I placed a global Option:
Host *
    ControlPath ~<user>/.ssh/ctrl-%r-%h-%p

In my .ssh/config. Of course you must replace <user> accordingly by your login name.
Whenever I want to setup an initial master connection I add '-M':
ssh -M <machine>

This creates a control socket with a filename specified above. Any subsequent call to ssh/scp targeting that <machine> will reuse the existing master connection. Dramatically speeding up the connection process because no further authentication is needed for the time the control (==master) connection exists. As a pleasant side effect you don't need to re-enter your pass-phrase once you give it for establishing the master connect.
Answer: You can use ssh-add to add private keys to your ssh authentication agent.  See
man ssh-add

and
man ssh-agent


Is there a limit for Number of Options for a Dropdown Attribute?

Question: Is there a limit to the Number of Options for a Dropdown Attribute? Let's say I have 10000 different lists of options in an attribute. How that will affect the Magento, website load time, backend data update, search response time.
Answer: Having over 1000 options in a dropdown is never a good idea. Just imagine having to scroll all those options and click the wrong one by mistake and the ordeal to do all the scrolling again.
A better option will be using radio buttons, but it will take a lot of space on your form/page.
The best option with this many options will be to go with searchable select (see demo here - https://harvesthq.github.io/chosen/#selected-and-disabled-support) field which can be implemented using https://harvesthq.github.io/chosen/ or any similar jquery plugin.
Also if you load all the options during page load it may affect the load times, so you should try to load is asynchronously using ajax.
Comment: I'm thinking adding another table for this attribute purpose and create custom module to populate data where it needed is the final option. Thank you for your insight!
Answer: I don't believe that there is a technical limit to the number of attribute option values other than the size of the primary key on the tables that store the data and the amount of space the database can consume.
How it affects backend performance depends on how the attribute is configured and used.
More options will increase page loads depending on the size of the associated HTML.
Where I would expect real problems is when these options are rendered by the browser as selects, layered navigation checkboxes etc. The result would be unpleasant to interact with and could cause memory issues for the browser. (This also applies to the admin).
If possible, it would be better to re-design the catalog so that there is no need for such an attribute.
Comment: hopefully, I can remove it from layered navigation bar, yet I'm thinking adding another table for this attribute purpose and create custom module to populate data where it needed is the final option. Thank you for your insight!
Answer: It's a limit of php configuration, because config max_input_vars by default has value 1000, in this case value of max_input_vars should be 10000. After increasing to 100000 it seems to work fine with 2100 options.
Comment: I don't think this applies, max_input_vars means number of variable for GET,POST or Cookies. Not related to the number of option for a single attribute in Magento 2, Correct me if I'm wrong.


How to fix lock screen stuck at "Tap to speak" when entering password?

Question: I can't access my phone. When I try to enter my password to unlock my phone it displays "Tap to speak" with microphone and the word "Google". There is also sign of setting and "X" but they are not responding.
This thing blocks me from using my phone and I don't know how it got into my phone. I am not familiar with it. How do I unlock my phone?
Comment: Did you enable 'voice lock' ?
Comment: my kid was playing with my phone I suspect she activated it accidentally
Answer: It's not cleared that what lock you used(there are 3rd party and in built 'Voice Lock' which could be found under Security Settings and then one is 'Google Voice Lock').
If it 'Google Voice Lock' say 'Ok Google' & 'Hey Google'. If it is your handset, you would have used Google Voice Search/Google Assistance which only activates by saving your voice.
Same voice is used for 'Google Voice Lock'.
So, if it is this lock. It will unlock as voice matches.
If it is other than this, i found this forum by xda-developers that could help you: Lock Screen stuck at voice lock.


Is thermal EMR just another form of Fluorescence / Phosphorescence?

Question: Normally when thinking about Fluorescence one only deals with visible light, but is it fair to say that the thermal EMR (heat) that's generated from a light source is also a fluorescent effect? For instance, If I shine a high intensity green laser at black tape, it will certainly add more energy into the system which puts the electrons into a higher energy state and emit infrared EMR. Is this correct or am I confusing two things?
Answer: Thermal radiation isn't fluorescence simply by definition. It's just blackbody radiation that's related to the object emitting statistically.
There doesn't need to be any electron levels at energies observed. For example most (undoped) dielectric crystals don't have any electron levels in far infrared but will still emit when heated. That's just totally different kind of a a beast.
Here is a blog entry by Chad Orzel I recently read entitled "Things I've Never Quite Understood: Microscopic Picture of Blackbody Radiation" somewhat relevant to your question. From comments in this blog entry I took out a reference to a rather interesting paper DOI 10.1119/1.1819931 which can be found here. This however may be behind a paywall for you.
Researchers in this paper show how absorption and re-emission when it happens long enough causes sharp atomic lines observed in gases to vanish, producing continuous thermal radiation. It's just statistical property that doesn't depend on material considered. And yes - it's somewhat confusing even to physicists.


Does the top of this guitar look ok?

Question: I'm considering purchasing an alhambra 9p guitar from a local store. It's a new guitar, but the top seems to have some stains/nonuniformities (see the picture). How much of a defect is that?
Comment: There was a good answer here that was deleted for some reason that mentioned this is a serious instrument, $2100 serious to be exact. You did not point out the various light spots on the treble side of the guitar which also may or may not bother you. Funny how the pics of the guitar on the advertisements have flawless tops on them. If they're going to bother you over time move on. If you can live with them go for a nice discount.
Comment: I have a lot of respect for mods, but I feel that sometimes it's necessary for them to justify publicly their actons. We're all adults here!
Comment: Look at some of the "blemishes" that violins can have https://tarisio.com/cozio-archive/property/?ID=1951
Comment: @JohnBelzaguy - it was deleted by a mod - i cannot see why, particularly - it was a constructive answer, which now cannot be undeleted.
Comment: @Tim same here, it was a good answer, I frankly cannot see the rationale for that and closing questions at times. For example sometimes analysis and help transcribing is allowed and other times it is shut down. I'm guessing this comment will probably be deleted if a mod sees it.
Comment: Ha-ha, this gutar is still in stock, now with 20% discount. I've also noticed that the bar which is visible in the sound hole is apparently not parallel to the fretboard.. How much of a defect is that? @Tim John
Answer: I have a theory that many guitar manufacturers leave good looking wood finishes for natural guitars, and those which have blemishes, or don't look as good, are painted, often black. Either won't really affect the sound of the particular guitar, but it means more guitars can be made and sold - in fact, some players prefer coloured guitars.
Could be that this one was on the edge, or someone considered it to be fine natural. It's not beyond anything to ask for discount if you really like the sound and the way it plays. Or leave it and buy a different one. That choice is yours - bear in mind when selling it on that the blemishes may also put off prospective purchasers. But as long as it has a nice ring sound when it's tapped, there's nothing to worry about sound-wise. Only complexion-wise.
Comment: Is there any chance the blemishes will flatten over time? I would love to buy another one, but it's in a single copy..
Comment: Doubtful. If it were me, I'd be pushing for discount !
Answer: From what I've seen that's how wood looks. Appears perfectly normal to me.
Answer: The two smaller things next to the fretboard look completely harmless to me, but the long one below the bridge looks like it might be a crack, and that could be problematic since cracks along the wood grain have a tendency to grow over time, and even a small crack may cause really annoying buzzing sounds.
I think in this case it's still ok since it's far enough away from the bridge where most force is concentrated, but I'd definitely take a really close look at that one. Is the surface properly even there? Does it sound suspiciously different when you knock with your fingers right next to that spot?
If it is a crack, then you should definitely consider making this a case for a discount.
Comment: If it is a crack, then you should definitely consider making for the exit - without it !
Comment: That too, but I wouldn't be _dogmatic_ about it. If the crack happened during final assembly and they made a good effort to seal it then the guitar may be perfectly ok in practice, so if you can get a bargain out of it, I'd say it might be worth the risk – as long as it still sounds good.
Answer: My thought is that, if you are worried about this now, the worry will never go away.
You ask if the blemishes will flatten. Does this mean that you can feel them as well as see them? That would be very unusual. The answer is no. These things don't go away of their own accord. An expert might be able to remove any unevenness but this could cost you as much as the guitar is worth to be done properly..
Answer
If you are like me then every time you pick the guitar up you will be aware of the blemishes and you will never be 100% happy about it. My personal recommendation would therefore be to wait. If you are not like me then it makes sense to be guided entirely by the sound.  If you are new to guitar then do your best to get an experienced player to go along with you.
Comment: > `Does this mean that you can feel them as well as see them?` No. Perhaps, I should have said "smooth out" instead of "flatten", I'm not a native English speaker :)
Answer: Thats just the grain in the wood, when they made that guitar, they should have caught that.  How much is the guitar? Wow 2100 bucks, don't think I would purchase that for fear of it cracking when the wood ages.
Comment: I've also noticed that the bar which is visible in the sound hole is apparently not parallel to the fretboard.. How much of a defect is *that*?

Does the top of this guitar look ok?