Sorry if this question is duplicate. But I can't find the difference in usage. When I run the below codes I am getting different answers. I see from most tutorials that using of "do ... end" is same as "{ ... }" blocks.  include Comparable  a = [1, 4, 2, 3, 5]  p a.sort do |x,y|     y &lt;=&gt; x end   output shows as = [1, 2, 3, 4, 5]  but when I run like this...  include Comparable  a = [1, 4, 2, 3, 5]  p a.sort { |x,y|     y &lt;=&gt; x }   output shows as = [5, 4, 3, 2, 1]  what was wrong here. is there any situations that two syntaxes has any different behaviour?
Which style is preferred? Is there a good reason for one vs. the other?  Thanks in advance!  1) cmds.each do |cmd|    end  2) cmds.each { |cmd|    }   Example code:  cmds = [ "create", "update", "list", "help" ]  # Block style one # cmds.each do |cmd|   puts "loop1, cmd: #{cmd}" end  # Block style two # cmds.each { |cmd|   puts "loop2, cmd: #{cmd}" }
How to install brackets.io from the command line? For some reason the gnome installer that handles .deb packages on my system is not working. I'm not concerned.  How would one install the Brackets.io program from the terminal? List of Stored Procedure from Table I have a huge database with 100's of tables and stored procedures. Using SQL Server 2005, how can I get a list of stored procedures that are doing an insert or update operation on a given table. Proof that if $s_n \leq t_n$ for $n \geq N$, then $\liminf_{n \rightarrow \infty} s_n \leq \liminf_{n \rightarrow \infty} t_n$ This is half of Theorem 3.19 from Baby Rudin. Rudin claims the proof is trivial. What I've come up with so far doesn't seem trivial, however, and is probably also wrong (my problem with it is pointed out below). This makes me wonder whether I'm overlooking some useful fact and/or using an unprofitable approach.  Theorem. If $s_n \leq t_n$ for $n \geq N$, where $N$ is fixed, then  $$ \liminf_{n \rightarrow \infty} s_n \leq \liminf_{n \rightarrow \infty} t_n. $$  Proof. Suppose that $s_n \leq t_n$ if $n \geq N$, but that  $$ \liminf_{n \rightarrow \infty} s_n &gt; \liminf_{n \rightarrow \infty} t_n. $$  Let $E_s$ denote the set of all subsequential limits of $\{s_n\}$, and let $E_t$ denote the set of all subsequential limits of $\{t_n\}$. Then  $$ \inf E_s &gt; \inf E_t. $$  This implies that there exists some $x \in E_t$ such that $\inf E_s &gt; x &gt; \inf E_t$, since otherwise $\inf E_t$ would not be the greatest lower bound of $E_t$. Hence some subsequence of $\{t_n\}$, say $\{t_{n_i}\}$, converges to $x &lt; \inf E_s$.  Lemma. (from Rudin) If $x &lt; \liminf_{n \rightarrow \infty} s_n$, then there exists an integer $N$ such that if $n \geq N$, then $s_n &gt; x$.   By the lemma, there exists an integer $N_0$ such that if $n \geq N_0$, then $s_n &gt; x$.   Now, let $\epsilon = \inf_{n \geq N_0} \{s_n - x\}$. This is where I think my proof breaks down. Can't $\epsilon$ be zero? Then, since $\{t_{n_i}\}$ converges to $x$, there exists an integer $N_1$ such that if $n_i \geq N_1$, then $|t_{n_i} - x| &lt; \epsilon$. But this means that, if $n_i \geq \max\{N, N_0, N_1\}$, we have both  $$ s_{n_i} &gt; t_{n_i}, $$  as well as $s_{n_i} \geq t_{n_i}$, a contradiction. The internal storage on my phone is almost full. The storage screen tells me    2.77GB / 2.91 GB taken Apps 0.89GB Other 1.89 GB Available 138MB   What is this "other" and how can I clean it up? I already followed the steps of "make more space", it barely makes a difference.   Phone Storage then tells me 43.00MB / 1.09GB is taken.  And on the SD card I have 1.86GB / 14.72GB taken.  I have plenty of storage in various places yet when I try to install apps I'm unable to do so cause of "insufficient storage". How can I fix this? Can you raise a number to an irrational exponent? What to do with bounty on question which is no longer relevant? SQLiteException while inserting values in the database in Android Add folder to PATH How to add something to PATH ? I have added like   PATH=$PATH:/home/example export PATH   and it works until I restart , after that when  I type env in PATH there is no /home/example. Construction of a Borel set with positive but not full measure in each interval How to create an Atlas based on point attributes? Essentially I am wanting to produce an atlas based on a categorical field in a point layer.   i.e. I have a point layer of childcare providers with the categorical field "Provision". I've categorized each feature in this field with "After School Club" , "Breakfast Club" etc, and I now want to produce a set of maps that iterate through each category and show only the points for each. One map of after school clubs, one map of breakfast clubs etc. The extents might be subtly different.  I could do it one by one but it seems like there should be a way to produce an atlas based on the extents of each category? (I do feel i'm missing something obvious :) )   Or alternatively is there a way of automating the creation of a polygon layer and using that as a hidden coverage for the atlas?  EDIT: I've made a little progress with this  - you can use rule based styling to switch on and off features relevant to the current atlas coverage feature.  it actually works fine if all you want to do is show a different set of points. I'm now looking at tying that back to a color scheme and reactive legend. How can I get the list of all fields(API name,Label,type) of any sObject? I'm trying to build a Dynamic list(table) of records by selecting the Sobject and its fields.So I need to get all the fields with its API name,label,type.But I can't get the label and type.(Tried DescribeSObjectResult Class methods to get label,but it didn't help to get the label dynamically)  I tried it with the following code.  System.debug('Selection-----'+selectedObject); Map&lt;String, Schema.SObjectType&gt; gd = Schema.getGlobalDescribe();  Schema.SObjectType ctype = gd.get(selectedObject);  Map&lt;String, Schema.SobjectField&gt; fmap = ctype.getDescribe().fields.getMap();    List&lt;FieldWrap&gt; strList = new List&lt;WrapMap&gt;(); for(String s: fmap.keySet()) {     WrapMap wmp = new WrapMap();     wmp.name = s;     wmp.label = String.valueOf(fmap.get(s));     strList.add(wmp);  }   Where FieldWrap is my wrapper class with name and field of String types. I'm getting the List of API name of fields,but not the Label and type of it.Is there a way to get the label and type of field.If so, please help me. Gravitational waves and time Two questions.  It is said that time can only go slower in gravity fields and if you move faster.  I have heard that when a gravitational wave pass earth then the space/time vibrate and time change for an instance.  But a wave is often with a top and a valley.  They have now atomic clocks that might be able to detect time variations, placed in satellites around the sun and "quantum entangled". "Using Atomic Clocks to Detect Gravitational Waves"   So what if we could compare time ticks between clocks in space at "absolute frame of reference" where time has its maximum universal speed as time in deep space between Galaxy Filaments.  Will we only detect that time ticks slower for an instance when the gravational wave pass?  1. Or will we detect that time tick slower AND faster than normal time also, as compared to zero gravity time and no movement time in "absolute frame of reference"?  2. Can time go let's say 10 times faster by theory/mathematics, by a extreme theoretical gravitational wave, than time in "absolute frame of reference time"? Stop suggesting Microsoft Edge browser in start menu when typing "internet" I use Chrome as my primary browser but must use Internet Explorer to be able to remote in to my work via Remote Desktop web client (since it uses ActiveX plugins). To start an app, I would often type out the name from the start menu unless I had a pinned link or shortcut handy. But if I type &quot;internet&quot; as if I were trying to start Internet Explorer, I will always be recommended Edge and have it highlighted by default.  I will never be able to use Edge here so stop recommending it... can this behavior be disabled somehow? Not even pinning the Internet Explorer link to the start menu prevents this. If I had any other shortcuts that started with the word &quot;internet,&quot; it still offers Edge and is preselected. At least if I type in &quot;chrome,&quot; Chrome is selected first. Windows 10 Pro 1909 (18363.900) I've tried to import but I don't see the (.max) file as an option when importing. Is there another way to import the 3DMax model into Blender for rigging and animation? What constitutes an observation/measurement in QM? Fundamental notions of QM have to do with observation, a major example being The Uncertainty Principle.    What is the technical definition of an observation/?  If I look at a QM system, it will collapse. But how is that any different from a bunch of matter "looking" at the same system?  Can the system tell the difference between a person's eyes and the bunch of matter?  If not, how can the system remain QM?  Am I on the right track? In which way does quantum mechanics disprove determinism? I've heard this pop up in a discussion with my physicist/engineer roommates, but didn't care to ask at the time.  Now I'm mighty curious about it.   doesn't really seem to say much on this issue.  From what I understand about the Uncertainty Principle, it says that there are certain properties of electrons and stuff that cannot be measured, and are therefore uncertain.  Then Wikipedia (under ) states that Sir Arthur Eddington says that the Uncertainty Principle isn't really so because we can't measure these properties, but because turns out nature is indeterministic.  At least that's what I took from those paragraphs.  Even without my biased wording, it sounds more like an assertion than evidence.  I've also read a few things about how other scientific conventions perceive the issue, like how a ball on the peak of a perfect mound might randomly roll down in any direction, and I'm still unconvinced.  My belief of determinism is generally that if you knew every single variable that existed as a factor at the very beginning and birth of the universe, you could correctly determine all properties of any individual particle at any point in time.  Could anyone provide some more background about this?  Especially regarding quantum mechanics? Balancing long table inside multicol in LaTeX I would like to put some longer tabular data inside the multicols environment while maintaining its balancing abilities. I have tried supertabular with the trick to redefine \newpage as columnbreak. This isn't good though, because the columns aren't properly balanced. Finally I ended up using \halign:  \documentclass[11pt, a4paper]{article} \usepackage[margin=3cm]{geometry} \usepackage{supertabular} \usepackage{multicol}  \def\shortlipsum{\par Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.\par}  \newcounter{entryno} \setcounter{entryno}{1} \def\tabline{Test &amp; \the\value{entryno} &amp; Description\addtocounter{entryno}{1}\\} \def\tablines{\tabline\tabline\tabline\tabline\tabline} \def\mybreak{\hrule width \columnwidth height 0pt \columnbreak}  \begin{document} \begin{multicols}{2} \shortlipsum \medskip  % % This doesn't balance the columns. Whole table ends up in the left column (it fits) % \begingroup\let\newpage\mybreak % \noindent\begin{supertabular*}{\columnwidth}{@{\indent}l l l} % \tablines\tablines\tablines\tablines\tablines\tablines % \end{supertabular*} % \endgroup  \begingroup\let\\\cr \noindent\halign{\indent#\quad&amp;#\quad&amp;#\hfil\cr \tablines\tablines\tablines\tablines\tablines\tablines} \endgroup  \medskip \shortlipsum \end{multicols} \shortlipsum \end{document}     I was wondering if I'm the only one using \halign to achieve this result. On the other hand supertabular leaves me with an undesired almost empty right column. How would you approach this problem? In an older question from June 2011, , apparently revived by the system, a user is asking about the origin of the rotation of celestial bodies.  The  (with 17 votes) states the following:     When things collapse under their own gravity in space (i.e. clouds of gas and dust), any small amount of asymmetry in the collapse will be enough start it spinning.   And then it goes on saying:     Even if it spins by a tiny amount, as it collapses, angular momentum     conservation will mean it spins more and more quickly.   Is all this really correct?  I could try to ask in a comment to the answer. I actually did. But the author is no longer registered.  Hence I am asking it as a question.  But that is not the end of the story. As I was about to ask my question, I looked for other relevant questions, and there are some. I did not make an exaustive survey, but I did not find one that had satisfactory answers:    (december 2011) has just one accepted answer (0 votes) stating essentially that the solar system has angular momentum because it started from a cloud that had angular momentum. No comment.  (july 2011) is questionning about everything from galaxies to electrons. The answers are of a much higher quality, but while they seem to justify the possiblility of spin and angular momentum (and its conservation), there are not clear on how it appears, at least for celestial bodies.  (june 2013): That was my own very naive first question on this site. It is related but does not directly address spin.   One answer I found is that momentum appear from bodies in relative motion past each other. Nice, but not really an answer: where did they get their relative speed to begin with. Unfortunately the answer is: from the angular momentum of larger structures they belong to (well, it can be more comples). So this is just chicken and egg explanation. But how did it get started?  Note that my question is not a duplicate, since it is primarily whether the above statements are correct, which is not considered in these other questions.  Furthermore, these questions are fairly old, and given that none had received answers that seem to answer the question of the origine of existence of celestial angular momentum (not in a way I can understand anyway), it may be appropriate to attempt restarting the process, with the above discussion to motivate that an answer should explain the physical mechanism that started the existence of spin of celestial bodies. How do you format the day of the month to say "11th", "21st" or "23rd" (ordinal indicator)? Via command line, I have a log file I'd like to keep track of.  What I want is to have, basically, a tail that refreshes when the log is updated making the text scroll upwards as new lines are appended to the log file.  Is there anything out there that does that without having to write some code?