Hey I just came across an function and I was confused as which one is better?  private static bool IsEqual(TypeABC output, TypeABC input) {     if( conditions....)     {        return true;     }      return false; }   or   private static bool IsEqual(TypeABC output, TypeABC input) {     bool isEqual = false;      if( conditions....)     {        isEqual = true;     }      return isEqual; }   Both perform the same thing but  I want to know from from any perspective may it be coding standards, performance or garbage collection. Which one of the above is better and why?  Or if its too generic to answer, then advantages / disadvantages of each code over the other.  Also suggest a few tags I should put for this question.
Are there good reasons why it's a better practice to have only one return statement in a function?   Or is it okay to return from a function as soon as it is logically correct to do so, meaning there may be many return statements in the function?
$ echo $(( 255 )) 255 $ echo $(( 33 )) 33 $ echo $(( ~33 )) -34 $ echo $(( ~255 )) -256 $    and my kernel is:  $ uname -a Linux HOSTNAME 3.2.0-40-generic-pae #64-Ubuntu SMP Mon Mar 25 21:44:41 UTC 2013 i686 i686 i386 GNU/Linux     QUESTION: ~ is for negating the number AFAIK. But why does ~33 produce -34 and why does ~255 produce -256? Seems that I just proved $2=4$. Is $\le$ defined by $\langle 𝑥_1, 𝑦_1 \rangle \le \langle 𝑥_2, 𝑦_2 \rangle$, if $𝑥_1 \le 𝑥_2 \land𝑦_1 \ge 𝑦_2$ a linear order? I need to tell if the relation $\le$ defined by relationship $\langle 𝑥_1, 𝑦_1 \rangle \le \langle 𝑥_2, 𝑦_2 \rangle$, if $𝑥_1 \le 𝑥_2$ $\land$ $𝑦_1 \ge 𝑦_2$ linear order?   I have already proven that the relation is an order, but I need to decide if it is a linear order and why. Thanks for any help! I have a JavaScript object like the following:  var p = {     "p1": "value1",     "p2": "value2",     "p3": "value3" };   Now I want to loop through all p elements (p1, p2, p3...) And get their keys and values. How can I do that?  I can modify the JavaScript object if necessary. My ultimate goal is to loop through some key value pairs and if possible I want to avoid using eval. When using divs when is it best to use a class vs id?   Is it best to use class, on say font variant or elements within the html? Then use id for the structure/containers?   This is something I've always been a little uncertain on, any help would  be great. Find the slope of tangent line to the curve at the point $(1, \pi/2)$  the equation is  $$\sin(xy) = x$$  The right answer was = Slope is infinite   My answer was taking the derivative and I end up in this equation   $$ (1-y\cos(xy))/ x\cos(xy)  $$  I substitute with the points and the calculator showed an error, Does the error means infinite ? How do I download a YouTube video? How can I get query string values in JavaScript? How to migrate from test environment to production environment? The migration is from the local environment to the production environment. The production environment has run some time and created a lot of articles.   In order to add new things to my site, I added a custom theme and installed CCK, Views and other modules in my local test environment. Now that the local test environment is finished, how do I migrate it to the production environment, without destroying the content of its database? Guaranteed lifetime of temporary in C++? Unique quadratic subfield of $\mathbb{Q}(\zeta_p)$ is $\mathbb{Q}(\sqrt{p})$ if $p \equiv 1$ $(4)$, and $\mathbb{Q}(\sqrt{-p})$ if $p \equiv 3$ $(4)$ How to return to original .pdf presentation after open a .pdf linked file? I'm preparing a beamer presentation and I'm using hyperlinks for the first time; When I do something like:  \href{name_file_to_open.pdf}{here I put a link to a figure which is working well}   It works just fine and open the .pdf document; Problem is I can't return to my presentation, cause when I close the linked.pdf I close it all. (I try this with movie and indicating an area to the file open like \href[width=3cm,height=2cm] but then it doesn't work)  Can anyone please has any suggestion to this problem? Proof that any simple connected graph has at least 2 non-cut vertices. Deputy badge after a reputation of 3000 How can I change the Keyboard Layout on login screen? I changed my Keyboard Layout from Swedish to English, but now my password doesn’t work and I can’t login. I need a way to change the keyboard layout at the login screen without having access to the keyboard or a way to enter the password using characters not available on the keyboard itself. I've just purchased a new brand laptop with 17 inch size of the screen. I've installed Texmaker and it is messy. The icons are very small and the GUI is not zoomed out automatically to fit the contents of the window. These are pictures         I've already set the size of the icons to medium and the size of apps to 250 (i.e. the recommended size) for  the display.  I'm using Windows 10. Some fonts are blurry and a lot of people are complaining about this problem with no solution from Microsoft. Any suggestions? I wish to remove Ubuntu and I'm not quite sure how. I know it has something to do with partitions. I have 3 partitions. 1. OS [683 GB]  2. Recovery [14 GB] 3. Ubuntu 12.04 LTS (E:)  I know it says Ubuntu but when I installed Ubuntu I think I put 14 gigabytes for it so I think its the recovery one but I'm not sure. I could have sworn I put more than 700 megabytes for it.  I have googled this and I can't seem to find an answer. Any help would be nice. How can we differentiate between change and progress in the area of history and natural sciences? Way to go from recursion to iteration I've used recursion quite a lot on my many years of programming to solve simple problems, but I'm fully aware that sometimes you need iteration due to memory/speed problems.  So, sometime in the very far past I went to try and find if there existed any "pattern" or text-book way of transforming a common recursion approach to iteration and found nothing. Or at least nothing that I can remember it would help.   Are there general rules? Is there a "pattern"? How to blacklist kernel modules?