Construct an Injection between the set of rationals $\mathbb{Q}$ and the set of all integers $\mathbb{Z}$ .  Answer:  Define $ f: \mathbb{Q} \to \mathbb{N} \ $ by $ \ f\left(\frac{p}{q}\right)=|p-q|+1 \ $ , where $ \gcd(p,q)=1$  Clearly $f$ is an injection.  Next, define $ g: \mathbb{N} \to \mathbb{Z}$ by $  g(n)=n  $  Then $ g $ is also an injection.
I want to prove that $\mathbb{Q}$ is countable. So basically, I could find a bijection from $\mathbb{Q}$ to $\mathbb{N}$. But I have also recently proved that $\mathbb{Z}$ is countable, so is it equivalent to find a bijection from $\mathbb{Q}$ to $\mathbb{Z}$?
Let $x,y,z&gt;0$: Prove that:   $\frac{1}{(x+2y)^2}+\frac{1}{(y+2z)^2}+\frac{1}{(z+2x)^2} \geq\frac{1}{xy+yz+zx}$  I tried to apply Cauchy - Schwarz's inequality but I couldn't prove this inequality! I'm writing a script and I would like to pass the results from bc into a variable. I've declared 2 variables (var1 and var2) and have given them values.  In my script I want to pass the results from bc into another variable say var3 so that I can work with var3 for other calculations.  So far I have been able write the result to a file which is not what I'm looking for and also I've been able to echo the result in the terminal but I just want to pass the result to a variable at moment so that I can work with that variable.  echo "scale=2;$var1/var2" | bc Strip whitespace from jsp output How can I strip out extra whitespace from jsp pages' output?  Is there a switch I can flip on my web.xml?  Is there a Tomcat specific setting? No Wi-Fi on iPhone? In my iPhone settings where I'm supposed to turn Wi-Fi on or off, it is just grey &amp; says 'No Wi-Fi'.  I have reset network settings, restored phone, re-synced everything, but still have this problem. Does anyone know how to fix this? Passive POE: Need 5V @ 2A at the destination I have heard many (rather most) people, especially in the USA, saying:      I don't know nothing about it.   Is that correct? I always get a weird feeling hearing this and feel the correct one would be saying:     I don't know anything about it. When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do? Please enable low-rep users to easily breakout up and down votes on their own questions I know once you get a certain amount of reputation, you can see the total up and down votes for questions. Well, my proposal is to always be able to see this on your own questions and answers. You can see it by going to your user page anyway, so why not make it possible to do by simply clicking on the number of votes (like you can when you have the rep)? How to define a figure size so that it consumes the rest of a page? Sometimes I don't need to have a specific picture size, but for layout reasons I would like to scale the image so that the rest of the page is filled. How can I achieve that? I have searched in %appdata%, pulling up the list of files there, but there is no file labelled .minecraft. Searching %appdata%\.minecraft returns "no results found".   I also opened Minecraft to click on the resources button and could not locate that either. How to see download count of an Android app on Google Play store? I cannot see the download counts of one app on Google Play.   How can we know that number of one app? How can one link / merge / combine / associate two accounts / users? (Anonymous / unregistered / cookie, or Google / Facebook / registered) I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit &quot;&quot; in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms) What does the "yield" keyword do? I encountered the following induction proof on a practice exam for calculus:  $$\sum_{k=1}^nk^2 = \frac{n(n+1)(2n+1)}{6}$$  I have to prove this statement with induction.  Can anyone please help me with this proof? It was suggested to me recently that Annihilator sacrifices (such as 's) are only chosen during resolution, rather than while they're going on the stack.  Do I choose those sacrifices during resolution? What part of the comprehensive rules backs that up?  I can't find any clarity on the internet, in the rules, on the MTG Salvation wiki for Annihilator, or in the ability's rulings. It seems reasonable, but I'd like to know what's behind it. Plus, if I can choose and then later  some stuff, all the better. Is there a "null coalescing" operator in JavaScript? Is there a null coalescing operator in Javascript?  For example, in C#, I can do this:  String someString = null; var whatIWant = someString ?? "Cookies!";   The best approximation I can figure out for Javascript is using the conditional operator:  var someString = null; var whatIWant = someString ? someString : 'Cookies!';   Which is sorta icky IMHO. Can I do better? Does applying the Collatz conjecture algorithm to negative integers always result in sequences ending with $-1$ and then repeating themselves an infinite number of times? It is so for the first several seed values.  After hours of thinking and research, I don't know how to answer the question. A set with n elements has 2^n subsets I don't understand why a set with n elements has 2^n subsets. How is this calculated? I realize that {123} has empty set - 1-2-3-1,2-1,3-2,3-1,2,3 but how is the formula derived? I'm trying to do a number checker in imessage. We all know that there is no such api, so I'm trying to use the tools at hand. The main took with past issues on this site on this topic.  I made a loop that inserts a number into a string, and by the color of the number (blue - registered, red - missing), using the standard utility Digital Colors Meter determines the color of the number. Then, depending on the color, it either adds a variable with a number from the initial txt file to the new one, or starts the script from the beginning. At least it should be.  But something is going wrong in loop. It checks the color, inserts numbers, everything is fine, but apparently the wrong condition, apparently the wrong data types. It inserts different numbers into the scatter. Some will insert, some will not, regardless of the initial condition. What could be the reason? Where is the error?      tell application "Digital Color Meter" to activate     tell application "System Events"         tell process "Digital Color Meter"             click menu item 1 of menu 1 of menu bar item 4 of menu bar 1         end tell         do shell script "/usr/bin/python -c \"import objc;bndl = objc.loadBundle('CoreGraphics', globals(), '/System/Library/Frameworks/ApplicationServices.framework');objc.loadBundleFunctions(bndl, globals(), [('CGWarpMouseCursorPosition', 'v{CGPoint=dd}')]);CGWarpMouseCursorPosition((" &amp; 1002 &amp; "," &amp; 222 &amp; "));\""         set rgbColors to words of (the clipboard)     end tell     if rgbColors is equal to {"77", "39", "38"} then         exit repeat     else         do shell script "echo " &amp; quoted form of n &amp; " &gt;&gt; /Users/oneone/Desktop/base2.txt"     end if   Only the color check condition for Digital Color Meter is presented here.  Through the do shell, the color is read at the mouse position and the variable is added to the new file. In this case I'm filtering by the tag [tag:css*], but it's showing this as [css*] and showing the  tag's exerpt.