Locked in a room with your worst enemy. On a table in the centre of the room is a bar of chocolate, divided into 23x45 squares in the usual way. One square of the chocolate is painted with a bright green paint that contains a deadly nerve poison. You and your enemy take it in turns to break off one or more squares from the remaining chocolate (along a straight line) and eat them. Whoever is left with the green square must eat it and die in agony. You may look at the bar of chocolate and then decide whether to go first or second. Describe your strategy in the following 3 cases: a) The poisonous square is in the corner b) The poisonous square is the middle square c) The poisonous square is adjacent to the middle (consider more cases if needed).  a) In the first case, I will play first and cut the chocolate along a line so that I leave my enemy with a square piece 23x23 having the deadly piece in one of its four corners. This is obviously a losing position for him.   b) In the second case, I don't see any winning strategy for me, if I play first. Apparently, I can't leave my enemy with a square piece of chocolate!  c) Well, I would start with eating the part that contains the middle square and then leaving my enemy with a rectangular piece that contains the poisonous square in the middle of its first 1x45 column. Any ideas on how to continue?
There is a bar of chocolate of size $N$ x $M$. Little square $(x, y)$ is poisoned. There are 2 players taking turns. In each move they can cut the bar along any of the horizontal or vertical lines, then the part which does not contain $(x, y)$ is being eaten. The player who is left only with square $(x, y)$ loses (beacause it is poisoned). Which player has the winning strategy? I guess that this game is equivalent to game of Nim due to Sprauge-Grundy theorem, but I don't know how.
Searching by user id in Android app only shows questions, no answers I have a Samsung Galaxy S3. Android version 4.3  I downloaded the official StackExchange app today. I am not able to view post related to android tag from my profile. I tried refreshing also  Snap     Edit:  However i am able to see one post for the relevant from the drop down list    Edit 2:  I tried what Steven V suggested. However it's the same.    I tried for a different user its the same. Tool for straightening a bent metal bar of the gate? Someone's car hit our metal bar gate, so one of the rods is bent as shown in the photo. What kind of a tool can I use to bend this back, so it's straight? Thank you! How to find and replace a string by increasing its numerical part? While talking about ships and countries, is it a good practice to use the feminine form?  For example:  "Her economy" - while referring to a country's economy "Her flag (or deck etc)" - while referring to a ship  Is this practice common? Is it used today? Indian CGPA to US GPA system What is aperture, and how does it affect my photographs? How does aperture affect my photographs?  Why should I care about the aperture with which a photo was taken? Shrink Tempdb log file when reaching a specific size how I can shrink tempdb log file when reaching a specific size?? I'm scheduling job to shrink tempdb but still I face a problem of disk space due to tempdb is full! How do you search for backdoors from the previous IT person? We all know it happens. A bitter old IT guy leaves a  into the system and network in order to have fun with the new guys and show the company how bad things are without him.  I've never personally experienced this. The most I've experienced is somebody who broke and stole stuff right before leaving. I'm sure this happens, though.  So, when taking over a network that can't quite be trusted, what steps should be taken to ensure everything is safe and secure? Inline image alignment issue for app and mobile web Is it feasible to build an index of prime factors? Would it be possible to break an RSA key, in for example 1 week of time, if the cracker have already spent X number of years building an index of primes by performing every permutation of existing prime keys up to $2^{2048}$?  I understand this would take an immense amount of time to do, but it would only be done once. Obviously, computing such an index would take a considerable amount of time and would have to be done with someone having the right amount of resource. Given the public key, you would be able to look up what the two primes are, and hence retrieve the private key instantly.  Breaking an 256 AES would then be easier, as AES keys are often generated using the RSA private key.  Would it be possible to build such an index? How long would that take in permutations and perhaps with the fastest computer in the world? Bold code in a question Frequently when I ask a question I have to include quite a bit of code for reference purposes.    It would be nice to be able to bold the important lines in the code.  For example this code:  &lt;DataTrigger Value="True"&gt;     &lt;DataTrigger.Binding&gt;         &lt;MultiBinding Converter="{StaticResource DisableWorkItemConverter}"&gt;             &lt;Binding ElementName="MainForm" Path="PickedWorkItemID"/&gt;             &lt;Binding Path="Id"/&gt;         &lt;/MultiBinding&gt;     &lt;/DataTrigger.Binding&gt;     &lt;Setter Property="IsEnabled" Value="False"/&gt;     &lt;Setter Property="IsSelected" Value="False"/&gt; &lt;/DataTrigger&gt;   Is not way long, but the important part (as seen in ) is the second to last line.  However, if I try to bold it, it ends up looking like this:  &lt;DataTrigger Value="True"&gt;     &lt;DataTrigger.Binding&gt;         &lt;MultiBinding Converter="{StaticResource DisableWorkItemConverter}"&gt;             &lt;Binding ElementName="MainForm" Path="PickedWorkItemID"/&gt;             &lt;Binding Path="Id"/&gt;         &lt;/MultiBinding&gt;     &lt;/DataTrigger.Binding&gt;     &lt;Setter Property="IsEnabled" Value="False"/&gt;     **&lt;Setter Property="IsSelected" Value="False"/&gt;** &lt;/DataTrigger&gt;   Not what I was going for.  It would be nice to be able to draw attention to specific lines of code when needed.    (One suggestion of a different color background sounds nice too (ie a yellow background to draw the eye to the relevant code.)  If there is some other way to bold in code please let me know. Apex compile error : variable does not exist I'm having issues with creating a pretty simple test Utility Class. I want to create two records: an account and a related child contact. The error I see in the developer console is:     Variable does not exist: a.ID   My code, based on the Salesforce Apex Workbook, is as follows. I've played around with various things, but it's not working. Where am I going wrong? Thanks in advance.  @isTest public class AccountSaveTestSuite {      public static Account createOneAccount(){           Account testAccount = createAcct('ABC Computing inc.');              Contact testContact = createContact();          return testAccount;             }      // Helper methods //     //        private static Account createAcct(string accountName) {          Account a = new Account(             Name=accountName);         insert a;         return a;     }      private static Contact createContact(){         Contact c = new Contact (             FirstName = 'Jane'              , LastName = 'Smith'             , Account = a.ID); // *** Error is here ***         insert c;         return c;      }  } How do you post to an iframe? How do you post data to an iframe? I have to prove that:     $$\sum_{k=0}^{n} {{m+k} \choose{m}} = { m+n+1 \choose m+1 }$$   I tried to open up the right side with Pascal's definition that: $$ { n \choose k} = {n-1 \choose {k}} + {n-1 \choose {k-1}}$$  Here is what I came up with, and I am sure it is wrong because it does not equal the left side:  $$ {m+n+1 \choose m+1} = {m+n \choose m+1} + {m+n \choose m} = ... ={m+n \choose m+1} + {m+n-1 \choose m} + {m+n-2 \choose m-1} + ... + {m \choose m+1} = \sum_{k=0}^{n} {m+k \choose m+k-n+1 }  $$  Which, again, probably is wrong because it is not equal $\sum_{k=0}^{n} { m+k \choose m}$. Any help is appreciated Usually a probability distribution over discrete variables is described using a probability mass function (PMF):  When working with continuous random variables, we describe probability distributions using a probability density function (PDF) rather than a probability mass function. -- Deep Learning by Goodfellow, Bengio,  and Courville  However,  is using PDF to describe the probability distribution over discrete variables:    Is this a mistake? or it does not much matter? What is the integral of 0? What can I do to manage my phone's internal storage? What is the strict aliasing rule? Teleporting a player from the overworld to the end Is there any way to teleport a player from the overworld to the end?   Or a way of teleporting a player to a random enderman in the end? How can I get back a system file after deleting it from my Mac? I've deleted a system file from my Mac and need to get it back.  System files can include:   hidden files in the root of / - especially unix files in /private  /System files /Library files /Applications files that ship with the core OS   System files are not any app, user files or files that can be regenerated by a known sequence such as cache files, Spotlight index files, etc…    Canonical question and answer for .