I'm new at programming. Recently i came across a problem in which i have to make a particular bit 0 of a number.  For example :    I have a number p    p      = 73 binary = 1001001   Now i want to make 4th bit to 0, that is 1000001(2) = 65(10)  I did this in following way :  int p = 73; int pos = 1&lt;&lt;3; // 4th bit int max_bit = (1&lt;&lt;31) - 1; // making all bit to 1 int mask = pos ^ max_bit; // making 4th bit to 0 except others p = p &amp; mask; // changing 4th bit of p to 0 cout&lt;&lt;p&lt;&lt;endl;   Is there a better way to do this ?
How do you set, clear, and toggle a bit?
How do I downgrade Minecraft to play on a server running an older version? Stop jQuery .load response from being cached I have the following code making a GET request on a URL:  $('#searchButton').click(function() {     $('#inquiry').load('/portal/?f=searchBilling&amp;pid=' + $('#query').val());             });   But the returned result is not always reflected. For example, I made a change in the response that spit out a stack trace but the stack trace did not appear when I clicked on the search button. I looked at the underlying PHP code that controls the ajax response and it had the correct code and visiting the page directly showed the correct result but the output returned by .load was old.  If I close the browser and reopen it it works once and then starts to return the stale information. Can I control this by jQuery or do I need to have my PHP script output headers to control caching? I have some lines. I want to draw perpendicular lines at the start and end of the lines, on both sides of the lines.  Can somebody help me in Python?  I am using ArcGIS. By viewing the polynomials as a difference of two squares, factorise the following polynomial: $$x^4+x^2+1.$$ I searched but couldn't find a way to solve this  Edit: By using Hans Lundmark hint, I get:  $$(x^2+1)^2-x^2$$   Is it fully factorized? Proof that $\suṃ̣_{k=1}^{n}k {n \choose k}$ for $n \in \mathbb N$ is equal to $n2^{n-1}$.  As a hint I got that $k {n \choose k} = n {n-1\choose k-1} $.  I tried solving this by induction but, in the inductive step I'm not arriving to the correct result. Is it safe to delete from C:\Windows\Installer? I can already scroll left and right with two-finger swiping, however, in Windows I can use the same gestures to go forward and back in browsers and such. Is this possible in Ubuntu? How many people have undergone carbon freezing in Star Wars? We all know the story of Han Solo being a guinea pig for the planned freezing of Luke Skywalker, but how often are people "stored" in this way? Dihedral group - elements of order $2$ What is the term when a word is used consecutively twice, with intentional stress placed on the first word, as a means to alter the severity of the word's meaning?  I am not referring to a  (had had) or a  (that that), but to the slightly sarcastic use as demonstrated in shows like Seinfeld. Sample sentences, with emphasis:  I know we're going out to eat, but I am only going to pick at an appetizer because I'm not hungry hungry. Don't wear something so formal to the party; I don't think you need to be dressed dressed.  Of personal note, some of my relatives decided a few years ago to nick-name the term a &quot;Celaine&quot; (a combination of their names) due to their own frequent use of it. Note: This question explicitly requests the term of art used by linguists and English scholars when discussing this phenomenon. This question is different from a  which requests a historical explanation for the phenomenon described by this term. None of the answers to the suggested duplicate provide the term.  The author of the similar question requests the term for the pattern in a comment, but does not receive an acceptable answer. The only mention of an acceptable term is in a comment made by the author of this question, in response to the author of the similar question, directing back to this very question. "FTL" Communication with Quantum Entanglement? Can quantum entanglement make sending a message, whether audio, video, or even Morse code, instantaneous between two points (faster than it could travel normally at the speed of light)?  Let me first be clear, my question is not whether a message can travel faster than light. I simply mean whether a message can be generated here and then a copy of that message heard over there sooner than the message would normally be received.  Say a large number of entangled pairs are generated. One half the particles are given to Jack and the opposite ones to Sally. Jack then hops on a ship and travels 8 months to Mars. Sally then manipulates her particles in the form of a message. Do the corresponding opposite particles get manipulated simultaneously so that Jack receives the message instantly instead of the 16 light-minutes for a classically transmitted message? Let $F : X → X$ be continuous. Prove that the set $\{x ∈ X : F(x) = x\}$ of fixed points of F is closed in X Here X is a Hausdorff Space.  I know that singleton sets, {x}, are closed in a Hausdorff space. Although Im not sure if thats how to use the Hausdorff property.   Should I investigate $h=F(x)-x$?  Can anyone give a hint What is some good free software for doing physics calculations?  I'm mainly interested in symbolic computation (something like Mathematica, but free). I'm batch processing a folder of image to a uniform width with GraphicsMagick (though I assume the same would apply to ImageMagick):  $ gm convert -resize 1000x in.jpg out.jpg   But when I inspect some of the images, I get 999px instead of 1000px.  $ gm identify -verbose out.jpg  ==&gt; Image: out.jpg ==&gt; Format: JPEG (Joint Photographic Experts Group JFIF format ==&gt;   Geometry: 999x591   Is there a way to enforce the right width? I assume it's doing some estimation to preserve aspect ratios. How do I set the page title? I know I could change the page title with drupal_set_title(t('Amy page title')), but when I try it in Drupal 8 I get the There is no such function error.  How can I change page title in Drupal 8? I understand that they force you to implement methods and such but what I cant understand is why you would want to use them. Can anybody give me a good example or explanation on why I would want to implement this. Evaluate the limit $\lim\limits_{n \to \infty} \frac{1}{1+n^2} +\frac{2}{2+n^2}+ \ldots +\frac{n}{n+n^2}$ Evaluate the limit   $$\lim_{n \to \infty} \dfrac{1}{1+n^2} +\dfrac{2}{2+n^2}+ \ldots+\dfrac{n}{n+n^2}$$   My approach :   If I divide numerator and denominator by $n^2$ I get :   $$\lim_{ n \to \infty} \dfrac{\frac{1}{n^2}}{\frac{1}{n^2} +1} +\dfrac{\frac{2}{n^2}}{\frac{2}{n^2} +1} + \ldots+ \dfrac{\frac{1}{n}}{\frac{1}{n} + 1}=0$$   but the answer is $\dfrac{1}{2}$ please suggest how to solve this.. thanks. How to deal with cross-thread access exceptions? Double orthogonal complement is equal to topological closure outline object effect How can I achieve an outline effect similar to the ones found in League of Legends or Diablo III?      Is it done using a shader? How? I would prefer answers that are not tied up to any particular engine but one that I can adapt to whatever engine I'm working on.