Can't get equals button to work in Java Swing calculator
How do I compare strings in Java?
Can I mix different RAM modules in PC? I have 4 RAM slots on the motherboard P5K. At the moment I have two 1GB RAM modules and two 2GB RAM modules. Everything is working fine.   Can I buy one 4GB module and put it instead of the 1GB module?  Another question, can I mix MHz values, like that I have two 667MHz modules and two 1066MHz modules? Is this dangerous for the comp? I need to print an image at a certain size. What dimensions and resolution should I use? (This question is meant to be a resource to direct others to given that this is a common question.)  Given the task of creating an image that will be printed at a certain size, what pixel dimensions and resolution should I be setting my file at? Possible Duplicate:          Most commands I use in linux behave exactly the same whether I include the trailing slash / character on the end of a directory name or not.  For example:  ls /home/cklein ls /home/cklein/  cp foo bar cp foo/ bar/   When does this trailing slash matter?  What is the semantic meaning of the trailing slash? Is Unit Testing worth the effort? I am working to integrate unit testing into the development process on the team I work on and there are some sceptics. What are some good ways to convince the sceptical developers on the team of the value of Unit Testing? In my specific case we would be adding Unit Tests as we add functionality or fixed bugs. Unfortunately our code base does not lend itself to easy testing. How can I enable Hardmode? What items do I need to make my world Hard Mode? Proving the AM-GM inequality for 2 numbers $\sqrt{xy}\le\frac{x+y}2$ I am having trouble with this problem from my latest homework.  Prove the arithmetic-geometric mean inequality. That is, for two positive real numbers $x,y$, we have $$ \sqrt{xy}≤ \frac{x+y}{2} .$$ Furthermore, equality occurs if and only if $x = y$.  Any and all help would be appreciated. Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's     What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?  I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine?  I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine.  So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91:  rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_%  rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code   I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.  I'm using Windows Server 2003 and Windows&nbsp;XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting). If $L_i/K$ are Galois extensions of number fields, $i=1,\ldots,n$, and $L=L_1\cdots L_n$ is the compositum. Then it's true that a prime $\mathfrak{p}$ of $K$ splits in $L$ if and only if it splits in all of $L_i$. Does this also hold if the $L_i$ are not Galois extensions of $K$?  The proof that I know regarding the compositum uses the fact that the $L_i/K$ are Galois, so is this true in the more general setting and how would one prove it? I accidentally unset all the directories of $PATH while trying to add a new one in ~/.bashrc. I opened a new terminal window as I was editing and now $PATH is empty. I'm worried if I boot from another drive to find the $PATH I won't be able to boot into this drive again.  Basically, what is the default result of echo $PATH? How to move an element into another element? How come I never see cosmic rays in steam like they appear in a cloud chamber? How can I safely move a module to another folder? I created a module through Drupal Console, unfortunately it wasn't placed in a folder of its own, rather straight into /modules/custom. Before I noticed where it had gone, I enabled the module.   In Drupal 6/7, this was easy to fix - I could literally just put the files into the correct path, clear the cache (maybe rebuild the registry, it wasn't an exact science), and all was well.  The same isn't true for Drupal 8; I moved the files into a subfolder, rebuilt cache, and all requests tell me that Drupal is failing to include a required file. The particular file is a block class, and the path Drupal is trying to find it is where it used to be, not where I've moved it to.  The bit of code objecting is in Symfony's ApcClassLoader, so I guess I need to clear something that's slightly above Drupal's head to get this path reference updated.  How can I do that?  Uninstalling and re-installing the module does work, but once there's important data stored that's not going to be an option.  I was wrong, uninstalling and re-installing is not a viable option. After uninstalling and reinstalling, Drupal can no longer pick up the custom blocks the module defines. I'm guessing that reference is cached somewhere that isn't cleared when the module is uninstalled. Just need to find out where that is and how to clear it... Why isn't there a potential difference across a disconnected diode? I know this question sounds silly, as if there was a potential difference a current would be created when the terminals are connected together and this would mean energy has come from somewhere.  The reason I ask this though is that from my understanding of the depletion region and built in potential of a diode it seems like if you connected a voltmeter across the whole diode it would show the value of the built in potential.  This is explained in the image below:    At first, electrons flow from the n type to the p type because there are a higher concentration in the n type, and holes do vise versa. This is called the diffusion current. The first electrons and holes to cross the pn boundary are the ones which are closest to it; these carriers recombine when they meet each other and are then no longer a carrier. This means there is a depletion region of no carriers near the pn boundary. because electrons have left the n type material, and holes have left the p type material, there is a surplus of positive and negative charge on the n and p side of the pn boundary respectively. This causes an electric field that opposes the diffusion current, and so no more electrons or holes cross the boundary and combine. In short, only the electrons and holes near the boundary combine, because after they have done that an electric field is formed that prevents any more carriers from crossing. The current due to this electric field is called drift current, and when in equilibrium this will equal the diffusion current. Because there is an electric field at the boundary (pointing from the positive charge to the negative charge) there is an associated voltage. This is called the built in potential.  If you sample the electric field at each point along the diode from left to right, you would start with 0 in the p region because there are an equal number of protons and electrons. As you approach the depletion region you would see a small electric field pointing back towards the p region, caused by acceptor impurities which now have an extra electron (due to recombination) and therefore now have a net negative charge. This electric field would increase in strength as you get closer to the boundary, and then die away as you get further away.  This electric field means there is a voltage, as shown in graph (d). The p side is at an arbitrary potential, and the n side is at a potential higher than this because there is an electric field between them. This means there is a potential difference across the depletion region; this is known as the built-in potential.  But why when I connect a volt-meter across the whole diode will I not see this built in potential? How can I install Ubuntu encrypted with LUKS with dual-boot? The Ubuntu installation disk has an option to install Ubuntu encrypted using LUKS. However, there is no option to perform an encrypted installation along-side existing partitions for a dual-boot scenario.  How can I install Ubuntu encrypted alongside another partition from the live disk? Having different horizontally  distributed equations inside an align environment, only lines are numbered, but not individual equations.    How can the left equations be numbered using subequations? See also the question   \documentclass{article} \usepackage{amsmath} \begin{document}   \begin{subequations}     \begin{align}        %\label{a}         a &amp;= a ,&amp;       \label{b}         b &amp;= b ,\\       %\label{c}         c &amp;= c ,&amp;       \label{d}       d &amp;= d .     \end{align}   \end{subequations} \end{document}     The solution should be able to either:    attach a label to the left equations, or modify the labels on the right to read (1a,b) and (1c,d)    I couldn't find anything in the documentation of amsmath or other packages. How do I find the index of an element in a list in Racket? What is a wave? Entire function bounded by polynomial of degree 3/2 must be linear. The problem is as follows:     Suppose $f$ entire satisfying   $$ |f(z)| \leq A + B |z|^{3/2} $$   for some fixed $A,B &gt; 0$. Prove that $f$ is a linear polynomial.   I know I want to reduce it to a function where I can use a Cauchy bound, but I'm not sure how. What is the difference between DPI (dots per inch) and PPI (pixels per inch)? There are lots of other questions on Graphic Design which partly cover this, e.g. .  However, I have become frustrated at the number of questions and answers which confuse the two terms. I think understanding the difference is important.  So here's a place to answer this question well and clear up the confusion! Why are we using a biased and misleading standard deviation formula for $\sigma$ of a normal distribution?