problem with c# logical operators & and | | is an OR and &amp; is AND. I have the following code and they works OPPOSITE.             int a = 0;             int b = 0;             int c = -1;             if ((a | b | c) == 0)              {                 textBox8.Text = &quot;everything 0&quot;;              }             else             {                 textBox8.Text = &quot;something is not a 0&quot;; // &lt;- code goes here             }                         if ((a &amp; b &amp; c) == 0)             {                 textBox9.Text = &quot;everything 0&quot;;  // &lt;- code goes here                         }             else             {                 textBox9.Text = &quot;something is not a 0&quot;;                            }  why i have this result?
What is the difference between the | and || or operators? I have always used || (two pipes) in OR expressions, both in C# and PHP. Occasionally I see a single pipe used: |. What is the difference between those two usages? Are there any caveats when using one over the other or are they interchangeable?
why does loop-cut-and-slide ignore some faces but not others? I consider the co-finite topology on $\mathbb{R}$ that is $$\{G\subset \mathbb{R}, card(\mathbb{R}\setminus G)&lt;+\infty\}\cup \{\emptyset\}$$  What are the convergent sequences in this space .  thank you Is it possible to paginate posts correctly that are random ordered? I found this problem on Wordpress Support and the topic unfortunately is now closed.  I have this same issue... (read below)    We have created a site where members can recommend things like favourite books, movie, songs, etc. For this problem I will use the Movies page as an example.  The "Movies" page is ultimately a custom page template that asks wordpress to display a random list of ALL posts that have been given the category "movies" (category 31). It displays the title of these movies in random order using the code below.  &lt;?php  $rand = new WP_Query("cat=31&amp;showposts=-1&amp;orderby=rand");  while($rand-&gt;have_posts()) : $rand-&gt;the_post(); ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt; &lt;?php endwhile; ?&gt;   Problem is the list is getting rather long and I would like to split it up into two or more pages of about 10 movies each. To achieve this, I have used the code below.  &lt;?php  $page = (get_query_var('paged')) ? get_query_var('paged') : 1;  query_posts("cat=31&amp;orderby=rand&amp;showposts=10&amp;paged=$page");  while ( have_posts() ) : the_post()  ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt; &lt;?php endwhile; ?&gt;   But there is a problem because although it splits up the data into pages of 10 posts each (paginates), it fails to include a new set of 10 posts on page 2 and so forth. In other words, because it is listing things in a random order, it just goes out and gets another 10 random posts (or in this case movie titles). As a result, we have some repeated movie title posts instead of a new set of 10 random movie titles on page 2, etc.  My question is - what can I add to this code to get wordpress to "remember" which random 10 posts it included on page 1, and then have it get a new set of 10 posts to put on pages 2, 3, etc. until all posts are displayed. I would like there to be only one occurrence of a post per page when sorted randomly in sets of 10. How do I use multirow in LaTeX? Getting key with maximum value in dictionary? What methods can be used to micro-adjust autofocus of a camera body to a particular lens? I have a Canon 7D with a 50mm f/1.4 lens, and I think the auto-focus of the lens is off.  How can I test and adjust this reliably?  Will this approach work with all of my lenses? If I had a different camera body, would I have other/different options? Is there a well-known term for the synonym or near-synonym "telescoping" words? This has been rattling around in the back of my mind for many years (way before Stack Exchange came into existence), so it's a relief to finally ask the question.  There are words that can be "contracted" by removing one or more letter(s) (without changing the order of the letters) to form a shorter word with the same meaning, or one very close to it.  The two strongest examples I can think of right now are:  rapscallion -> rascal  and  satiate -> sate  This is a slightly weaker example:  rapine -> rape  Even though "rape" has come, in modern usage, to refer almost exclusively to a sexual crime, it can still be used in a more literary (and purposefully anachronistic) sense to mean "the plunder and pillage of a country or region". In that sense, "rape" can be used in a similar fashion to "rapine"; in any case, the two words are etymologically related to the Latin rapere which is tied to the archaic usage.  Another weaker example:  transliterate -> translate  These words are near-synonyms, but there is a definite difference in their meaning. Still, I guess this pair would qualify, albeit in a looser sense.  I wanted to exclude some relatively trivial examples, such as:  (inflammable -> flammable)  (perambulate -> ambulate)  and so forth. So I've imposed the additional rule (arbitrary though it may seem) that the "stripped" letters must not come from the start or the end of the word, but only from its middle.  Acronyms and portmanteaus are also excluded, as are "slangier" contractions e.g.:  (modulator-demodulator -> modem)  (motor-hotel -> motel)  (certitude or certainty or certificate -> cert)  I guess the long-short forms of the same word would form a linguistic doublet. I've coined the term "telescoping word" to describe the long form that "collapses" into the short form with letter deletion sans anagramming.  My question is: has this phenomenon already been studied? If so, what name have authorities given it? Is there already an existing reference or resource on it? Thanks in advance.  (This is not a duplicate of , as that is asking about the more general phenomenon of words (not necessarily synonyms) occurring within larger words. In fact, the question specifically mentions "kangaroo word" and states that a broader scope is being sought.) OpenCV argc and argv confusion Calculating latitude and longitude of points using QGIS How do I easily calculate the lat/long of points using the QGIS Field Calculator? I saw a previous related question (), but it deals with a more advanced approach. In ArcGIS Desktop this is similar to the Calculate Geometry function; I just can't find where do this in QGIS. Proof by induction that if $n \in \mathbb N$ then it can be written as sum of different Fibonacci numbers Proof that every natural number $n\in \mathbb N$, can be written as the sum of different Fibonacci numbers between $F_2,F_3,\ldots,F_k,\ldots$.  For example: $32 = 21 + 8+3 = F_8+F_6+F_4$  Research effort:  The base step it's simple:  Let $k=1$ it can be britten as $k=1=F_2$  For the inductive step I considered:  Let $k = k  F_2 =F_2+F_2+\cdots+F_2 = \sum_{i=2}^w a_iF_i, a_i =\{0,1\} $  Then if $k$ suffice I want to see if $k+1$ suffices too... But I'm not realy seeing how to use the inductive hypothesis, so I assume It's wrong.  Any thoughts on which can the inductive step be? How can I create an executable JAR with dependencies using Maven? How do I scan for Wireless Access Points? Anonymous users can't see new content type in feed $P(X<Y)$ where X and Y are exponential with means $2$ and $1$ How to update Android Studio in Ubuntu? I am trying to update from version 2.0.0 to version 2.1.2 in Ubuntu 64bit/14.04LTS but when I click "update and restart" it says "Downloading patches" and it closes.   It does not start again and if I try to open it, the version is still 2.0.0.   Is there any tutorial to manually update android studio? (keep all settings and etc). How do I space quads evenly? Is there a way in blender or an addon that allows me to select a bunch of faces (or verts) and evenly distributes (or relaxes) them into quads clean quads.  Without screwing up the vert ID/order.  Edit: I would like to have the shapes of my quads to turn into perfect squares while maintaining the volume of the object and the vertex order. Backgrounder:  The  (Pointer to IMPLementation) is a technique for implementation hiding in which a public class wraps a structure or class that cannot be seen outside the library the public class is part of.  This hides internal implementation details and data from the user of the library.  When implementing this idiom why would you place the public methods on the pimpl class and not the public class since the public classes method implementations would be compiled into the library and the user only has the header file?  To illustrate, this code puts the Purr() implementation on the impl class and wraps it as well.  Why not implement Purr directly on the public class?  // header file: class Cat {     private:         class CatImpl;  // Not defined here         CatImpl *cat_;  // Handle      public:         Cat();            // Constructor         ~Cat();           // Destructor         // Other operations...         Purr(); };   // CPP file: #include "cat.h"  class Cat::CatImpl {     Purr(); ...     // The actual implementation can be anything };  Cat::Cat() {     cat_ = new CatImpl; }  Cat::~Cat() {     delete cat_; }  Cat::Purr(){ cat_-&gt;Purr(); } CatImpl::Purr(){    printf("purrrrrr"); } Printing pointers in C Correct usage for "all you need is/are..." What is the solution to the Squirrel sequence of letters question?