How do I calculate a trendline for a graph?

Question: Google is not being my friend - it's been a long time since my stats class in college...I need to calculate the start and end points for a trendline on a graph - is there an easy way to do this? (working in C# but whatever language works for you)
Comment: Least squares fitting is your best bet.
Answer: Thanks to all for your help - I was off this issue for a couple of days and just came back to it - was able to cobble this together - not the most elegant code, but it works for my purposes - thought I'd share if anyone else encounters this issue:
public class Statistics
{
    public Trendline CalculateLinearRegression(int[] values)
    {
        var yAxisValues = new List<int>();
        var xAxisValues = new List<int>();

        for (int i = 0; i < values.Length; i++)
        {
            yAxisValues.Add(values[i]);
            xAxisValues.Add(i + 1);
        }

        return new Trendline(yAxisValues, xAxisValues);
    }
}

public class Trendline
{
    private readonly IList<int> xAxisValues;
    private readonly IList<int> yAxisValues;
    private int count;
    private int xAxisValuesSum;
    private int xxSum;
    private int xySum;
    private int yAxisValuesSum;

    public Trendline(IList<int> yAxisValues, IList<int> xAxisValues)
    {
        this.yAxisValues = yAxisValues;
        this.xAxisValues = xAxisValues;

        this.Initialize();
    }

    public int Slope { get; private set; }
    public int Intercept { get; private set; }
    public int Start { get; private set; }
    public int End { get; private set; }

    private void Initialize()
    {
        this.count = this.yAxisValues.Count;
        this.yAxisValuesSum = this.yAxisValues.Sum();
        this.xAxisValuesSum = this.xAxisValues.Sum();
        this.xxSum = 0;
        this.xySum = 0;

        for (int i = 0; i < this.count; i++)
        {
            this.xySum += (this.xAxisValues[i]*this.yAxisValues[i]);
            this.xxSum += (this.xAxisValues[i]*this.xAxisValues[i]);
        }

        this.Slope = this.CalculateSlope();
        this.Intercept = this.CalculateIntercept();
        this.Start = this.CalculateStart();
        this.End = this.CalculateEnd();
    }

    private int CalculateSlope()
    {
        try
        {
            return ((this.count*this.xySum) - (this.xAxisValuesSum*this.yAxisValuesSum))/((this.count*this.xxSum) - (this.xAxisValuesSum*this.xAxisValuesSum));
        }
        catch (DivideByZeroException)
        {
            return 0;
        }
    }

    private int CalculateIntercept()
    {
        return (this.yAxisValuesSum - (this.Slope*this.xAxisValuesSum))/this.count;
    }

    private int CalculateStart()
    {
        return (this.Slope*this.xAxisValues.First()) + this.Intercept;
    }

    private int CalculateEnd()
    {
        return (this.Slope*this.xAxisValues.Last()) + this.Intercept;
    }
}

