Javascript array grouping value
Get all unique values in a JavaScript array (remove duplicates)
How does centrifugal force work? Is a music band a singular or a collective entity, grammatically speaking? Duplicate:    What is correct to say?  Korn* is a great band  OR  Korn* are a great band.  (* You can replace your favourite band's name here) Of course everybody there is no doubt about the following sentences:  The Beatles are a great band Led Zeppelin is a great band  But with certain kinds of names, the situation becomes difficult.  Metallica are a great band  OR  Metallica is a great band  Is there any consensus on this matter? Why is a (simple) mask not recommended for asymptomatic COVID-19 patients? Information about (simple) mask wearing (concerning covid19) is a complete mystery to me. On several official places it is not recommended for a person without symptoms to wear a mask. For example:    (time 0:20)  or here:    However no explanation is given - which makes me wonder (and even angry). I think everybody should wear a mask because:   Many persons feel ashamed wearing it, even those with symptoms. If everybody wears it, they do not feel ashamed and wear it. As far as I know, one is (wrt covid19) contagious before developing symptoms. So if everybody wears the mask also these people do.   The two above points act as a collective protection.   Simple mask certainly will lower "getting / spreading illness" probability. Of course the "holes" (in a simple mask) are too big to prevent completely virus to enter (or get out when coughing), but it lowers probability! Even if it lowers the transmission probability by e.g. 5%, it might be a lot. As a hypothetical example: it might reduce R0 from 1.02 to 0.97 and so stop the virus spread so fast.   The videos are full of self-contradiction. In the same video    time 0:50 the lady says I should wear a mask if I am in contact with an infected person... why if it is inefficient?  Question: What are reasons for not recommending wearing a mask? What does each part of the `ls -la` output mean? What do the following numbers represent? Passing data between two controllers using storyboards Difference between Sort and SortBy How to Send Byte array To Server L1 regression estimates median whereas L2 regression estimates mean? bash is not terminating I'm trying some things with my shell. This includes the following command:  kill $$  My expectation was that the shell would log me out and terminate itself. But instead the bash persists without change.   Any idea why?  I ran this command on different environments (archlinux, debian). The behavior was always the same. In .NET, which loop runs faster, 'for' or 'foreach'? In C#/VB.NET/.NET, which loop runs faster, for or foreach?  Ever since I read that a for loop works faster than a foreach loop a  I assumed it stood true for all collections, generic collections, all arrays, etc.  I scoured Google and found a few articles, but most of them are inconclusive (read comments on the articles) and open ended.  What would be ideal is to have each scenario listed and the best solution for the same.  For example (just an example of how it should be):   for iterating an array of 1000+ strings - for is better than foreach for iterating over IList (non generic) strings - foreach is better than for   A few references found on the web for the same:               [Edit]  Apart from the readability aspect of it, I am really interested in facts and figures. There are applications where the last mile of performance optimization squeezed do matter. How to connect to device via SSH over direct ethernet connection I have a device that I need to connect to over SSH. The device is connected to my workstation via a direct ethernet connection. I'm attempting to assign the connected device an IP address somehow that I can SSH to, however all of the guides I'm finding have the user configure the IP from whatever device they're working with (namely Raspberry Pi's and so on). This is not something I can do with this device as I've no physical interface to work with.  I've been recommended to setup a DHCP server on my workstation so it would take care of this for me, however I've no idea how to configure it and none of the guides I have followed have been helpful. With that approach, I seem to have been able to bind an IP to the interface the device is connected on, however SSHing to that IP just brings me back to my own machine.  So my main question is: How do I assign an IP address to a device directly connected to my computer via ethernet cable without having any kind of access to the device (no interface, keyboard, monitor, etc). If the answer is to set up a DHCP server on my machine, how do I properly configure this and get an IP I can SSH to?  For reference, I am using Ubuntu 16.04 with OpenSSH installed. The device is also running some flavor of Linux and has SSH software installed, but again there's no way to interact with it except through SSH. I also do not have access to my router, so plugging the device in there and letting the router do the work is not an option. Get the generated SQL statement from a SqlCommand object? I have the following code:  Using cmd As SqlCommand = Connection.CreateCommand     cmd.CommandText = "UPDATE someTable SET Value = @Value"     cmd.CommandText &amp;= " WHERE Id = @Id"     cmd.Parameters.AddWithValue("@Id", 1234)     cmd.Parameters.AddWithValue("@Value", "myValue")     cmd.ExecuteNonQuery End Using   I wonder if there is any way to get the final SQL statment as a String, which should look like this:  UPDATE someTable SET Value = "myValue" WHERE Id = 1234   If anyone wonders why I would do this:   for logging (failed) statements for having the possibility to copy &amp; paste it to the Enterprise Manager for testing purposes How to upload a file of size 2GB from Apex? Is there any sobject that I can make use of? If my Schengen visa starts on the day of arrival which is one day ahead of departure, would they let me get into the plane? The difference between GPU and CPU Specifying spaces between words One of us is wrong, aren't we? I have just learned from what I consider a reliable source, that the following sentence is correct:     One of us is wrong, aren't we?   I would never in my life have written this, but I am assured that   As I realize comments don't live forever I will quote the relevant parts:     oerkelens : So you  would really write One of us is wrong, aren't we? I guess by analogy you would not bat an eyelid at One of these balls is blue, aren't they?   Matt Эллен : yes, "Then one of us is wrong, aren't we?" is exactly how it would be written. Same for the balls.   Could someone please enlighten me how it is possible that the number in a question tag supposedly has to be in discordance with the subject of the main clause?  I admit that I am not the youngest any more, and my school days are long gone, but back in the days, I was taught that  1. a verb and its subject concord in number 2. a question tag concords with the subject of the main clause  I was given examples like:     It is warm today, isn't it?   We will be on time, won't we?   Mary is pretty, isn't she?   John isn't the brightest, is he?   Some people may notice that the subject of the main clause seems to determine every time the subject of the question tag. When the main clause subject is singular, so are verb and subject in the question tag.  I was under the impression that a) this made sense and b) this would be a general rule.  I fully realize that grammar does not have to make sense, so a) is immaterial. As for b), today I learned I was wrong :)  So when (and possibly why?) do we form question tags that are different in number from their main clause?   To exemplify, also the other example sentence that I used and was corrected on:     One of these balls is blue, isn't it? (so this is wrong)   One of these balls is blue, aren't they? (and this is correct)   As an afterthought, does this strange grammatical number mix-up only appear in question-tags, or should I always refer to singular subjects in the plural if certain conditions are met? And what are those conditions?  Which versions are correct?     One of the cars is broken, aren't they? They (the car(s?) that is(are?) broken) should be fixed.   One of the cars is broken, aren't they? It (the car that is broken) should be fixed.   One of us must be wrong, mustn't we? We (the one(s?) that is (are?) wrong) should make amends.   One of us must be wrong, mustn't we? He (the one that is wrong) should make amends.   (In the last one, they could of course be used as the singular they, but that would avoid the issue...) The energy stored in a capacitor is $$ U= \dfrac{1}{2} CV^2 $$    So when I have a 1F supercap charged to 1V the energy is 0.5 J. When I connect a second supercap, also 1F in parallel the charge will distribute and the voltage will halve. Then    $$ U = \dfrac{1}{2} 2F (0.5V)^2 = 0.25 J $$  What happened to the other 0.25 J? Today, on C.SE, I reviewed some 'Late Answers' and First Posts.  I was not even near my daily vote limit.  And yet, I was given a message that said      comments disabled on deleted / locked posts / reviews   It seems I was not the only one either:   The workaround, of course, was simply to go back and provide the guidance - but was this a design or a bug?  If it is design, why would you want to discourage the feedback? Especially with first posts, there is often a high percentage of 'didn't read the FAQ' usage, which can best be addressed by gently providing guidance. (e.g. "Unfortunately, this doesn't answer the question" or "This reads like a comment" or "This really isn't on-topic here - can I suggest you checkout our [faq]" etc...)  Timely first post guidance goes a long way towards making good users.   If it was a bug, was other functionality silently rolled out? Desktop folders won't open with clean install of 18.04