I don't know how long ago this happened, but today I realized that when I open up terminal it no longer says Matthew-MacBook:~matthew$  as it used to. Instead, it appears to have synched up with my roommate's macbook pro. It now displays: $Gabriels-MBP:~matthew$  I've restarted my mac but it doesn't change the name. I've tried the suggestions suggested   posts sudo scutil --set HostName Matthew-Macbook  But no effect! echo &quot;$PS1&quot; returns \h:\W \u\$
For three days straight, I have connected to the public WiFi network at my local library. Each day, I have seen a different prompt in Terminal. Here are some of the prompts I've seen:  zp-pc:~ russell$ mary-pc:~ russell$ normob05:~ russell$   I have check under System Preferences -> Sharing, and my computer name is "Russell's Mac". Also, I set the DHCP Client ID to "RUSSMAC" under System Preferences -> Network -> Advanced -> TCP/IP, but I still see the random host names at the Terminal prompt.  Why is my computer name changing every day?
Preserving order with LINQ I use LINQ to Objects instructions on an ordered array.  Which operations shouldn't I do to be sure the order of the array is not changed? What is the correct possessive for nouns ending in "‑s"? What is the possessive of a noun ending in ‑s?  Are these both right, or is the second one wrong?   the boys' books the boss' car Why do we need both using namespace and include directives in C++ programs?  For example,   #include &lt;iostream&gt;  using namespace std;  int main() {  cout &lt;&lt; "Hello world"; }   Why is it not enough to just have #include &lt;iostream&gt; or just have using namespace std and get rid of the other?  (I am thinking of an analogy with Java, where import java.net.* will import everything from java.net, you don't need to do anything else.) ClassNotFoundException: org.eclipse.jetty.util.component.AbstractLifeCycle running inside jetty Where's the problem in this equation? Resulting in $4 = 5$ I just saw this equation and I can't find out where's the problem:  $$25-45 = 16-36$$  $$25- 2 \cdot 5 \cdot \frac{9}{2} = 16- 2\cdot4\cdot\frac{9}{2}$$  $$25 - 2\cdot 5\cdot \frac{9}{2} + \frac{81}{4} = 16 - 2\cdot 4 \cdot \frac{9}{2} + \frac{81}{4}$$  $$\left( 5-\frac{9}{2} \right) ^2 = \left (4-\frac{9}{2} \right) ^2$$  $$5-\frac{9}{2} = 4 - \frac{9}{2}$$ $$5=4$$ If $f \in L_p \cap L_q$, $1 \leq p < r < q < \infty$ then $f \in L_r$. If $f \in L_p \cap L_q$ and $1 \leq p &lt; r &lt; q &lt; \infty$ then $f \in L_r$.   Proof: Let $E = \{ x \in X: \left\lvert f \right\rvert \leq 1 \}$. Then, $$\int \left\lvert f \right\rvert^r \mathrm{d}\mu = \int_E \left\lvert f \right\rvert^r \mathrm{d}\mu+\int_{E^C} \left\lvert f \right\rvert^r \mathrm{d}\mu \leq \int_E \left\lvert f \right\rvert^p \mathrm{d}\mu+\int_{E^C} \left\lvert f \right\rvert^q \mathrm{d}\mu$$ $$\leq \int \left\lvert f \right\rvert^p \mathrm{d}\mu+\int \left\lvert f \right\rvert^q \mathrm{d}\mu &lt; \infty.$$ Thus, $f \in L_r$.  I just want to make sure I am somehow not missing anything. Thanks Site choice dropdown cannot be shown on Android app Steps to reproduce:   Ask a question, open the "Ask on which site?" dropdown menu. Press the back button.   Issue: the menu will disappear and you can't bring it back by tapping the arrow or the field. Only typing text or selecting another field then tapping back will return the dropdown menu. PostgreSQL CPU 100% after configure Wal log shipping hot standby I have configured Hight Avaliabily WAL Log Shipping Hot Standby (SSL) with one node. But after I configure, both hosts (primary and secondary) take 100% CPU usage. The most strange is because I have only one database called &quot;TESTE&quot; with one table called &quot;EXAMPLE&quot; to check if replication was OK. The replication worked perfectly but I don't understand why my CPU takes 100% usage because I don't have any application connect on my cluster. I ran HTOP command and get this results: Image 1 - Primary Server HTOP Info  Image 2 - Secondary Server HTOP info  S.O. version: No LSB modules are available. Distributor ID: Debian Description:    Debian GNU/Linux 10 (buster) Release:        10 Codename:       buster  PostgreSQL version: postgres (PostgreSQL) 12.3 (Debian 12.3-1.pgdg100+1)  Primary server postgres.conf file: max_connections = 100 SSL = on shared_buffers = 2GB work_mem = 10485kb maintenance_work_mem = 512MB dynamic_shared_memory_type = posix effective_io_concurrency = 200 max_worker_processes = 4 max_parallel_maintenance_workers = 2 max_parallel_workers_per_gather = 2 max_parallel_workers = 4 wal_level = replica wal_buffers = 16MB max_wal_size = 200MB min_wal_size = 80MB checkpoint_completion_target = 0.7 archive_mode = on max_wal_senders = 3 wal_keep_segments = 8 hot_standby = on hot_standby_feedback = on random_page_cost = 1.1 effective_cache_size = 6GB default_statistics_target = 100  pg_stat_activity info:  pg_stat_archiver info:  pg_stat_replication info:  If I stop postgres service in both servers the CPU still has 100% usage. Anyone can help me? How to find out what init mode system is using? I was looking at this and I'm not sure how to find out which startup service is used on my machine (Ubuntu 14.04 on Digital Ocean). Can it use all of them? (upstart, system v, systemd) I need a little hint in a proof on convergence of a sequence. The problem I have is: Suppose $(x_n)$ is a monotone decreasing sequence of real numbers such that $\sum x_n$ converges, prove that:  $$\lim_{n \to \infty} nx_n=0$$  My idea is: proving this fact aims to prove that given $\epsilon &gt;0$ there's some natural $n_0 \in \mathbb{N}$ such that if $n &gt;n_0$ we have $|nx_n|&lt;\epsilon$.  Now, I know that $\sum x_n$ converges, so that given $\epsilon'&gt;0$ there's some $k_0 \in \mathbb{N}$ such that if $k &gt; k_0$ we have:  $$\left|\sum_{i=1}^{k}x_i - S\right|&lt;\epsilon'$$  Where $S = \sum x_n$. Now, since $(x_n)$ is monotone decreasing we know that we must have $x_1 &gt; \cdots &gt; x_k$ so that the sum of all $x_i$ should be less or equal to $k x_k$. So I know that I have:  $$\left|\sum_{i=1}^{k}x_i - S\right|\leq\left|\sum_{i=1}^{k}x_i\right|+|S|\leq|kx_k|+|S|$$  I feel that the proof will come from this, however I'm stuck at this point. Can someone give just a little hint on how to proceed from here?  Thanks very much in advance for your help. I don't know if this is a famous problem but my professor assigned this for a research project and I am hitting a dead end( I don't know what to do next).   Note: In $\phi(n)$ ; $n=rows=columns$ and this function throws out total combination of matrices that satisfies the following rule:  Rule for this square binary matrix:  Every Row and Column has two 1's.  So,    $$\phi(2)=1$$ \begin{bmatrix}    1 1 \\    1 1 \\ \end{bmatrix} $$\phi(3)=6$$  I can't write out all the possible matrices for $n=3$ but this is one of them (btw i did this by hand): \begin{bmatrix}    0 1 1 \\    1 0 1 \\ 1 1 0 \\ \end{bmatrix}   According to a program made by my friend, he told me:   $$\phi(4)=90$$ $$\phi(5)=2040$$ Why is it sensical for a proposition with a false antecedent to validate to true? Why are these black dots / spots appearing in my pictures? Batch fit images into ratio with blurred background I need to resize a lot of images into a 4:3 ratio with the desired effect.  Is there a way to do this using photoshop actions? (the background can be scaled or two copies moved to the sides, either way works)     image credits: Using shell's read command with live editing functionality (readline like) Is there a standard (POSIX) way of asking the user some data from within a shell script, with  for example, while allowing live edition of the text being typed (what readline does)?   I know bash has read -e varname that allows for the person launching the script to use keyboard arrows for exemple, to edit or correct what has just been typed without deleting the last entered characters with backspace.   However, read -e is . And still, it is pretty cumbersome to delete all that has been wrote if you realise you made a mistake at the beginning of your long sentence... I constantly have problems working with dates in Excel, I must be doing something wrong but I don't understand what.  I have a spreadsheet, exported from our exchange server, that contains a column with dates on. They have come out in US format even though I'm in the UK.   The column in question looks like this  04/08/2012 04/09/2009 04/01/2010 04/21/2011 04/05/2012 08/30/2009 08/29/2010 08/28/2011   In Excel, I have highlighted the column and selected Format Cells.... In this dialog box, I have selected the Date, selected English (United States) as the locale and chosen the matching date format from the list. I hit OK and try to sort the data by this column.   In the sort dialogue I choose this column, select sort on Values but the order only gives me options for A to Z, not oldest to newest as I would expect.  This in turn sorts the date data by the first two digits.  I am aware I could re-format this data to ISO and then the A to Z sort would work but I shouldn't have too, I'm obviously missing something. What is it?  EDIT: I messed up the bounty but this should have gone to @r0berts answer, his first suggestion of Text to Columns with no delimiter and choosing 'MDY' as the type of data works. Additionally, if you have a time (i.e. 04/21/2015 18:34:22), you need to first get rid of the time data. However after that the method suggested by @r0berts works fine. Xmonad with Unity / HUD I want to use xmonad and still use the HUD from Unity.  Is this possible? Could Xmonad be using while using Unity?  is there a way to use the HUD inside of Xmonad?  I'm in 12.04, soon to be 12.10. How to read a single character from the user? How to solve the "io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information" error on Minecraft? I am getting the following error when I try to connect to a Minecraft server:  This is all servers, not just one. The error says:  io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: Version 1.12  I've tried:  Restarting Minecraft Restarting Computer Uninstalling and Reinstalling Mincraft Uninstalling and Reinstalling Java Altering Firewall Restarting Internet I've messed with my port, made a second windows account, reset netsh winsock Checked hosts Made a new WINDOWS account  The overlay in the bottom right is Geforce's Overlay for game capturing. I don't have any mods installed. A Mojang support ticket wouldn't help. Im desperate. Typically, to box in some text, I use the following:  \fbox {     \parbox{\linewidth}{     This is some text! Blah blah blah...     } }   However, say I have a verbatim block within that. It will never compile. Anyone know how I could draw a box around text which contains a verbatim block? I should note that I want to be able to draw a box around not just a verbatim block. For example, I would want to draw a box around something like:  This is text. \begin{verbatim} This is some more text. \end{verbatim} And this is even more text.