Formula for the sum of $\ n\cdot 1 + (n-1)\cdot 2 + ... + 2 \cdot (n-1) + 1\cdot n$
How to show that $\sum_{k=1}^n k(n+1-k)=\binom{n+2}3$?
Honey changing into unusable, hardened clump How to use multiple HDRIs My question is, how would I make the visible HDRI/Enviroment Map be image 1 and then have reflections as Image 2? If someone can post a node setup, or a .py file that would be great &lt;3 I was thinking maybe using the Is Camera Ray node but I'm not confident it would work, and have no idea where to start. I have a table with a column for ID, Date and Frequency of occurrence for that particular date and ID.  ID    date          Frequency 1     2014-05-18      5 1     2014-05-19      4 1     2014-05-20      25 2     2014-05-20      7 3     2014-05-18      4 3     2014-05-20      1 4     2014-05-18      6   I'm looking to insert the dates for each ID that aren't currently there (assuming that the date ranges from 2014-05-18 to 2014-05-20) and add a value of 0 in Frequency for those.  For example, you can see that  ID 1 has an observation for all three dates;  ID 2 is missing 2014-05-18 and 2014-05-19;   ID 3 is missing 2014-05-19;   ID 4 is missing 2014-05-19 and 2014-05-20.  Therefore, the output should look like this  ID    date          Frequency 1     2014-05-18      5 1     2014-05-19      4 1     2014-05-20      25 2     2014-05-18      0 2     2014-05-19      0 2     2014-05-20      7 3     2014-05-18      4 3     2014-05-19      0 3     2014-05-20      1 4     2014-05-18      6 4     2014-05-19      0 4     2014-05-20      0   I've attempted the following from . However, that will only add dates with 0 Frequency that aren't present throughout the entire table instead of on an ID level.   DECLARE @s DATE = '20140518', @e DATE = '20140520';  SELECT c.date, Frequency = COALESCE(a.Frequency,0) FROM dbo.Calendar AS c LEFT OUTER JOIN dbo.table AS a ON c.date = s.[date] WHERE c.d &gt;= @s AND c.d &lt; DATEADD(DAY, 1, @e); MAC addresses in JavaScript I know that we can get the MAC address of a user via IE (ActiveX objects).  Is there a way to obtain a user's MAC address using JavaScript? Serial protocol delimiting/synchronization techniques As asynchronous serial communication is widely spread among electronic devices even nowadays, I believe many of us have encountered such a question from time to time. Consider an electronic device D and a computer PC connected with serial line (RS-232 or similar) and required to exchange information continuously. I.e. PC is sending a command frame each X ms, and D is replying with status report/telemetry frame each Y ms (The report can be sent as response to requests or independently - doesn't really matter here). The communication frames can contain any arbitrary binary data. Assuming the communication frames are fixed-length packets. The problem: As the protocol is continuous, the receiving side might loose the synchronization or just &quot;join&quot; in the middle of an ongoing sent frame, so it just won't know where the start of frame (SOF) is. A the data has different meaning based on its position relatively to the SOF, the received data will become corrupted, potentially forever. The required solution Reliable delimiting/synchronization scheme to detect the SOF with short recovery time (i.e. it shouldn't take more than, say 1 frame to resynchronize). The existing techniques I am aware (and using some) of: 1) Header / checksum - SOF as predefined byte value. Checksum in the end of frame.  Pros: Simple. Cons: Not reliable. Unknown recovery time.  2) Byte stuffing:  Pros: Reliable, fast recovery, can be used with any hardware Cons: Not that suitable for fixed-size frame-based communication  3) 9th bit marking - prepend each byte with additional bit, while SOF marked with 1 and the data bytes are marked with 0:  Pros: Reliable, fast recovery Cons: Requires hardware support. Not directly supported by most of PC hardware and software.  4) 8th bit marking - kind of emulation of the above, while using the 8th bit instead of 9th, which is leaving only 7bits for each data word.  Pros: Reliable, fast recovery, can be used with any hardware. Cons: Requires an encoding/decoding scheme from/to the conventional 8-bit representation to/from 7-bit representation. Somewhat wasteful.  5) Timeout based - assume the SOF as the first byte coming after some defined idle time.  Pros: No data overhead, simple. Cons: Not that reliable. Won't work well with poor timing systems like, say, Windows PC. Potential throughput overhead.  Question: What are the other possible techniques/solutions exist to address the problem? Can you point to the cons in the above list which can be easily worked around, thus removing them? How do you (or would you) design your systems protocol? Flagging multiple comments versus flagging the whole post for moderator attention When multiple comments in a comment thread ought to be removed (especially if they're all for the same reason), should I flag each of them individually or flag the parent post for moderator attention?  I've usually adopted the former strategy - flagging each comment with the same flag reason, often a custom one copied and pasted. I had always assumed the following things that led me to follow this strategy:   Flagged comments were discretely marked as flagged in some way when the reviewer viewed the question (much like how I can see others' pending suggested edits now that I have editing privileges). By individually flagging all the comments that needed cleaning up, I was allowing the flag reviewer to see at a glance which comments needed removing, thereby providing them with useful additional information that wouldn't be available if I flagged the entire parent post. By flagging comments individually, rather than flagging the whole post, I was letting my flags be handled by anyone with 10k+ rep and access to the mod tools, rather than having to be handled by a diamond moderator.   However, I just read  (now deleted) by Shog9 that makes me suspect that approach is misguided, and question whether any of my assumptions about how comment flags work are actually true. Notably he says:     If you'd pinged me once for every comment in that thread you found noisy, I would probably be plotting my revenge instead - at very least, I would think you very rude for doing so. Yet, that's exactly what you're doing when you start flagging multiple comments in a single thread: instead of taking a few seconds to describe a problem, you're attempting to use a moderator as a tool to do your bidding, without any real effort to communicate.   He also said some more stuff on the topic - I think there was something about huge offensive boxes blotting out the UI when he views questions with multiple flags - but I now can't recover it any more because that question was deleted while I was in the process of writing this one, and it doesn't seem to be available in the Google cache.  Much of the flagging and review system is still a black box to me as a low/mid rep user, and it's difficult for me to figure out what flagging behaviors are appropriate and helpful when I have no idea what actually happens when I flag a comment. (The Privileges section doesn't mention comment flags anywhere that I can find. I don't even know who reviews them at the moment, and can't find a Meta question anywhere that addresses that.)  Could somebody provide some input on when (if ever) flagging lots of individual comments in a thread is appropriate, and when flagging the entire parent post is? A pretty screenshot of the UI of the relevant review/mod tools, demonstrating the effect of each approach, might also be helpful for understanding this, if that's not asking too much. How does pointing a CNAME on my domain to a service-provider's server enable them to offer customized services? I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know. Prove that the derivative of an even differentiable function is odd, and the derivative of an odd is even. Cycles : shadows on smooth shaded mesh, strange behavior I wonder if this is a bug, or if I missed something... When a light hits tangentially convex surfaces with "smooth shading", the shadow on this surface seems to "partially ignore" the smoothness of the surface. Here is an example with a simple cylinder :    On the left, a cylinder with "flat shading". Everything's ok. On the right, the same with "smooth". We can see an edge, bad shadowed.  With or without the "Edge split" modifier, no matters, the edge is still there. The shader is a simple white diffuse shader with no texture nor displace.  I have to add a subsurf modifier with at least 2 levels, which will insanely increase the vertex count... And I can't do that for my project.  I hope someone already saw it, and have a little tip to share. Or if someone already know it's a bug, or a limit of the current Cycles renderer ? Careers Stack Overflow - Tag "ruby-on-rails" returns jobs that don't contain the tag How do I send a file with FileZilla from the command line? I have a batch file that builds an application, and then I want to upload it to an FTP server from the command line.   Considering I do the upload manually with , is there a command line for it to upload files?  I am limited to Windows. How do I see a C/C++ source file after preprocessing in Visual Studio? I am trying to update to install PHP 5.5, 5.6 or 7.0 in Ubuntu 12.04/14.04/16.04 LTS, and I can only get PHP 5.3.10 for Ubuntu 12.04, PHP 5.5.9 for Ubuntu 14.04 or PHP 7.0.4 for Ubuntu 16.04 using official repositories (using apt-get).  I'm not really sure how to do a manual update – as I need:   to play around with the new(est) PHP features to install older PHP version due support in the software How to avoid the 'not properly formatted as code' alert Got NODATA issue: 'NODATA' (does the network require authentication?) When to use IMG vs. CSS background-image? In what situations is it more appropriate to use an HTML IMG tag to display an image, as opposed to a CSS background-image, and vice-versa?  Factors may include accessibility, browser support, dynamic content, or any kind of technical limits or usability principles. Reading a Set in PostLoad on JPA/Hibernate If $I$ and $J$ are ideals in a ring $R$ with $1$ such that $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n \in \mathbb{N}$ If $I$ and $J$ are ideals in a ring $R$ with 1 which are  co-maximal, i.e $I+J = R$, show that $I^m$ and $J^n$ are co-maximal for all $m,n$ in $\mathbb{N}$  Work done:     Should I proceed using    By taking $$K=I^m+J^m \neq R$$  Let $$S=\{I,J \in R \mid I^m+J^n \neq R \}$$ be the required partially order set ordered by inclusion then  $$I+J \subseteq I^n+J \subseteq I^n+J^m \subseteq \ldots $$  Then, I think this chain doesn't have an upper bound...as $I^m+J^n \neq R$ for all $ m,n \in \mathbb N$. Am I right??  Thanks for any help!! Why does this not work with an imaginary exponent?