Why is the assignment operator affecting all elements?
List of lists changes reflected across sublists unexpectedly
Why should you not use Number as a constructor? How to calculate the summation $(\sum_{p = k}^{n} \binom{n}{p}) / 2^n$ quickly? I was solving a question which technically reduces to the following     Given $N$ items, it is equiprobable for each item to be good or bad, what is the probability that number of good items in the set are greater than or equal to $K$.   This can be reduced to $\dfrac{x}{2^n}$ where $\displaystyle x = \sum_{p = k}^{n} \binom{n}{p}$. Is there a more simplified form which is easier to calculate for large values of $N, K$?  Note: It may be safe to assume that we do not require extremely high precision while calculating(first 5-10 digits only).  Thanks! How to enable or disable a user? I'm uing ubuntu 12.04 desktop. I have 3 users: user1(administrator), user2(standard) and guest. I wanted to disable user1 and enable user2 which auto logs on with no password but after I did that I can't login to user1 and user2 accounts except the guest session user. I'm striped off every administrative privileges. I don't know which options are available to me and how do I enable root or user which is an administrator? Can't reach wi-fi signal on Ubuntu, but can do it on other OS/devices (ath9k) Live CD asks for a username and password What TV movie had lost space cadets who piloted yellow tripod robots, and a squid bad guy? I'm trying to find a movie I watched on TV, probably in the 90s. I think it was a made-for-TV movie.  It was about a ship with an AI. The ship was crewed by young adults. I think they were cadets?   There was an accident (like a warp drive malfunction) and they end up in another part of space where they meet a female alien whose ship had been shot down.  I remember they had manned robots they would pilot and they took them to a planet to get upgraded and they are attacked by more manned robots. They had three legs and they were yellow, I think.  I also remember the baddie had a holo-projector or something like that which allowed him to change his appearance. He commanded a massive fleet and he worked for someone he spoke to in a video chat that looked like a squid. Why split the  tag when writing it with document.write()? Why can't variable names start with numbers? Cannot change brightness setting using function buttons or using the brightness control bar on HP laptop php execute a background process I need to execute a directory copy upon a user action, but the directories are quite large, so I would like to be able to perform such an action without the user being aware of the time it takes for the copy to complete.  Any suggestions would be much appreciated. Why can't two series-connected diodes act as a BJT? Another form of the question is: will joining two diodes with wires (pn-np) make a transistor-equivalent?  I read that they are not equivalent, but why? How to avoid duplicating assigned materials when duplicating a mesh? how can I prevent Blender 2.8 from duplicating materials every time (?) I duplicate a mesh. My question is about one particular usage of static keyword. It is possible to use static keyword to cover a code block within a class which does not belong to any function. For example following code compiles:  public class Test {     private static final int a;         static {         a = 5;         doSomething(a);     }     private static int doSomething(int x) {         return (x+5);     } }   If you remove the static keyword it complains because the variable a is final. However it is possible to remove both final and static keywords and make it compile.   It is confusing for me in both ways. How am I supposed to have a code section that does not belong to any method? How is it possible to invoke it? In general, what is the purpose of this usage? Or better, where can I find documentation about this? "Timed Out" error when trying to join server I've been taking photographs for a while, and have started to think about moving to full-frame. I'm on a very limited budget, but I currently have a good macro lens and am quite willing to buy something like a EF 50mm f/1.8 to start off with. I could possibly stretch my budget as far as a 70-200 f/4 L or 24-105 f/4 L.  Primarily, I'm interested in taking photos of small wildlife like reptiles, amphibians and insects, but I have a healthy interest in landscapes, birds and street photography.   I currently have an EOS 30D, and I love the way the camera handles, especially with the dual control dials. For this reason, I think shooting with a Rebel would be a significant step down.   However, I have seen 5Ds and occasionally 1Ds Mark IIs on ebay for roughly the same price as an EOS 650D. I'm sure these cameras have better IQ than my 30D, since they are pro-level bodies from around the same time, and full-frame besides. The question is, are these cameras now so old that the image quality from them is a substantial step down from current Rebels?   I realise I'll be giving up continuous shooting speed and some amount of low-light performance, and that I'd also need to get an external flash, but besides these, are there any substantial caveats I need to be aware of before I go ahead and take the plunge? Is "I'm being angry" ungrammatical? Why is the installer not showing any partitions? iPhone 6s with iOS 12.4 not connecting to MacBook Pro mid2015 with macOS 10.14.6 I am using an iPhone 6s with iOS 12.4 and a MacBook Pro mid2015 with macOS 10.14.6. Since recently (I am not exactly sure when it started), I cannot charge the phone with my computer anymore. As soon as I plug the phone in, it will play the charging sound repeatedly. The right-hand side port sometimes works, the lefthand side port never works. When I connect my old iPhone 5 (using the same cable), it charges without any issues. My iPad mini 4 shows the same issue.  Sometimes the "Do you trust this computer" setting flashes on the phone and disappears before I can click anything.   How can I fix this?  Update 1  Sometimes I get the Software Update dialogue in macOS. After approx. 2 minutes it shows the following:     Update 2  For some reason the issue disappeared for a while but is back now. Disabling "Settings" > "Touch ID &amp; Passcode" > "USB Accessoires" seems like it makes the problem a bit less bad, but not go away.  Update 3  This is driving me crazy. I upgraded to Mojave 10.14.3 mostly to get rid of the issue. It persists. Some more random information: Before logging in (Filevault pre-boot authentication), the phone will charge fine. Only when a user account is loaded, the issue appears. The likelihood of a successful connection increases with the battery state of the iPhone. Workaround 2 in my answer below suggest that this a "Trust issue" from the iPhone's side. I suppose the solution will have to be hidden somewhere there...    What I tried so far (will update):   Reset Privacy settings on iPhone Different (original, almost new Apple) lightning cables   Remove and add "iPhone USB" in Network Settings  SMC reset (), PRAM reset Upgrade to latest iOS 12.4 and MacOS 10.14.6 Is there a software utility to adjust screen gamma/brightness/contrast? Why did my windshield freeze instantaneously?