Best way to return 1 of a few different strings
Should I use #define, enum or const?
Non-principal ideal in $K[x,y]$? Let $K$ be a field. Then $K[x,y]$ is not a PID because $x$ is irreducible but the quotient $K[x,y]/(x)$ is isomorphic to $K[y]$, which is not a field.  So there must be an ideal in there which is not principal. What is an example of such an ideal? Can I fly back to Italy if my Italian residency card has expired and is being renewed? What are the current travel restrictions on individuals entering the United States from regions affected by Covid-19? This community wiki explains the current restrictions by the United States of America on the entry of individuals who may pose a risk of transmission of the SARS-Cov2, the virus which causes the Covid-19 disease. Trouble downloading packages list due to a "Hash sum mismatch" error When I check for updates, I get a "Failed To Download Repository Information" error.   This is what comes up under details:   W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_main_source_Sources  Hash Sum mismatch,  E: Some index files failed to download. They have been ignored, or old ones used instead. I was given this question by a friend and after working tirelessly on it I have not come up with anything substantial. I was hoping someone in the community could provide a pointer or possibly a solution. The person who gave me the question says he has the answer to it, but I am more curious about the working.  Here is the question:     Three points $(B, C, D)$ lie on parabola  $y = x^2$ and a fourth point $A$ is placed such that $ABCD$ forms a square. Find the minimal area of $ABCD$.   So far my working out has involved a collection of distance/mid-point formula's and I haven't even reached the point where I differentiate to minimize the area.  Any pointers would be welcome.   Edit  Apparently the correct answer is $\sqrt{2}$ units squared. Remove a child with a specific attribute, in SimpleXML for PHP I have several identical elements with different attributes that I'm accessing with SimpleXML:  &lt;data&gt;     &lt;seg id="A1"/&gt;     &lt;seg id="A5"/&gt;     &lt;seg id="A12"/&gt;     &lt;seg id="A29"/&gt;     &lt;seg id="A30"/&gt; &lt;/data&gt;   I need to remove a specific seg element, with an id of "A12", how can I do this?  I've tried looping through the seg elements and unsetting the specific one, but this doesn't work, the elements remain.  foreach($doc-&gt;seg as $seg) {     if($seg['id'] == 'A12')     {         unset($seg);     } } The following question is on my homework assignment that I cannot figure out:     Let U and V be independent random variables, each having a normal distribution with mean zero and variance one. Find the moment generating function of the random variable W = UV .   I have looked around online, and cannot find an answer to this question. In fact, the only answers I can find that even relate to the product of standard normal random variables are using techniques that we never covered in my class. We covered in class how to find the MGF for linear combinations of random variables, by W isn't linear, its a product of two normals. So that technique won't work.   What am I supposed to do? I am completely at a loss. I have tried multiplying the MGFs of U and V together, but that leaves me with something ugly that I can't reduce. Find all functions $f(x)$ such that $f\left(x^2+f(y)\right)$=$y+(f(x))^2$ How would I connect to a proxy on Ubuntu Studio? So I am running Ubuntu Studio on my laptop and what do I do to connect to a proxy? I search for proxy and in network settings their is no PROXY tab. What are key words in the tabs to look for? Getting an error that a flow "was" activate and cannot be overwritten What are the key principles that effective designs share? You have arrived on this page because you are clearly curious about underlying fundamentals that you can incorporate into your thought process when designing.  According to many that came before us, there are key principles that can be considered when creating an effective design. In the following answers, you will find useful theories from a variety of respected sources.  Use this question as a reference for navigating the variety of topics:  Gestalt Principles  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  Other Fundamentals and Useful Information  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  If you know of a topic that hasn't been covered here, please add an answer with references to respected resources and it will be added to the list.  Of course direct quotes and paraphrasing from respected resources are a must, but should be limited to a small paragraph per topic at most and referenced back to their source as thoroughly as possible.  A  has been posted before, but not to create a collection of snippets that are enlightening for graphic designers of any and all skill levels. How to expand the ext4 primary partition size in a VMware Player virtual disk? I have a VMware Player virtual machine setup, running Ubuntu 10.04 as the a guest OS.  The VM was created on a 20GB virtual drive, with a single partition for working space. Finally I got to the point where I need to expand the size of the virtual drive. Resizing the drive itself, adding some 10GB, was easy via the VMware Player menus. I now need to resize the main partition itself (I prefer this over creating a separate partition and mounting it).  According to GParted, I now have the following partitions:    My question is, how can I increase the size of the Filesystem partition to include the free 10GB?  From information I found online, it looks like one limitation is the fact that he swap partition is immediately adjacent to the filesystem, so my understanding is that first thing would be to move that partition to the end of the volume. How can this be done?  Also, some sources suggest that the system should be booted from a LiveCD, so the filesystem is not the boot partition, and thus make it easier to resize. As mentioned above, I run a VM, so I am not sure how to boot it from a LiveCD. Any ideas? I would like to scale an image file for each dimension differently for example 50% of the x dimension or 25% of the y dimension. Thank you very much. Can you 'exit' a loop in PHP? I have a loop that is doing some error checking in my PHP code. Originally it looked something like this...  foreach($results as $result) {     if (!$condition) {         $halt = true;         ErrorHandler::addErrorToStack('Unexpected result.');     }      doSomething();  }  if (!$halt) {     // do what I want cos I know there was no error }   This works all well and good, but it is still looping through despite after one error it needn't. Is there a way to escape the loop? 14.04.5 to 16.04 Update failed - xenial.tar.gz.gpg missing The update from Trusty to Xenial is officially available via the software updater. After updating all packages, upgrading through the software updater yields:  Fetching the upgrade failed. There may be a network problem.   Doing a sudo do-release-upgrade yields:      Checking for a new Ubuntu release Err Upgrade tool signature                                                        403  Sorry, not allowed to fetch that type of file: xenial.tar.gz.gpg         Err Upgrade tool                                                                  403  Sorry, not allowed to fetch that type of file: xenial.tar.gz             Fetched 0 B in 0s (0 B/s)                                                       WARNING:root:file 'xenial.tar.gz.gpg' missing Failed to fetch Fetching the upgrade failed. There may be a network problem. XSL That Returns the XML unchanged What size should the HMAC key be with SHA-256? I'm trying to generate a secret key to be used for HMAC SHA-256 signature processing. I've seen many sample of keys with variable length from 32 characters to 96 characters.  What is the ironclad rule for this key size? Each  has a compiled cost that contributes towards the  compiled character formula limit.  What are the current compiled costs associated with each formula function? I stupidly ran sudo rm /* followed by sudo rm -R /*  My sites still run, although the vast majority of commands like ls are now broken.  Is there a simple way to get data off the server or reverse some of damage? How to use PostgreSQL/PostGIS with ArcGIS for Desktop?