Can't pass a character string to require() in a function?
Load R package from character string
Is is possible that a software issue could be causing spotty USB-C connections on 2017 MacBook Pro? I have a 2017 MacBook Pro. It has 2 USB-C ports on the left side and I use an Aukey hub to provide more ports (4 USB, 1 HDMI, 1 USB-C) and always to connect two monitors.   I connect one monitor through the hub with the HDMI port and another directly to the MBP with a USB-C adapter. Sometimes when I connect the hub to the Mac and the 2nd monitor to the Mac, it works as it should with no problem...but more than half the time I have to connect, disconnect, jiggle, jangle, switch ports, reconnect HDMI, etc. and hopefully they will both work. OFTEN, I can only get one monitor to fire up.  Is there any kind of software fix or reset that might solve this issue? Any other thoughts welcome. Thanks. Functions satisfying $f:\mathbb{N}\rightarrow\ \mathbb{N}$ and $f(f(n))+f(n+1)=n+2$ Find all functions $f$ such that $f:\mathbb{N}\rightarrow\  \mathbb{N}$ and $f(f(n))+f(n+1)=n+2$   Let us plug in $n=1$  $f(f(1))+f(2)=3$  Since the function is from $\mathbb{N}$ to $\mathbb{N}$, $f(2)$ can only take the values $1,2$. Now we divide the problem into cases.  Case-1: $f(f(1))=2,f(2)=1$  We can assume that $f(1)=c$ for the time being. Then plugging in $n=3$ and using $f(2)=1$ gives $$f(3)=4-c$$ and again since the range of the function is positive integers,then $4-c$ has to be positive and hence $c$ belongs to  {$1,2,3$}. Now, $$f(1)=c$$$$\implies f(f(1))=f(c)$$$$\implies 2=f(c)$$ by the assumption that $f(f(1))=2$ . Now,since $c$ can only take the values $1,2,3$,we start treating cases. If $c=1$,$$f(c)=2$$$$\implies f(1)=2$$ but we know from the deinition of $c$ that $f(1)=c=1$,a contradiction.If $c=2$,then $2=f(c)=f(2)$ but $f(2)=1$ by assumption. Finally,if $c=3$ $$2=f(c)=f(3)$$ but $$f(3)=4-c=4-3=1$$ which is once again a contradiction. Therefore there are no such functions in this case.  Case-2: $f(f(1))=1,f(2)=2$  Again assuming $f(1)=c$ and using $f(n)\le n$ along with plugging $n=c-1$ will give us that $f(1)=1$ and then it is easy to prove that such a function exists by recursion. I can only give a "sort of recursive" way to define the function. Here it goes $$f:\mathbb{N}\rightarrow \mathbb{N}$$$$f(1)=1$$$$f(n)=n+1-f(f(n-1))$$  But this case is harder to deal with.Some help will be appreciated. How do I know the script file name in a Bash script? How can I determine the name of the Bash script file inside the script itself?  Like if my script is in file runme.sh, then how would I make it to display "You are running runme.sh" message without hardcoding that? Drawing wavy, wiggly lines in QGIS? Is there a QGIS function or plugin to draw wiggly line?   I have used Spline Tool to manually draw some waves, but it is time consuming.  If possible, I would like to draw something like:    Inkscape Function Plotter ( sin(x) curve). Have we managed to make a perfect vacuum? Have we managed to make a device without any atom inside it on earth? I was reading about vacuum , and I found in the examples part  that even on the best man made vacuum devices, there are still millions of "molecules per $cm^3$". So my other question here is, what are these molecules and what is the mass of them? An operator has closed range if and only if the image of some closed subspace of finite codimension is closed. Pivot rows into multiple columns I have a SQL Server instance that has a linked server to an Oracle server. There is a table on the Oracle server called PersonOptions which contains the following data:  ╔══════════╦══════════╗ ║ PersonID ║ OptionID ║ ╠══════════╬══════════╣ ║        1 ║ A        ║ ║        1 ║ B        ║ ║        2 ║ C        ║ ║        3 ║ B        ║ ║        4 ║ A        ║ ║        4 ║ C        ║ ╚══════════╩══════════╝   I need to pivot that data so the results are:  ╔══════════╦═════════╦══════════╦══════════╗ ║ PersonID ║ OptionA ║ Option B ║ Option C ║ ╠══════════╬═════════╬══════════╬══════════╣ ║        1 ║       1 ║        1 ║          ║ ║        2 ║         ║          ║        1 ║ ║        3 ║         ║        1 ║          ║ ║        4 ║       1 ║          ║        1 ║ ╚══════════╩═════════╩══════════╩══════════╝   Any suggestions? How to preserve non-ASCII characters in ogr2ogr import? I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? &lt;div id=&quot;header&quot;&gt;   &lt;img src=&quot;..&quot; &gt;&lt;/img&gt;   &lt;h1&gt;testing...&lt;/h1&gt;   &lt;img src=&quot;...&quot;&gt;&lt;/img&gt; &lt;/div&gt; I see pictures online of everyone having all these Pokémon to catch being everywhere around them, but it seems like I can only ever see one or two. I live in a rural area, but even walking miles through the farmland, it's rare to find any Pokémon.  Why is this? How can I find more Pokémon? Dashed line and Wireframe What are the recommended textbooks for introductory calculus? I think the title is pretty self explanatory.   The question is how can I create an alias in a Windows cmd that will also work after I close and then reopen it. For example I would like an alias called ip to call the command ipconfig or an alias ls -l to call Dir.  My operating system is Windows 10, in case that makes a difference. I need a robust and simple way to remove illegal path and file characters from a simple string. I've used the below code but it doesn't seem to do anything, what am I missing?  using System; using System.IO;  namespace ConsoleApplication1 {     class Program     {         static void Main(string[] args)         {             string illegal = "\"M&lt;&gt;\"\\a/ry/ h**ad:&gt;&gt; a\\/:*?\"&lt;&gt;| li*tt|le|| la\"mb.?";              illegal = illegal.Trim(Path.GetInvalidFileNameChars());             illegal = illegal.Trim(Path.GetInvalidPathChars());              Console.WriteLine(illegal);             Console.ReadLine();         }     } } An element of a group has the same order as its inverse If $a$ is a group element, prove that $a$ and $a^{-1}$ have the same order.   I tried doing this by contradiction.    Assume $|a|\neq|a^{-1}|$  Let $a^n=e$ for some $n\in \mathbb{Z}$ and $(a^{-1})^m=e$ for some $m\in \mathbb{Z}$, and we can assume that $m &lt; n$.  Then $e= e*e = (a^n)((a^{-1})^m) = a^{n-m}$. However, $a^{n-m}=e$ implies that $n$ is not the order of $a$, which is a contradiction and $n=m$.  But I realized this doesn't satisfy the condition if $a$ has infinite order. How do I prove that piece? Can I print a custom paper on standsard size in word? I want to pose a question such as:  What is your name? Joe  How would I accomplish this using Console.WriteLine to also wait for the response on that same line instead of it being broken into:  What is your name? Joe I have an enum construct like this:  public enum EnumDisplayStatus {     None    = 1,     Visible = 2,     Hidden  = 3,     MarkedForDeletion = 4 }   In my database, the enumerations are referenced by value. My question is, how can I turn the number representation of the enum back to the string name.   For example, given 2 the result should be Visible. Typing the ZIP code doesn't yield the company page How do I logout from a non-registered account? I have a registered StackOverflow account which I normally log into using OpenID.  Recently I logged out in order to post a question anonymously (supplying a fake name and of my secondary email addresses).  The problem now is that I'm logged in to StackOverflow as this "dummy" user, unable to see a way to log out.  The top menu normally has a "logout" link, but when you aren't fully registered this link is replaced with "register".  There is no "logout" link for me. :(  So..   When logged out there is a "login" link. When logged in there is a "logout" link. When "logged in" with an unregistered account, there is only a "register" link (no "logout").