Comment: Consider the solution proposed by Bedwyr Humphreys
Comment: I believe this is assuming the data is sorted (due to using `xAxisVales.First()` and `.Last()`)
Comment: Slope value should be Double, not integer
Answer: OK, here's my best pseudo math:
The equation for your line is:
Y = a + bX
Where:
b = (sum(x*y) - sum(x)sum(y)/n) / (sum(x^2) - sum(x)^2/n)
a = sum(y)/n - b(sum(x)/n)
Where sum(xy) is the sum of all x*y etc. Not particularly clear I concede, but it's the best I can do without a sigma symbol :)
... and now with added Sigma
b = (Σ(xy) - (ΣxΣy)/n) / (Σ(x^2) - (Σx)^2/n)
a = (Σy)/n - b((Σx)/n)
Where Σ(xy) is the sum of all x*y etc. and n is the number of points
Comment: This one is the real answer, although i prefer b*n/n to remove the n fraction
Comment: This would be a big help if I could figure out what n represents.
Comment: In your equation for b what is the second = sign suppose to be?
Comment: Math class is coming back - n is the number of points on an axis right?
Comment: @Sparafusile: The most popular answer uses a minus sign there so I have edited this answer accordingly.
Answer: Given that the trendline is straight, find the slope by choosing any two points and calculating:
(A)  slope = (y1-y2)/(x1-x2)
Then you need to find the offset for the line.  The line is specified by the equation:
(B)  y = offset + slope*x
So you need to solve for offset.  Pick any point on the line, and solve for offset:
(C)  offset = y - (slope*x)
Now you can plug slope and offset into the line equation (B) and have the equation that defines your line.  If your line has noise you'll have to decide on an averaging algorithm, or use curve fitting of some sort.
If your line isn't straight then you'll need to look into Curve fitting, or Least Squares Fitting - non trivial, but do-able.  You'll see the various types of curve fitting at the bottom of the least squares fitting webpage (exponential, polynomial, etc) if you know what kind of fit you'd like.
Also, if this is a one-off, use Excel.
Comment: I'm fairly certain that this will not yield a fitted trend-line; the slope calculated in (A) is going to be significantly different depending on which "two points" you choose.  This is not a fitted trend line.
Comment: [I prefer this one I've found](http://math.stackexchange.com/questions/204020/what-is-the-equation-used-to-calculate-a-linear-trendline/204021#204021)
Comment: @Jay Thus the sentence, "If your line has noise you'll have to decide on an averaging algorithm or use curve fitting of some sort."
Answer: Here is a very quick (and semi-dirty) implementation of Bedwyr Humphreys's answer.  The interface should be compatible with @matt's answer as well, but uses decimal instead of int and uses more IEnumerable concepts to hopefully make it easier to use and read.
Slope is b, Intercept is a
public class Trendline
{
    public Trendline(IList<decimal> yAxisValues, IList<decimal> xAxisValues)
        : this(yAxisValues.Select((t, i) => new Tuple<decimal, decimal>(xAxisValues[i], t)))
    { }
    public Trendline(IEnumerable<Tuple<Decimal, Decimal>> data)
    {
        var cachedData = data.ToList();

        var n = cachedData.Count;
        var sumX = cachedData.Sum(x => x.Item1);
        var sumX2 = cachedData.Sum(x => x.Item1 * x.Item1);
        var sumY = cachedData.Sum(x => x.Item2);
        var sumXY = cachedData.Sum(x => x.Item1 * x.Item2);

        //b = (sum(x*y) - sum(x)sum(y)/n)
        //      / (sum(x^2) - sum(x)^2/n)
        Slope = (sumXY - ((sumX * sumY) / n))
                    / (sumX2 - (sumX * sumX / n));

        //a = sum(y)/n - b(sum(x)/n)
        Intercept = (sumY / n) - (Slope * (sumX / n));

        Start = GetYValue(cachedData.Min(a => a.Item1));
        End = GetYValue(cachedData.Max(a => a.Item1));
    }

    public decimal Slope { get; private set; }
    public decimal Intercept { get; private set; }
    public decimal Start { get; private set; }
    public decimal End { get; private set; }

    public decimal GetYValue(decimal xValue)
    {
        return Intercept + Slope * xValue;
    }
}

Answer: Regarding a previous answer
if (B) y = offset + slope*x
then (C) offset = y/(slope*x) is wrong
(C) should be:
offset = y-(slope*x)
See:
http://zedgraph.org/wiki/index.php?title=Trend
Answer: If you have access to Excel, look in the "Statistical Functions" section of the Function Reference within Help. For straight-line best-fit, you need SLOPE and INTERCEPT and the equations are right there.
Oh, hang on, they're also defined online here: http://office.microsoft.com/en-us/excel/HP052092641033.aspx for SLOPE, and there's a link to INTERCEPT. OF course, that assumes MS don't move the page, in which case try Googling for something like "SLOPE INTERCEPT EQUATION Excel site:microsoft.com" - the link given turned out third just now.
Answer: I converted Matt's code to Java so I could use it in Android with the MPAndroidChart library.  Also used double values instead of integer values:
ArrayList<Entry> yValues2 = new ArrayList<>();

ArrayList<Double > xAxisValues = new ArrayList<Double>();
ArrayList<Double> yAxisValues = new ArrayList<Double>();

for (int i = 0; i < readings.size(); i++)
{
    r = readings.get(i);
    yAxisValues.add(r.value);
    xAxisValues.add((double)i + 1);
}

TrendLine tl = new TrendLine(yAxisValues, xAxisValues);

//Create the y values for the trend line
double currY = tl.Start;
for (int i = 0; i < readings.size(); ++ i) {
    yValues2.add(new Entry(i, (float) currY));
    currY = currY + tl.Slope;
}

...

public class TrendLine
{
    private ArrayList<Double> xAxisValues = new ArrayList<Double>();
    private ArrayList<Double> yAxisValues = new ArrayList<Double>();

    private int count;
    private double xAxisValuesSum;
    private double xxSum;
    private double xySum;
    private double yAxisValuesSum;

    public TrendLine(ArrayList<Double> yAxisValues, ArrayList<Double> xAxisValues)
    {
        this.yAxisValues = yAxisValues;
        this.xAxisValues = xAxisValues;

        this.Initialize();
    }

    public double Slope;
    public double Intercept;
    public double Start;
    public double End;

    private double getArraySum(ArrayList<Double> arr) {
        double sum = 0;
        for (int i = 0; i < arr.size(); ++i) {
            sum = sum + arr.get(i);
        }
        return sum;
    }
    private void Initialize()
    {
        this.count = this.yAxisValues.size();
        this.yAxisValuesSum = getArraySum(this.yAxisValues);
        this.xAxisValuesSum = getArraySum(this.xAxisValues);
        this.xxSum = 0;
        this.xySum = 0;

        for (int i = 0; i < this.count; i++)
        {
            this.xySum += (this.xAxisValues.get(i)*this.yAxisValues.get(i));
            this.xxSum += (this.xAxisValues.get(i)*this.xAxisValues.get(i));
        }

        this.Slope = this.CalculateSlope();
        this.Intercept = this.CalculateIntercept();
        this.Start = this.CalculateStart();
        this.End = this.CalculateEnd();
    }

    private double CalculateSlope()
    {
        try
        {
            return ((this.count*this.xySum) - (this.xAxisValuesSum*this.yAxisValuesSum))/((this.count*this.xxSum) - (this.xAxisValuesSum*this.xAxisValuesSum));
        }
        catch (Exception e)
        {
            return 0;
        }
    }

    private double CalculateIntercept()
    {
        return (this.yAxisValuesSum - (this.Slope*this.xAxisValuesSum))/this.count;
    }

    private double CalculateStart()
    {
        return (this.Slope*this.xAxisValues.get(0)) + this.Intercept;
    }

    private double CalculateEnd()
    {
        return (this.Slope*this.xAxisValues.get(this.xAxisValues.size()-1)) + this.Intercept;
    }
}

Comment: I searched hours for a solution and eventually came back to your answer and it worked! Thank you!
Answer: This is the way i calculated the slope:
Source: http://classroom.synonym.com/calculate-trendline-2709.html
class Program
    {
        public double CalculateTrendlineSlope(List<Point> graph)
        {
            int n = graph.Count;
            double a = 0;
            double b = 0;
            double bx = 0;
            double by = 0;
            double c = 0;
            double d = 0;
            double slope = 0;

            foreach (Point point in graph)
            {
                a += point.x * point.y;
                bx = point.x;
                by = point.y;
                c += Math.Pow(point.x, 2);
                d += point.x;
            }
            a *= n;
            b = bx * by;
            c *= n;
            d = Math.Pow(d, 2);

            slope = (a - b) / (c - d);
            return slope;
        }
    }

    class Point
    {
        public double x;
        public double y;
    }

Answer: Here's what I ended up using.
public class DataPoint<T1,T2>
{
    public DataPoint(T1 x, T2 y)
    {
        X = x;
        Y = y;
    }

    [JsonProperty("x")]
    public T1 X { get; }

    [JsonProperty("y")]
    public T2 Y { get; }
}

public class Trendline
{
    public Trendline(IEnumerable<DataPoint<long, decimal>> dataPoints)
    {
        int count = 0;
        long sumX = 0;
        long sumX2 = 0;
        decimal sumY = 0;
        decimal sumXY = 0;

        foreach (var dataPoint in dataPoints)
        {
            count++;
            sumX += dataPoint.X;
            sumX2 += dataPoint.X * dataPoint.X;
            sumY += dataPoint.Y;
            sumXY += dataPoint.X * dataPoint.Y;
        }

        Slope = (sumXY - ((sumX * sumY) / count)) / (sumX2 - ((sumX * sumX) / count));
        Intercept = (sumY / count) - (Slope * (sumX / count));
    }

    public decimal Slope { get; private set; }
    public decimal Intercept { get; private set; }
    public decimal Start { get; private set; }
    public decimal End { get; private set; }

    public decimal GetYValue(decimal xValue)
    {
        return Slope * xValue + Intercept;
    }
}

My data set is using a Unix timestamp for the x-axis and a decimal for the y. Change those datatypes to fit your need. I do all the sum calculations in one iteration for the best possible performance.
Answer: Thank You so much for the solution, I was scratching my head.
Here's how I applied the solution in Excel.
I successfully used the two functions given by MUHD in Excel:
a = (sum(x*y) - sum(x)sum(y)/n) / (sum(x^2) - sum(x)^2/n)
b = sum(y)/n - b(sum(x)/n)
(careful my a and b are the b and a in MUHD's solution).

- Made 4 columns, for example:
  NB: my values y values are in B3:B17, so I have n=15;
      my x values are 1,2,3,4...15.
  1. Column B: Known x's
  2. Column C: Known y's
  3. Column D: The computed trend line
  4. Column E: B values * C values (E3=B3*C3, E4=B4*C4, ..., E17=B17*C17)
  5. Column F: x squared values
I then sum the columns B,C and E, the sums go in line 18 for me, so I have B18 as sum of Xs, C18 as sum of Ys, E18 as sum of X*Y, and F18 as sum of squares.
To compute a, enter the followin formula in any cell (F35 for me):
F35=(E18-(B18*C18)/15)/(F18-(B18*B18)/15)
To compute b (in F36 for me):
F36=C18/15-F35*(B18/15)
Column D values, computing the trend line according to the y = ax + b:
D3=$F$35*B3+$F$36, D4=$F$35*B4+$F$36 and so on (until D17 for me).

Select the column datas (C2:D17) to make the graph.
HTH.
Answer: If anyone needs the JS code for calculating the trendline of many points on a graph, here's what worked for us in the end:

/**@typedef {{
 * x: Number;
 * y:Number;
 * }} Point
 * @param {Point[]} data
 * @returns {Function} */
function _getTrendlineEq(data) {
    const xySum = data.reduce((acc, item) => {
        const xy = item.x * item.y
        acc += xy
        return acc
    }, 0)
    const xSum = data.reduce((acc, item) => {
        acc += item.x
        return acc
    }, 0)
    const ySum = data.reduce((acc, item) => {
        acc += item.y
        return acc
    }, 0)
    const aTop = (data.length * xySum) - (xSum * ySum)
    const xSquaredSum = data.reduce((acc, item) => {
        const xSquared = item.x * item.x
        acc += xSquared
        return acc
    }, 0)
    const aBottom = (data.length * xSquaredSum) - (xSum * xSum)
    const a = aTop / aBottom
    const bTop = ySum - (a * xSum)
    const b = bTop / data.length
    return function trendline(x) {
        return a * x + b
    }
}

It takes an array of (x,y) points and returns the function of a y given a certain x
Have fun :)
Answer: Here's a working example in golang. I searched around and found this page and converted this over to what I needed. Hope someone else can find it useful.
// https://classroom.synonym.com/calculate-trendline-2709.html
package main

import (
    "fmt"
    "math"
)

func main() {

    graph := [][]float64{
        {1, 3},
        {2, 5},
        {3, 6.5},
    }

    n := len(graph)

    // get the slope
    var a float64
    var b float64
    var bx float64
    var by float64
    var c float64
    var d float64
    var slope float64

    for _, point := range graph {

        a += point[0] * point[1]
        bx += point[0]
        by += point[1]
        c += math.Pow(point[0], 2)
        d += point[0]

    }

    a *= float64(n)           // 97.5
    b = bx * by               // 87
    c *= float64(n)           // 42
    d = math.Pow(d, 2)        // 36
    slope = (a - b) / (c - d) // 1.75

    // calculating the y-intercept (b) of the Trendline
    var e float64
    var f float64

    e = by                            // 14.5
    f = slope * bx                    // 10.5
    intercept := (e - f) / float64(n) // (14.5 - 10.5) / 3 = 1.3

    // output
    fmt.Println(slope)
    fmt.Println(intercept)

}

Answer: Divide by n is not so efficient. Rewrite the formulas as follows
Assume Y = a + bX is the trendline
n the number of x,y points
then
b = (nΣ(xy) - ΣxΣy) / (nΣ(x^2) - (Σx)^2)
a = (Σy - bΣx)/n
Same as in
Source: http://classroom.synonym.com/calculate-trendline-2709.html


Rotating coordinate frame

Question: Hello I have a question about rotating coordinate frames. Following the book of Brizard the Lagrangian is given by
\begin{equation}
L(\mathbf{r}, \mathbf{\dot{r}}) = \frac{m}{2} \vert \mathbf{\dot{r}} + \boldsymbol{\omega} \times \mathbf{r} \vert^2 - U(\mathbf{r})
\end{equation}
Would it be possible that $L$ is independent of $\mathbf{\dot{r}}$? What does this mean? In particular, how can I end up with an equation of motion, since I would not have a term $m\mathbf{\ddot{r}}$ in that case, so no resulting force?
Comment: What do you mean, $L$ is independent of $\dot{r}$? Your formula includes $\dot{r}$.
Comment: No, it is not possible that $L$ would be independent of $\dot{\mathbf{r}}$. What would make you think that it is possible?
Comment: There may be some kind of constant of motion which allows elimination of terms you are looking for. Even if something is present in the equation explicitly, doesn't mean value depends on it.
Comment: What make me think of its possible was that usually coordinate frames are fixed. Then the Coriolis force must vanish and I think this would be possible with a vanishing velocity. So a non-rotating system as limit of a rotating was the idea behind it
Answer: If you set $L=L(\mathbf{q})$ then your equations of motion become :
$$\frac{\partial L}{\partial q_i}=\frac d {dt}\left( \frac{\partial L}{\partial \dot q_i} \right)=0$$
But for any such function this reduces to a set of equations that fix the $q_i$ to some constant values (the roots of those equations).
There is no motion simply because you are defining a system where position is fixed.
Answer: The Lagrangian is the difference between the kinetic and potential energy. In a conservative field the potential energy cannot depend on the velocity but the kinetic energy must.
So the answer to your question is a resounding "no".

Rotating coordinate frame


Should "absence of evidence" questions be allowed?

Question: What is the correct approach to take when there is simply insufficient evidence about a claim, or it is not possible to reproduce or validate a claim made?
Comment: Sorry to close this question again, but it is also not on-topic here on meta. Meta is meant for discussing issues about this site, general discussions about Skepticism are also off-topic here.
Comment: @Fabian there are several questions on both sites about the nature of skepticism, so I find it hard to see why my question would not be acceptable in some form. Perhaps you can give me a suggestion to tweak it so it *would* be acceptable.
Comment: Questions discussing Skepticism as a philosophy or a movement are explictly off-topic here, and as far as I know we should have no questions still open about that. I don't see a way to phrase your question to be on-topic here, it is more suited to a Skeptics forum or something like that. We decided early in the private beta to focus on *applying* Skepticism.
Comment: @Fabian to the right of this question under related there are several questions discussing skepticism, such as the question asking whether or not it is compatible with common sense. Also, my question is explicitly about applying skepticism and to what extent it makes sense to do so. It is not a question about skepticism itself.
Comment: I've tried to edit your question. While the general concern that some question may never have a definitive answer is interesting, the example given was completely off topic. I hope I've managed to maintain at least a bit of the original intent.
Comment: @sklivvz THanks for the input...My question was more along the lines of when evidence is available, how do you gauge it is it "good enough" when claims can be validated and repducted but you have to rely on a 3rd party do so, should you still be skeptical? Not sure why the question is still downvoted though...
Comment: @Sklivvz Also I wanted to ask more about when it is reasonable to consider evidence sufficient, hence my moon landing example. Most people don't have the means to reproduce such an event to validate it, so are people right to be skeptical?
Comment: Absence of evidence and existence of contradictory evidence are both situations that seem likely to occur, perhaps frequently. It seems like a useful function of the site to record questions and answers where this is true and a definitive answer is not justified by the current state of knowledge. It might be, though, that the current format doesn't need any changes to record that sort of conclusions. but we might need more gentle editing initially to allow such questions in.
Answer:
If a post is in line of principle not falsifiable, then it is not about facts, or addressable by skepticism. So it's off-topic.
Example

Does the Flying Spaghetti Monster exist?

If a post is asking to prove a negative, then find a reference supporting that and post it as an answer. It's actually quite difficult to distinguish between valid and invalid claims, so let's always refer to the experts. Do not assume that because you can't think of an example, it doesn't exist!
Example

Is there a Loch Ness monster?

Wrong answer/attitude/comment

No because it's impossible to prove, LFMAO!

Correct answer/attitute/comment

There is no reliable proof that it is the case. This has been debated {here} and {here} and the consensus is that there is no monster - in this case absence of evidence is evidence of absence.


Critical size and Radioactive Nuclei

Question: Nuclear fission requires the mass of the fissile material above the critical mass. So that the explosion takes place at least in the case of a nuclear bomb. But once a single nucleus got involved in the reaction, the reaction can't be stopped easily if I'm right.
    A single nucleus how do know about the critical mass of the entire fissile material?
Comment: A single nucleus doesn't.  It's about statistics.  A certain number are going to be decaying each second so that releases particles that can strike others in a chain reaction.  When the flux of high energy particles crosses above a threshold it becomes a runaway chain reaction.
Comment: Then, The critical is not a necessary requirement for the nuclear fission to begin.
Comment: Nope, just for it to reliably trigger a chain reaction.
Comment: This question is expressing interest in the background fission rate / neutron flux, or alternatively the neutron trigger in bombs. In commercial reactors, an AmBe neutron source is often used. However, these are never necessary to start, it's just economical because you avoid having to waiting to climb so-many orders of magnitude of neutron flux above background. To the other points, fission itself does not require critical mass, you only need that for a self-sustaining reaction, or an increasing reaction. Subcritical configurations still amplify the background neutron flux.
Answer: There's spontaneous fission, a rare decay mode for some superheavy nuclei like uranium and plutonium. There's also induced fission, where some interaction with the environment (typically neutron capture) causes a nucleus to split. Both fissions typically produce a couple of free neutrons, which may be captured on other fissionable nuclei, or may be captured on some nearby neutron absorber (a "control rod" or a "neutron poison"), or may escape from the reaction volume to infinity.
The "critical mass" is the amount of fissionable material needed so that each fission is likely to trigger, on average, one other fission. It's not a property of a single nucleus, but of the fuel assembly, its geometry, and its environment.

Critical size and Radioactive Nuclei


How can I remove this concrete wall anchor?

Question: The anchor pictured was holding a hose reel, which has been removed.  When I twist the part sticking out it just spins infinitely in either direction.  I think it is something like a toggle or a molly anchor.  How can anchors of this type be removed with as little damage as possible to the wall?
Answer: These don't come out easily, sometimes they can be pushed back into the wall and dissappear, this is often the case if the person installing it was thinking ahead and drilled the hole deeper than needed as an end-of-life plan.
Else you need to drive the shaft back in a bit to release the wedge and then pull on the sleeve part, locking pliers are useful here.
If it won't budge the easiest fix is to chop it off using an angle-grinder with a cut-off wheel and then drive it back into the hole a bit and plaster over it.
Comment: Thank you - I ended up just buying another hose reel of the same type/size and reusing the anchors.  Didn't want to deal with these anchors!
Answer: These are wedge anchors and they're almost impossible to get out withoutY damaging the wall. Your best bet is to use a cutoff tool like a Dremel tool with a cutoff wheel. After removing the bolt portion you can grind away at the sleeve to recess it a bit more and then dab some white caulk around the hole to seal and cover it up. Good luck
Comment: Using a crowbar can get you a hile about 5" in diameter to fill...
Comment: Masking tape on the surface around your wall anchors will keep burning metal from your angle grinder from staining the surrounding area.
Comment: Thanks, if this is the case, I think I'm just going to buy another hose reel of the same size/type.  The old one was in bad shape so it looked terrible.
Comment: @Luke      Using brute force , you could screw a nut on the anchor and then grab  the anchor with a crowbar.  Slide a piece of wood between the wall and crowbar, to protect the wall, and pull. you might just pull the anchor out.  this could damage the wall which is hy I didn't include it in my answer.
Comment: Typically the holes are drilled deeper than needed, after the bolt is cut off, the remaning sleeve and bolt can most likely be driven in to make a wall repair easier, unless you wanted to reuse the hole. This would not be possible in any case. Reusing the bolt as you (Luke) mentioned would be the best solution.
Answer: I removed four of these successfully by doing the following:

Using two hammers, pulling out the threaded bolt and attaching the claw of one hammer to it.
Then using the other hammer, to hit the head of the hammer attached to the bolt. I did this in all four directions and used it to loosen the sleeve. Hitting in several different directions crushed the internal brick and increased the diameter of the hole.
In some cases, this was enough to pull the bolt and sleeve out  together. But in some cases I had to push the bolt back and use plyers around the sleeve to wriggle it out.


Is there a folder for JUST Archived email? NOT ALL MAIL

Question: Is there an "Archives" file?  On my old email on my phone, when you swiped left, you deleted it, on Gmail, apparently you are sending it to Archives.  While trying to search for the folder, and follow the instructions I found, I ended up archiving active email I need.  I found it in "All Mail", but why ca I find JUST a list of what is Archived?
Answer: While there is no way to access a label or folder specifically for "Archived" email, you could do the following search in Gmail:
<code>-in:inbox
</code>
This search basically means search for email that is currently "Not in Inbox."
Answer: On Gmail archiving an email means removing from Inbox, there isn't an "Archives" view/folder other than All Mail.
Reference

Archive or mute Gmail messages


How to show a full-screen ad (like Flixster) randomly in an iOS app?

Question: I have recently started programming in iOS. I found this really interesting way of showing an Ad in the Flixster app. It randomly pops up a latest movie banner and asks to watch trailer or skip to continue using the app. How is it actually implemented? how can they be pushing a variable screen (may be a view) at runtime? Every time you open the app, you see a different banner.
Answer: I work for Flixster and here's how we do it:
Every time the app starts or resumes, the app pings our API to ask for what ads should be shown.  Our api gives our app the url of the image to be shown, as well as the click-through url, which can be a regular url, or a custom link to one of our native pages like viewing a trailer, or a movie info page.
We have an admin tool where we can upload the ad image, modify the properties of the ads, or remove old ads and add new ads.  However, we've recently started using 3rd party Ad networks like DFP and Admob (acquired by Google) to take over this management.


Is defragging relevant to improving disk performance anymore?

Question: Does it stil make much difference, now that we have much faster and larger HDDs? Generally I find if disk performance is getting too slow, it's probably because of too little free space, and the solution is to buy a new HDD.
Answer: It is still relevant, but since the release of Vista, Windows has automatically defragged your hard drive when the computer was sitting idle. If you leave your computer idle for long periods, this is no longer something which must be done manually.
Comment: What doesn't make sense for me is if it automatically does it why does it also schedule it?  Especially as the default time is 1am when your computer is likely to be idle anyway and, apparently, automatically defragging.
Comment: Since Vista I think also it is set up to run a scheduled defrag once a week or something.
Comment: @JonHopkins I think it makes sense. Chances of you doing real definite work is unlikely at 1am. Most people turn off their computer when not in use. If you happen to have the computer running at 1am, it'll force the computer to defrag whether you're idle or not.
Answer: It's not relevant on SSDs, which are hardly (if at all) affected by defragmentation (no read-heads to be moved around). And even more: SSDs have a much more limited number of times each part of the "disk" can be written to ("write endurance"; What is the lifespan of an SSD drive?), so especially for cheap SSDs it's best to use the whole disk, rather than keep using the same parts over and over again by running defragmentation tools.
For those who've partitioned their hard drive: didn't that introduce a huge fragmentation?
And though the question is tagged "windows", for those who get here given the generic title: it is not relevant for each file system. Like for a Mac (emphasis mine):

You probably won't need to optimize at all if you use Mac OS X. Here's why:

Hard disk capacity is generally much greater now than a few years ago. With more free space available, the file system doesn't need to fill up every "nook and cranny." Mac OS Extended formatting (HFS Plus) avoids reusing space from deleted files as much as possible, to avoid prematurely filling small areas of recently-freed space.

Mac OS X 10.2 and later includes delayed allocation for Mac OS X Extended-formatted volumes. This allows a number of small allocations to be combined into a single large allocation in one area of the disk.

Fragmentation was often caused by continually appending data to existing files, especially with resource forks. With faster hard drives and better caching, as well as the new application packaging format, many applications simply rewrite the entire file each time. Mac OS X 10.3 Panther can also automatically defragment such slow-growing files. This process is sometimes known as "Hot-File-Adaptive-Clustering."

Aggressive read-ahead and write-behind caching means that minor fragmentation has less effect on perceived system performance.

[..]
There is also a chance that one of the files placed in the "hot band" for rapid reads during system startup might be moved during defragmentation, which would decrease performance.

Of course, the latter would not occur when using a Defrag utility that is included with the operating system.
Answer: Yes.
On my friend's PC (XP, NTFS, 80GB HD, ~750MB free), the 700MB pagefile was in 11,000 fragments, and the MFT was in 40 fragments. I cleaned up the hard drive, defragmented, and rebooted, and the difference was very noticeable.
Comment: I thought the standard trick for pagefiles was to set them to a fixed size (e.g. minimum 2048MB maximum 2048MB).  Do it early and you never have to worry about it fragmenting.
Comment: My friend isn't the most "computer literate", if you know what I mean
Answer: It matters, but in Vista and Win7, it should be happening automatically as long as your machine has idle time.
Lots of good info.
Comment: Only so long as you leave your computer on 24 hours a day.  By default, it attempts to defrag at 1:00 AM.  Many people turn their computers off when they are done using them for the day, or set their computers to go to sleep.  Would have been nice if Microsoft had chosen a realistic approach rather than just scheduling defrags for 1:00 AM.
Answer: The speed brought by defrag is especially visible on slower hdds, like those on laptops.
Answer: I think it's still relevant.  I have a C2Duo/2Gb/250Gbx2 setup, and even with the mirrored "small" drives, defragging seems to help tremendously with startup and program load times.
Answer: I would say it still makes sense - specially on hard drives that get a lot of file activities. I run MyDefrag at work to keep my hard drive from getting too fragmented, since at work I usually work on several revision depots that can have thousands of file changes in one day - keeping it defragged really helps on open read performance of the bigger art files I work with, but also on the speed of my text searches.


Basic rule for diffraction

Question: I'm a high school student. I still don't understand the reflection, diffraction and refraction of light. It seems to me that in concept of quantum physics, reflection is just a process of object absorbing and reemiting light at a particular angle. What really is diffraction? Is it the behavior of light propagating over an obstacle? How big is the obstacle? I remember in the double slit experiment that if the slit is too big, the light will just go through it. The width of the slit must be smaller than the wavelength? Why wavelength? It seems to me that, in a simple model of wave propagating forward, the amplitude will affect whether it can go through the slit or not.
Comment: Want to correct the fact that if the slit is to big one see fringes on both sides of the slit. Then ever you have an edge you get diffraction.
Comment: Do you understand the classical concept of diffraction, with pond waves for example. Without a classical understandment quantum physics will only make things worse.
Comment: I'm voting to close this question as off-topic because the user shows a too low level in physics. Also, there is a lot of material in Internet and Wikipedia that explains what is diffraction.
Answer: You should read this page :http://en.wikipedia.org/wiki/Huygens%E2%80%93Fresnel_principle
The Huygens principle explain intuitively why the wave will spread after being "cutoff" by an obstacle, as the spherical sources at the edge will not interfere anymore with the adjacent ones (those being stopped by the obstacle) to form a plane wave.
As shown in the figure in the link, this principle also explain refraction.
The diffraction by a slit can also be explained as an effect of the uncertainty principle (velocity-position): when the photon passes through the slit, its position in along the slit direction (vertical if you look at the figure in Rnr1410 answer) is known more precisely (the uncertainty on its position is reduced). So, in virtue of the uncertainty principle the velocity along the same direction will be increased. Before the slit, the velocity along the slit dimension was zero (assuming perpendicular incidence), after the slit it could be 0 plus or minus some vertical component : the photon will thus appear on the screen at a position higher or lower thatn the slit's "shadow".
If this is done with many individual photons (one by one) the overall distribution of the photon on the screen will reproduced the interference pattern, see http://en.wikipedia.org/wiki/Double-slit_experiment#Variations_of_the_experiment
Answer: diffraction only occurs when the width of the slit is less then wavelength λ  of the source. we can prove this in lay-man terms also.explainationeach photon ( light-particle ) will be assumed as a wave too.so imagine you cut the slits into infinitely many slits, which were placed side-by-side. then each slit acts as a souce of light. each slit makes amplitude waves on the screen. if the width of all the slits is more than λ , then the sumation of all the waves on the screen is made analogous to what is guessed by classical physics. but if the slit width is small, then the quantum mechanics comes into dominance.Note: if the width is big, light is approximated as falling only on center, but not exactly.
see superposition of waves - wikipedia
Comment: This is incorrect: "diffraction only occurs when the width of the slit is less then wavelength λ of the source". A wave can and does diffract at the edge of anything, no need for a slit. See Sommmereld's classic solution of the edge diffraction problem http://puhep1.princeton.edu/~kirkmcd/examples/sommerfeld.pdf .

Basic rule for diffraction


Pressure in Harmonic Oscillation

Question: Classical Harmonic oscillator's energy depends on temperature as it equals $k_B$$T/2$. However, quantum harmonic oscillator energy is $(n+1/2)hf$. So, when T=0, quantum predicts motion.
I have been wondering what would happen if there is change in pressure? If the pressure is changed, does the quantum and classical prediction differ?
Comment: sorry - not sure what you mean by pressure - if we think about mass on a spring simple harmonic motion then if 'force constant' of the spring then nothing much changes, but the Quantum levels get further apart as the spring gets stronger. Also I think you will find that the harmonic oscillator might get $k_B T$ rather than $k_B T/2$ energy. Certainly for a diatomic molecule it has $3 k_B T/2$ translational energy, $k_B T$ rotational energy (for two degrees of freedom in rotation), but $k_B T$ for the one vibrational mode - typically explanation $k_B T/2$ of KE + $k_B T/2$ of PE for vibration.
Comment: For the molecules in one dimension, what will the effect of change in pressure result? I mean like will the classical as well as quantum both be affected by change in pressure as in temperature?
Answer: Pressure and volume are thermodynamic conjugates. So, to truly depend on pressure a harmonic oscillator would have to have a volume. In that sense a harmonic oscillator is independent of pressure---volume and pressure simply don't appear as variables! On the other hand we can control the oscillator's "size" by changing its spring constant (changing frequency).
In all mechanical systems we have control parameters (generalizing the idea of volume) with associated forces (generalizing pressure). For any parameter $x$ that influences a mechanical system, there is an associated force $X = -\partial E/\partial x$ applied by the system. Note that this force depends on the state of the system and likely fluctuates over time.
In statistical thermodynamics the state of the system is random but with a particular distribution and so we can talk about a well-defined mean value of the force. This turns out to be given (equivalently) by either of these expressions:
$$\langle X \rangle = -(\partial \langle E\rangle / \partial x)_S$$
$$\langle X \rangle = -(\partial A / \partial x)_T$$
The first is the derivative of enery with respect to the parameter, holding entropy constant. The second is the derivative of Helmholtz free energy with respect to the parameter, holding temperature constant.
For the quantum harmonic oscillator, we have a free energy
$$
A = E_0 + \tfrac{1}{2}hf + kT\ln(1 - e^{-hf/kT})
$$
where $E_0$ is the minimum of the potential energy, $h$ is Planck constant, and $f$ is the oscillation frequency. Note that the classical oscillator is a special case for low frequency, where $A \approx E_0 + kT\ln(hf/kT)$.
Now, we can think of $E_0$ and $f$ as control parameters. Changing $E_0$ is boring -- it just adds or removes that change in energy directly to the system. But if we change $f$ (by changing spring constant) while keeping $E_0$ constant, then there is a "force" of
$$
\langle F \rangle = -(\partial A/\partial f)_T = -\tfrac{1}{2}h - \frac{1}{e^{hf/kT} - 1}h
$$
What is the meaning of this? First, it is negative meaning that we must supply energy to the system when we increase frequency. For very high frequencies where the oscillator is frozen into its ground state, the force is $-h/2$. This is is a zero-point-motion force analogous to Casimir force. For very low frequencies the oscillator is basically behaving classically and has an $f$-independent mean energy of $E_0+kT$, however there is still a frequency-changing force of $-kT/f$. This is analogous to the pressure $kT/V$ from a gas molecule in a box. When we increase frequency we decrease the "volume" of the harmonic oscillator.
Answer: It's a little unclear what you are asking, but one influence that pressure does have is that it can effectively broaden energy levels and result in "pressure broadened" or "collisionally broadened" radiative transitions.
Essentially what is going on is that at high pressures (which for a given temperature, means high densities), collisions between atoms/molecules become more frequent and close encounters with another atom/molecule can perturb the energy levels. Thus if you were to think about atoms/molecules as harmonic oscillators (they aren't, but that's not important here) It turns out that the energy levels are perturbed in such a way that the radiative transitions between them have shortened lifetimes and are broader by a factor that depends on the number density and the square root of temperature (for collisional broadening; i.e. it increases with pressure). Similarly, the level-perturbing effects of near encounters with other atoms, sometimes known as the Stark effect, also increases with pressure (essentially as the number density).
These effects are commonly encountered at the kinds of pressures and temperatures present in the photospheres of stars.
Answer: Ah - do you mean pressure as external collisions onto the oscillator?
I think that pressure would have to be very very high to disrupt the oscillation and note that atoms in a crystal have zero point motion (the motion you get at T=0) and zero point energy.
The pressure that you would need to disrupt this zero point motion in a solid would be very high- the sort of pressure that you get in white dwarf/neutron stars I expect.

Pressure in Harmonic Oscillation


Predicting evolution of an unknown mathematical function with machine learning?

Question: Is it possible to predict how a mathematical function evolves using ML? I am studying radioactive decay of polonium 210 and I have gathered data for its decay throughout a couple of weeks. I was wondering if I could use Machine Learning to train on the data available and predict how the Radioactive Activity would evolve after the timeframe where I gathered data. Can I predict (with ML) how the radioactive activity would evolve based on available experimental data?
Answer: You don't need any ML to do this task. If you search on Wikipedia Radioactive Decay you will lear in the "decay rate" section that there is a known behaviour of the times of the decays. In particular the decay of a radioactive nuclide follows what is called a Poisson process, hence the number of events in a given time window follows a Poisson distribution and the delay between two consecutive events follows an exponential distribution with a mean value that is the inverse of the decay constant. As you have the timestamp of each decay event you can calculate the delays between them and fit with an exponential distribution to obtain the decay rate of Po210. Otherwise you can calculate the number of events in a given time window and using the Poisson hypothesis you can calculate the same value for the decay rate.
As the radioactive decay is a true random event that follows quantum physics rules you won't be able (in any possible way) to know when the process wi take place, you can only estimate the probability that it will take place in a given window of time.


MBS benchmarking

Question: I am trying to find some resources online on how to perform mbs benchmarking, but I was unable to find anything.
Could someone explain how to perform mbs benchmarking and provide some resources?
Answer: Despite being written more than twenty years ago, you can get a solid introduction to many of the issues that come up in MBS Benchmarking in "Gaining Exposure to Mortgage Benchmarks - A Guide for Global Investors" by Kulason et al (available online).
For more recent work, see Chapters 19-21 in Dynkin et al. Quantitative Management of Bond Portfolios and Chapter 30 in Fabozzi's  The Handbook of Mortgage-backed Securities.
Answer: The question is lacking context, but I will try to give an overview:

You would first need an index to benchmark to, common MBS benchmark indices include the Bloomberg Barclays U.S. MBS Index, the ICE BofA U.S. Mortgage-Backed Securities Index, and the FTSE MBS Index.
Then you take the data that you have on your MBS portfolio and use it for the subsequent comparison. Make sure that you understand the quality of your data, that it is up-to-date and that you have enough of it.
Calculate performance metrics for both your portfolio and the benchmark. Common metrics include the annualized return, the standard deviation, the Sharpe Ratio, the duration, the prepayment speed, the weighted average loan age the OAS, the effective duration and price convexity.

Relevant resources include:

MBS Valuation and Risk Management Under SOFR
Benchmarking the Canadian Mortgage-Backed Securities market

MBS benchmarking


How do I prevent my soil from compacting?

Question: I have several raised beds for vegetables and I don't walk on them but they still compact over time from watering.
What can I add to the soil to keep it from compacting?
Answer: Elliot Coleman used a broadfork for this.  I'm adding this link for the pictures not because I endorse the product  You can make your own there are DIY tutorials online for that.
What might help would be using drip irrigation and a heavy layer of mulch.  I'd also work in as much organic matter as I could acquire every year or two.  This will help prevent the soil compaction... Also avoid chemical fertilizers and pesticides that might harm the soil life.  These critters aerate your soil for you but can't if you're bypassing their purpose with chemicals.
Answer: Watering does create a pan on the top of the soil, and this needs to be broken up from time to time. Usually this is simply done by forking over the ground, lightly if there's stuff growing in it already. Do it as soon as you see a pan forming - quite often it will form after one lot of watering if that watering is done with a can, especially one without a rose. Work off boards laid on the soil rather than walking all over it if you can, otherwise, fork up where you've walked as you back off the bed rather than leaving compacted footprints.
Answer: Adding a layer of mulch such as dry leaves is the first thing you can do right away. I did this for my raised hills of squash, and beds for garlic and sweet potatoes.
Answer: Earthworms. This may be politically incorrect, depending upon who you talk to, but I'd add earthworms to the beds - and as earlier commentators mentioned, avoid chemical fertilizers and pesticides so you don't kill them. The worms will not only burrow, loosening the soil, they'll carry organic material from the surface deep into the soil. Red Wigglers are NOT suitable for this, but if you search for "buy earthworms online," you'll find a number of other options.
Comment: Be extra careful when adding earthworms to only use species native to your area, and **not** to ever introduce them to an area where they are not native. Invasive earthworms can be devastating to ecosystems where they are not native, by destroying the leaf litter layer in forests. I have seen it happen and it's not pretty, creates a massive erosion problem, facilitates the spread of invasive plants, and severely taxes canopy trees, especially of more shade-tolerant species that rely on an intact leaf litter layer.
Answer: Probably the best way to prevent soil compaction is to ensure that the soil is completely covered at all times. Ideally, you want some sort of layer of vegetative growth at all times, but in the absence of vegetation, some leaf litter or a loose mulch can cover the ground.
There are many different ways of achieving vegetation cover. One of my favorites is to grow low-growing, shade-tolerant crops such as strawberries, parsley, or various greens. The three sisters method uses squash for this purpose. You can use all sorts of other plants other than food plants too; if you're not going to grow a food plant, try to find plants native to your area that have a low maximum height so that they won't compete with your taller food plants.
If you don't have vegetation cover at any point in time, put down a loose mulch. Leaf litter is great if you have leaves in autumn. You can use cut up waste from the garden itself, if you're growing plants where there is no risk of diseases propagating from the fallen litter. I usually avoid buying mulch or accepting external mulch, but if you do use external mulch make sure it's loose and just enough to cover the soil. If you put too much mulch down or if you use a dense, hard mulch, not only can it hold too much moisture, but it can prevent burrowing insects from accessing the soil, and you want those insects. If you compost, occasionally work some compost into the soil or use it as a mulch. The added material not only can cover exposed soil, but can add some nutrients back into the system, replenishing what is lost when you harvest things.
Another factor that can improve soil structure is ensuring that you have some deep-rooted plants in the mix. One reason I like growing carrot-family plants like parsley and fennel, is that they tend to have deep taproots. Also, I like to always have at least one kind of legume in my garden. Beans are the easy one. These will add a lot of nitrogen to the soil, generally making it more fertile and biodiverse.
The more biodiversity you have in your garden, the better the soil structure will be. Leave any native weedy plants that are small enough that they're not shading out your plants, but pull out invasive plants, especially ones that tend not to be eaten by insects. You want a lot of insects so that they are burrowing in the soil, as that will improve the structure. Consider trimming back native weeds instead of pulling them; this avoids exposed soil and soil disturbance.
Also, try to mix together the plants you grow, like instead of having all the tomatoes grouped together, mix them up with other plants, especially ones from unrelated families like beans, or okra, or whatever else you're growing. Not only will this slow the spread of pests from one plant to another, but the total biodiversity will create a broader range of insects which means more things burrowing in the soil and improving the structure.
Lastly, make sure to leave some dead plant stalks in winter, after harvest, ideally leaving them as late as you can, only clearing them out when you need the space. This will help more insects overwinter. And avoid using insecticides! Never! You want lots of critters in there, so they're constantly burrowing and so that there are enough predators that they will keep any pests under control.


Standard deviation and average over 1000 images with random null values

Question: I have a large collection of raster files that I would like to calculate the standard deviation over. The first issue is that ArcGIS cannot process over 1000 rasters via cell statistics, so I decided to go another route by summing the squared values of all the rasters, and then getting the variance and standard deviation. The problem is that each raster may have different areas with values, and some areas with null.

If I were to try to script an iterative function that would sum the rasters, the output would be completely null since with a large quantities of these maps would eventually have null values everywhere.
I then tried using another program, Spirits (http://spirits.jrc.ec.europa.eu/overview/about/). While this software was able to provide an image like this:

The problem with this output is that the null values were converted to 0.
I am looking for a method to process a large time series of these images that ignore the null values for their calculations, and can process over 1000 images at once. Do you guys have any recommendations?
Answer: You can do this in very easily in R using the overlay function in the raster package.
For demonstration purposes I simulate a raster stack object containing all of the rasters. In a real analysis this object would be a pointer to the rasters on disk and read them in blocks to keep the problem memory safe.
library(raster)
library(rgdal)

r <- raster(ncols=100, nrows=100)
  r[] <- runif(ncell(r))
  r <- stack(r)
    for(i in 1:6) {
      cat("layer",i,"\n")
        r <- addLayer(r, r)
      r[[i]] <- runif(ncell(r[[i]]))
    }

You could create a raster stack, from rasters on disk, using the list.files function and a wildcard to read all rasters in a directory. In this example the "r" object would represent a stack of all tiff rasters in "C:/mydir".
r <- stack(list.files("C:/mydir", "tif$"))

To calculate the standard deviation you would use overlay and pass it the sd function with the na.rm = TRUE argument to remove nodata values.
r.sd <- overlay(r,  fun = sd, na.rm = TRUE)

Keep in mind that the mean and standard deviation assume a Gaussian distribution and with skewed distributions are no longer relevant moments. For a spatial dataset this large, skewed "at pixel" distributions are possible and, depending on the data, you could also fall into the "taking the mean of a mean" trap. In the case of needing to take the mean of a derived mean (eg., mean of monthly precipitation) you would use the harmonic mean and not the arithmetic mean.
For a distribution independent measure of variation, akin to standard deviation or variance, you could use the median absolute deviation from the median (MAD), and the median for the central tendency. The "mad" function in R adjusts the coefficient for asymptotically normal consistency.
r.mad <- overlay(r,  fun = mad, na.rm = TRUE)
r.median <- overlay(r,  fun = median, na.rm = TRUE)
plot(r.mad)

If you read the functions help, invoked using ?overlay, you will see that one of the arguments is "filename". If you specify this argument a raster will be written to disk. The format can be defined through additional arguments, specifying format, bit-type, etc.. or just by the file extension (the easy way).
r.mad <- overlay(r,  fun = mad, na.rm = TRUE, filename = "C:/mydir/raster_means.tif")

Answer: Here are some options.

Set up a non-null counter (NNC). That is one additional image that
holds the number of non-null values. Then you can just use the zero
approach but use the NNC raster to divide / stats  etc.
The problem is inherently non-spatial so other tools like Matlab will do this task out of the box.
You can actually do this in gdalcalc.py as well using the NNC method.

EDIT. So first create the binary rasters. In ArcGIS (I'd use a model to do all your rasters, actually I'd use GDAL...) change all values to 1 and all nodata to 0. See image below, change the last value ("inputraster" to 1 in the argument. Then you can just do batches of sums in cell statistics (or just use gdal_calc) and the final value in each cell will be the total numbers of non-null values.
Comment: The error that comes with cell statistics processing over 1000, http://i.imgur.com/v3uUNBH.png, but I will try the NNC method out. Thanks!
Comment: thanks, yes I see it now. I must have done them in batches as  I needed sums.
Answer: What you could do with the output from Spirits is to convert the 0 values to Null, either with SetNull or clip the raster to the raster using Clip (Data Management) and in that tool you can set the null value.
Comment: Unfortunately, I would like to leave out the null values. If one pixel over 1000 images had 980 images without null, it should take the sum of the 980 images and divide by 980. Similar concept with standard deviation.
Comment: Ys the key is to get a raster of the count of non-null values.


Talmudic Methodology - Books

Question: Are there any books that compare and contrast the various methods of Talmud study?
Answer: I do not know if you are looking for this (cannot remember a book that discusses this), however I think this might help you.
I would strongly recommend reading the chapter מתודיקת התלמוד by Rabbi Eliezer Berkovitz
Rav Moshe Taragin explains:

I do not assume that there is one method of learning Torah nor that one style is superior to another.  Such an assertion would be both arrogant and fatuous.  No one would chas ve-shalom minimize the Torah of the Penei Yehoshua or the Maharsha simply because their styles of learning didn't match ours.  To learn Torah is to fully appreciate its quintessential infiniteness.  By the same token, there has been one distinct style which has popularized itself over the last 100 years and which to a greater or lesser degree is studied in most of contemporary yeshivot - an analytic style which in its purest form is labeled the "Brisker Derekh".  This analytic style, which recognizes the fundamental essence of a Health as the source for its constituent halakhic particulars, was by and large practiced by the Rishonim.  Indeed, there are different variants of this approach to lamdanut but at their root they all exhibit substantial similarities.  It is the aim of these shiurim to explore this methodology.
However, there is an additional hazard to the term methodology.  It assumes that within a "derekh" there exists one distinct system and technique for analyzing the gemara and arriving at the desired structure.  Such a premise is also erroneous.  The nature of intellectual enterprise is that objective knowledge is acquired in a highly subjective and personal manner.  I might analyze a 'sugya' from a wholly different perspective than you would even though we would arrive at similar conclusions.  There is no specific order or strategy and to adopt one is to stifle the personal initiative which is so vital to true Torah mastery.

One of the מתודיקת of Talmud-study is called the "Brisker method". However:

While the Brisker method has won acceptance in almost all yeshivas today, it has its opponents. These include Rabbi Avraham Yeshayahu Karelitz (1878–1953) (known as the Chazon Ish), who felt that often the existing approach to a Talmudic portion was sufficient. Additionally, the Brisker method is not widely used in modern yeshivas which stem from the Mirrer Yeshiva (originally from Russia), which instead tend to stress single, unifying themes throughout Talmudic concepts, often focusing on only one Rishon if it is seen as the most "truthful" approach to a Talmudic passage

Similary, Rabbi David Samson writes:

The Natziv had a different way of learning Gemmarah which was based upon clarification of the Rishonim method and is explained simply in his book the "Haemek Shela". The Natziv used precise language to clarify if, indeed, this was what the specific Rishon wanted to convey to us. This method is being continued by Yeshivat Mercaz Harav, as prescribed by Rav Tzvi Yehuda Kook zt"l. Rav Kook instructed that one should learn the methodology of the Rishonim and the principle points of the Achronim and then see how they both intertwine and at what point they complete each other.

And on Tosfos:

In order to teach Tosafot one needs to clarify its structure. The Tosafot is broken up into two parts. The first part involves a question, an explanation and three proofs. The second part consists of two proofs and one more unacceptable proof. Thus, the student realizes exactly what he does not understand, which the first step towards understanding is. If the student does not know how to get through this first stage then it will be difficult for him to figure out exactly what he doesn't understand and it will not be easy for him to learn the Gemmarah. However, if the structure of Tosafot is clear to the student and he is able to define to himself which point in the Gemmarrah needs clarification, then that point that he is missing should not detract from understanding that Gemmarah as a whole. The student will then be on his way to understanding what he is not grasping and will be better able to learn Gemmarrah .

Further: see this discussion
Comment: Thanks for this information. It's very helpful. Is R. Berkowitz's book available in print? I can't find a hard copy of it. Also, how would R. Steinsaltz's approach to the Talmud be classified?
Comment: @Bs234570 no problem. I don't think "What is the Talmud" has been printed as far as I know. Sefaria (see link at the beginning of my response) has the whole work available in digital format. The only I found about R. Steinsaltz is this "He also immersed himself in the writings and theology of Kotzk and also Chabad theology". It seems he was a descendant of the first Slonimer Rebbe, so maybe he followed their Derech HaLimud?  see: https://vinnews.com/2020/08/09/rabbi-adin-steinsaltz-a-life/

Talmudic Methodology - Books


Is the surface integral of a vector field through the six surfaces of a cube zero?

Question: Is the surface integral of a vector field through the six surfaces of a cube zero when the vector field is defined in the whole region.  If I integrate over all the surfaces for any vector field.  The flux through opposite surfaces cancel out. So is this true for a cube?
Comment: What makes you thing that opposite faces will always cancel?
Comment: @amd for a vector field when we are integrating over a region and vector field is A then A.n Is always equal for both faces in value but sign is always opposite in opposite  faces . So surface integral of both added is zero.  I think.  Where's my mistake. I just wanna know my mistake.
Comment: Try it with the field $\mathbf r/\|\mathbf r\|$, where $\mathbf r = (x,y,z)$.
Answer: This is not necessarily true for a cube (or for any closed surface).
If we imagine the vector field as measuring a velocity field of water in motion, then flux measures how much water is passing through the surface.
Now, if all your water is moving left to right, then you're right that the flux through the left face and the right face of a cube cancels out (and the flux through the remaining 4 walls is 0 because no water passes through them.)
But fluid flow can be vastly more complicated!  In particular, if you have a source of water inside the solid, you can easily arrange for the net flux to be non-zero.  (This is essentially amd's suggestion in the comments)
Now, water in real life is often (roughly) incompressable.  If you assume this, as well as that there are no sources or sinks for water to emanate from or disappear into, then you have mathematically assumed the divergence of your vector field is zero.  Then the divergence theorem tells you the net flux through the surface is 0, in this case.  I think this is why your intuition was leading you to guess the net flux was zero.


Is there an easy way to finding lore items?

Question: I seem to find myself mousing over every book in every room to see if it has any meaning - reading, xp, etc.  Is there an easier way of finding if an item of importance exists in my current view?
Answer:
It is currently unknown whether or not lore books will be tied into
  the achievement system, but it's likely that many players will want to
  collect all available books in the game. Some books are sensitive to
  quests, where if the player misses them during a quest step, they will
  have to repeat the quest to attain the book. This list will eventually
  house the location of every lore book in the game. The following is
  listed by when the book becomes available to the player
  chronologically, not when they were recorded. A static spawn is an
  item spawned in a pre-set area, and will always appear during a
  specific event or in a specific area. A dynamic spawn does not have a
  100% chance to spawn, and it will also usually spawn in multiple
  locations.

Source
This is still incomplete, but soon they will complete all acts with all books. ATM there is only ACTI with some books.
The easier are:

Leah's Journal: from Leah's room (depend on which quest you are)
Lore Book in Deckard Cain's house
Answer: Quest items appear with a faint gold glowing particle effect.  See the crown at 8:35 in this video.
Answer: Taking in account my experience so far in the game, what i realized is that, lore itens (such as green books) can be found in dead bodies ( those you have to click in order to drop its content) and in places that are not hidden such as pedestals (like in the act 1 dungeons).


Why is "Do you have anything in mind?" correct?

Question: If "What's the time in your watch?" is grammatically inconsistent (as time is an abstract concept so it should be "by your watch"), why is "Do you have anything in mind?" correct even though that "anything" could be abstract as well (Why is "in" used there)?
Comment: The rule is that you learn every single preposition for every single word by heart. Just like native speakers do. All of them have to do it, and all of them have to do it before even learning that the word "preposition" exists or what it means.
Comment: Because prepositions have nothing at all to do with how abstract a thing is. A very non-abstract you can be *in* a very non-abstract bus, but you can't say that. You are trying to apply a rule that does not exist. And so of course it doesn't work. You can ask for the current time *in* China. You can even ask for the current time in China in China. You can ask for the current time *in* ten years' time. You can talk about all kinds of abstract concepts *in* mathematics. Or *in* a hall. Or *in* a square. Just never *in* a bus.
Comment: Prepositions, at least in English, are probably the most polysemous (used 'with many different shades of meaning') (or even at times defying simple definition, and grading to 'function words') of words. The more peripheral usages have probably come to us in the 21st Century from more logical-sounding earlier expressions; dropping of words or semantic shifts have led to modern usages defying analysis.
Comment: @RegDwigнt♦ What's the rule?
Comment: @RegDwigнt♦ Thanks
Comment: @Edwin Ashworth Thanks
Comment: It's an idiom, which means that though it may not follow the usual rules, the phrasing is stuck and to do otherwise would be ungrammatical. "It's 12 o'clock" is an idiom - there's no "o'time" or "o'ruler" or whatever.
Answer: The reason for that has to be sought in the relation expressed by the preposition and the relations that are applicable to the entity that the word represents.
If we take "in", the fundamental relation is that of position within something, like a container, something that is characterized by volume, mass, rather than by surface, things that have content,  or things similar to them. Therefore, when humans choose a preposition to go with a noun or a verb they go approximately by the meaning of this relation. For instance, in the case of "in the mind", the concept of mind in the human mind is associated with the head,  and the head is a kind of container; we know in fact that the mind accounts for some part of the volume of the head. The idea is the same for the combination "in a house" because a house is like a box, like a container; therefore the best suited preposition is "in" when you need to make precise a position between the walls of a house.
Of course this system is not perfect and it  takes on very complicated aspects because it   strives in great part upon the concrete relation to attribute to the prepositions yet other relations of an abstract nature. For instance, the preposition "on" is use for a concrete relation that has little to do with volume and concerns primarily surfaces (on the table, on the floor (but here, divergence of point of view, and "in the floor" is also correct)), on the sea, on the beach). However, this preposition takes on new abstract meaning and so a locution such as "on the mind" has to be accepted without asking for a clear explanation; when you come to the abstract relations you cannot rely upon the logic of their concrete meaning to a great extent. They appear often to result from mere assignation and the best you can do is to take them as they come.
Let's take another example, that of the watch that you mention. You say the preposition should be "by"; well, it is "by" in a way, that is, it is not just "by",  "on" can be used for the same purpose.  We have in this usage of "on"  the "concrete" logic of relations for surfaces; since our sole real concern  with getting the time of day is nothing else but the surface on which we read this time. The preposition "by" is more abstract, the watch is considered as an agent giving you the time; thus, in the case of watches you have two prepositions, one concrete and the other abstract, and both are justifiable as to the the meaning they have. The matching of a preposition to a word is not always so easy or so neat  but nevetheless innumerable cases of matching rest upon a more or less evident logic.


Render an ActionResult to a String, Return it as ContentResult

Question: I have some code that is almost working to convert an actionresult to a string.
After I execute the method EditableItem, it outputs the html stream response to a stringwriter, and then I get the html and modify it, and then I have the html in a string (with escape charachters).
My problem is that at the end of the code, I cant return a content result. I assume this is because I'm messing with the ControllerContext. I'm entirely sure if this is the problem, but this code returns a blank html page for me. But the end, the readonlyHtmlString string is full of great html code. And rendering a regular ContentResult doesn't work either. How can I remedy this?
Thanks
<code>    public ActionResult Readonly(long Id = 0, long id2 = 0)
    {

         var localWriter = new StringWriter();
         var response = ControllerContext.RequestContext.HttpContext.Response;
         response.Output = localWriter;
         this.EditableItem( Id, id2 ).ExecuteResult(ControllerContext);
         localWriter.Flush();
         var htmlStringWithEscapes = localWriter.ToString();

         var htmlDoc = new HtmlDocument();
         htmlDoc.LoadHtml(htmlStringWithEscapes);

         foreach (HtmlNode inputNode in htmlDoc.DocumentNode.SelectNodes("//input"))
         {
            //var disabledNode = inputNode.Clone();
            inputNode.Attributes.Add("disabled", "disabled");
            //inputNode.ParentNode.ReplaceChild(inputNode, disabledNode);
         }

         var readonlyHtmlString = htmlDoc.DocumentNode.OuterHtml;

         //should return a readonly view at this point!!
         //return Content(readonlyHtmlString, "text");

         //this code doesn't work anymore either
         return Content(String.Format("This is the Material Item Controller > Readonly and Id is {0} and id2 is {1}",Id, id2),"text");

    }
</code>
Comment: I need see EditableItem action
Answer: I'm not sure why it wasn't working, so I scrapped the code in favor of the methods used here...
Render an MVC3 action to a string from a WCF REST service method


How can I integrate DeadBeef into the sound indicator menu?

Question: Is it a way to put DeadBeef to sound menu instead of Rhythmbox?
Answer:
how to
First install deadbeef - you should check the authors launchpad website for precompiled versions of deadbeef.  At the time of writing this, no 12.10 or later version was available:
sudo add-apt-repository ppa:alexey-smirnov/deadbeef
sudo apt-get update

sudo apt-get install deadbeef

add deadbeef to sound indicator
Using dconf-editor you can add deadbeef to the sound indicator:

add volume control options
To add the volume controls you need to compile from the MPRIS plugin from source.
important note - this was highly unstable for me on 64bit ubuntu causing deadbeef to continually crash and I dont recommend you do so.
sudo apt-get install deadbeef-plugins-dev git
Next download the mpris plugin source from github

git clone https://github.com/kernelhcy/DeaDBeeF-MPRIS-plugin.git
cd DeaDBeeF-MPRIS-plugin
./autogen.sh
./configure
make
sudo make install

If you want to remove Rhythmbox from the sound indicator then the linked Q&A will help

Linked Questions:

How do I change the Sound Menu's default music player?
How do I remove players I don't use from the sound indicator?
Comment: @Dune - updated - however you should note, no 12.10 version exists.
Comment: Your instructions are out-of-date. The PPA does not support 12.10 and the MPRIS plugin is no longer available on SourceForge. Can you please update your post with a working method to install the MPRIS plugin?
Comment: Thank you very much! If I can help it I don't want to build this plugin from source. If you've already built the plugin, would you mind uploading the `.so` file somewhere? I am using the x64 version of DeadBeeF on 12.10 x64.
Comment: Does this still work? I noticed this answer is 8 years old, I want to make sure it's not obsolete before I screw with the dconf.


Doubt regarding a differential equation.

Question: There's a problem in a book regarding exact differential equation :
Solve :
$$x\,dx+y\,dy = \frac{a^2(x\,dy-y\,dx)}{x^2+y^2}$$
The author further proceeds to rearrange above in the form $M\,dx+N\,dy=0$
where
$$M=x+\frac{a^2y}{x^2+y^2} ; N= y-\frac{a^2x}{x^2+y^2}$$
Which further implies
$$M_y=N_x=\frac{a^2(x^2-y^2)}{(x^2+y^2)^2}$$
This is the required condition for the given equation to be exact and the solution is obtained using standard formula.

But, what I did is as follows :
$$x\,dx+y\,dy = \frac{a^2(x\,dy-y\,dx)}{x^2+y^2}$$
$$\to (x^2+y^2)x\,dx + (x^2+y^2)y\,dy=a^2(x\,dy -y\,dx)$$
Therefore
$$(x^3+xy^2+a^2y)\,dx + (y^3+yx^2-a^2x)\,dy =0$$
Comparing it with the equation $M\,dx+N\,dy=0$ we get,
$$M=x^3+xy^2+a^2y; N=y^3+yx^2-a^2x$$
But
$$M_y=2xy+a^2; N_x=2xy-a^2$$
Evidently, $M_y\neq N_x$.
So what am I doing wrong here?

At first I thought I shouldn't/couldn't just simply multiply both sides of the given equation with the denominator ($x^2+y^2$) of right hand side if it's zero, but since as it's already in denominator isn't it understood that it isn't/can't be zero ??

Any help is really appreciated.
Comment: Have you yet studied [integrating factor](https://en.wikipedia.org/wiki/Integrating_factor)s?
Answer: $$x\,dx+y\,dy = \frac{a^2(x\,dy-y\,dx)}{x^2+y^2}\tag 1$$
As you correctly found : Equation $(1)$ is an exact ODE.
You transformed Eq.$(1)$ into Eq.$(2)$:
$$(x^3+xy^2+a^2y)\,dx + (y^3+yx^2-a^2x)\,dy =0\tag 2$$
Again you correctly found : Equation $(2)$ is not an exact ODE.
This is not contradictory because Eqs.$(1)$ and $(2)$ are not the same ODE.
In order to transform Eq.$(2)$ into an exact ODE one have to multiply it with an "integration factor", say $\mu(x,y)$.
One find that $\mu(x,y)=\frac{1}{x^2+y^2}$.
$$\mu(x,y)\Big( (x^3+xy^2+a^2y)\,dx + (y^3+yx^2-a^2x)\,dy\Big) =0\tag 3$$
$$ \frac{x^3+xy^2+a^2y}{x^2+y^2}\,dx + \frac{y^3+yx^2-a^2x}{x^2+y^2}\,dy =0\quad\text{is exact.}$$
In fact Eq.$(3)$ is equivalent to Eq.$(1)$ thanks to the correct $\mu(x,y)$.
Answer: In my mind, your question is about integrating factor.
You have checked your equation
$$
(x^3+xy^2+a^2y)dx+(y^3+yx^2-a^2x)dy=0
$$ is not exact.
That's why we need integrating factor. Here the integrating factor is exactly $\frac{1}{x^2+y^2}$.
By the integrating factor, we make your equation an exact equation deliberately, then we can solve the ODE by exact equations.
If $x^2+y^2=0$, then this ODE is not $\textbf{well-defined}$.
p.s. It's my first time to answer a problem. Perhaps I misunderstand your problem, please tell me and I would try to correct my answer.
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


2d game with png sequences slowing on Unity3d

Question: We are building a tower defence game,In which enemy movement is done through sprite sheets as well the tower rotation is also done through sprites...every tower and every enemy has its own script attached to it which controle its animation...but when enemies and towers are in greater ammount the games slows down..and become laggy on iphone and unity ..can anyone tell what is the problem with it...
Comment: Do you have Unity Pro?  Have you tried using the profiler?
Comment: It is hard to see the performance problem without seeing the scripts. Maybe you could provide us with a pasebin link to your script?
Answer: In a personal project of mine having a script working on every object in the game would slow the game down drastically. Thus creating a main object that controls multiple things should give a performance increase
Comment: Welcome to GDSE Roy! We typically like our answers to be a bit more in-depth. Perhaps if you could link to references or explain the reason for the slow down further that would make this answer better. Thanks for your contribution.


How to remove the red squiggly line from IntelliSense for the newly created table or procedure without restarting the SSMS

Question: A newly created table or procedure will always have the red squiggly underline until the SQL Server Management Studio is restarted. Is there a way to get rid of it without re-start the SSMS? Or it's a feature that SSMS needs to update? Thanks!
Comment: Well, the answer there certainly address my question. It's just when I searched before I asked this question, it doesn't show up. The question about updating the IntelliSense cache is more or less part of the answer to this question, not necessary a duplicate. The person who asked the question obviously knows the red squiggly underline is due to the IntelliSense cache, just doesn't know how to update it.
Answer: Try pressing ctrl + Shift + r to refresh intellisense and remove the red squiggly underline.


How do I make my post community-wiki using android app?

Question: I am using SE android app and want to make my post as community-wiki but can't see any option/feature for that.
Comment: There is not. Updated tags.
Answer: This would be amazing!
When posts need to be CW, there should be an option to make them CW so it gets less messy. Anyways, the current way is to flag the post for moderator attention with a comment saying that the post needs to be marked CW. Great proposal that needs a big status-completed!


Consider $\mathbf{Z}G$, $G$ finite. If the characters of two $\mathbf{Z}G$-modules are equal, does it follow that the modules are isomorphic?

Question: So I have recently started to delve into integral representation theory and I was wondering if a particularly useful theorem survives the transition to integral rep theory. Basically, suppose we have two $\mathbf{Z}G$ modules $M$ and $N$ such that their representations are isomorphic. Clearly this means they have equal characters. What I am wondering is whether this implies $M\cong N$, and if so, where I can find such a proof.
I am interested in this since obviously this holds over fields of characteristic zero which are algebraically closed. Any help in this matter will be greatly appreciated. Thanks in advance!
Comment: I am a little unsure what you mean here. Do you mean you have two $\mathbf{Z}G$-modules with equal characters, and you want to know if this implies that the modules are isomorphic?
Comment: Yes, that is what I mean.
Answer: If you want an example where the modules are free over $\mathbb{Z}$, then let $G=\langle g\rangle$ be a cyclic group of order $2$, let $M=\mathbb{Z}G$ be the regular $\mathbb{Z}G$-module, and let $N=U\oplus V$ be a direct sum of two copies of $\mathbb{Z}$, where $g$ acts trivially on $U$ and by multiplication by $-1$ on $V$.
Comment: Hi Jeremy, thank you for answering. Perhaps I am being a bit slow but are you supposing this is a counter example to my question?
Comment: @SamWilliams Yes, both modules have the regular character, but they are not isomorphic, since $N$ is a direct sum of two rank $1$ modules but $M$ is not.
Comment: Ah okay, now this makes more sense. Do you know if there is ever a case where this holds? Such as for lattices etc?
Comment: @SamWilliams If by "lattice" you mean a $\mathbb{Z}$-free $\mathbb{Z}G$-module, then the modules in my example are both lattices.
Comment: By lattice I meant a $\mathbf{Z}G$ module whose underlying abelian group is both finitely generated and torsion free.
Answer: The answer is no. One example to keep in mind is the 2 dimensional representation of $\mathbb{Z}/p$ over $\mathbb{F}_p$ where 1 acts by the matrix $$\left( \begin{array}{ccc}
1 & 1 \\
0 & 1\end{array} \right)$$
This representation has trivial character.
Comment: Perhaps I m missing your point but that is because we are working over a finite field, rather than the integers which are certainly infinite.
Comment: Working over a finite field is over the integers. ZG modules are just abelian groups with G actions.
Comment: Note that in Jeremy's answer $M \otimes \mathbb{F}_2$ is exactly the representation of $Z/p$ described in my answer for $p = 2.$ In fact, the fact $M \not\cong N$ can be attributed to exactly this problem at 2 as $M[1/2] \cong N[1/2].$
Comment: Thanks, this has cleared up things for somewhat


Can I just remodel my town without losing anything?

Question: So my town on Animal Crossing: New Leaf is perfect, but I'm kinda getting tired of it. So I want to know, if I reset my town, will everything be deleted? Or will it just be moved around?
Answer: You cannot reset your town, you can only delete it. This deletes the town, everything and everyone in it, as well as all player characters that reside in the town.
Afterwards you can start your town brand new as if you just bought the game.
Answer: You can't reset your town but what you can do is delete it. You lose everything in the town but one of my tricks is for a friend to hold your items and then have them give the items back after you create a new town. You also get randomly new picked residents and you lose relationships with residents and you get a new town fruit.


Configuration database missing

Question: My configuration database of SharePoint 2016 has gone missing. It's .mdf file is also not there which means somebody has removed that database. What can be done now? I am unable to run any application, Central Admin, etc
.
Comment: If you are certain about "someone deleting it", you'll likely want to start to prepare for a backup recovery. Hopefully there is a backup for your database server available. In not too distant future you'll probably want to investigate why and how this happened too.
Comment: No, it must have got removed right from sql server management studio.
Answer: If configuration database is missing, thats mean you farm is down and now you have to two options.

Either Built a new farm

You have to take the backup of all content dbs
Install and configure SharePoint in a farm.( you have to uninstall the sharepoint as Config DB missing)
Create new web application and service application
Apply all the customization, authentication and other changes ( if any).
now mount the content database to web application and test it.
lastly, perform a backup of all your database.

Restore the Config DB from backup,

Make Sure recover point is as close as possible to the deletion time. if there is lag between deletion time and recovery time then you may see the orphan sites. i.e if Config DB was deleted at 7AM and your restore time is 4 am then u will see issue.
Answer: If the database is neither present in SQL Server Management Studio nor on disk as .MDF file, you cannot recover from this disaster with SharePoint methods. You need to restore the ConfigurationDatabase from your last backup.

Configuration database missing


Who owns the patent now?

Question: My great grandfather invented several jacks IE: lift jack, screw jack, etc. He worked for the Buda company in Illinois at the time. Their agreement was my gr.grandfather would receive the royalties for five years and then the royalties would go to Buda company.  Some time after my gr.grandfather passed away, the Buda company went out of business. From what I understand the patents would then be returned to the original owner, my gr. grandfather.  I actually have the book of his patents. But nobody ever turned anything back over when the company shut down. So, who owns the patents? Me, because I have the book of them? Someone else? Why did the royalties not return to our family after Buda shut down? It's like it all disappeared when the Buda Co closed.
Comment: If those patents are from more than 20 years ago, they will have expired and would have no financial value. If you can provide the patent numbers, we can check if they've expired.
Comment: Joanna, I tried to answer you question. I'm an engineer and inventor, so if you could provide the patent numbers or even your great grandfather's name, I could review the patents and maybe provide some additional insight.
Answer: According to Wikipedia, the Buda Engine Co. was founded in 1881 in Buda, Illinois. Buda seems to have been involved very early in the automotive industry. Rather than going out of business, it was acquired by Allis-Chalmers in 1953. When a company is purchased by another company, typically all the assets are acquired including intellectual property such as trademarks, trade secrets and patents. Unless the terms of ownership of the patents were defined in a specific contract, I don't think their ownership would necessarily revert to your grandfather rather than being held by Allis-Chalmers.
In any case, based on your question, the patents must have be issued at least 5 years prior to 1953 which means they would have an expiration date 17 years after their grant date. This is part of the basic idea of patents. The government wants to encourage individuals and companies to spend the time, money and effort developing new technologies. In return for a public description of how the invention works, it grants the owner of the patent a limited duration of exclusivity after which, anyone else can use the invention without license. Thus, even if the patents all issued in 1953 (and they likely were much earlier) the latest anyone would have to pay royalties on them would have been 1970.
The bottom line is that the patents probably expired more than 50 years ago and thus the potential for royalties. At this point the patents have no commercial value. It is possible that the patent documentation you posses could have some collector value especially considering they may be automotive related.

Who owns the patent now?


Why is electric power needed at all when elevator is descending?

Question: If the ropes are doing negative work on lift, why is electric energy needed? And why is there a limit on number of passengers in a lift in this case?? Please explain in terms of energy conservation and Work Energy Theorum
Answer: When an elevator is descending what is needed is a mechanism for getting rid of the gravitation potential energy of the elevator.
A very inefficient way would be to have a friction brake with heat being generated as the elevator descended.
One way of helping to improve efficiency is to have a counterweight, which could be another elevator, so the potential energy from one elevator going down is transferred to the counterweight going up.
The potential energy of the counterweight (often weighing the same as an elevator loaded to $40\%$ capacity), can then be used to raise the elevator.
This reduces the amount of work which the motor has to do and so increases the efficiency of the system.
This system was used 100s of years ago allowing fully loaded mineral trucks from a mining operation to go down a hill whilst empty trucks were hauled up the hill.
There are systems where the motors are regenerative so that they not only do work but can have work done on them thus acting as a generator (and a brake) and producing electrical energy for use in other parts of the facility.
The article Energy efficient elevator technologies gives some more information about improving the efficiency of elevators.
Answer: It is a matter of control of velocity, the correct acceleration going up, and the correct deceleration going down that need electrical power.
There are the counter weights, but the load is variable in the elevator and that has to be taken care of with the power from electricity, whether ascending or descending. With just the counterweights nopower is needed either up or down!!


Definition of Positive and Negative Angular velocity?

Question: (I have taken angular displacement positive for counterclockwise.)
First definition
Angular velocity is positive when the rotation is counterclockwise and negative when it is clockwise.
Second definition:
Angular velocity is positive when the angular displacement is increasing and negative when the angular displacement is decreasing.
Contradiction:
According to second definition When angular displacement is decreasing then angular velocity is negative and from first definition angular velocity is positive.
These two upper statement are confusing and i think have contradiction between them will any one expert elaborate.
Comment: Ask yourself, what is bigger $-2$ or $-3$? When going from $-2$ to $-3$ is the change positive or negative? What about when going from $2$ to $3$? I think you are confusing a quantity change with a change in its magnitude.
Answer: First of all, ask to yourself

Does nature care how you are examining it ? (In Newtonian Mechanics)

The property of positive and negative only depends on your coordinate system, i.e how you are looking to the system.Similarly, the matter of some quantity is decreasing or increasing also depends on your coordinate axis.Nonetheless, they describe the $\textbf{same}$ thing.
Addition to that, think "decreasing" as increasing in the negative direction.
Answer: The answer is simple. Lay out the angular displacements in a number line. If you are moving from left to right then the velocity is positive. Otherwise it is negative. It is a matter of convention, but the velocity sense has to be the same as the angular sense.
This is such that statements like $\theta_2 = \theta_1 + \omega \Delta t$ make sense algebraically as well as conceptually.


iOS: controlling size of assets designed in Cinema 4D when importing into Xcode?

Question: A designer provided the attached two DAE files created in Cinema 4D. The characters in these DAE files are to be integrated into an iOS game.
Both assets are of comparable size inside of Cinema 4D. Both DAE files were produced with the same export process.
Importing the DAE files into a SceneKit scene, however, produces different results.
Chango.dae imports at a "normal" size with a bounding box of ~3x4x3.
Tiki.dae imports at a huge size with a bounding box of ~155x325x140. Its dimensions inside Cinema 4D is 122x283x142.
Questions:
1) How do you make sure assets "fit" into a SceneKit scene? Are you supposed to scale down assets with the "scale" property of the SCNNode, or are you supposed to ask the designer to make the asset of a certain size? In SpriteKit and UIKit, this is straightforward. The asset size correlates directly to its screen size (e.g., 20x20 icon takes about that much screen space depending on resolution). However, what's the analog for SceneKit? If you want an asset to fit into a 1x1x1 SCNNode, what size do you ask the designer to make the asset?
2) If your asset is too large for a scene, how do you scale it down? In UIKit, for instance, you can scale an image to fit a UIView with something like ScaleAspectFit. There doesn't seem to be an analog for a SCNNode. Using the SCNNode's scale property changes the appearance, but doesn't change the asset's bounding box. And even changing the appearance isn't precise. For instance, with Tiki.dae, the original height of the asset (as shown by the bounding box) is 324.36. If you set the Y-scale to 0.01, however, the height doesn't become ~3.24. It becomes smaller than 3, which you can prove by fitting it comfortably within a sphere of height 3 (radius of 1.5).
Answer: You can always click on your .dae in the Scene Graph View, then adjust the scale in the Node Inspector. I'm using the same workflow from C4D to Xcode and I have to shrink things down to something absurdly small like x: 0.0001 y: 0.0001 z: 0.0001 so there must be something I'm missing too.
Comment: Doesn't the exporter have a scaling feature?


Deploy azure data factory v2 app

Question: I'm trying to find any way to publish my console app (.net) written for azure data factory v2.
But could not find any solution.
Comment: Since this has nothing to do with U-SQL, I am removing the tag.
Answer: More details would be really appreciated but if you mean that you are using the .NET SDK to create ADF V2 objects, my understanding is that there is no such thing as publish compared to the new User Interface in the portal where you create/edit the objects first and then you click on publish.
if you use the library they get automatically uploaded to ADF V2 and you can easily test that now with the new UI.
Answer: It would be useful to have a bit more info on your context. You're talking about running a custom activity from an Azure Batch account? What did you try already?
When running a custom activity, you'll have to upload your executable + depedencies to an Azure storage account. Create a blob container and copy the files there. Then you'll have to configure the activity to use this storage account and the point it to the right container.
If you're asking for a deployment like a right-click -> deploy option, it doesn't exist. I've automated my deployments using PowerShell, using Set-AzureStorageBlobContent to write the files to the Storage account.

Deploy azure data factory v2 app


Uniqueness of nonterminating decimal expansion...

Question: Prove that decimal representation is unique iff the number has no terminating expansion. Prove also that any terminating expansion also has a nonterminating expansion. How are these nonterminating expansions constructed?
Comment: Welcome to MSE! Do you have any thoughts or tried anything on the problem? Regards
Answer: Hint:  the important idea is that $1=0.9999\ldots $  This will let you solve the second and third.  The first depends on what you have to work with, but the idea is that aside from this any two expansions are a ways apart.


How is the Beeswarm plot better than a histogram?

Question: I have read about Beeswarm and Histogram plots. But I did not understand the difference. In a Histogram, if the bins number is increased then its intrepretation is changed. So how can a beeswarm plot help to understand the data?
Answer: They are quite similar but :

Histograms results of aggregation into bins (loss of information due to aggregation: high-resolution point (2.324) is reduced to bins resolution [2,3])
Beeswarm plot displays the exact value of points on the axis. It is a 1D-scatter plot.

However, if two points are very close to each other they will overlap if the point size is big enough. To avoid this, the beeswarm plot will slightly shift one point to the side so it does not overlap.
They will often look similar because the more points you have locally, the higher the probability of overlapping. Then, high-density areas will often result in "peaks" as in histograms.
The beeswarm plot is a more faithful representation

Gap in the data: depending on the binning (both placement and size), the histogram may not represent it (as on point 1 in the figure).
Min and max: Imagine values are limited at 5 but the histogram last bins continues to 6, it might give the impression that the max value of the variable is 6.

In both cases, you can see that beeswarm is a more faithful representation.
Because of this, it is not highly scalable (it has to represent every single point with no overlap). On the seaborn.swarplot function docs :

This function is similar to stripplot(), but the points are adjusted (only along the categorical axis) so that they don't overlap. This gives a better representation of the distribution of values, but it does not scale well to large numbers of observations. This style of plot is sometimes called a "beeswarm".
Comment: Thanks for the answer  , i have a one question more , is there also a plot which is better than beeswarm plot.
Comment: I wouldn't say one is better than the other. As mentionned histograms are suited when data volume increases and beeswarm is more suited with a small data volume to have a faithfull representation.

You can also check violin plot (which is probably the easiest to understand for a non-scientific person) and boxplot (highly aggregated representation)
Comment: Please accept my answer if answered your question :)
Comment: I understand it .
Thanks
Comment: @Satish Saini please have a look on [how to accept an answer](https://datascience.stackexchange.com/help/someone-answers)
Comment: Thanks BrunoGL.