I have a few very simple bash scripts that I cobbled together for things that I do regularly. One of them is to run duplicity to do my backup tasks. Nothing clever just a bunch of if .. then statements really. As this needs to be run as sudo would it be best practice to put my script in /usr/bin ( or other location in PATH ) , chown to root.root and chmod to 700 ?
I'm developing some scripts. One for the  that popped in Ubuntu 16.04 even though pcspkr is blacklisted. Another to fix a  where sound switches off from TV to the laptop.  What is the best directory to put my bash scripts in?  I've searched the Q&amp;A database but I get a bunch of different answers for a bunch of different scenarios.  /usr/local has been recommended by one person because it's in the PATH$. Is that the right thing to do?  Thank you for your advice.    Even though I accepted below answer over a year ago, I ended up using:   /usr/local/bin for scripts needing sudo powers /home/me/bin for scripts running at user level   After creating directory /home/me/bin you need to log out and in again for it to get into your PATH.
If $p$ and $q$ are distinct primes such that $p|c$ and $q|c$, prove that $pq|c$ What is the practical difference between a differential and a derivative? I ask because, as a first-year calculus student, I am running into the fact that I didn't quite get this down when understanding the derivative:  So, a derivative is the rate of change of a function with respect to changes in its variable, this much I get.  Thing is, definitions of 'differential' tend to be in the form of defining the derivative and calling the differential 'an infinitesimally small change in x', which is fine as far it goes, but then why bother even defining it formally outside of needing it for derivatives?  And THEN, the bloody differential starts showing up as a function in integrals, where it appears to be ignored part of the time, then functioning as a variable the rest.  Why do I say 'practical'? Because when I asked for an explanation from other mathematician parties, I got one involving the graph of the function and how, given a right-angle triangle, a derivative is one of the other angles, where the differential is the line opposite the angle.   I'm sure that explanation is correct as far it goes, but it doesn't tell me what the differential DOES, or why it's useful, which are the two facts I need in order to really understand it.  Any assistance? Generating data with a given sample covariance matrix Migrating to full Ubuntu after dual installation on WinXP I previously ran 12.04 alongside WinXP to see how it performed on my mom's older laptop.  i also migrated her email to Thunderbird. If I now convert from dual WinXP/Ubuntu to only run Ubuntu will things like her Thunderbird emails be transferred as part of the Ubuntu full install? Or must I do something else? I am fairly tech aware, but not a full IT boffin! Windows 7 Audio Too Loud In Windows 7 (64-bit, Ultimate) the default audio output is extremely high. This has been an issue for a while but I was able to get around it as my previous headphones took more power to drive so it actually worked in my benefit.  However, now I have a set of really sensitive headphones and they're being over-powered. So much so that if I put it down at around 5% of total output it's bearable.  Is there a way I can sort of limit the system's volume so that it's incapable of going extremely loud and then have the rest of it just behave as normal?  Things I've tried:   Uninstalling and re-installing the audio device and drivers. Limiting each application individually. Searching for third-party software (so far nothing looks promising).   The first has no effect. The second works find but I have to do it for every application individually (which can be a pain) and many of them reset their volume every time they're launched, which makes it almost useless. Some even reset the volume while I'm playing a game!  So does anyone have any suggestions on how to make my volume reasonable?  The device is, apparently, a Cirrus Logic CS4206A (AB 24). The computer is an 2010 iMac. Does being refused entry to Singapore mean I am now blacklisted? My friend who is an Indonesian citizen tried to enter Singapore this week and was refused entry at the Singapore Harbour Front Ferry Terminal by immigration.  This was his first trip overseas and is not used to international travel, so due to his inexperience and that he was excited to go to Singapore, he possibly made some mistakes on trying to be granted access into Singapore.   He was told he was to enter a Singapore address for his stay or a friend or relative he will stay with. He was only staying for one day and was going to catch the ferry back at night, so he had no plan to stay in Singapore and as such had no address to put. They then asked why he was traveling alone and that he should travel with somebody for his first trip. He told them he always travels alone in Indonesia and finds it easier to see and do things alone. He was then asked why he was entering Singapore and the reason he gave was to purchase some electronics which he cannot buy in Indonesia. They asked for how much money he had and they then advised that he did not have enough money to purchase the items he was after. They refused his entry and he was then escorted to a ferry and returned to Indonesia. His passport was not stamped and he was not fingerprinted.   He was given a Notice of Refusal of Entry which had the reason as "Being ineligible for the issue of a pass under current immigration policies" form on his departure. Also included on this form is his passport number etc. He was not advised of him being banned or a time frame that he cannot enter Singapore.  My questions are: Has he been banned or restricted to enter Singapore for a period of time? When entering countries including Singapore, does he need to tick the box stating he has been refused entry into another country? I am hoping to get my friend to Australia at the end of the year for a 10 day holiday and will this hinder his chance of getting a visa and entering Australia? I just came over this syntax in some of the questions in this forum, but Google and any other searchengine tends to block out anything but letters and number in the search so it is impossible to search out "=>".  So can anyone tell me what it is and how it is used? I need a cell that contains an image to also contain a hyperlink.  Following formula is the only one I found but doesn't work (error analyzing formula)  =HYPERLINK("URL", image("URL"))   Following formula I tried shows a blank cell but the link works  =hyperlink("URL"; Image("URL")) I have a custom .desktop file: [Desktop Entry] Type=Application Terminal=false Icon[en_US]=/home/alex/bin/idea-IC-173.4127.27/bin/idea.png Name[en_US]=IntelliJ Exec=/home/alex/bin/idea-IC-173.4127.27/bin/idea.sh Name=IntelliJ Icon=/home/alex/bin/idea-IC-173.4127.27/bin/idea.png  Output of ls -lha .local/share/applications/intellij.desktop: -rwx--x--x 1 alex alex 248 Dez 30 10:54 .local/share/applications/intellij.desktop  Answers posted to a previous question () don't work for me. I can find this launcher in Activities and I can double click on that file and IntelliJ will start. Nevertheless, I cannot add this launcher as a favorite to the dock. The option does not show up. Large text files load not working on android Is it possible to recover Classical Mechanics from Schrödinger's equation? Let me explain in details. Let $\Psi=\Psi(x,t)$ be the wave function of a particle moving in a unidimensional space. Is there a way of writing $\Psi(x,t)$ so that $|\Psi(x,t)|^2$ represents the probability density of finding a particle in classical mechanics (using a Dirac delta function, perhaps)? Is it possible with GEE to export all the images in an image collection? GNOME: supend on laptop lid close no longer works since 19.10 upgrade I'm quite positive that this used to work flawlessly in 19.04 (and past releases) but no longer does after a release-upgrade to 19.10 (kernel 5.3.0-24, ThinkPad X1 Carbon gen 5 in case this matters).  I have the corresponding switch set in GNOME-Tweaks and have also attempted to manually edit /etc/systemd/logind.conf as suggested , namely uncomment and adjust the following lines, followed by a reboot:  $ grep -v '^#' /etc/systemd/logind.conf [Login] HandleLidSwitch=suspend HandleLidSwitchExternalPower=suspend HandleLidSwitchDocked=suspend LidSwitchIgnoreInhibited=yes   (strictly speaking, only the first one ought to be required but, just in case, I also added lines 2 &amp; 3, as well as #4 for good measure...  Looking at the output of systemctl status systemd-logind, I see the following:  Dec 17 17:56:50 x1c5 systemd-logind[8959]: Lid closed. Dec 17 17:57:03 x1c5 systemd-logind[8959]: Lid opened.   So the lid events are correctly detected.  To rule out any issue with the suspend process itself, I have also set my power button to suspend in Settings->Power->Suspend &amp; Power Button, for testing purposes.  Pressing the power button now results in this in the output of systemctl status systemd-logind (after a successful suspend-resume cycle):  Dec 17 18:13:58 x1c5 systemd-logind[8959]: Power key pressed. Dec 17 18:14:28 x1c5 systemd-logind[8959]: Delay lock is active (UID 121/gdm, PID 9215/gsd-power) but inhibitor timeout is reached. Dec 17 18:14:39 x1c5 systemd-logind[8959]: Operation 'sleep' finished.   Bottom line: lid events are detected correctly and suspend works flawlessly - but not on lid close...  Any idea how I can get the suspend on lid-close feature back to life?  I can of course use the workaround with the power button but it's a little too easy to forget and result in laptop overheating in bag etc...  --- edited to add ---  Got a little further courtesy of , although the issue isn't the exactly as described.  Here's a smoking gun:  $ systemd-inhibit --list --mode=block WHO       UID  USER      PID  COMM           WHAT                                                     WHY                                                         MODE  gdm       121  gdm       2231 gsd-power      handle-lid-switch                                        External monitor attached or configuration changed recently block gdm       121  gdm       2252 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block user      1000 user      3017 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block   This suggests that the lid close action is being blocked because "External monitor attached or configuration changed recently".  I do connect my laptop to a monitor using a USB-C cable but as I write this, it's been undocked and running on batteries for nearly 3 hours (GNOME settings only shows my laptop display as available).  However it looks like systemd or whichever component is responsible for this still incorrectly believes the external display is attached and - per the ticket - suspend isn't supported by GNOME in such scenarios...  Interestingly the gsd-power process (PID 2231) is owned by gdm rather than my UID.  Killing it restores the suspend-on-lid-close functionality.  Need to figure out why this process exists... When actually connected to external display, systemd-inhibit --list --mode=block reports a 2nd gsd-power process owned by the interactive user; which appears correct and sufficient. Ubuntu GNOME 17.04: wi-fi not working -- mac address keeps changing? My Panda USB wi-fi adapter works just fine on 16.10, but when I try to connect to my wi-fi router in 17.04, GNOME network manager reports "Connection failed." I did some tinkering, and noticed that my MAC address for my wifi adapter, according to GNOME, is DIFFERENT every time I make it forget my wifi settings and try to reconnect. Any leads on a possible fix or work-around?   I'm running Ubuntu GNOME 17.04, kernel 4.10.0-19-generic, GNOME 3.24.0. Can the category of chain complexes be realized as a functor category? As the title says, is there some sort of category $\mathsf{C}$ which can be thought of as the "walking chain complex", so that the category of chain complexes in some other category $\mathsf{A}$ can be realized as $\mathsf{A}^\mathsf{C}$ (or perhaps some subcategory thereof)? The graph of the function $f (x)$ is given.  How many different real roots does the $f (4-3x^2)=0$ equation have?  Here is possible solution:  $$\Bigg [{4-3x^2=-2 \\ 4-3x^2=4} \Longrightarrow x=\left\{0,\sqrt 2,- \sqrt 2\right\} $$  Then, here is different solution:  $$f(x)=x^2-2x-8$$ $$f(4-3x^2)=0\Longrightarrow (4-3x^2)^2-2(4-3x^2)-8=0 \Longrightarrow 9x^4-18x^2=0 \Longrightarrow x=\left\{0,\sqrt 2,- \sqrt 2\right\} $$   Problematic point. Here, I assumed the function is quadratic. But, obviously, this function may not be quadratic.  My questions:  Question $-1:$ Is the first solution completely correct?  Question $-2:$ Can we say that, the second solution is completely and definitely wrong? If so, is it possible to add something to this method and turn it into the right solution? Is it possible to use a laptop as an external monitor? I need to create a multi-monitor setup for my desktop computer but I have no additional monitors with me right now, aside from my laptop. Is it possible to use my laptop screen as an external monitor?  Note that I am not trying to connect a monitor to my laptop, rather, I am trying to connect my laptop screen to a desktop video card (if this is possible). How to speed up 4e combat I DM a group of four PC's and even "easy" battles take at least an hour to resolve. Normal encounters take even longer! I want to speed up combat so my players can do more in a session.  I've been trying a lot to speed up combat, we are already using:   Initiative cards that the players keep up 30 second bonus rule: if someone take his turn within 30 seconds, he receives a token. This token can be used to give a +1 on attack or damage, after rolling. Completely removed healing surges Checked all character sheets, they are roughly equal Roll damage and attack at the same time   I even introduced an experienced player, which helped my party to play more strategic, but speed hasn't improved.  Also the party is Lv 8, nearing Lv 9.  This is not an issue of the DM's turn taking too long. My turns take about 60 seconds tops. The 30 second rule helps a lot, most of the the players turns are within or near 30 seconds.   The major issue appears to be the sheer number of rounds, averaging on 25-30 rounds needed to resolve even a "normal" encounter.  What can I change to resolve combat faster?  I'm looking for both 4e solutions, system agnostic and home brew solutions. Class not found loading JDBC org.postgresql.Driver Why does no one notice the Joker's presence as a policeman during the mayor's speech?