The question is as follows: $\DeclareMathOperator{\rank}{rank}$     Is the set $S_r = \{A \in \Bbb R^{n \times n}: \rank(A) \leq r\}$ closed in $\Bbb R^{n \times n}$ in the Euclidean topology?   I have a feeling that this is true, but I got stuck looking for a convincing argument.  Certainly this is true for $r = n-1$.  Perhaps it can be shown that $S_{r-1}$ is a closed subset of $S_r$?  No neat tricks are coming to mind, but I would think that there must be one. This seems like the kind of thing that has a canonical answer, so links are welcome.
Let $M$ be the space of all $m\times n$ matrices. And $C=\{X\in M|rank(X)\leq k\}$ where $k\leq \min\{m,n\}$. How to proof that C is a closed subset of M?
Brightness fn key shortcut doesn't work on ASUS laptop The brightness shortcuts via fn key don't work.  I tried each solution from . After editing /etc/default/grub file I rebooted.  GRUB_CMDLINE_LINUX="acpi_osi=Linux" GRUB_CMDLINE_LINUX="acpi_backlight=vendor" GRUB_CMDLINE_LINUX="acpi_osi=linux acpi_backlight=vendor" GRUB_CMDLINE_LINUX="acpi_osi_Linux"   What other workarounds/solutions are there?  Relevant output:  $ sudo lshw -C display   *-display UNCLAIMED             description: 3D controller        product: GK107M [GeForce GT 750M]        vendor: NVIDIA Corporation        physical id: 0        bus info: pci@0000:01:00.0        version: a1        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff   *-display        description: VGA compatible controller        product: 4th Gen Core Processor Integrated Graphics Controller        vendor: Intel Corporation        physical id: 2        bus info: pci@0000:00:02.0        version: 06        width: 64 bits        clock: 33MHz        capabilities: msi pm vga_controller bus_master cap_list rom        configuration: driver=i915 latency=0        resources: irq:50 memory:f7400000-f77fffff memory:d0000000-dfffffff ioport:f000(size=64) I'm not a git master, but I have been working with it for some time now, with several different projects.  In each project, I always git clone [repository] and from that point, can always git pull, so long as I don't have outstanding changes, of course.  Recently, I had to revert to a previous branch, and did so with git checkout 4f82a29.  When I was again ready to pull, I found that I had to set my branch back to master.  Now, I can not pull using a straight git pull but instead, have to specify git pull origin master, which is annoying, and indicates to me that I don't fully understand what is going on.  What has changed which does not allow me to do a straight git pull without specifying origin master, and how to I change it back?  UPDATE:  -bash-3.1$ cat config [core]     repositoryformatversion = 0     filemode = true     bare = false     logallrefupdates = true [branch "master"] [remote "origin"]     url = git@github.com:user/project.git     fetch = refs/heads/*:refs/remotes/origin/*   UPDATE 2: To be clear, I understand that my original method may have been incorrect, but I need to fix this repo so that I can simply use git pull again.  Currently, git pull results in:  -bash-3.1$ git pull You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your configuration file does not tell me either.  Please name which branch you want to merge on the command line and try again (e.g. 'git pull  '). See git-pull(1) for details on the refspec.  If you often merge with the same branch, you may want to configure the following variables in your configuration file:      branch.master.remote =      branch.master.merge =      remote..url =      remote..fetch =   See git-config(1) for details.   I can tell git pull which branch to merge, and it works correctly, but git pull does not work as it did originally before my git checkout. Can a Canadian Travel to the USA twice, less than 180 days each time? I plan to travel to the USA for less than 180 days in 2019. I will return to Canada for Christmas and New Years, then return to the USA for approx 4 months and for sure less than 180 days.  Can I do this? I've seen online 180 per calendar year (which would make this plan ok) and in other places per 12 month rolling period (which would make it not ok.) I frequently login to a server, then cd into a specific directory. Is it possible to simplify these two commands into one?   ssh bob@foo   cd /home/guest   I'd like to avoid changing anything on 'foo' if possible, as I'll have to clear it with the server administrator. I use bash, but I am open to answers in other shells. What is the correct output of cat /etc/apt/sources.list? How can we prove that any bijection on any set is  a composition of 2 involutions ?  Since involutions are bijections mapping elements of a set to elements of the same set, I find it weird that this applies to any bijection.  Thanks for your help ! Finding the value of $\int_0^{\pi/2} \frac{dt}{1+(\tan(x))^{\sqrt{2}}}$ The problem: Find the value of $\displaystyle\int_0^{\pi/2} \frac{dx}{1+(\tan(x))^{\sqrt{2}}}$   I tried a few different substitutions and the closest I got to an okay looking integral is $$\int_0^\infty \frac{t^2 \, dt}{t^{1/\sqrt{2}}(1+\sqrt{t})},$$ which still looks scary. How do I approach this integral? Two envelope problem revisited I was thinking of this problem.  I believe the solution and I think I understand it, but if I take the following approach I'm completely confused. Problem 1:  I will offer you the following game. You pay me \$10 and I will flip a fair coin. Heads I give you \$5 and Tails I give you \$20. The expectation is \$12.5 so you will always play the game.  Problem 2:  I will give you an envelope with \$10, the envelope is open and you can check. I then show you another envelope, closed this time and tell you: This envelope either has \$5 or $20 in it with equal probability. Do you want to swap? I feel this is exactly the same as problem 1, you forgo \$10 for a \$5 or a \$20, so again you will always switch.  Problem 3:  I do the same as above but close the envelopes. So you don't know there are $10 but some amount X. I tell you the other envelope has double or half. Now if you follow the same logic you want  to switch. This is the envelope paradox.  What changed when I closed the envelope?? EDIT: Some have argued that problem 3 is not the envelope problem and I'm going to try and provide below why I think it is by analysing how each views the game. Also, it gives a better set up for the game. Providing some clarification for Problem 3: From the perspective of the person organising the game:  I hold 2 envelopes. In one I put \$10 close it and give it to the player. I then tell him, I have one more envelope that has either double or half the amount of the envelope I just gave you. Do you want to switch? I then proceed to flip a fair coin and Heads I put \$5 in and Tails I put \$20. And hand him the envelope. I then ask him. The envelope you just gave me has twice or half the amount of the envelope you are holding. Do you want to switch?  From the perspective of the player:  I am given an envelope and told there is another envelope that has double or half the amount with equal probability. Do I want to switch. I think sure I have $X$, hence $\frac{1}{2}(\frac{1}{2}X + 2X) &gt; X$ so I want to switch. I get the envelope and all of a sudden I am facing the exact same situation. I want to switch again as the other envelope has either double or half the amount. Scale-dependent displaying of a layer using OpenLayers plugin? When I am creating a layer in QGIS the layer position/lines does not stay the same when I zoom in closer than, it seems like 1: 1000. I am adding 2 images to explain the problem. The moment I zoom in closer than 1: 1 000 then the original layer does not display correctly anymore.  Please, can you assist in this matter? So, the question pretty much says it all. I'm on Snow Leopard, and I do a lot of web development, particularly in Rails 3 which makes heavy use of the console.  I've seen some notable bloggers etc. mention Zsh as their preference over Bash, but I don't know what difference it would make.  Could anyone give me a good comparison of what difference there is and what might make one prefer one option or the other? How to remove RVM (Ruby Version Manager) from my system Normal + Connected -> Uncountable Here's a solution (to the exercise "prove that if $X$ is a space with more than one element, and is normal and connected then $X$ is uncountable"):   by Urysohn's lemma, given $A$ and $B$, closed and disjoint in $X$, there exists a continuous function from $X$ into $[0,1]$ such that $f(A)={0}, f(B)={1}$.   If $X$ were countable, so it would be $f(X)\subset [0,1]$; choose $r\in (0,1)\setminus f(X)$, then $X=f^{-1}([0,r))\cup f^{-1}((r,1])$, so $X$ is disconnected.  But the full power of the lemma wasn't used, all that was used is that there exists a continuous function $X\longrightarrow [0,1]$, so the condition of being normal seems too much.  So my question is, what are the weakest conditions on $X$ for the existence of such continuous functions into $[0,1]$ (or $\mathbb{R}$, for that matter)? Could someone please explain the differences between the 3 fitting methods, method = c("CSS-ML", "ML", "CSS"), in Arima?  If I run the code below I get an error message, but if I specify method="ML" in Arima it runs fine.  So I was curious what the difference was between the 3 fitting methods.  Code with error:  library("fpp")  tsTrain &lt;- window(hsales,end=1989.99)  pvar&lt;-1:10 dvar&lt;-1:2 qvar&lt;-1:7  OrderGrid&lt;-expand.grid(pvar,dvar,qvar)  n &lt;- function(a,b,c) {Arima(tsTrain, order=c(a,b,c))} ModFit &lt;- do.call(Vectorize(n, SIMPLIFY=FALSE), unname(OrderGrid))   Fixed Code:  library("fpp")  tsTrain &lt;- window(hsales,end=1989.99)  pvar&lt;-1:10 dvar&lt;-1:2 qvar&lt;-1:7  OrderGrid&lt;-expand.grid(pvar,dvar,qvar)  n &lt;- function(a,b,c) {Arima(tsTrain, order=c(a,b,c),method="ML")} ModFit &lt;- do.call(Vectorize(n, SIMPLIFY=FALSE), unname(OrderGrid)) Given the key, the plain text and the cipher text can I calculate the IV used in CBC mode? If I have the plain text, the ciphertext and the key for an AES-128 CBC operation, can I determine the IV, even if I don't know the padding (assuming the padding follows one of the more common formats)?  I believe it should be possible since my understanding is that the IV is only used as an initial XOR of the plain text in encryption, and should, therefore, be able to be available like this:  AESDecrypt(key, ciphertext) =&gt; (PlainText XOR IV); IV = ((Plaintext XOR IV) XOR (Plaintext))   Is this correct? Brackets in if condition: why am I getting syntax errors without whitespace? I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month=&quot;01&quot;] &amp;&amp; [$day=&quot;01&quot;]; then         date=&quot;$last_month/$yes_day/$last_year&quot;         fulldate=&quot;$last_month/$yes_day/$last_year&quot; else         if [$month=&quot;01&quot;] &amp;&amp; [$day=&quot;02&quot;]; then                 date=&quot;$last_month/$yes_day/$last_year&quot;                 fulldate=&quot;$last_month/$yes_day/$last_year&quot;         else                 if [ $day = &quot;01&quot; ]; then                         date=&quot;$last_month/$yes_day/$year&quot;                         fulldate=&quot;$year$last_month$yes_day&quot;                 else                         if [ $day = &quot;02&quot; ]; then                                 date=&quot;$last_month/$yes_day/$year&quot;                                 fulldate=&quot;$year$last_month$yes_day&quot;                         else                                 date=&quot;$month/$yes_day/$year&quot;                                 fulldate=&quot;$year$month$yes_day&quot;                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found This is an unproven proposition I've come across in multiple places.   Suppose $A$ is a commutative Noetherian ring, and $S$ a multiplicative subset of $A$. Then $S^{-1}A$ is Noetherian.  Why is this? I thought about taking some chain of submodules $$ S^{-1}M_1\subset S^{-1}M_2\subset\cdots $$ and pulling back to a chain  $$ M_1\subset M_2\subset\cdots $$ of submodules of $A$ which must eventually stablize. Is there more to it than this? I kind of wary of assuming all submodules of $S^{-1}A$ have form $S^{-1}M$ for $M\leq A$. Help needed with definite integral for $\lim_{n\rightarrow \infty}\sum_{k=1}^{n} \frac{1}{n+k}$ A lot of people will probably gloss over this fact, but it looks like C-3PO meets BB-8 for the first time in this scene 0:20:                                But how does C-3PO know BB-8's name? Is there a time where C-3PO meets BB-8 before this and knows his name? Why is it sensical for a proposition with a false antecedent to validate to true? In propositional logic, the statement "If pigs can fly, then elephants can lay eggs." validates to true because the antecedent validates to false.  In other words, given $a \rightarrow b$, if a is false, the entire statement is true. Why?  Just because the antecendent is false doesn't mean that another fact depends on it, right? Categorical Principal Component Analysis - using Count, Continuous, Ordinal variables together I have some variables and I want to reduce their number for further analysis. I initially thought of combining them using factor analysis. But since the variables are of all kinds (rating, count, ordinal, continuous dollar amount) I am thinking about using CATPCA for it. However, I have some questions about the technique -   Is CATPCA the right approach or Latent Class Factor Analysis would be the better one? By using the different kinds of variables together - how will the object scores be interpreted? For example - The rating question is on a 10 point scale but the dollar amount ranges from 0 to 1000s, so what will the object score obtained after CATPCA represent? And is it comparable to the Factor Score obtained from traditional PCA? For ordinal variables - Do all of them need to be in the same form, e.g. 1 meaning lowest and 10 meaning highest? Or can they be used in whatever form they are? Is it good to categorize the count and continuous variables based on their distribution and then treat then as ordinal/categorical variables?   I would highly appreciate any help you can provide!