If I have a class:  class KlassWithSecret   def initialize     @secret = 99   end end   and run:  puts KlassWithSecret.new.instance_eval { @secret }   it prints 99, but if I run:  puts KlassWithSecret.new.instance_eval do   @secret end   It returns an error: `instance_eval': wrong number of arguments (0 for 1..3) (ArgumentError)  Why can't I use do/end blocks with instance_eval?  P.S. I am using Ruby 2.1.0.
I extracted simple example:  require 'pp' x = 1..3 pp x.map do |i| {:value =&gt; i, :double =&gt; (i*2)} end pp x.map { |i| {:value =&gt; i, :double =&gt; (i*2)} }  pp(x.map do |i| {:value =&gt; i, :double =&gt; (i*2)} end) pp(x.map { |i| {:value =&gt; i, :double =&gt; (i*2)} })   I am wondering why first pp produces:  [1, 2, 3]   While all the oders are giving:  [{:value=&gt;1, :double=&gt;2}, {:value=&gt;2, :double=&gt;4}, {:value=&gt;3, :double=&gt;6}]   I assume it has something to do with operator precedence. Where can I find good explanation?
What do we know about the creature whose skeleton we see in Star Wars? In Star Wars:  Episode IV - A New Hope, C-3PO passes by what looks like a dinosaur skeleton:      What is this creature?  Are they extinct?  How did such a large animal manage to survive in a barren desert? Is it possible to make an underfull tabulary spread out? With this MWE  \documentclass{article} \usepackage{tabulary}  \begin{document}  \hrule  \begin{center}   \begin{tabulary}{\textwidth}{|L|L|L|}     foo&amp;bar&amp;baz   \end{tabulary} \end{center}  \hrule  \end{document}   I get a table which is narrower than the page:   But I'd like the table to be spread out to \textwidth like tabularx would do. Is this possible?  Or is there an alternative approach? Why is mathematical induction a valid proof technique? Context: I'm studying for my discrete mathematics exam and I keep running into this question that I've failed to solve. The question is as follows.    Problem: The main form for normal induction over natural numbers $n$ takes the following form:   $P(1)$ is true, and for every $n, P(n-1)\to P(n).\qquad\qquad\qquad\text{[Sometimes written as $P(n)\to P(n+1)$]}$   If both 1 and 2 are true, then $P(n)$ is true for every $n$.  The question is to prove the correctness of the form above.    My work: My idea was to make a boolean statement and if it's a tautology in a true false table. That means the statement is always correct.  I've tried many times but I've failed.  Here is the original question in Hebrew:  n טענה כלשהי לגבי מםפר טבעי  $P(n)$ תהי   אם מתקימיים שני התנאים הבאים:  1- הטענה $P(0)$ נכונה  2- לכל n>0, $P(n)$ נכונות הטענה $P(n-1)$ גוררת את נכונות הטענה   אז $P(n)$ נכונה לכל מספר טבעי n  הוכיחו את נכונות משפט זה Reduce file size without losing quality I would like to save files in Photoshop but keep them as small as possible.   I use Save for Web (and Devices) and save as a JPEG. Here are the settings I used:     I really do not want to lower the quality settings because I use text and sometimes I see artifacts if the setting is too low.   This produces file sizes of several hundred kilobytes depending on size of image. While this isn't a huge issue these images are used for the web and smaller is better. What are techniques without reducing quality to reduce the file size?   Update:  To add some more information here:   Many of the images I use and create get sent via email. This severally limits what I can do with placing of text using HTML and CSS over the image.   Also I use a variety of fonts. Some I could use for the web using CSS's @font-face but you can run into large file sizes and in some cases you cannot upload the font to the web legally. I could use a service like  but again many fonts I use are not available with Typekit.   Here is an example image: Will $\sum^{\infty}_{n=1}|a_n|^p$ converge? Given that $\sum^{\infty}_{n=1} a_n^2$ converges,then, will $$\sum^{\infty}_{n=1}|a_n|^p$$ converge for $p&gt;2$?  I couldn't find a counterexample neither a proof but it looks to me that this is true. For $p=3/2$, I found the counter example $\sum a_n=\displaystyle \sum^{\infty}_{n=1} \frac{1}{n^{2/3}}$ I'd like to know if the following problem of elementary linear algebra is already solved / solvable.  For two (singular) $n\times n$ matrices $P$ and $Q$, if $\det(\lambda P+\mu Q)=0$ for any $\lambda,\mu\in\mathbb{R}$, what are conditions on $P$ and $Q$? Can a 3rd party app *technically* take better pictures? I've seen in several forums that some phones have very good cameras and the photos  taken are compressed too much and the details are lost.  I was wondering whether a 3rd party application (forgetting the post processing done by the application) have access to the full resolution image without any compression.  So can another application access the raw data from the camera or all applications gets the same raw data when they access the camera? When will my device get the Android 4.4 update (KitKat)? Android 4.4 (KitKat) was officially announced on October 31, 2013.  (You can review  at the official Android Developer's site or the .)  Of course, not all devices will get this update right away and others won't get it at all. Each manufacturer and carrier often choose to add their custom modifications which tend to delay the official release.  When will each device get Android 4.4, either officially or unofficially, if ever?  See also: Calculate limiting distribution of $\frac{\sum_{i=1}^n X_i}{\sum_{i=1}^n Y_i}$ Deleting array elements in JavaScript - delete vs splice How to turn off notifications for individual apps? On my iphone, there is a "notifications" setting section, which basically just allows me to choose which apps has the power to notify me.  I was wondering if there's anything similar that is available on the Samsung Galaxy s2?  Basically, we have a new app called Scramble For Friends. And it keeps notifying us every time someone has finished their turn so that I can play. We play random people so this could be in the middle of the night or in a meeting etc.  It just vibrates but still - it's annoying and we want to turn it off. We also don't want to turn off other notifications like Email, Facebook etc. - we just want to turn off the notifications for Scramble For Friends.  I've been looking around in the Settings but there doesn't seem to be a universal page which deals just with notifications. Using right-hand Riemann sum to evaluate the limit of $ \frac{n}{n^2+1}+ \cdots+\frac{n}{n^2+n^2}$ I'm asked to prove that $$\lim_{n \to \infty}\left(\frac{n}{n^2+1}+\frac{n}{n^2+4}+\frac{n}{n^2+9}+\cdots+\frac{n}{n^2+n^2}\right)=\frac{\pi}{4}$$ This looks like it can be solved with Riemann sums, so I proceed:  \begin{align*} \lim_{n \to \infty}\left(\frac{n}{n^2+1}+\frac{n}{n^2+4}+\frac{n}{n^2+9}+\cdots+\frac{n}{n^2+n^2}\right)&amp;=\lim_{n \to \infty} \sum_{k=1}^{n}\frac{n}{n^2+k^2}\\ &amp;=\lim_{n \to \infty} \sum_{k=1}^{n}(\frac{1}{n})(\frac{n^2}{n^2+k^2})\\ &amp;=\lim_{n \to \infty} \sum_{k=1}^{n}(\frac{1}{n})(\frac{1}{1+(k/n)^2})\\ &amp;=\lim_{n \to \infty} \sum_{k=1}^{n}f(\frac{k}{n})(\frac{k-(k-1)}{n})\\ &amp;=\int_{0}^{1}\frac{1}{1+x^2}dx=\frac{\pi}{4} \end{align*}  where $f(x)=\frac{1}{1+x^2}$. Is this correct, are there any steps where I am not clear? In the discussion from a question I asked several days ago (), someone suggested that I use general.runalg() instead of processing.runalg() for running QGIS algorithms.    I've now used both, and haven't noticed a difference in either performance or syntax between them.  I'm just wondering what sort of differences there are between these two methods, and which one I should be using. Subequation: Counter too large Do these two observations suffice to show that a finite boolean ring must be of the form $\mathbb{Z}_2\times\cdots\times\mathbb{Z}_2$? Question: If $R$ is a finite boolean ring, then show $R \cong \mathbb Z_2 \times \mathbb Z_2 \times \cdots\times \mathbb Z_2$.   I know that   $\mathrm{char}(R) =2$  $R$ has $2^k$ elements for some $k$  (this is because, if $p\neq 2$ is a prime with $p\mid|R|$, then there exists a non-zero $x \in R$ s.t. $px=0$ and $p $ is odd $\implies x=0$, contradiction).   Does this suffice to answer my question? Detecting outliers using standard deviations Following my question , I am wondering if there are strong views for or against the use of standard deviation to detect outliers (e.g. any datapoint that is more than 2 standard deviation is an outlier).  I know this is dependent on the context of the study, for instance a data point, 48kg, will certainly be an outlier in a study of babies' weight but not in a study of adults' weight.  Outliers are the result of a number of factors such as data entry mistakes. In my case, these processes are robust.   I guess the question I am asking is: Is using standard deviation a sound method for detecting outliers? I'm currently in the process of making a custom map and I want to add blocks that can only be placed on a certain colour clay.  This is the command I tried using.  /give @p cobblestone 1 0 {CanPlaceOn:["hardened_stained_clay"],Damage:3}   However, even with this command the cobblestone can be placed on any colour of stained clay. What command can I use for placing only on a certain block? How to let the user switch language in playframework 2 Files list file for package missing -- dpkg warning I want to install Open JDK or Oracle JDK to my machine but I got an error during installation. The error is:  Selecting previously unselected package oracle-java8-installer. dpkg: warning: files list file for package 'unity-scope-gourmet' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-guayadeque' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-gmusicbrowser' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-manpages' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-firefoxbookmarks' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-gdrive' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-home' missing; assuming package has no files currently installed E: Sub-process /usr/bin/dpkg returned an error code (2)   I searched on Google and try to something for install/reinstall this packages. Finally i try to remove Unity. I faced this error for my every tries. I am using Xmonad. How can I fix this issue? Why "would" instead of "will" in this sentence? The goal for these negotiations is to reach a mutually-agreed long-term comprehensive solution that would ensure Iranˈs nuclear program will be exclusively peaceful.    what does would imply here? If it implies future, why will has not been used?  A good link teaching would thoroughly would be really appreciated. Specially, distinguishing between the senses of would is not always easy.