To extend the heading a little bit further. There are 100 holes ordered from min to max (min-hole with minimal radius, max-hole with maximum radius). There are two balls given which are to be used to find the perfect hole (matching hole). There is only one hole which matches perfectly with both balls (both balls are the same size as the matching hole which has to be found) . Find the shortest possible way to find the matching hole.  Note: if the ball in the whole is too big and the ball drops, you are loosing a ball.  What I've tried:   The easiest way is to insert a ball in the min-radius hole and then the second ball to the hole+1 until one ball goes away by falling inside the whole which means that the hole-1 is the matching hole if of-course the given ball does not match the most widest hole (max hole). The second thing that I would apply is a form of binary search algorithm by reducing the wholes drastically but then I would need to measure the radius of the holes after dividing the set (and the ball radius), however I'm not sure if this is allowed.   I believe there is better attempt to solve the problem any suggestion are greatly appreciated.
You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum number of floors from which the egg can be dropped without breaking it. What is the minimum number of tries needed to find out the solution?
Which is faster/best? SELECT * or SELECT column1, colum2, column3, etc What is a race condition? When writing multithreaded applications, one of the most common problems experienced is race conditions.    My questions to the community are:  What is the race condition? How do you detect them? How do you handle them? Finally, how do you prevent them from occurring? $N$-body simulation in General Relativity How would one perform an $N$-body simulation in General Relativity (GR) for something like galaxy formation or galactic dynamics?  Suppose one wants to simulate the rotation curve $v(r)$ for galaxies with an $N$-body simulation, and wants to do it in the framework of GR / the Einstein equations. Pigeonhole-principle with two choices I am able to solve this sort of problem pretty easily.     An arm wrestler is the champion for a period of 75 hours. The arm   wrestler had at least one match an hour, but no more than 125 total   matches. Show that there is a period of consecutive hours during which   the arm wrestler had exactly 24 matches.   However this homework problem I can't seem to figure out.     Tyler has five weeks to prepare for his driver’s test. His mother   volunteers to ride with him for either 15 minutes or one half hour   every day until the test but not for more than 15 hours in all. Show   that during some period of consecutive days, Tyler and his mother will   drive for exactly 8.75 hours.   If I try doing it the same way as the first problem. I get $70$ pigeons and $95$ pigeon holes. I honestly don't know where to start with this problem. I thought that maybe I could assume that they only drove $.25$ hours on each day and prove that there is a period of consecutive days where they drove for exactly $8.75$ hours. Then I could say that we assume there is one day that they drove for $.5$ hours and work my way up, but I can't seem to get that to work either. $X$ and $Y$ are independent $U(0,1)$ random variables.   I have to find $E[X|X&gt;Y]$.   I found it out by integrating $\int_0^1 \int_y^1 x dxdy$ to get $\frac{1}{3}$ as the answer but this is wrong according to the answer key. What is the mistake that I have made? Get client IP address via third party web service Preview: PDF Highlighting & Search Stop Working until Restart A problem has recently become much more prevalent for me when using Preview to search PDFs for text (using Command + F or the search box in the upper right).  At first, everything generally seems to go fine:    (as it should be) a list of thumbnails appears in the sidebar, indicating all of the pages that contain the search term. Generally, though not always, the term I search for will be highlighted on the first page that it occurs on.   But, after this, things quickly start malfunctioning:   Generally speaking, if I click on thumbnails lower on the list, Preview will take me to that page in the PDF (like it used to).  But, it will no longer highlight the searched for terms. Instead, Preview will make a low-pitched beeping noise of the sort that occurs when one tries to perform some un-permitted action in a variety of mac situations. Furthermore, once this occurs, I cease being able to make any highlights at all in the document I am viewing with Preview.  In fact, I can't even select any text any more.   Below is a list of unsuccessful efforts to resolve this:   Closing the side bar does not work to resolve this. x-ing out the search box in the upper right does not resolve this. Selecting the "Tools" menu and then "Text Selection" does not work either, nor does clicking on the text selection icon in the edit panel. If I quit preview and then re-open the PDF, I am able to highlight again.  But, the problem will re-surface as soon as I try performing another search. Working with the same files in other PDF programs (e.g. Skim, Acrobat, etc.) poses no problems.  I'm quite certain it isn't a problem with the underlying PDFs. None of the responses to  resolve this.  (indeed, I supplied one such response myself a while ago, but that trick and the others no longer work).   I've used Preview for many years without problem.  This issue started cropping up relatively recently for me, I believe within the past 3-4 months.  I had hoped that upgrading to Catalina might resolve it, but it did not.    I'd like to think I am fairly sophisticated with computers (I have a reputation of close to 8,000 on the main stackoverflow page), but I am baffled by this.  I also don't have a good handle on how I can get diagnostic information or how I can create a reproducible example.    Any leads on how to tackle this would be greatly appreciated. I make homemade cayenne pepper sauce every year. I do add some liquid pectin to slightly thicken it so it will stick to food rather than roll off. After a month or so on the shelf it seems to separate a bit. What can I add to this so that it won't or is there a method I can do to stop this. We are slowly working our way into marketing this product down the line and this won't work for that reason. We are using a water bath canning method, vinegar based, no sugar added. Spartan 6 DCM unstable clock output The link here refers to the clocking resources of spartan-6 FPGA. I am using the DCM-CLKGEN primitive described in the link, to generate a 8x clock based on an input clock. It works fine as long as the input clock is stable.  But now i sweep the input clock at every 90 us by ±5%. I see that although the DCM does not lose lock, it takes very long (15 to 20 us) to change the output freq after changing the input frequency. This is for me undesirable. Any suggestions?  This question was posted on the xilinx forum and the suggestion was to reset the DCM everytime it loses lock. But the problem is that the DCM is not losing lock  Also, this was earlier posted on stackoverflow and now has been reposted here. Why do PBX systems use -48 V? It seems common that PBX and other telephone hardware use a positive-ground power supply, where the "hot" line is at -48v.  What's the reason for that? How do I alter a language item link? Editing capabilities document in GeoServer I've got several layers in GeoServer, one of which I'm trying to use as a WMS in desktop programs (Manifold 8). I've set it up correctly, but whenever I bring it into Manifold, it projects the layer into EPSG:4326, which unfortunately can't work with my map - I need it in EPSG:3857. The layer in question is wrapped inside a more overarching layer definition, which contains all the layers - and coordinate systems that allow them all to be used flexibly. However, I want to put this layer on its own in the capabilities document, and only allow it to use EPSG:3857. How, in GeoServer, would I edit, or override, a capabilities document? What are the effects of exceptions on performance in Java? 301 redirect blogspot to an existing domain? Is it possible to redirect a blogspot site to an existing URL?  Note that I don't want to buy a new domain and tell blogspot to use that, eg as per this question: .    Instead I am trying to 301 redirect to an existing website in order to combine the website and the blog in one place.  So it needs to be:  301 example.blogspot.com/post to example.com/blog/post Can we continue to show the "Take a tour" banner after a user has created an account? When you view a Stack Exchange site without being logged in, you see a friendly banner, prompting you to take a tour and understand the features of the site:    This links off to a high quality resource that can help new users understand how the site works. However, the moment a user signs up to the site, this banner disappears from immediate view and hides itself as a link under the help menu.  My proposal is to continue showing this banner until one of the following conditions are met;   The user gets the "Informed" badge The user reaches a set amount of reputation (250 or 500 should be sufficient) The user chooses to hide the banner   This should increase the exposure of the tour to new users, who are the people who need the tour, rather than hiding it the moment a user signs up. Prove: $\binom{n}{0}F_0+\binom{n}{1}F_1+\binom{n}{2}F_2+\cdots+\binom{n}{n}F_n=F_{2n}$ Prove: $\binom{n}{0}F_0+\binom{n}{1}F_1+\binom{n}{2}F_2+\cdots+\binom{n}{n}F_n=F_{2n}$;  I was stuck with this question for a while... Help me please!!! Thanks!!! How to set page geometry for a single page only? The new notice for protected questions looks like this:     Earn 10 reputation in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.  The phrasing of this notice leaves out a lot of info, and is incorrect in many cases:  In the case where the user has just created their account on the site (whether or not they have the association bonus of +100), the default 1 for signing up does count toward the required 10. The message implies that the user has to earn 10 more reputation for a total of 11 (or 111), while the actual requirement is 10 (or 110).  If the user just registered and started off with the association bonus, then later lost part of it (e.g. through bounties or making a downvoted post), earning 10 reputation is not enough to answer protected questions. According to the literal wording of the notice, earning 10 reputation is enough regardless of previous rep loss, but this is not the case.   The easiest fix that can be made, to at least fix part of the problem, would be to explicitly indicate that the association bonus does not count. This was implemented in the prior protected question notice in response to , but was omitted from the new notice. This omission  , and adding this back would remove that. Can we please fix this notice? Repeating an equation including its content and number Does something like  exist for topological (eg. braided) circuits?   Alternatively, any ideas on how @ is getting  (or something similar)?