In a party of 5 persons compute the probability that at least 2 have the same birthday(month/day),assume a 365-day year.
$n$ people attend the same meeting, what is the chance that two people share the same birthday? Given the first $b$ birthdays, the probability the next person doesn't share a birthday with any that went before is $(365-b)/365$. The probability that none share the same birthday is the following: $\Pi_{0}^{n-1}\frac{365-b}{365}$. How many people would have to attend a meeting so that there is at least a $50$% chance that two people share a birthday?   So I set $\Pi_{0}^{n-1}\frac{365-b}{365}=.5$ and from there I manipulated some algebra to get $\frac{364!}{(364-n)!365^{n}}=.5\iff (364-n)!365^{n}=364!/.5=.....$   There has to be an easier way of simplifying this.
Proving that a number with digits 1...9 in some order, ending in 5, is not a perfect square. If "x" is a 9 digit number , which contains digits from 1 to 9 which ends in 5 . Prove that it can't be a perfect square ( digits are not to be repeated).  Please suggest the solution of this question. Book recommendations for fluid dynamics self-study I have my bachelors degree in engineering science: computer science, option electrotechnic. I have a good understanding of basic mechanics and dynamics, calculus (differential equations).  The books I'm now having a look at are:       What book do you recommend for studying fluid dynamics on my own and why? How to find all the tables in MySQL with specific column names in them? I cheated on the Disciplined badge, how bad is it? I was looking for badges I didn't have yet, and I saw the Disciplined badge. So I deleted an answer of mine with 3+ votes, and waited. Five minutes later, sweet, a new badge! Then I went to my answer again, and undeleted it. No problem at all, and I keep the badge!   What will happen? Will my badge stay here or not? More generally, what happens when the conditions to get a badge are valid at one time, and then not valid?  Other badge in this case:   Unsung hero - "Zero score accepted answers: more than 10 and 25% of total"   What happens if answers get a vote after getting the badge? Are the badge frequently recalculated? This is a question in general, not specific to any method or data set. How do we deal with a class imbalance problem in Supervised Machine learning where the number of 0 is around 90% and number of 1 is around 10% in your dataset.How do we optimally train the classifier.  One of the ways which I follow is sampling to make the dataset balanced and then train the classifier and repeat this for multiple samples.   I feel this is random, Is there any framework to approach these kind of problems. How do I put /home in a different partition? Yeah, so I have 2 hard drives, on with 2 partitions(backups and windows), and I have another that also has 2 partitions with only one used. I have Ubuntu on hard drive 2:partition one, but I have come to a point when the /home folder can't hold any more files, but the partition is only about 15% filled up. So I did some researching and figured out that you can put it on a separate partition, but most of the guides were vague on what I needed to do. Could someone give me step-by-step instructions on what I need to do, or even tell me a, easier or different way to fix this /home folder capacity problem? I am currently running Ubuntu 11.10 off of a SanDisk 16GB USB. I installed it using a Live USB with the following partition configuration:  6GB Primary /dos   FAT32 5GB Logical /      ext4 5GB Logical /home  ext4   I don't have a hard disk, and don't see myself getting one anytime soon.   I rely solely on this 16GB, and two other 4GB USBs, one of which I used as the LiveUSB. I bring the USBs around, and even use the install at work.   I previously used an install that used a swap file. It functioned fine for the most part, save for a few slow moments, but I came across , and it got me thinking about my USB's life, so I reinstalled with the current config.   My problem now is that it is slower. Applications like Firefox would hang more often. In my previous setup (the automatically partitioned setup), Firefox would start hanging if I was running an unzip or install task on the same partition as /.   Now however, it would hang if I had another window open i.e. the system settings window. My guess is that it may have something to do with the swap file or the install being on a Logical partition rather than a Primary partition, but I don't know.   Any insight as to why it has slowed down? Symbol Table from Apex Class In an earlier question  I asked in general about the symbol table for an Apex class.  Using the Tooling API wrapper from  I am able to get part way there. But am unGodly confused.  If I go to the developer console, query editor, check the "Use Tooling API" box and run this query:  Select Id, Name, symbolTable FROM ApexClass Where Name Like '%NewCaseListController%'   I get back an ID, Name and [object Object] for the symbol table, meaning there is a symbol table object there.   But if I try the same query in Apex code in the execute anonymous window I get the error:   System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element location   If I do this in Apex I can get a result back, and according to the code for the class the result should be of type ToolingAPIWSDL.QueryResult. The QueryResult should contain a member consisting of a list of sObject_x records sObject_x[], unless I am mis-reading what that means.  ToolingAPIWSDL.QueryResult result = tooley.query('select Id, Name from ApexClass WHERE Name Like \'NewCaseListController\'');   I can take the result and apparently put the sObject_x object in it like this:  List&lt;ToolingAPIWSDL.sObject_x&gt; objList = new List&lt;ToolingAPIWSDL.sObject_x&gt;(); for(Integer i = 0; i&lt;result.records.size(); i++){     objList.add(result.records[i]); }   At least that does not throw an error and I can write:     System.debug('objList: ' + objList[0]);  And get a result, but how do I access the symbol table? Or more to the point, how can I get a list of methods and variables? I am assuming the symbolTable is the only way? I'm going to guess that the answer is "no" based on the below error message (and ), but is there anyway to perform a cross-database query using PostgreSQL?  databaseA=# select * from databaseB.public.someTableName; ERROR:  cross-database references are not implemented:  "databaseB.public.someTableName"   I'm working with some data that is partitioned across two databases although data is really shared between the two (userid columns in one database come from the users table in the other database). I have no idea why these are two separate databases instead of schema, but c'est la vie... "I who has" vs "I who have." Possible Duplicate:          Am aware it is correct to say "I have written..." and "I am a doctor who has writen..."  I have, however, severally come across the sentence "I, Tertius, who have written...". Shouldn't it be "I, Tertius, who has written..."? RAR password cracker Does the  file format use a serious encryption (such as )?  Will it take unfeasibly long to brute force a password?  If not, what tools do you suggest that do so automatically? How do I run Command & Conquer Gold on Windows 7 64-bit (in XP mode)? I downloaded the first Command &amp; Conquer game  and burnt some CDs. I couldn't get the Setup.exe program to run in Windows 7 64-bit, as it must need some old DLLs. So I ran up the Windows XP Mode virtual machine, and was able to install it fine.   However, when I try to run the program, I just get an empty message box with an "OK" button. I've set the compatibility to Windows 95, and checked all of the options in the Compatibility tab, but it's not running. I also downloaded the patch suggested by EA, which is an updated version of the THIPX32.DLL file (copied into the C&amp;C installation folder).  Has anyone managed to get this working? How to pretty print XML from Java? I have a Java String that contains XML, with no line feeds or indentations. I would like to turn it into a String with nicely formatted XML. How do I do this?  String unformattedXml = "&lt;tag&gt;&lt;nested&gt;hello&lt;/nested&gt;&lt;/tag&gt;"; String formattedXml = new [UnknownClass]().format(unformattedXml);   Note: My input is a String. My output is a String.   (Basic) mock result:    &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;root&gt;   &lt;tag&gt;     &lt;nested&gt;hello&lt;/nested&gt;   &lt;/tag&gt; &lt;/root&gt; Does anyone have a simple work-flow for drawing cross sections of earth features in QGIS?   My thing is that QGIS is being used to present the plan view, but we have a little interest in some elevations as well. All the data is one set and is simply an elevation value in the attribute table, I don't want to have to move all that to CAD.  One logical workaround is to present the z value as the y.  I am a dunce in paper space in CAD, and would be more comfortable with the QGIS Composer. I'm trying to write a page that calls PHP that's stored in a MySQL database. The page that is stored in the MySQL database contains PHP (and HTML) code which I want to run on page load.  How could I go about doing this? Collection of clopen sets form a base for a countable completely regular space I have $X$ as a countable, Tychonoff space, and I want to show that the collection of clopen subset of $X$ form a base for the topology on $X$.  Can I first just define a base $\mathscr{B}$ of X, let $x\in X$ and $E \subset X$ is closed such that $x\notin E$. So $x\in X-E$, which is open.   I also noticed that the interval $[0,1]$ is uncountable. Can I define a function $f: X\to [0,1]$, then f is onto. Do I need to show that $f$ continuous next? Should VMware Tools always be installed in headless Linux guests? We have a deployment with what I would call an Enterprise Cloud Provider. It's VMWare Infrastructure 3.5.x and includes VMotion / VMWare HA instances, etc.  At Provider 1 VMWare Tools was installed:   vmware-guestd is running and; at least two kernel modules are loaded, vmmemctl &amp; vmhgfs   Provider 1 does nightly VM Snapshots.  We are beginning a new deployment at Provider 2 (also an Enterprise Cloud Provider). They did not install VMWare Tools. Provider 2 does not do nightly VM Snapshots but rather file-system backups (using an agent).  From my reading it seems like at the very least VMWare Tools should be installed for the Memory Balloon Driver (vmmemctl) and from reading sources like  it suggests that certain VirtualCenter management operations also depend upon VMWare Tools being installed in the Linux guest.  Note that all of our instances are headless (default runlevel is 3) and RHEL.  It is hard to find authoritative information on this question and the aforementioned source is somewhat dated.  Can someone shed some light on this? What are the factors/criteria that would lead to an answer in the affirmative or negative?  TIA  Cheers Supersymmetric Localization (Mirror Symmetry) I'm reading Chapter 9 of . As you can see in eq. (9.30) his model for SUSY is  $$\begin{align} \delta_\epsilon X &amp;=\epsilon^1\psi_1 + \epsilon^2\psi_2\\ \delta\psi_1 &amp;= \epsilon^2\partial h\\ \delta\psi_2 &amp;=-\epsilon^1\partial h.  \end{align}\tag{9.30}$$  I understand that if $\partial h\neq 0$ it is possible to see that partition function vanishes, in particular, there is a total divergence:  $$ \int \mathrm{d}\hat{X}e^{\frac{1}{2}(\partial h(\hat{X}))^2}\frac{\partial^2 h(\hat{X})}{(\partial h(\hat{X}))^2}. \tag{*} $$  The implication that a total divergence yields vanishing integral, it is a bit strange, because, since every function that admit a primitive is a total derivative. What is the meaning of that implication? Then why $(*)$ vanishes? It seems to me that, in general, $$ \int \mathrm{d}(h')\frac{e^{\frac{1}{2}(h')^2}}{(h')^2}\neq 0. $$  Then, again, when he claims that if there is a $x_0$ such that $h'(x_0)=0$ we can use again the argument of the total divergence, why doesn't he keep in account that, removing a small neighborhood of $x_0$, give us some contribution at the border of that neighborhood (two points)? S1300I scanner issues under Ubuntu 16.04 using Sane In theory this scanner does work under Linux and Ubuntu.  I've found this document that I tried to follow.    I install sane, copy firmware, confirm the location in the config etc.  Everything looks good.  Potential problem areas  sudo sane-find-scanner   output:  # sane-find-scanner will now attempt to detect your scanner. If the # result is different from what you expected, first make sure your # scanner is powered up and properly connected to your computer.  found SCSI processor "Marvell 91xx Config 1.01" at /dev/sg5 # Your SCSI scanner was detected. It may or may not be supported by SANE. Try # scanimage -L and read the backend's manpage.  could not fetch string descriptor: Pipe error could not fetch string descriptor: Pipe error found USB scanner (vendor=0x04c5 [FUJITSU], product=0x128d [ScanSnap S1300i]) at    libusb:005:007 could not fetch string descriptor: Pipe error # Your USB scanner was (probably) detected. It may or may not be supported by # SANE. Try scanimage -L and read the backend's manpage.  # Not checking for parallel port scanners.  # Most Scanners connected to the parallel port or other proprietary ports # can't be detected by this program.   Okay.  So the scanner is detected and listed, it prints a bunch of extra noise that   # scanimage -L  No scanners were identified. If you were expecting something different, check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). Please read the documentation which came with this software (README, FAQ, manpages).   Okay, let's verify the firmware files:  ls -lh  /usr/share/sane/epjitsu  total 136K -rw-r----- 1 root root 65K Jan  1 17:49 1300_0C26.nal -rw-r----- 1 root root 65K Jan  1 17:49 300_0C00.nal   Looking at the configuration file: (snippets)  # Fujitsu S300 firmware /usr/share/sane/epjitsu/300_0C00.nal usb 0x04c5 0x1156  # Fujitsu S1300 firmware /usr/share/sane/epjitsu/1300_0C26.nal usb 0x04c5 0x11ed   Last thing I tried was to pull the line from sane-find-scanner and update the config  sane-find-scanner returns a different product ID.   I updated the config file above, restarted the sane service, I ran scanimage -L still, scanner not detected.  For reference I had this working on this same computer under a virtualbox VM.  If I can get it to work under windows that would be ideal.  Any suggestion would be much appreciated.    Update: I revisited the behavior after adding the 1300i firmware and it's still not working but.  Once in a while when I do run this is the output.  If I run it again it'll fail.  scanimage -L device `epjitsu:libusb:005:008' is a FUJITSU ScanSnap S1300i scanner   also sudo gscan2pdf and sudo simple-scan both fail to detect a scanner.  It fails with and without sudo permissions. How do I expire a PHP session after 30 minutes? I need to keep a session alive for 30 minutes and then destroy it.