I'm using robot world for an assignment. we have to get to robot to go north 8 places then east 6 places. when we get to the point the robot has a choice to make. if there is an even number of beepers in that see the robot should face north and move one cell. if there is an odd number of beepers then it should face south and move one. I don't know what command to give the robot in the source code. my program runs when i just have              if(beeperPresent)) {     turnLeft();     move(); } else {     turnRight();     move(); }
How can I check if a given number is even or odd in C?
I'm a student of mathematics with not much background in physics. I'm interested in learning Quantum field theory from a mathematical point of view.  Are there any good books or other reference material which can help in learning about quantum field theory? What areas of mathematics should I be familiar with before reading about Quantum field theory? How to Implement Page Object and Page Factory Pattern in Selenium Webdriver? I am a beginner in learning selenium Webdriver. I am not able to understand how page object and factory models works and how it can be beneficial?    Kindly help me explain it with detailed explanation. Can I safely charge my laptop with a non-standard, third-party charger? I have a Toshiba Satellite laptop. My charger has stopped working.  I have access to a Lenovo charger. Can I use this charger on my laptop? What is the smallest positive integer $n$, such that there exist positive integers $a$ and $b$, with $b$ obtained from $a$ by a rearrangement of its digits, so that   $a – b = 11\dots 1$ (The number of '$1$'s equal to $n$)?   Is there any example that can satisfy the equation? How can I subdivide this plane into even squares? Does anyone know how prove the following?   Suppose that $f,g$ are holomorphic functions on a non-empty open connected set $\Omega \subset \mathbb{C}$ and that $|f|^2+ |g|^2$ is constant on $\Omega$. Show that $f$ and $g$ are constant on $\Omega$. Meaning of a set in the exponent Let $ D = 2^\mathbb{N} $, i.e., D is the set of all sets of natural numbers.   What's the meaning of this definition? Intuitively, I would suggest that $ D = \{1,2,4,...\} $ but the explanation "set of all sets" leads me to the guess that this is wrong. Wrong numeration in toc longer then one page I tried anything I could find with \cleardoublepage and \newpage and so on; mostly they use \addcontentsline. I don't need to use it as listof=totoc already puts it into the toc so even if I use \addcontentsline instead I get the same result.  \documentclass[     fontsize=11pt,     DIV10,     ngerman,     paper=a4,      twoside=false,     titlepage,     parskip=half,     listof=totoc,     bibliography=totoc,     index=totoc,     captions=tableheading,     foottotes=multiple,     final ]{scrartcl}  \usepackage[     automark,     headsepline,     ilines ]{scrpage2}  \usepackage[ngerman]{babel} \usepackage[babel,german=quotes]{csquotes} \usepackage[dvips]{graphicx}  \begin{document}  \ofoot{\pagemark} \pagenumbering{Roman} \clearpage \tableofcontents \clearpage \listoffigures \clearpage \pagenumbering{arabic} \section{Test} \label{sec:Test}  Test  \subsection{Test} \label{sec:Test}  \begin{figure}[H]  \centering \caption{Testfig} \label{fig:testfig} \end{figure}  \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test} \subsection{Test} \label{sec:Test}  \end{document} No Surname in indian passport and given name is considered as last name in E ticket for an international flight I have booked tickets for my parents to visit Mauritius for a week and my mom's passport (given name is xxxx) doesn't have surname, so in the e-ticket form her name has been printed as "Mr xxxx". I have spoken to the travel agency and Air Mauritius, but didn't get any information regarding the issue.  Can anyone please tell me if there might be a problem boarding the flight?  I am very anxious right now since its their first international flight. Old fantasy book with a party finding coloured stones having powers over fire, water, mood I'm trying to remember the name of a book series of which I remember only the following, with Google yielding no results.   the name of the author starts with a Z   the main character is a knight in an household with a name sounding like Malachai who goes on a quest with six others guys and girls (a bard, another knight, a priest, etc.) and each of them finds a stone of colour which has a power on various things (like fire, their mood or water) and then they set toward a quest to beat some ancient evil. I used to find the book at the local library 10 years ago in France (but it was translated). Escaping regex string Can any one help me out , based on quote line items can we create a layout like by prepopulating items, price &amp; qty and next 6 qtrs. Example below 2 part numbers are  in quote line items, also default the price from quote line item.  Upon saving ,it should save as detailed record for each quarter. Creating a custom object  and calling them in Visual force page or by using JavaScript and CSS .Any suggestions plz.I shall appreciate your help.  i tried previously in this way   &lt;apex:page standardController="CustomLineItem__c"  sidebar="false" showHeader="false"&gt;  &lt;apex:form &gt;   &lt;apex:pageBlock &gt;     &lt;apex:pageBlockButtons location="top"&gt;       &lt;apex:commandButton value="SAVE" action="{!SAVE}"/&gt;       &lt;apex:commandButton value="SAVE&amp;MORE" action="{!SAVE}"/&gt;       &lt;apex:commandButton value="CANCEL" action="{!CANCEL}"/&gt;     &lt;/apex:pageBlockButtons&gt;     &lt;apex:pageblockSection title="Schedule"&gt;       &lt;apex:inputField value="{!CustomLineItem__c.ProductPartNumbers__c}" label="Product"/&gt;        &lt;apex:inputField value="{!CustomLineItem__c.Year__c}" label="Year"/&gt;        &lt;apex:inputField value="{!CustomLineItem__c.PricingRequestsQuarterNos__c}" label="Quarter"/&gt;        &lt;apex:inputField value="{!CustomLineItem__c.Quantity__c}"/&gt;        &lt;apex:inputField value="{!CustomLineItem__c.Price__c}"/&gt;    &lt;/apex:pageblockSection&gt;   &lt;/apex:pageblock&gt;  &lt;/apex:form&gt; &lt;/apex:page&gt; My significant other and I finish our master degrees at the same time and thus we are applying for PhD programmes at the same time. One major factor of accepting a potential offer would be if we could study at the same university, so I feel that mentioning a two-body problem would be advantageous for both, us and the admission committee. But where do I mention this? Is a line in the statement of purpose suitable here?     If you admit me, please also consider admitting my significant other Jane Roe.   Some additional information: We both do research in computer science. While I do research in natural language processing my partner does research in computer vision. How to import a module given its name as string? TV show that starts with debris encompassing Earth I need to find a way of proving that the square roots of a finite set    of different primes are linearly independent over the field of    rationals.    I've tried to solve the problem using elementary algebra  and also using the theory of field extensions, without success. To  prove linear independence of two primes is easy but then my problems  arise. I would be very thankful for an answer to this question. PTR record won`t update While I was investigating a problem I had with lexical closures in Javascript code, I came along this problem in Python:  flist = []  for i in xrange(3):     def func(x): return x * i     flist.append(func)  for f in flist:     print f(2)   Note that this example mindfully avoids lambda. It prints "4 4 4", which is surprising. I'd expect "0 2 4".   This equivalent Perl code does it right:  my @flist = ();  foreach my $i (0 .. 2) {     push(@flist, sub {$i * $_[0]}); }  foreach my $f (@flist) {     print $f-&gt;(2), "\n"; }   "0 2 4" is printed.  Can you please explain the difference ?    Update:   The problem is not with i being global. This displays the same behavior:  flist = []  def outer():     for i in xrange(3):         def inner(x): return x * i         flist.append(inner)  outer() #~ print i   # commented because it causes an error  for f in flist:     print f(2)   As the commented line shows, i is unknown at that point. Still, it prints "4 4 4". I'm new to regular expressions and would appreciate your help.  I'm trying to put together an expression that will split the example string using all spaces that are not surrounded by single or double quotes. My last attempt looks like this: (?!") and isn't quite working. It's splitting on the space before the quote.  Example input:   This is a string that "will be" highlighted when your 'regular expression' matches something.   Desired output:  This is a string that will be highlighted when your regular expression matches something.   Note that "will be" and 'regular expression' retain the space between the words. back-up: which patitions to back-up before upgrading/reinstalling I have Ubuntu13.04 on my laptop. I have to upgrade it to the next release or else I would install a fresh release after deleting my current system.  I have already installed and configured my current system a lot and I can't take the burden of doing it all over again if I install the next release. Now I would like to know that what all back-ups are required to be taken beforehand so that I would recover all my files/installations/configurations etc. In other words I should have everything on my new system (simply by restoring from back-ups) that I possess currently.  My current system has /, /boot, /home &amp; swap partitions which were created by me when I had freshly installed the O.S.