Are records immutable by default?
How do I create an immutable Class?
We have two PHP5 objects and would like to merge the content of one into the second. There are no notion of subclasses between them so the solutions described in the following topic cannot apply.    //We have this: $objectA-&gt;a; $objectA-&gt;b; $objectB-&gt;c; $objectB-&gt;d;  //We want the easiest way to get: $objectC-&gt;a; $objectC-&gt;b; $objectC-&gt;c; $objectC-&gt;d;   Remarks:   These are objects, not classes. The objects contain quite a lot of fields so a foreach would be quite slow. So far we consider transforming objects A and B into arrays then merging them using array_merge() before re-transforming into an object but we can't say we are proud if this. Why is everything in minecraft opaque red and blue? The question asks to compute:   $$\sum_{k=0}^{n-1}\dfrac{\alpha_k}{2-\alpha_k}$$   where $\alpha_0, \alpha_1, \ldots, \alpha_{n-1}$ are the $n$-th roots of unity.   I started off by simplifiyng and got it as:  $$=-n+2\left(\sum_{k=0}^{n-1} \dfrac{1}{2-\alpha_k}\right)$$  Now I was stuck. I can rationalise the denominator, but we know $\alpha_k$ has both real and complex components, so it can't be simplified by rationalising. What else can be done? How to enter the Default Keyring password via the command line? Is there a way to enter the default keyring password using the command line?   For instance:  You have a remote setup of Ubuntu 10.10 thats set to auto login. You don't want to remove  the keyring password.  All right the system boots up and logs in automatically, then asks for the keyring password now at this point you can create ssh connections but you can't remote desktop.   What can you do to enter the keyring password at this point?  Also, to better clarify, this is from a remote connection using the command line. I have scripts that expect specific drive letters for hard drives. Windows sometimes assigns the different drive letters (e.g. I expected my Maxtor drive to be E:, but it's now F:, therefore my scripts will fail), depending on the order of how the drives are plugged into my laptop.  In Windows 7, how do I assign a permanent drive letter to a drive? Money - Countable or Uncountable noun page suggests that we use much with only uncountable nouns whereas the use of many/several is limited to countable nouns only. So I conclude that money is uncountable noun as I've heard people saying phrases like      So much money!   But, We do count the money in our daily life then why is it that money is considered an uncountable noun instead of countable? What if I say      I have $500 to spend   Wouldn't the money be considered countable in this case?  Edit The question may be considered duplicate of the suggested question but, in my opinion, the question on that link itself is not answered properly. What would be an informative introduction to quantum computing software? I am new to Stack Exchange and am working on a quantum learning platform for minority youth groups (LGBTQ, low-income, at risk, etc).  In the question below they are looking for courses on the subject, which I am also interested in, and do plan on checking those links out for ideas.        What I am looking for are simple videos, articles, or even games, that cover basic quantum theory at an introductory level.  There are some games I have looked into and played.  Hello Quantum! was fun and informative, though on my end there was still a lack of comprehension on how the quantum computer (or anything else "quantum") would actually function and play out.   My focus for the educational platform is more directed towards the software side of quantum computing. Is there anything  that gives a good introduction to the functions and uses a quantum computer will have? As well as what language would be best to program one? Also, would there be a way to program a quantum computer through a classical computer? And, is there a simple introduction to any of this already existing? What are the common phrases, words, abbreviations that are used on Stack Overflow, Server Fault, Super User, Meta Stack Overflow, and the other Stack Exchange sites? This is meant to be a very quick overview, not an in-depth tutorial. When considering whether a term ought to be included, please use this test:  New user comes in and posts on day 1. What terminology or jargon are they likely to run into (comments, support, system messages, etc.) that cannot be understood from the context without prior experience with the site (that is, clear only if known). For example: &quot;This is a dupe. Flag a diamond mod to close or migrate to SU.&quot; Huh? Can these instruction be made clear from the glossary? Is it clear for those for whom English is a second language?  Please:  Edit the existing answer Insert relevant links to more detailed information on the term/phrase/abbreviation Add only factual information Keep it very, very brief, terse, and to the point Delete your own comments once they become irrelevant (integrated into the glossary) Use the Edit Summary box to note reasons for your edit, not comments  Please avoid:  Opinion Using abbreviations, terms, and phrases inside a description Unverified information Uncommon terms, abbreviations, phrases Long descriptions Unnecessary detail - link to the relevant FAQ instead Citations or examples of usage Inside jokes that are not common on all of the trilogy () Common Internet jargon (that is, , , , etc.) unless usage here differs significantly  Recurring discussion: While the experiment to keep meta-discussion in the comments is going well (that is, deleting them once consensus is reached) it is clear that some discussions will be recurring, and we'll have to keep a record around so people new to the glossary can understand the consensus already reached. Add a new answer if you believe a new issue is likely to come up repeatedly. For instance, discussion about what terms to include, whether the glossary should be broken up to make linking easier, or formatting issues might be best discussed in new answer/comment posts. variable-sized "such that" pipe Allow applications downloaded from anywhere in macOS Sierra In previous versions of the OS in the security pane, you are provided an option of:    But in this version there is no option anywhere:    Is there a way that I can turn on anywhere? (via Terminal maybe?) Why does minimizing the MAE lead to forecasting the median and not the mean? From the , specifically :     A forecast method that minimizes the MAE will lead to forecasts of the   median, while minimizing the RMSE will lead to forecasts of the mean   Can someone give an intuitive explanation of why minimizing the MAE leads to the forecasting the median and not the mean? And what does this means in practice?  I have asked a customer: "what is more important for you to make mean forecasts more accurate or to avoid very inaccurate forecasts?". He said that to made mean forecasts more accurate have higher priority. So, in this case, should I use MAE or RMSE? Before I read this citation I believed that MAE will be better for such condition. And now I doubt. Dual boot windows 8 and Ubuntu with Windows 8 Boot manager I have two partitions on my hard-didk , I have installed ubuntu on my 1st partition and windows 8 later on another partition.Now i can only boot into windows 8 because it doesn't recognize Ubuntu.  How would i dual boot my PC without using grub . I would like using Windows 8 boot manager as its pretty neat.  This is what i have tried :  I tried using easyBCD but it doesn't work.It causes the boot manager to switch to windows 7 Boot Manager .  EasyBCD creates a C:/NST/AutoNeoGrub0.mbr file .  As EasyBCD was causing the boot manager to switch i created a manual entry to the BCD store uisng windows bcdedit command and point it to the C:/NST/AutoNeoGrub0.mbr file created by EasyBCD. This gave me the Windows 8 Boot-Manager with Ubuntu Entry,but grub is unable to find the root partition.  Is there any other work around or solution for this ?  Any help would be appreciated.  Note: The windows 8 boot Manager is sky blue color interactive menu with mouse and other options and windows 7 boot manager is the normal black and white one where you can only use your keyboard  I don't want to install grub because it would prevent my windows 8 from updating as its a genuine MSDN version and various other reasons sudo: unable to resolve host   I think I need to edit the /etc/hosts file to make an entry for 127.0.1.1 PC name.  But how can I do that if I can't access sudo? It seems to have gone since I updated to 13.10.  I have tried nano, which still doesn't work. How do you split a list into evenly sized chunks? I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question: WUBI installed Ubuntu not showing up at boot menu after Windows reinstallation How to list files installed by a snap package? After a snap has been installed with sudo snap install [package] how can I list the files which have been installed by the snap? I can easily find files with given string in name:  me@comp:/usr/local/hydra/hydra-7.4.2$ find -D stat -name "*hack*" ./hack881663129.txt ./hack881663129_7.txt ./hack881663129_5.txt ./hack881663129_4.txt ./hack881663129_4_7.txt ./hack881663129_6.txt ./hack881663129_1_6.txt ./hack881663129_8.txt   How can I also print file details, like size, date of creation etc.? If I read the sentence     Find ten apples and oranges.   Do I need to find ten or twenty pieces of fruit? Is this series known to converge, and if so, what does it converge to (if known)?  Where $p_n$ is prime number $n$, and $p_1 = 2$,  $$\sum\limits_{n=1}^\infty \frac{1}{p_n}$$ &quot;I hate wizards. If he so much as points a finger at me, you stick him, Hook.&quot; &quot;Remind me to find out the name of that flooring company so I can be sure never to buy so much as a carpet tile from it.&quot; &quot;I didn’t listen so much as survive the conversation.&quot;