How can I show that these are equal?
Sum of First $n$ Squares Equals $\frac{n(n+1)(2n+1)}{6}$
Why is the year NOT displayed in the questions and comments dates? Why is it that the year is never displayed in the questions or comments? Is it because it is the current year? I, and maybe others, wonder. New UI encourages askers to confirm or dispute duplicate votes , the banner shown to askers whose questions have attracted at least one duplicate close vote has a couple of new options:    If the author clicks the first button, they're shown a confirmation that clarifies the results of this action somewhat:    If they click "Ok", the question is instantly closed:    If, instead, they edit, they'll be offered this guidance:    ...and once an edit is submitted the choice will go away until another duplicate close-vote is cast.   In just the past day, 80 questions  network-wide have been closed in response to confirmation from the asker; edits by askers are up significantly as well.   We'll be monitoring the results to see if further adjustments are needed. A few open questions surrounding this change include:    Perhaps if the number of votes is below some threshold?   I'm posting this separately from  to allow room for discussion and . How many permanent SPECIAL points are available in Fallout 4? If a lens focuses all incoming light to a point, how do we get 2D images? How do lenses produce 2-dimensional images, if a lens bends all incoming rays of light to intersect at the focal point? Shouldn't this produce a single dot of light on a screen placed at the focal length?  This is basically the standard diagram that always shows up in textbooks:    I know this doesn't happen in real life--I used to use telescopes pretty frequently for work. The most in-focus image would be the one with the smallest diameters for the stars, which, of course, we think of point sources at infinity. But--the light from all stars (despite being at infinity) is not all focused at a single point. Instead, each star's light is focused at its own $(x,y)$ point on a 2D image.  I can't reconcile the theory as I understand it with any of my real-life experience with optics. What am I missing? I am running logistic regression on a small dataset which looks like this:    After implementing gradient descent and the cost function, I am getting a 100% accuracy in the prediction stage, However I want to be sure that everything is in order so I am trying to plot the decision boundary line which separates the two datasets.  Below I present plots showing the cost function and theta parameters. As can be seen, currently I am printing the decision boundary line incorrectly.    Extracting data  clear all; close all; clc;  alpha = 0.01; num_iters = 1000;  %% Plotting data x1 = linspace(0,3,50); mqtrue = 5; cqtrue = 30; dat1 = mqtrue*x1+5*randn(1,50);  x2 = linspace(7,10,50); dat2 = mqtrue*x2 + (cqtrue + 5*randn(1,50));  x = [x1 x2]'; % X  subplot(2,2,1); dat = [dat1 dat2]'; % Y  scatter(x1, dat1); hold on; scatter(x2, dat2, '*'); hold on; classdata = (dat&gt;40);   Computing Cost, Gradient and plotting  %  Setup the data matrix appropriately, and add ones for the intercept term [m, n] = size(x);  % Add intercept term to x and X_test x = [ones(m, 1) x];  % Initialize fitting parameters theta = zeros(n + 1, 1); %initial_theta = [0.2; 0.2];  J_history = zeros(num_iters, 1);   plot_x = [min(x(:,2))-2,  max(x(:,2))+2]  for iter = 1:num_iters  % Compute and display initial cost and gradient     [cost, grad] = logistic_costFunction(theta, x, classdata);     theta = theta - alpha * grad;     J_history(iter) = cost;      fprintf('Iteration #%d - Cost = %d... \r\n',iter, cost);       subplot(2,2,2);     hold on; grid on;     plot(iter, J_history(iter), '.r');  title(sprintf('Plot of cost against number of iterations. Cost is %g',J_history(iter)));     xlabel('Iterations')     ylabel('MSE')     drawnow      subplot(2,2,3);     grid on;     plot3(theta(1), theta(2), J_history(iter),'o')     title(sprintf('Tita0 = %g, Tita1=%g', theta(1), theta(2)))     xlabel('Tita0')     ylabel('Tita1')     zlabel('Cost')     hold on;     drawnow      subplot(2,2,1);     grid on;         % Calculate the decision boundary line     plot_y = theta(2).*plot_x + theta(1);  % &lt;--- Boundary line      % Plot, and adjust axes for better viewing     plot(plot_x, plot_y)     hold on;     drawnow  end  fprintf('Cost at initial theta (zeros): %f\n', cost); fprintf('Gradient at initial theta (zeros): \n'); fprintf(' %f \n', grad);   The above code is implementing gradient descent correctly (I think) but I am still unable to show the boundary line plot. Any suggestions would be appreciated.    logistic_costFunction.m  function [J, grad] = logistic_costFunction(theta, X, y)      % Initialize some useful values     m = length(y); % number of training examples      grad = zeros(size(theta));      h = sigmoid(X * theta);     J = -(1 / m) * sum( (y .* log(h)) + ((1 - y) .* log(1 - h)) );      for i = 1 : size(theta, 1)         grad(i) = (1 / m) * sum( (h - y) .* X(:, i) );     end  end   EDIT:  As per the below answer by @Esmailian, now I have something like this:  [m, n] = size(x);  x1_class = [ones(m, 1) x1' dat1']; x2_class = [ones(m, 1) x2' dat2'];  x = [x1_class ; x2_class] How do people understand astromech droids? Why does an conditionally convergent infinite series, when deranged, have a different limit? $\sum u_n = 1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\dots$ conditionally converges to $\log 2$; and, when deranged to $\sum u'_n = 1-\frac{1}{2}-\frac{1}{4}+\frac{1}{3}-\frac{1}{6}-\frac{1}{8}+\dots,$ converges to $\frac{1}{2}\log 2$. Why does a deranged conditionally convergent series have a different limit? First Course in Math Anal, p.93, by Burkill, explains that the sums $s_n, t_n$ of the first n terms of the two series are different functions of $n$. This reasoning is incomplete, because different functions of $n$ can converge to the same limit; for example, let $r_n$ be the first $2n$ terms of $\sum u_n$, then $s_n$ and $r_n$ are different functions; besides, by differently defining terms, i.e. clustering pieces of a series, e.g. \begin{align*} 1-\tfrac{1}{2}-\tfrac{1}{4}+\tfrac{1}{3}-\tfrac{1}{6}-\tfrac{1}{8}+\dots = \left(1-\tfrac{1}{2}-\tfrac{1}{4}\right)+\left(\tfrac{1}{3}-\tfrac{1}{6}-\tfrac{1}{8}\right)+\dots \\ = \left(1-\tfrac{1}{2}-\tfrac{1}{4}+\tfrac{1}{3}-\tfrac{1}{6}-\tfrac{1}{8}\right)+\dots,\\ 1-1+1-1+\dots = (1-1)+(1-1)+\dots \\ =(1-1+1-1)+\dots,\\ 1+1+1+1+\dots = (1+1)+(1+1)+\dots \\ = (1+1+1+1)+\dots, \end{align*} one gets the sum of first n terms as different functions, but the series's limit remains. One could view a changed limit from the perspective of the changed number of terms, Denote 'countably many', the size of natural number, as $\lvert\mathbb{N}\rvert$, then $\lvert\mathbb{N}\rvert = \lvert k\mathbb{N}\rvert = \lvert\mathbb{N}\times\mathbb{N}\rvert$. Then two series with different numbers (e.g. $\lvert \mathbb{N}\rvert$, $\lvert k\mathbb{N}\rvert$) of terms– and so having different limits– paradoxically have same number of terms–and so are possibly formed by the same terms. The paradox could be the fundamental reason. Are there other explanations? Is the use here of 'countably many' is proper? Finding an expression for $\tan (a+ b + y)$ which involves only $\tan a, \tan b,$ and $\tan y$. Where can the last FSTrim be seen as successful or not? (log files) I recently installed an SSD and AFAIK Ubuntu makes a weekly FSTrim on SSD's that support it.  Is there a log file of this trims? Conditional expectation of $X$ given $\sin(X)$ How to use WiFi and Ethernet at the same time Brief Description:  I need my Ethernet card (en0) to see all traffic under 192.168.2.xxx.  However I also need to use WiFi card (en1) for all other traffic.  OS: OS X Lion    I am using a separate network location to deal with this specific use (since this is a for a robotics project that communicates via Ethernet). Ethernet (en0) had to be set up as a static IP (192.168.2.10) per the requirements for the device I am connecting to. All connections on the Ethernet card (en0) should be 192.168.2.xxx as specified above. WiFi (en1) is set up as DHCP to a router since their is no point in assigning it as a static for general purpose traffic. Ethernet (en0) is set up as priority over WiFi (en1).  I would also like to keep this under the network location preferences if at all possible since I do not require this feature to be on all the time.  I would really appreciate your help on this. No one I have talked to knows how to solve this. Calculating MEAN and STANDARD DEVIATION confussed [] ** calculate the mean and standard deviation of each investment, assume that both returns come from independent samples, are both normally distributed and that the (true but unknown) variances are the same,, Can someone could check my  calculations for  mean and standard deviation? I did calculations but not sure what to do with negative values of distances(If if am correct Investment A MEAN= 78.6875 when it comes to calculating standard deviation i have to power difference by 2 ?  ** Using select by attributes then calculate field on selection in ArcPy? ArcGIS Pro 2.3  I want to create a standalone script which runs outside of ArcGIS Pro (for automation purposes), which selects features (with blank attributes) in a feature class and runs calculate field on those selections.  The code below doesn't work. It updates all fields, not the selected ones.  import arcpy arcpy.management.SelectLayerByAttribute(r"C:\Automation\Categories\Coal\Coal_automation.gdb\CLAIMS", "NEW_SELECTION", "Claim_Spend_in_£ = ''", None)  arcpy.management.CalculateField(r"C:\Automation\Categories\Coal\Coal_automation.gdb\CLAIMS", "Claim_Spend_in_£", '"Unrecorded"', "PYTHON3", None) print ("Done")   How can I write the code to run calculate field on a selection? Ever since adding an iTunes gift card to my account, I'm getting verification requests like crazy. I can't even download free apps. It takes me to my payment info and when I try to select none, I continually get a message under the payment info that says "you must verify your payment info to continue"  I don't want a credit card on file and would really like the none option to work. My ID shows I still have iTunes credit. How to install PostgreSQL 9.2 with PostGIS 2.0 on Ubuntu 11.10 (or higher)? Let $\mathbb{F}_{27}$ denote the finite field of size 27. For each $\alpha\in\mathbb{F}_{27}$ , define $ A_{\alpha}$ $=$ { $ 1, 1+\alpha , 1+\alpha+{\alpha}^2 , 1+\alpha+{\alpha}^2+{\alpha}^3 , .... $} . Then  prove that  the number of  $\alpha\in\mathbb{F}_{27}$ such that $|A_\alpha|$=26 equals 12.  $ 0\in A_\alpha $ if and only if $\alpha\neq 0$ For the first proof , the multiplicative group of the field $\mathbb{F}_{27}$ is cyclic and its order is 26  , so there are 12 generators in that group.   Now  I need  to  show  that  $ 1+\alpha+{\alpha}^2+.. {\alpha}^{25} $ =0  , where order of $\alpha$=26 . Since   $\alpha ^{26}$ =1 ($\alpha$-1)(1+$\alpha$+${\alpha}^2$+...+${\alpha}^{25}$)=0 , since $\alpha\neq 1$  , So $ 1+\alpha+...+{\alpha}^{25} $ =0 My question is , can I write these last two  lines?  I mean are those two lines alright to write? If those two lines are invalid then I need some help to show  $ 1+\alpha+{\alpha}^2+..+{\alpha}^{25} $=0  .Thanks I want to return two objects from a Java method and was wondering what could be a good way of doing so?  The possible ways I can think of are: return a HashMap (since the two Objects are related) or return an ArrayList of Object objects.  To be more precise, the two objects I want to return are (a) List of objects and (b) comma separated names of the same.  I want to return these two Objects from one method because I dont want to iterate through the list of objects to get the comma separated names (which I can do in the same loop in this method).  Somehow, returning a HashMap does not look a very elegant way of doing so. Where in the DNS process are NS records used? I register a new domain, mynewdomain.com, at a hosting company.   In the advanced DNS settings there is an A record which maps mynewdomain.com to a ip address.  In my webhost control panel, it shows me the nameservers for the domain: ns1.mywebhost.net &amp; ns2.mywebhost.net  When I type in mynewdomain.com into a browser and hit enter I believe the following happens.   ISP resolver searches "." nameserver ISP resolver then told to search ".com" nameserver instead. ISP resolver finds mynewdomain.com, and searches the zone file to get the A record.     So my question is, where does my webhost's nameservers come into play? I believe the flaw in my logic comes from the fact that my zone file (in which the A record is kept) is stored on ns1.mywebhost.net). But if that is the case, how does my ISP resolver know to look here? (because I didn't type this into my address bar) Is the universe really "fine-tuned for life"? I understand what is meant when we say , but I've seen it claimed it's is fine tuned "for life". Is it?  When I look at known or even speculated life in our universe, I see life clinging to a tiny crumbs separated by vast voids. Our life needs baryonic matter, only 5% of the universe. Its density is $10^{-30}  g/cm^3$, but it clumps together leaving vast voids between the clumps. 99% is in stars and black holes and nebula utterly inhospitable to known life.  That leaves the parts "fine tuned for life" to be 0.05% of the universe. The planets, asteroids, and comets seem like just debris separated by  than the life-sustaining clumps preventing life from spreading.  Even that seems to be used very inefficiently. Life requires the energy of a star, but it's spewed out in all directions. We only receive a tiny fraction of it. Similarly, life requires heavier elements created in supernova, but these are also spewed out in all directions. And it took billions of years to develop a being capable of asking "is the universe fine tuned for life?"  It seems like we live on the crumbs of creation warmed by a rounding error of the heat from our star. Taking this view, the universe appears extremely inhospitable to life. It could be a lot better tuned.  Is it that the universe is fine-tuned for life? Or is it that the universe is so large and life requires such an infinitesimal fraction of the universe that it's a near guarantee were we to roll the dice again that some crumb, maybe not even baryonic matter, could develop something complex enough to ask "why is the universe fine tuned for life"? Am I just restating the weak anthropic principle?  I understand this is straying into philosophy. If that's off topic, are my  physical assumptions correct? Restoring backups failing Ubuntu 16.04