My app won't launch and points to a Null Pointer Exception on my FileReader fr. I initialized it as null to prevent a "Variable may not have been initialized" error. I know the file I want it to use is there under downloads. The file is also inside the main project folder and putting just "academiccalendar.json" does not work either.  My main activity:  public class MainActivity extends AppCompatActivity {   Event[] mobileArray; Gson gson = new Gson();  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      BufferedReader br;     FileReader fr = null;     try {         fr = new FileReader("C:/Users/Ali/Downloads/academiccalendar.json");     }     catch (FileNotFoundException e){         e.printStackTrace();     }     br = new BufferedReader(fr);     //br = new BufferedReader(new FileReader("C:/Users/Ali/Downloads/academiccalendar.json"));       mobileArray = gson.fromJson(br, Event[].class);   My logcat output:   12-31 20:06:37.368 9449-9449/com.example.test.testassigment E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.test.testassigment/com.example.test.testassigment.MainActivity}: java.lang.NullPointerException   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)   at android.app.ActivityThread.access$600(ActivityThread.java:127)   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)   at android.os.Handler.dispatchMessage(Handler.java:99)   at android.os.Looper.loop(Looper.java:137)   at android.app.ActivityThread.main(ActivityThread.java:4511)   at java.lang.reflect.Method.invokeNative(Native Method)   at java.lang.reflect.Method.invoke(Method.java:511)   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:976)   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)   at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException   at java.io.Reader.<init>(Reader.java:64)   at java.io.BufferedReader.<init>(BufferedReader.java:92)   at java.io.BufferedReader.<init>(BufferedReader.java:80)   at com.example.test.testassigment.MainActivity.onCreate(MainActivity.java:42)   at android.app.Activity.performCreate(Activity.java:4486)   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)    at android.app.ActivityThread.access$600(ActivityThread.java:127)    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)    at android.os.Handler.dispatchMessage(Handler.java:99)    at android.os.Looper.loop(Looper.java:137)    at android.app.ActivityThread.main(ActivityThread.java:4511)    at java.lang.reflect.Method.invokeNative(Native Method)    at java.lang.reflect.Method.invoke(Method.java:511)


Paying extra on a mortgage. How much can I save?

Can I pay $12,000 extra once a year or $1000 every month - which option  is better? The first option does sound better, but for a 30 year mortgage, is it that significant?  The mortgage is for $527,000 @4.375 fixed rate with no penalty for pre-payments. How much money and years on a mortgage can I save? When is the best time to pay? At the end of each year?


Book about attack by aliens that decimate entire human fleet and take a single prisoner

I remember reading it in mid-to-late 90s.  It was a hardcover with a huge starship drawn on the cover.  The plot was about humans making first contact with a new alien species, when aliens suddenly attack and quite easily destroy the entire fleet.  Only one survivor is taken prisoner to the aliens' homeworld, where he is being prodded, tested, and evaluated.  The survivor happens to be a son of some important general who sends an elite force of commandos to rescue him.  In the meantime humans are preparing for the inevitable invasion.  The ending seemed open, as if this book was part of a set.  Seems like I may be missing closure to this story.


Prove if $deg(f)=d$ and $L$ splitting field of $f$ over $K$, $[L:K]\mid d!$

I've been a lot of time trying to figure how to prove this statement from my Galois Theory course:  Let $L$ be a splitting field over $K$ of $p(X)\in K[X]$ polynomial of degree $d$, then $[L:K]\mid d!$  My course notes give me a hint, it says to study two different cases when applying induction hypothesis wether $p$ is irreducible or not. I guess my induction initial case must be $deg(p)=1$ or $deg(p)=2$, since in both cases te statement is obviously true, but I really don't know to translate the divisible condition when adding $1$ to the degree of $p$. I'm sorry if this is too trivial and I'm just not getting something really easy. I've seen other similar posts in this site, but they ask to prove that $[L:K]$ is less or equal to $d!$, instead of proving divisibility. How can I solve this? Any help or hint will be appreciated, thanks in advance.


Datasets constructed for a purpose similar to that of Anscombe's quartet

I've just come across  (four datasets that have almost indistinguishable descriptive statistics but look very different when plotted) and I am curious if there are other more or less well-known datasets that have been created to demonstrate the importance of certain aspects of statistical analyses.


We are using MapInfo in our organisation to maintain corporate GIS datasets (in TAB files). We've come to realise the importance of maintaining a metadata file for our GIS layers. Are there any free/open-source metadata managers out there that can help us achieve the desired objectives?


How can I use CanPlaceOn and CanDestroy in Bedrock Edition?

Java Edition has the CanPlaceOn and CanDestroy NBT tags, which are used to restrict the blocks an item can be placed on and destroy respectively (in adventure mode). For example, the following commands give the player a stone block that can only be placed on grass and dirt, and a netherite axe that can only destroy pumpkins: give @s stone{CanPlaceOn:["minecraft:grass","minecraft:dirt"]} give @s netherite_axe{CanDestroy:["minecraft:pumpkin"]}  How can I do this in Bedrock Edition?


Finding the tenth derivative of $f(x) = e^x\sin x$ at $x=0$

I came across this Question where I have to find $$f^{(10)}$$ for the following function at $x = 0$  $$f(x) = e^x\sin x$$  I tried differentiating a few times to get a pattern but didn’t get one, can someone provide the solution.


So I'm on Ubuntu 14.04 and for some reason every time I use sudo or log in as root I get the following message:  grant@grant-G551JM:~$ sudo apt-get build-dep python-pygame sudo: unable to resolve host grant-G551JM [sudo] password for grant:    It still lets me proceed as if nothing happened, but I get it every time and want to amend the situation. Anyone have any clue as to why this would be?


I need to evaluate the limit $$\lim_{n\rightarrow \infty}(n-\sqrt{n+\alpha}\sqrt{n+\beta})$$  My work: $$(n-\sqrt{n+\alpha}\sqrt{n+\beta})=n-\sqrt{n^2+\alpha n+\beta n+\alpha\beta}$$ I understand that both $\alpha$ and $\beta$ are just constants. But, now how should I factor this? I understand the calculus behind limits, but the algebra troubles me.


Why two folders with the same contents have different sizes?

I just created a copy of my music library, let's call it music_backup, and also have the original folder, called music. The backup folder was created using the trusted rsync, so no weird tools involved here or anything. However I noticed something strange: when I do du --total music_backup and du --total music I get different results (22269244 to 22269272, respectively).  So here's my question: considering these two folders are an identical copy of one another, should their sizes not be the same? Or this small difference means there was some file corruption in the copying process?


Ubuntu 12.04 how do I remove the guest option at login

My first question is, how do I remove the guest option at login so it is just me who uses the computer/Ubuntu?


I have been texture painting in look dev mode. But when i try to render it, everything looks very dark. I have 3 sun lights in my scene, ambient turned on in Eevee settings. What am i missing? I really like the look of my scene in Look Dev mode, how can i achieve the same look when my scene is rendered too?


Should users do a sprint to answer unanswered questions

Just like everyone here, I really enjoy this site and would like to see it even better.  I have seen a lot of questions on "meta" concerning the unanswered question.  Many people suggest that theses questions get closed or removed but how does one decide to close or remove a question.  Coming back with an old proposition  Since this is a community driven site, maybe the users should have an official "Answer unanswered questions day" where all users who like this site will go around their preferred tags and do a bit of cleanup.  Tags some questions or answer them, it doesn't matter but at least, it would be nice to see the count go down. EDIT: I know this has already been proposed in 2011 but I would be curious to see what is the people's opinion on it 2 years later, now that it indicates 1,179,164 unanswered questions in SO.  What's in it for me ?  A lot of those unanswered questions have been asked a few years ago by a user with a reputation of "1".  Meaning, they will never accept the answer and have most likely lost their credentials.  It would be nice if there could be a system on such a day where users can accept answers that were posted by inactive users more than x days ago.  This way, we could, not only clean up a little bit of the site but also earn some points to do so.   This has already been proposed  As someone noted, this has already been proposed.  This is why I added the "What's in it for me?" section that try to bring a solution to some of the answers on that original post.  I guess that's it, just wanted to submit (yet another) suggestion about the unanswered questions.


Java - NullPointerExceptioneven when variable has been set in constructor

I have made this code, but it seems that it throws a NullPointerException even when it has been set. This is the code (I am aware my code is not future proof or optimised at all. Please do not comment about it). I have tried passing the reference to the method Main, but that doesn't seem to work.  MainTest.java  public class MainTest {     public static void main(String[] args) {         for (int i = 0; i < 500; i++) {             Main main = new Main();             main.run();         }     } }   Main.java  public class Main {     Chicken[] chickenList = new Chicken[8388607];     int counter = 0;      public void run() {         for (int i = 0; i < 4; i++) {             chickenList[counter++] = new Chicken(Chicken.ADULT, this);         }         for (int i = 0; i <= 7200; i++) {             for (Chicken chicken : chickenList) {                 if (chicken != null) {                     if (chicken.getAdultOrBaby() == Chicken.ADULT) {                         chicken.layEgg();                     } else {                         chicken.hasGrown();                     }                 } else {                     break;                 }             }         }         System.out.println(amountOfChickens());     }      public void newChicken() {         chickenList[counter++] = new Chicken(Chicken.CHILD, this);     }      public int amountOfChickens() {         int amount = 0;         for (Chicken chicken : chickenList) {             if (chicken != null) {                 amount++;             } else {                 return amount;             }         }         return amount;     } }   Chicken.java  import java.util.Random;  public class Chicken {     Random random = new Random();     private int timeAlive;     private int timeSinceLastEgg;     private int adultOrBaby;     private int randomTimer;     public static final int ADULT = 0;     public static final int CHILD = 1;     public static Main caller;      public Chicken(int adultBaby, Main callers) {         caller = callers;         timeAlive = 0;         timeSinceLastEgg = 0;         adultOrBaby = adultBaby;         if (adultOrBaby == ADULT) {             randomTimer = newRandomTimer();         }     }      public int getAdultOrBaby() {         return adultOrBaby;     }      public void hasGrown() {         if (++timeAlive == 1200) {             adultOrBaby = ADULT;         }     }      private int newRandomTimer() {         return random.nextInt(300);     }      public void layEgg() {         timeAlive++;         if ((++timeSinceLastEgg) == (300 + randomTimer)) {             new Egg(caller);             timeSinceLastEgg = 0;             randomTimer = newRandomTimer();         }     } }   Egg.java  import java.util.Random;  public class Egg {     Main caller;     Random random = new Random();     private static final int WILL_HATCH = 2;     private final int WILL_4 = 3;      public Egg(Main callers) {         if (random.nextInt(8) == WILL_HATCH) {             if (random.nextInt(32) == WILL_4) {                 spawn4();             } else {                 spawn();             }         }         caller = callers;     }      private void spawn4() {         for (int i = 0; i < 4; i++) {             caller.newChicken();         }     }      private void spawn() {         caller.newChicken();     } }   And this is the output:  Exception in thread "main" java.lang.NullPointerException         at Egg.spawn(Egg.java:27)         at Egg.<init>(Egg.java:14)         at Chicken.layEgg(Chicken.java:40)         at Main.run(Main.java:13)         at MainTest.main(MainTest.java:5)


Black shadows on Faces, not a normals thing

this is the first time I've used this website, sorry if I dont organize the post wrong. I've been using Blender for a couple months now, so I'm not too terribly new, however, There are these weird black shadows on my model and its driving me crazy, as I cant get rid of them. They're not a normals issue, as I've already recalculated them and it's not that. Does anyone know what causes this? Its in object mode, by the way. It happens anywhere.  Its probably a problem with the way I modeled it or something, as it's happening around these sharp edges. Here is it in edit mode.  Here is it in edit mode. Does anyone see anything wrong that I did? I'm sure I did something wrong.  Thanks so much for your help.


I have written a template for a personal diary. The main tex file \input a file called entries.tex, which will \input all the diary entries, which are in a subdirectory, as well as write the title of the entry and the date it is in (both of which it gets from the path and filename)  entries.tex is generated by a python script called entries.py, the output of this script looks like this:  \textbf{This is the title}  \hspace*{\fill}  \textbf{2018-11-16}\\ \input{entries/2018/11/16 - This is the title} \bigskip  \textbf{This is another entry}  \hspace*{\fill}  \textbf{2018-11-18}\\ \input{entries/2018/11/18 - This is another entry} \bigskip   And the main.tex file looks like this:  \documentclass{article} \usepackage[margin=4cm,left=2cm,right=2cm]{geometry}  \title{\huge{}Personal Diary} \author{\LARGE{}Author name} \date{Last written \today}  \begin{document}  \maketitle \newpage  \input{entries}  \end{document}   The directory tree looks like this:  Diary ├── entries │   └── 2018 │       ├── 01 │       ├── 02 │       ├── 03 │       ├── 04 │       ├── 05 │       ├── 06 │       ├── 07 │       ├── 08 │       ├── 09 │       ├── 10 │       ├── 11 │       │   ├── 16 - This is the title.tex │       │   └── 18 - This is another entry.tex │       └── 12 ├── entries.py ├── entries.tex ├── main.tex └── makefile   However, when I try to compile main.tex, it seems to find entries.tex, but not the files that entries.tex includes. The output of it looks like this:  python3 entries.py pdflatex main.tex This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian)  (preloaded format=pdflatex)  restricted \write18 enabled. entering extended mode (./main.tex LaTeX2e <2018-04-01> patch level 5 (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty) (/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)) No file main.aux. *geometry* driver: auto-detecting *geometry* detected driver: pdftex [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./entries.tex  ! LaTeX Error: File `entries/2018/11/16 - This is the title.tex' not found.  Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: tex)  Enter file name:    I'm sure that entries/2018/11/16 - This is the title.tex exists. Does anyone have any idea why LaTeX wouldn't be finding it?  I have made a github repo with all the code on for anyone who wants to try it out: https://github.com/ventlion/latexdiary


I want to speed up the time it takes for me to be able to drag text in chrome. I have to wait for 2 or 3 seconds to drag text, or else I just end up selecting text again currently. Is there an attribute that controls the time it waits that I can modify in the terminal??


a better way to express "an idea/thought suddenly came to me"

What are some grandiloquent, or simply better, ways of expressing "an idea/thought suddenly came to me", or "an idea/thought struck me", or "I was struck by an idea/thought"?


My sister and I made a really cool house. She wanted to download the world so she could have it too. Problem is, in 0.7.3 it just say "quit to menu" or whatever. How do you quit and copy the world? Where did the menu option go to copy a multiplayer world?


Dependency problems with apache2, mysql-common, libmysqlclient20:amd64 and mysql-client-5.7

I tried to install a package, but there was some kind of problem with dependencies. First I tried to clean up everything with the command sudo apt-get autoremove and I got a similar error message as with apt-get install  Output after autoremove  Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. 4 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up apache2 (2.4.18-2ubuntu3.5) ... info: Executing deferred 'a2enconf javascript-common' for package javascript-common ERROR: Conf javascript-common does not exist! dpkg: error processing package apache2 (--configure): subprocess installed post-installation script returned error exit status 1 Setting up mysql-common (5.7.20-0ubuntu0.16.04.1) ... update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist dpkg: error processing package mysql-common (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of libmysqlclient20:amd64: libmysqlclient20:amd64 depends on mysql-common (>= 5.5); however: Package mysql-common is not configured yet.  dpkg: error processing package libmysqlclient20:amd64 (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of mysql-client-5.7:  mysql-client-5.7 depends on mysql-common (>= 5.5); however:  Package mysql-common is not configured yet.  dpkg: error processing package mysql-client-5.7 (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                       No apport report written because MaxReports is reached already Errors were encountered while processing:  apache2  mysql-common  libmysqlclient20:amd64  mysql-client-5.7 E: Sub-process /usr/bin/dpkg returned an error code (1)   Any solutions? Seems there is some problem with the packages apache2, mysql-common etc. but I got no idea since I'm not very experienced with the command line.


How do I list multiple things that are compound words?  In my own language I'm used to writing these lists like this:  "I kicked foot-, basket-, and volleyball"  The sentence is supposed to mean that I kicked all types of balls (football, basketball and volleyball). However, it does not seem correct to me. Should I write them as whole words, with or without hyphen, or how?


Can I Sacrifice a blocker and still prevent damage from getting though to me?

Can you block an attacking creature with a creature with a sacrifice ability in order to prevent the attacking creature from getting through to do damage?


When reviewing you should see what others have voted for so far

At the moment, when reviewing an edit, you do not have any indication of what others are thinking about the question, at least, not until you click 'reject'. Only then, once you are already going down the route of rejecting do you see what others are thinking. I see many edits that should be rejected but are already approved, which I assume is people rushing through to accept edits (perhaps a downside to badges, but let's not get sidetracked).   I propose that when reviewing an edit, you are shown how many people have so far rejected the edit. This data is already viewable to a reviewer, it is just one step away. Hopefully this will make people think about approving posts if others have already rejected the edit. As I see it, this will hopefully make people more willing to reject edits, and if it turns out that the edit really did need to be made, someone else will surely propose it.  I in no way pretend to think that this will make the review system perfect, but it do belive it will help towards that.


How can you make a Mac (2015 Yosemite) hibernate? (Hibernate like Windows PC, ie. save state to disk and fully power down)

Please note: Whilst the older question (4 years ago)  has answers that show a hibernate option exists for Macs, it doesn't detail how to make your Mac hibernate. Perhaps this is because that answer was sufficient for older machines (Pre-2015 MacBookPro Retina or pre-Yosemite).  I've been a longtime Windows user and was told Apple's Macs were better. I recently bought a MacBookPro Retina 2015 15" OS X 10.10 Yosemite (SSD). I have not been able to make it hibernate.  I have already enabled the hibernate mode number 25 (as can be seen in the settings below).  I was told that the grey screen with the progress bar upon wakeup indicates the machine was hibernating. I managed to get this grey screen to show up after disabling standby.   sudo pmset -a standby 0   I was also told I could check what state the machine woke from via the following command:  pmset -g log | grep -i "wake from"   I ran the command but it still shows that I have always been waking from Standby. This is the case when waking from both AC and Battery. E.g.     Wake from Standby [CDNVA] due to EC.PME/User: Using BATT (Charge:92%) 303 secs   I am assuming that if my machine did indeed hibernate then the grep command should show Wake from 'Hibernate' as opposed to 'Standby'.  This makes me wonder if the OS X man pmset command, which brings up the pmset commands manual which is dated 2012 is still valid today. Or perhaps I'm just too new to this.  I have also tried 2 deep sleep apps/widgets. Both end up putting the MBP to Standby instead of Hibernate.  pmset -g shows the following:  Active Profiles: Battery Power          -1* AC Power               -1 Currently in use:    standbydelay         3    standby              0    halfdim              1    hibernatefile        /var/vm/sleepimage    darkwakes            0    gpuswitch            2     disksleep            10    sleep                1    autopoweroffdelay    1    hibernatemode        25    autopoweroff         1    ttyskeepawake        1    displaysleep         2    acwake               0    lidwake              1     PS. Next to sleep it sometimes shows "(sleep prevented by AddressBookSour)"


Derivation of the speed of light using the integral forms of Maxwell's Equations

Having just finished physics 2, I've been (slightly) exposed to showing that light is a wave with speed $1/\sqrt{\mu _0 \epsilon _0 }$ using the differential forms of  though this is the only derivation I've come across. Can you show the same thing using the integral forms? My first thought is that it may be more difficult since the wave equation is often given as a differential equation.   Note: I have not taken vector calculus (or even multivariable), and do not have sufficient mathematical (or even physical) background to explicitly do the derivation. I'm merely asking for a hopefully understandable solution or a source to the solution.


Let $A=QR$ where $Q\in$ $M_n(\mathbb R)$ orthogonal and $R\in M_n(\mathbb R)$ is upper triangular matrix. Do $A$ and $RQ$ have the same eigenvalues?  $\det(A-\lambda I)=\det(QR-\lambda I)=\det(QR-\lambda QQ^T)=\det Q\det(R-\lambda Q^T)=\det Q\det(RI-\lambda Q^T)=\det Q\det(RQQ^T-\lambda Q^T)=\det Q\det(RQ-\lambda I)\det Q^T=\det(RQ-\lambda I),$   so they have the same eigenvalue, is this ok?


I'm trying to hide element inside Iframe from different website. This is the embed code for Iframe  <iframe width="853" height="480" src="https://my.matterport.com/show/?m=NtQzb5gDVTp" frameborder="0" allowfullscreen allow="vr"></iframe>   I want to hide the top bar at the top. I'm trying to use this css:  #model-title .title-row {     height: 50px; }   I tried from my browser developer mode and it works. My question is: How I can Include this css code in my page to hide this element and make it savable


Baryogenesis only at the Planck scale, or none at all?

I can think of three general ways of explaining why the universe contains more matter than antimatter:  (1) Near the Planck time, the universe had zero baryon asymmetry, but at some later time, determined by some GUT energy scale, the  were satisfied, and the baryon asymmetry became nonzero.  (2) Nonconservation of baryon number occurs only at Planckian energies. Near the Planck time, the baryon asymmetry evolved from zero to some nonzero value.  (3) The Sakharov conditions have never been satisfied. The baryon asymmetry has always been nonzero, and has simply scaled as expected. (Apparently one  $\Delta n=n_B-n_\bar{B}\propto s$, where $n$ is number density and $s$ is entropy density).  It seems like most theorists are interested in #1, but is there any reason why 2 and 3 aren't possible?  2 seems pretty reasonable, since for the reasons given in , we have good reasons to think that baryon number is not conserved under Planckian conditions.  3 also seems reasonable to me, since even if baryon number is nonconserved at Planckian energies, that's only one of the three Sakharov conditions. I don't see any obvious fine-tuning objections to #3, since the scaling of baryon asymmetry with cosmological expansion isn't particularly drastic (not an exponential decay or anything). Is there something unphysical about maintaining $\Delta n\propto s$ all the way back to the Planckian era?   Some people might object to #3 on aesthetic grounds, since we "expect" the initial conditions of the universe to be symmetric, but that seems weak to me. After all, we don't object aesthetically to the fact that homogeneity was an imperfect symmetry of the early universe, and we even accept that the early universe was in a thermodynamically unlikely state.


Remove vertical line from specific cell in Table

I want to create the table as shown in the Image.


Remedies when bus company makes me miss a flight

I'm buying a bus ticket to get to Boston 23 hours before my flight to ensure I reach my departure airport on time.  If I didn't arrange bus transport well in advance, what legal remedies would I have if a delayed bus caused me to miss my flight?


20.04 Synaptics package manager not supported

Installing from  should work, doesn't  Nothing else does. Failed to install  - file not supported $ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.2 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal  ubuntu@ubuntu:~$ dpkg --print-architecture amd64


Won't the test charge disturb the electric field to be measured?

As written in Principles of Physics by Halliday, Resnick and Walker:     The electric field is a vector field; it consists of a distribution of vectors,one for each point in the region around a charged object. In principle, we can define the electric field at some point near the charged object. We first place a positive charge $q_0$, called a test charge,at the point. We then measure electrostatic force $\vec{F}$ that acts on the test charge. Finally, we define the electric field $\vec{E}$ at that point due to the charged object as $$\vec{E} = \frac{\vec{F}}{q_0}$$ .   So, this is the way they derive the electric field. But one thing that perplexes me is that as test charge has its own field, so when the test charge is introduced in the field of concerned charged object, say another point charge $+q$ , won't it get shifted due to the repulsion from the test charge $q_0$ (which is, by convention, positive)? Then consequently the field of $+q$ will also be shifted. In a word, it will get disturbed by that test charge. But the book derived the formula as if the positive point charge $+q$ remained fixed i.e. the test charge had no effect on the field of the point charge. But how can it be? If the test charge $q_0$ is a charge, then obviously it has also field which will exert force on $+q$. So how can the formula be true? Why did the book neglect this?  This phenomenon can be compared to earth's gravitational field. When a body moves upward, it exerts force on the earth downward. But as the earth has huge mass, its shifting can be neglected and hence it doesn't affect its gravitational field.   But here it is a point positive charge; it has no huge mass. So why did the book neglect its shifting and how can the formula be true? Please help.


Is there only one complex structure on complex plane $\mathbb{C}$?

There is a trivial complex structure on $\mathbb{C}$.   Do we have other complex structures on complex plane $\mathbb{C}$?   If not, how to prove it?


Maybe the underlying question is what the Voltage-Current curve looks like. Can I drive it from a voltage source (like you drive a heater) or from a current source (like you drive an LED)? Or even different than those two options?  ADDITIONAL1: Say (hypothetically) I have two commercially available identical Peltier's, they are spec'd 6V/3A. Can I connect these in series to a 12Vdc power supply without any worries?  CONCLUSION1: Current/Voltage load curve is reasonably linear, both driving from current or voltage source will do fine as long as the device is operated within its spec. (Olin Lathrop, Russell McMahon)  CONCLUSION2: Don't drive a Peltier from PWM, power loss due to current increase, grows more rapidly than cooling power. (Olin Lathrop)  CONCLUSION3: Beware the mechanical wear of the device with continues cycling. Eg. don't use a thermostat on/off controller. (Russell McMahon)


My laptop went down a few days ago and I lost my short sound script.  I thought someone here could help me rebuild it.  It was something like this:  Better post:  if sound prog were "pback" the command would be   pback file[s]  #! FILE=$1;  cat FILE | [forgotten command]  #End   Can anybody help me with the command?


iptables drop all incoming ICMP requests except from one IP

Currently, I have something like:  iptables -A INPUT -p ICMP --icmp-type 8 -j DROP iptables -A INPUT -s x.x.x.x -p ICMP --icmp-type 8 -j ACCEPT   However, when I run the second command, it looks as if iptables just stops.  I have to break out of it to get back to terminal.  Perhaps I am doing it all wrong, but some insight would be helpful.


I'd like to modify the contents of my headers and footers - e.g., to display the current chapter and/or section title or to change the pagination alignment. How can I do that? I've noticed the packages  and scrpage2 (part of the -bundle) - are they interchangeable, or are there situations where I should prefer one package to the other?


When two equally opposite charges placed then which type of motion will carried out b/w them?

I want to know that which type of motion will carried out between two equally opposite charged particles, when they placed in front of each other.


How can I put more space between bibliography entries (biblatex)

My bibliography (made with biblatex) has all items close to each other. I would like to introduce some space between them, e.g. half a line.  How can I do this?


What are the consideration when choosing either newcommand or newenvironment?

The first time I learnt LaTeX, I thought \newcommand properly fits for inline mode and \newenvironment for displayed mode.  Later I noticed it is not correct. So the question is   What is the rule of thumb when deciding whether we should use one over the other one?


Singular or plural verb with "A series of"

should a verb after the phrase "a series of" be singular or plural?   A series of incidents has taken place since the accident. A series of incidents have taken place since the accident.


I'm working on exercises from Kunen and I'm stuck. I must proof that the following are equivalent:   There exists a sequence $\langle A_\alpha:\alpha<\omega_1\rangle$ such that $\forall\alpha(A_\alpha\subset\alpha)$ and for all $A \subset \omega_1$ the set $\{\alpha \in \omega_1:A\cap\alpha=A_\alpha\}$ is stationary. ($\diamondsuit$-principle) There exists a sequence $\langle A_\alpha:\alpha<\omega_1\rangle$ such that $\forall\alpha(A_\alpha\subset\alpha\times\alpha)$ and for all $A \subset \omega_1\times\omega_1$ the set $\{\alpha \in \omega_1:A\cap\alpha\times\alpha=A_\alpha\}$ is stationary. There exists a sequence $\langle f_\alpha:\alpha<\omega_1\rangle$ such that $\forall\alpha(f_\alpha:\alpha\rightarrow\alpha)$ and for all $f : \omega_1\rightarrow\omega_1$ $\exists\alpha(f|\alpha=f_\alpha\wedge\alpha>0)$ There exists a sequence $\langle f_\alpha:\alpha<\omega_1\rangle$ such that $\forall\alpha(f_\alpha:\alpha\rightarrow\alpha)$ and for all $f : \omega_1\rightarrow\omega_1$ the set $\{\alpha \in \omega_1:f|\alpha=f_\alpha\}$ is stationary.   I have proved that $1\implies 2\implies 4\implies 3$ and that $4\implies 1,$ but I'm having problems on proving that $3\implies$ "something", because it only talks about one $\alpha$. Can someone help me?


GPG2 Asks for password even with --passphrase specified

I'm trying to script a gpg decryption, and as such need to provide the password on the command line. According to the man page, there are three ways to do this: read from a file using --passphrase-file, read from stdin (or another file descriptor) using --passphrase-fd 0, or include in the command line using just --passphrase. All of the above also require --batch to be set, which I did.  My most recent command line attempt is:  echo "<password>" | gpg2 --no-tty --batch --passphrase-fd 0 -d -o /<path_to_destination>/$FILE_NAME $FILE   which still pops up a dialog asking for the password. What am I missing here? For reference, if it makes a difference, my password does include some special characters like &, but it doesn't appear to complain about that. Also, gpg version is 2.1.9:  # gpg2 --version gpg (GnuPG) 2.1.9 libgcrypt 1.7.1 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Home: ~/.gnupg Supported algorithms: Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,         CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2   EDIT: Unlike , which is simply trying to get a text-based password entry for use in a SSH session, I'm trying to get a completely non-interactive method of using GPG for use in scripting.


MYSQL: How to select all attributes of all duplicate entries?

I have a database that containes user data and need to dig up only the entries where two attributes are duplicate between users (surname and social security number). I need all of the attributes for these entries, such as email and firstname.   I first used group by to get every user where those two values are duplicates with this query:  SELECT *  FROM jasenet  GROUP BY hetu, sukunimi  HAVING count(*) >= 2  ORDER BY sukunimi;   This returns all duplicate entries. After some research I tried to use IN operator in order to find out each individual duplicate person with this query:  SELECT *  FROM jasenet  WHERE sukunimi  IN (SELECT sukunimi      FROM jasenet      GROUP BY hetu, sukunimi      HAVING count(*) >= 2      ORDER BY sukunimi) ORDER BY sukunimi;   This works somewhat because I get each individual with duplicate surname, but in addition to this I need to be able to have the query use the social security number as well (hetu).  I tried this query, but it didn't work:  SELECT *  FROM jasenet  WHERE sukunimi  IN (SELECT sukunimi      FROM jasenet      GROUP BY hetu, sukunimi      HAVING count(*) >= 2      ORDER BY sukunimi) AND hetu IN (SELECT sukunimi      FROM jasenet      GROUP BY hetu, sukunimi      HAVING count(*) >= 2      ORDER BY sukunimi) ORDER BY sukunimi;   How can I use two columns returned from a query in another query?


How to remove GRUB Rescue prompt after deleting Ubuntu partition?

I had a Windows 7 pc dual booting with Windows XP and then i got hold of Ubuntu 12.10 and I installed  it alongside Windows 7 and after installing on boot i got GNU GRUB interfering in my bootloader and after some days I by mistake formatted the parttion now my pc does not boot and shows grub rescue


I'm trying to get the PID of tcpdump which is part of a while loop. Example:  tcpdump -x -q -l -i $IFACE port $PORT | while read buffer; do    # process, if something received from tcpdump. Otherwise wait done   $! within the while loop will not provide the PID of tcpdump.   How to get the PID of tcpdump in this construct?


Formulae to Convert between z Critical Value and Confidence Level

What are the two formulae to convert between the two?  For example, I have a z critical value of 3.00. With what formula can you convert this to 0.9973?  And, for example, you have a confidence level value of 0.9973. How do you convert it to 3.00?


C++ mechanism of constructing, deconstructing and pointer to class object

#include <iostream> using namespace std;  class A { private:    int m_i;    friend int main(int argc, char const *argv[]); public:    A (int i = 0):m_i(i){};    void display()    {        cout << m_i << endl;    }    int result() {return m_i;} };  void createA(A *pa) {    pa = new A(1); }  A* createA() {    A a(2);    return &a; }  void createAonstack() {    A a(3); }  int main(int argc, char const *argv[]) {    A a;    A * pa = &a;    pa->display();    createA(pa);    pa->display();     A * a2 = createA();    cout << a2->m_i << endl;    createAonstack();    cout << a2->m_i << endl;    return 0; }   The results of the program above is  0 0 2 3   How to explain the result 2 and 3? From my understanding, the object created in function createA() should be deconstructed, and the pointer it returns should point to NULL, but why a2->m_i can be 2. And the 3 is even more confusing, as it seems that the function createAonstack() has nothing to do with a2.


Strange df (disk space) output since macOS Catalina

Why is this:  $ df -h / Filesystem     Size   Used  Avail Capacity iused      ifree %iused  Mounted on /dev/disk1s5  234Gi   10Gi   15Gi    41%  482117 2448643243    0%   /   Very different from this:  $ df -h . Filesystem     Size   Used  Avail Capacity iused      ifree %iused  Mounted on /dev/disk1s1  234Gi  205Gi   15Gi    94% 1911870 2447213490    0%   /System/Volumes/Data   Is there an explanation with this new "data" filesystem? How is it different?


How can I open Java .class files in a human-readable way?

I'm trying to figure out what a Java applet's class file is doing under the hood. Opening it up with Notepad or Textpad just shows a bunch of gobbledy-gook.  Is there any way to wrangle it back into a somewhat-readable format so I can try to figure out what it's doing?   Environment == Windows w/ VS 2008 installed.


What's the best way to validate that an IP entered by the user is valid?  It comes in as a string.


Question about the use of "(What/How) do you do?"

Can we use "what do you do?" to mean "what activity are you engaged in at the moment?" And not asking about someone's job. My teacher once used it not to mean asking my classmate's job. Was my teacher correct? Can we also use "how do you do?" to mean "how someone is doing something?" like cooking a meal, rather than an expression used in greetings?


Pop-up window for a related layer doesn't show the right values in ArcGIS online

In my ArcGIS online map, I have two layers (morminte and layer2) related in a one-to-many relationship. For an item from the morminte layer I can have 0, one or two corresponding values from layer2. In the picture below it is shown the pop-up window for an item from morminte. In the pop-up, only the Nr. Mormant field is from the morminte layer. This is the only field that returns the right value.  The rest of the fields are from the related layer.  The fields NUME (surname) and PRENUME (name) should return text values, DATA_NASTERII and DATA_DECES -> date values and VARSTA->a number. Instead, if for the selected item I have one corresponding value from layer2, the pop-up returns "1", if I have 2 corresponding values, then I get "2" and if there is no value to be related, then I get "0".    Before uploading the map to ArcGIS Online, I made sure that both layers involved in the relationship class are configured properly in ArcMap. NUME and PRENUME are string fields, DATA_DECES and DATA_NASTERII are date fields and VARSTA is a short integer field.  In the Configure Attributes window for the morminte layer, I noticed that I can select only  count in the Statistic Operator tab. I don't know if it has something to do with this.    I also created a layer that has the fields NUME, PRENUME etc. as it's own. In this case, the pop-up shows the right values. But in my map I want to use two  related layers instead of one because is more advantageous for what I need to do.


Why is the number of conjugacy classes modulo 16 equal to the order for a finite group of odd order?

Let $G$ be a group of odd order $n$ and suppose $|Con(G)| = k$  ( Con(G) is the set of conjugacy classes of G), prove that $$k \equiv n \pmod{ 16}.$$ How do I proceed on this? Thanks.


How to prove that $\sum_{t=1}^{\infty}\frac{t}{2^{t}}=2$

I'm trying to verify the solution of St.Peterburg paradox:  when W = c = 2.  $$\sum_{t=1}^{\infty}2^{-t}\left(\ln\left(W+2^{t-1}-c\right)-\ln W\right)=0$$  In terms of math, I need to check if the LHS of the expression above equals to 0 when W=c=2.  $$\Leftrightarrow\sum_{t=1}^{\infty}2^{-t}\left(\left(t-1\right)\ln2-\ln2\right)=0\Leftrightarrow$$  $$\Leftrightarrow\sum_{t=1}^{\infty}2^{-t}\left(t-2\right)\ln2=0\Leftrightarrow\sum_{t=1}^{\infty}2^{-t}\left(t-2\right)=0\Leftrightarrow\sum_{t=1}^{\infty}\frac{t}{2^{t}}-2\sum_{t=1}^{\infty}\frac{1}{2^{t}}=0\Leftrightarrow$$  $$\Leftrightarrow\sum_{t=1}^{\infty}\frac{t}{2^{t}}-2\left(\frac{0.5}{1-0.5}\right)=0\Leftrightarrow\sum_{t=1}^{\infty}\frac{t}{2^{t}}=2$$  How to prove, assuming that I didn't make a mistake previously, that $\sum_{t=1}^{\infty}\frac{t}{2^{t}}=2$.


Is it possible to see a list of all my edits using a query?

Is it possible to see a list of all my edits using a query similar to this ?  Can any one give any link to the query?


Disable the "You've gone full screen" notification in Chrome

Every time I switch into Full Screen (F11) in chrome it says "You've gone full screen. Exit Full Screen (F11)".   Can I disable this from showing up? I know how to exit full screen.


Unable to install wine Xubuntu 16.04 64bits

I know there are several question about this subject, but some of them do not have any response, and for the ones which do, I have followed all the advices given and nothing fixed my problem. Every time I attempt to give :   sudo apt-get install wine   I get an error about depends on X BUT IT WONT BE INSTALLED with X being some version of wine, for instance wine1.6 or some library its using. I have attempted a MYRIAD of workarounds from all over Google but still I am unable to do it. As a side note, I used the same DVD to install Xubuntu on my mother's PC and I installed it there (Wine) with no issues.  Can someone advice here?  EDIT :  Error I am getting :  sudo apt-get install wine  The following packages have unmet dependencies:  wine : Depends: wine1.6 E: Unable to correct problems, you have held broken packages.   Attempting wine1.6  sudo apt-get install wine1.6 The following packages have unmet dependencies:  wine1.6 : Depends: wine1.6-amd64 (= 1:1.6.2-0ubuntu14)            Depends: wine1.6-i386 (= 1:1.6.2-0ubuntu14)            Recommends: fonts-droid but it is not installable E: Unable to correct problems, you have held broken packages.   Attempting wine1.6-amd64  sudo apt-get install wine1.6-amd64 The following packages have unmet dependencies:  wine1.6-amd64 : Depends: wine1.6:any (= 1:1.6.2-0ubuntu14)                  Recommends: libosmesa6 but it is not going to be installed E: Unable to correct problems, you have held broken packages.


Evaluate $\lim \limits_{n\rightarrow\infty}\sin^2(\pi\sqrt{n^2 + n})$

I'm struggling to find the limit at infinity of : $$\lim \limits_{n\rightarrow\infty}\sin^2(\pi\sqrt{n^2 + n}), n\in\Bbb N$$ I know it is $1$ but I don't understand why this is wrong :  $\sin^2(\pi\sqrt{n^2 + n}) = \sin^2(\pi*n\sqrt{1 + \frac{1}{n}})$.  So $\lim \limits_{n\rightarrow\infty}\sin^2(\pi\sqrt{n^2 + n}) = \lim \limits_{n\rightarrow\infty}\sin^2(\pi*n\sqrt{1 + \frac{1}{n}}) =  \lim \limits_{n\rightarrow\infty} \sin^2(\pi*n) = 0$.  Thanks.


So, I did a stupid thing...  I was installing some software (Java SE 7, if you must know) from a tarball, and I got tired of using sudo, so I went and changed the owner of my /usr directory to myself.    $ sudo chown -R sammy /usr   Whoops!  Since sudo lives in /usr/bin/, it also changed owner.  Now, I can't use it anymore.  Have I accidentally been caught in a sudo-Catch 22?  I can't use apt-get install or any number of other essential features of my shell environment.  $ sudo sudo: must be setuid root   Is there a way to change the owner of this directory (and subdirectories, too) back to root?


Why does `cd /../` not return an error in bash?

In bash (or, I'm assuming, any linux shell), I would expect cd /../ to return an error. I interpret that to be asking for the parent of the root of the directory tree. Since it's the root of the directory tree, I was under the impression that it has no parent.  However, it returns no error, and looks to be equivalent to cd /. I would also expect an error from cd / && cd ../ for the same reason: asking for the parent of the root directory, but it has the same result.  Why is this?


Is there any way that my girlfriend and I can interact between our Sim characters/families? Is it possible to share neighborhoods online or play the same family change by change? We have both Origin accounts with Sims 3.


Could you please give a hint how to show that the zariski topology on $\mathbb{A}^2$ is not the product topology on $\mathbb{A}^1\times\mathbb{A}^1$


I'm trying to install mumble but apparently I'm missing some dependencies

I got the following error message:    The following packages have unmet dependencies:  mumble-server : Depends: libiceutil34 but it is not installable                  Depends: libzeroc-ice34 but it is not installable   E: Unable to correct problems, you have held broken packages.   I honestly have no clue how to solve this problem. I'm relatively new to Linux in general and Google provides answers way too complicated for my level of understanding.


Cannot set the proper resolution on new Dell laptop in Ubuntu-gnome 16.04

I just received a new Dell Latitude E5570 for work and installed Ubuntu Gnome on it. I quickly realized that it was only running at 1366x768, rather than the 1920x1080 it should be capable of. In the list of resolutions, it is not showing anything higher than 1366x768. I've already had to install kernel 4.7 in order to get Ubuntu running properly, so I suspect there might be some issue with the newer hardware. Is there anything I can do to find a solution?  Edit: I have tried the solution listed in the suggested duplicate, and when I try to addmode I get:  ➜  ~ xrandr --addmode eDP1 1920x1080_60.00                                                             X Error of failed request:  BadMatch (invalid parameter attributes)   Major opcode of failed request:  140 (RANDR)   Minor opcode of failed request:  18 (RRAddOutputMode)   Serial number of failed request:  47   Current serial number in output stream:  48


How to write the below lines using array?? val1=$(grep 'Thread' Threadout.txt | awk -F"/" '{print $1}')    val2=$(grep 'Thread' Threadout.txt | awk -F"/" '{print $2}')  val3=$(grep 'Thread' Threadout.txt | awk -F"/" '{print $3}')  val4=$(grep 'Thread' Threadout.txt | awk -F"/" '{print $4}')  Threadout.txt contains like "Thread 1/1/25/100"


What is the difference between > and >> (especially as it relates to use with the cat program)?

Suppose that I have a file called temp.txt.  Using the cat program, I would like to add the contents of this file to the end of myfile.txt -- creating myfile.txt if it does not exist and appending to it if it does.    I am considering these possibilities:  cat temp.txt > myfile.txt   or  cat temp.txt >> myfile.txt   Both commands appear to work as I want.  So, my question is, what is the difference between > and >>?  Thanks for your time.


I've been trying to use this answer  to no avail. I use the packages:  \usepackage{algorithm} \usepackage{algpseudocode}   And this code for defining new environment:  \newenvironment{megaalgorithm}[1][htb]{     \renewcommand{\algorithmcfname}{MegaAlgorithm}% Update algorithm name    \begin{algorithm}[#1]%   }{\end{algorithm}}   But then it tells me that there is an error:      Latex Error: \algorithmcfname undefined   I can't use algorithm2e as in previous example as it breaks my current code.


How to screenshot a Blue Screen Of Death (BSOD)

I am using windows 7. Recently my computer crashed, and displayed the dreaded BSOD:     I was trying to copy down the error message, but I didn't have enough time. Is it possible to take a screenshot of the BSOD?


Is there a way to permanently exclude the kernel from updates?

I'm using Fedora and wonder if there is some way I can exclude kernel updates when I run yum update, until I specifically want to update the kernel.    The reason why I am concerned about this is because sometimes it requires a lot of extra research finding patches for some programs and extra time spent recompiling them to work on the new kernel.  I am thinking VMWare specifically as one example.   I wonder if there is some way for yum update to NOT update the kernel and only notify me that a new one is available when it goes through its routine so that I can decide to put it off until a more convenient time.  Or is this thinking likely to cause other issues?


I am struggeling now for days, because I'm very new to c++.  I want to write something into a .ini file with WritePrivateProfileString  int i = 0; char arr[total]; stringstream ssin(configs); while (ssin.good() && i < total){     ssin >> arr[i];     ++i; };  [...]  WritePrivateProfileString(TEXT("Config"),TEXT("active"),arr[i],path);   (total is a int that equals 6 and configs is a string like "text1 text2 text3")  And now I want to seperate every text (text1, text2, text3) in to a array so I can u easily use them.  But because WritePrivateProfileString uses LPCSTR I cant insert this char array as input.  [Error] invalid conversion from 'char' to 'LPCSTR {aka const char*}' [-fpermissive]  Is there a way to use the char array in the WritePrivateProfileString function or how can I convert it so it can be used in this function?  Thank you in advance.


Can't add applications using sudo apt-get and unofficial ppa: unable to lock directory

My terminal shows this error. I can't add any applications. Please help someone  ashwin@ash:~$ sudo add-apt-repository ppa:tualatrix/ppa [sudo] password for ashwin:   The official Ubuntu Tweak stable repository  More info: https://launchpad.net/~tualatrix/+archive/ppa  Press [ENTER] to continue or ctrl-c to cancel adding it gpg: keyring `/tmp/tmpwj1dey/secring.gpg' created gpg: keyring `/tmp/tmpwj1dey/pubring.gpg' created gpg: requesting key 0624A220 from hkp server keyserver.ubuntu.com gpg: /tmp/tmpwj1dey/trustdb.gpg: trustdb created gpg: key 0624A220: public key "Launchpad PPA for TualatriX" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg:               imported: 1  (RSA: 1)  OK  ashwin@ash:~$ sudo apt-get update E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)  E: Unable to lock directory /var/lib/apt/lists/


Can't reach login after Ubuntu 18.04 "Volume group "ubuntu-vg" not found"

When I upgraded to Ubuntu 18.04 and rebooted I had the "Failed to start session" error. Pressing ctrl+alt+f1 I found myself in a terminal, and used sudo apt-get install --reinstall ubuntu-desktop, then rebooted.  After entering my encryption pass, I see this error:  WARNING: Failed to connect to lvmetad. Falling back to device scanning. Volume group "ubuntu-vg" not found Cannot process volume group ubuntu-vg WARNING: Failed to connect to lvmetad. Falling back to device scanning. Reading all physical volumes. This may take a while... Found volume group "ubuntu-vg" using metadata type lvm2 WARNING: Failed to connect to lvmetad. Falling back to device scanning. 2 logical volume(s) in volume group "ubuntu-vg" now active /dev/mapper/ubuntu--vg-root: recovering journal /dev/mapper/ubuntu--vg-root: clean, 487053/30203904 files, 66914067/120783872 blocks WARNING: Failed to connect to lvmetad. Falling back to device scanning. Volume group "ubuntu-vg" not found Cannot process volume group ubuntu-vg WARNING: Failed to connect to lvmetad. Falling back to device scanning. Reading all physical volumes. THis may take a while... Found volume group "ubuntu-vg" using metadata type lvm2 WARNING: Failed to connect to lvmetad. Falling back to device scanning. 2 logical volume(s) in volume group "ubuntu-vg" now active /dev/mapper/ubuntu--vg-root: recovering journal /dev/mapper/ubuntu--vg-root: clean, 487053/30203904 files, 66914067/120783872 blocks   This message is shown for 1-4 seconds, after that it just goes black and then it shows the same message again. Nothing happens when I press anything, except if I press alt+f3 (or similar) the login terminal can be seen briefly, before going completely black and continuing the loop.  I'm new to Ubuntu. How can I solve this?


What are the incompatibilities of pdftex, xetex and luatex?

[Please correct me if my statements are wrong]  TL;DR: pdftex, xetex and luatex exhibit different behaviour. What are these differences and why are they present.    I know of three engines, which implement TeX and support native PDF output: pdftex, xetex and luatex. Unfortunately they are not completely compatible.  pdftex is an ɛ-TeX engine, which is downward compatible to Knuth-TeX, i.e. there will be not difference in the typeset output of pdftex and tex (breakpoints, pagebreaks, ligatures, dimensions, etc. are exactly the same).  Example of an Incompatibility  This is not true for xetex and luatex. I just know of one obvious incompatibility which I will support by a MWE in a moment. To prevent a ligature, Knuth suggest several alternatives in the TeXbook in exercise 5.1     {shelf}ful or shelf{}ful, etc.; or even shelf\/ful, which yields a shelfful (w/ ligature) instead of a shelfful (w/o ligature). In fact, the latter idea—to insert an italic correction—is preferable because TeX will reinsert the ff ligature by itself after hyphenating shelf{}ful. (Appendix H points out that ligatures are put into a hyphenated word that contains no “explicit kerns,” and an italic correction is an explicit kern.) But the italic correction may be too much (especially in an italic font); shelf{\kern0pt}ful is often best.   Thus having the following plainTeX document should always result in the ff ligature being disabled  shelf{}ful \bye   pdftex  The output of tex and pdftex is as expected    luatex  But for luatex I obtain    xetex  For xetex I get the same as for pdftex    but as soon as I load an OpenType font as in  \font\test="CMU Serif" \test shelf{}ful \bye   the ligature reappears    Another example (which turned out to be a bug)  The code  ${}\limits$ \bye   will typeset without any complaint under luatex whereas it will throw the error  ! Limit controls must follow a math operator.   with pdftex or xetex.  This example will also throw the appropriate error for luatexversions > beta-0.79.1.  Summary  In the end my question boils down to several points:   What are the incompatibilities of xetex and luatex with pdftex? Why did the designers choose to break compatibility with Knuth? Can I restore compatibility by making specific design choices (i.e. breaking ligatures with \kern0pt instead of {})?     N.B.: Please don't get too caught up by the example. I'm not asking for a solution to this specific problem. If you are searching for a solution to it, visit those links         List of known incompatibilities  Here I collect links to questions/answers which point out some of the incompatibilities.  It is intended for users contemplating to switch engines, but want to known what to watch out for.


How to get smallcaps for a font that doesn't support it?

I have a few artistic fonts that I use in XeLaTeX with the fontspec package. However, they don't support smallcaps out of the box.  Is there a way to tell LaTeX to "fake" smallcaps by capitalizing everything and scaling the lowercase letters down a bit, similar to how Word or OpenOffice do it?   Minimal example, even though it's pretty obvious:  \documentclass{report}  \usepackage{fontspec}  % Really any font that doesn't include small caps definitions \newfontfamily\titlefont{Old London Alternate}  \begin{document} \titlefont \scshape Test Text \end{document}   The Test Text is not rendered in small caps, as it would be if the font supported small caps.  Thanks for pointing me to , which works fine in general, but has the drawback that it fails on UTF-8 encoded files with non-ASCII characters, which I need to use. If you have an idea how to modify that answer to also support non-ascii characters, please let me know.


How can I make a Puppet module that fixes time?

I have written a Puppet module that corrects the time via NTP, but this only works on server with a small NTP offset.  There are sometimes server with a time offset higher than 10 minutes for various reasons.   I want to make a Puppet module that runs exec "service ntpd stop; ntpdate ntp3.domain.local; service ntpd start" when the ntp offset is too high, to forcably correct the time.  How can I see if the NTP offset is too high in order to tell Puppet to run this command? Or are there better solutions?


Preparing to travel, how to boot same windows 10 installation on multiple computers, using just one hard drive to go? Is it reliable?

I need to boot the same windows installation from my pc and laptop as well, where I will find all of my installed applications and settings and whatnot.  I have done this in the past and it has worked when moving from old pc to new one, but I don't know if this is reliable or if I am even supposed to do this every two weeks.   So far I have only worked from my desktop where I feel most comfortable working than laptops. But I need to travel more on the upcoming months and I'll be carrying a laptop. It's going to be such a pain constantly trying to sync applications and setting between every time I need to head out and come back and switch between my pc and laptop.   What should be solution here instead of syncing back and forth? Will the hard drive swapping reliable?  Should I instead setup a vm? Anyone used it so far or daily use? In my experience it seems a bit laggy.   I want to continue working on my desktop when I'm home and only use laptop on the go.  I also don't mind buying additional windows licenses if I need to.


What do I if I used "Reset All" or "Erase All Content and Settings" on a jailbroken iOS Device?

I recently received an iOS device and it was jailbroken. When I wanted to unjailbreak it, I used "Erase All Content and Settings." The loading screen came on and it has not changed. After rebooting the device, it is now stuck at the Apple logo. What should I do?


What are the differences between "should live in Japan" & "should be living in Japan"?

Ok, see , here is this tense matrix                     Past - Present - Future Simple Continuous Perfect Perfect Continuous   We also have the same tense structures for Modals                     Can - May         - Might - Must - Could - Would - Ought to Simple                 may do Continuous             may be doing Perfect                may have done Perfect Continuous     may have been doing   I would think the differences between "must live in Japan" & "must be living in Japan" are:  Must here refers to a very high possibility. Things that you think is very likely to happen.  Ex: She must live in Japan (we also have "She lives in Japan" which means she lives there more or less permanently)  And when you want to emphasize a continuous process, say "She must be living in Japan" (we also have "She is living in Japan" which means she lives there more or less temporarily)  Ok, "must, might" are easy, but what about "should"?  My question is that: What are the differences between "I should live in Japan" & "I should be living in Japan"?  Does "I should live in Japan" mean "I should live there more or less permanently"  & "I should be living in Japan" mean "I should live there more or less temporarily"?  Note: "must" here refers to possibility not obligation. She must live in Japan (=it is likely that she lives there at this moment), not (She have to live there) as if it is obligation  "should" here refers to advice.


How do align intertext with math instead of an awkward space?

When you use the \intertext in the \align* environment with the amsmath package, it has a small vertical space between the displayed text and equation even though it is still coded on the same line as the equation.   In a regular line of code, you can type \intertext{text} (generic equation) on the one line. Yet, when it is compiled, it visual output shows a small vertical space between the text and the equation that I did not add manually.  I am using \intertext because it is left-aligned and I don't want the equation itself to be left-aligned, just the text, but it should also be on the same displayed line as the \intertext.


How is the age of the universe theorized?

There are statements in wiki like:     The current measurement of the age of the universe is 13.799±0.021 billion (109) years within the Lambda-CDM concordance model.   My question is how does scientists theorize this value, by relying on which observed facts and data?


Compute $\sqrt{x} \pmod p$ working on finite fields.

I was wondering about how $\sqrt{x}$ is handled while working over finite modular fields.  As we know, we cannot get decimal values while working over prime modular fields.  So for example, the operation $\frac{a}{b}$ will be computed as: $a * b^{-1} \pmod p$ NOTE: It's a modular inversion.  But which is the way of handling $\sqrt{x} \pmod p$  assuming that $x$ is a value that will give a fraction as a result as for example $x\ =\ 411$ ??  Thanks.


I think I can use stars and bars here to find how many combinations of 4 non-negative integers sum to 15, but how do I then count the number of unacceptable cases- i.e. where one of the integers is greater than 9?


What's the difference between "would" and "will" in the following context?

How would he do that?   And     How will he do that?


Rendering a specific set of frames in one job

I want to render every 2nd(or even) frame and every 5th frame that end in '5' is it possible to do that in one render job.....not very good at scripting but will take any advice I can get


How to wipe a USB flash drive without a computer

I have a USB flash drive that's become unreadable in any computer. It has a lot of confidential information on it which I need to wipe before sending it back to the manufacturer for a warranty replacement.  What would be the best way to do this given that I can't get any computer to read the drive and format it?


I want to setup wake-on-demand as described  so I can remote wake up my computer and ssh into it while I am oversea.  My iMac did not have ethernet connection and I want to wake-up it using Wifi.  Thats what I have:  iMac 27-inch, Mid 2011, Software  OS X 10.9.1 (13B42)  AirPortExpress, version 7.6.4  Raspberry-pi  ISP-provided router (Technicolor TG582n)  My Raspberry-pi is always on so it is fine if I need to ssh into it first to wake up my iMac.  I have follow the instructions provided in the article for iMac. But I don't know how to actually wake up my computer.  From Bonjour Browser, I can see that my AirPortExpress is publishing _sleep-proxy._udp so I think it have Bonjour-Sleep-Proxy on.    For some reason, I found this line in the log     mDNSResponder[47]: BeginSleepProcessing: en1    not capable of magic packet wakeup   whereas en1 is my wifi interface. But from System Information  en1:   Card Type:    AirPort Extreme  (0x168C, 0x9A)   Firmware Version: Atheros 9380: 4.0.74.0-P2P   MAC Address:  04:54:53:0f:c9:b1   Locale:   APAC   Country Code: ES    Supported PHY Modes:  802.11 a/b/g/n   Supported Channels:   1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140   Wake On Wireless: Supported <--- is this lying to me?   AirDrop:  Supported   Status:   Connected


Route 53 going from www domain version to naked

My domain used to use www, which I was ableto get rid of using Route 53.  Now if I type abcd.example, it correctly shows what used to be on www.abcd.example.  The problem is, I have a handful of links  with the www version, which will no longer respond, although its routed to the EC2 instance.  What can I do with this?


I want to check if a given command exists in bash and I care only about the native commands of the bash and not the scripts written by the user. When I refer to native commands I mean all those commands that are generally available to a user.   There are two commands  command -v type   that can be used to check if the command exists. But it also returns a true for user written scripts whereas I want to restrict myself just to the inbuilt commands.  Note: I am not just trying to distinguish between a bash builtin and other commands because  type -t touch  gives file as the type, but this is a command available to the user by default. But if the user writes a script and then tries to run it then I would like to filter that.  Any help is appreciated.


I secured a visa for the US. What happens once I arrive at a US port-of-entry seeking admission into the country?

I have secured a visa for the US, be it an ESTA or another visa requiring me to go for an interview. My understanding is that obtaining a visa for the US does not guarantee me entry into the country. Rather, :  Entering the United States A visa allows a foreign citizen to travel to a U.S. port-of-entry (generally an airport) and request permission to enter the United States. A visa does not guarantee entry into the United States. The Department of Homeland Security (DHS), U.S. Customs and Border Protection (CBP) officials at the port-of-entry have authority to permit or deny admission to the United States. If you are allowed to enter the United States, the CBP official will provide an admission stamp or a paper Form I-94, Arrival/Departure Record.  What happens once I arrive in one such port-of-entry? Will I have to go through customs checks? Will I have to talk to an immigration officer explaining my reasons for visiting the US? What documentation, if any, should I bring? Is the documentation I brought for the interview enough? What if I did not attend an interview since it was not required (for example if I obtained an ESTA online)?


Template Function yields undefined reference error

I am trying to implement a Template function of the Manhattan Distance for vectors that have any type (int, float etc) of coordinates, in C++.  So I have this:  template <typename T> T manhattan_distance(std::vector<T> v1, std::vector<T> v2) {      //implementation }   When trying to use it (in another file), I do as follows:  std::vector<int> v1 = [1,2,3]; std::vector<int> v2 = [4,5,5]; int res = manhattan_distance(v1,v2);   When make-ing, I get this error:    undefined reference to `int manhattan_distance<int>(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'   What is the issue? The function is not in a class. Am I missing something? Thanks in advance!


Proving idempotent elements in $\mathbb{Z}_n$

I'm working in $\mathbb{Z}_n$ under multiplication  (not addition) for some time now and I'm beginning to notice something: For $n \in \mathbb{N}$ where $n$ is even and $\frac{n}{2}$ is odd, it seems to be always true that $\frac{n}{2}$ is idempotent, i.e. $(\frac{n}{2})^2 \equiv \frac{n}{2}$ mod $n$ when $n$ satisfies the aforementioned definition. So I wanna try to prove this but I don't know how to approach it. My first thought was induction since this iterates across $n \in \mathbb{N}$ satisfying my definition of $n$.  Proof Let $n \in \mathbb{N}$ such that $n$ is even and $\frac{n}{2} = 2k+1$ for some other $k \in \mathbb{N} \cup \{0\}$ (Note that $k$ could equal $0)$ Define $P(n)$ as the statement:$(\frac{n}{2})^2 \equiv \frac{n}{2}$ mod $n$ Our basis case would be $P(2): (\frac{2}{2})^2=(1)^2 \equiv 1$ mod $2 \equiv \frac{2}{2}$ mod $2$ So $P(2)$ holds as true. Assume $P(i)$ is true for some $i \in \mathbb{N}$ where $i = 2(2k+1)$. Inductively, then we have: $$P(i+1): (\frac{i+1}{2})^2 =  ?? $$  Then I get stuck here and don't know how to proceed. Obviously, I can't do much once I put $k$'s into the equation because $k$ can be any number. All we know about $k$ is that $k \leq n$ by how we defined $n$.


Why would the number of columns in the "Stack Exchange Network" section in the footer vary?

The number of columns in the "Stack Exchange Network" in the footer varies. For example, the Science section has 2 columns, but there are still 10 more unlisted sites. Why don't they be listed? Apparently there are rooms for that, because in the Technology section it has 7 columns. Why is that?


Change colors of \mobile, \address and \title in Modern Cv

EDIT : How could I put in bold what is before \email ? Something like \email{\textbf{bla bla}} doesn't work.  When using moderncv to create my CV, I type the following commands :  \documentclass[12pt,a4paper]{moderncv} \moderncvtheme[blue]{classic}                 \usepackage[utf8]{inputenc} \usepackage{color} \definecolor{nav}{rgb}{0.22,0.45,0.70}% light blue \usepackage[inner=2.2cm,outer=2.2cm,top=1cm,bottom=2cm]{geometry}      \firstname{Name}     \familyname{\textsc{Name}}     \title{Name}           \address{Name}{Name}       \mobile{045454}                   \email{aaa@aaa.fr}         \begin{document}     \maketitle     \end{document}   I would like anyhting there in this "nav" color, \mobile and \address symbols included.


How can a Paper be sent to "Under Review "so quickly?

I had submitted a manuscript to an SCIE indexed journal 1 month ago. I had selected an Associate Editor for my manuscript.  The journal website said  that if my manuscript is not deemed fit for peer review then I will be informed and it will be rejected.  To my utter surprise the paper showed the status "Under Review" from Day 1. I dont understand how can an Editor so quickly find reviewers.  Till date after 1 month it is still showing the status "Under Review".  Should I send an email asking the Associate Editor regarding the status of my journal or is it too early to enquire about it?  I am in a fix.However I dont know how can a Paper be sent to "Under Review "so quickly.  Any comments on this will be helpful.


I am having trouble getting .shp layers to "line up" on QGIS.  Now, I opened them both in ArcGIS and noted there that they had the same projection. I opened them up in a text editor, and just to be sure, copied the data from one .prj file into the other. Reopened them in Arc and had no problems whatsoever.  However in QGIS I can't get them to come into the same map. I've tried every combination of CRS / Layer menu options that I can think of, nothing seems to work.   They seem to have the same Projected Coordinate System, but different Geographic Coordinate Systems: this I assume from going to the full extent, and note that both layers are on the map but hundreds of KM apart.  I tried setting them to the same GCS in QGIS properties, but then they both vanished. ("Zoom to Layer didn't work, they were gone.)   Is there are process I should be following here?   If the data were corrupted, wouldn't duplicating the .prj data be enough to fix the problem? If it's a GCS issue, how do I change that?  Mostly I'm looking for a process I can apply every time I import data to QGIS so I'm guaranteed to work around any CRS issues.


Convergence of the series $\frac{1} {n} \sin(nx) $

I've been trying to work out the solution to this problem. Consider $\forall x \in \mathbb R $ the series $$\sum_{n=1}^{+\infty} \frac{1} {n} \sin(nx) $$ Find the values of $x$ for which the series converge (pointwise, uniformly or absolutely). My attempt: It is obvious that for every $x \in \mathbb R $, we have $ \vert \sin(nx) \vert \le 1$, and if we take the points $x=\frac{\pi} {2n}$ our series is exactly the harmonic series and it doesn't pass the Weierstrass M-test. So our series is not absolutely and uniformly convergent (at one time). Then if we take the points $x=k\pi, k \in \mathbb Z$, our series converges to 0, very easily. For the other values of $x$, I tried using other common tests, such as ratio and root test (I get the inconclusive 1), and figuring out useful bounds for the sequence, but didn't succeed. I suspect it converges, but I don't know how to go on. Am I mistaken? Are there any other tests?


Prove that $\sum_{n=1} 1/n^p$ converges uniformly for any $p > 1$

Can someone please give me a formal proof that $\sum_{n=1} 1/n^p$ converges uniformly for any $p > 1$? By the $p$-test, we know that such a series converges, but that doesn't speak to the uniform convergence of the series.


Skype installation problem in Ubuntu 16.04.02 LTS

I tried to install Skype by using below commands:  sudo dpkg --add-architecture i386 sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" sudo apt-get update && sudo apt-get install skype   On Ubuntu 16.04 but it shows error saying:  Reading package lists... Done Building dependency tree        Reading state information... Done Package skype:i386 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: skype-bin:i386  E: Package 'skype:i386' has no installation candidate.   How can I solve the problem and install Skype?


How are Authoritative Name Servers' IPs resolved

I realized I don't understand a pretty basic thing about DNS. So, here's the flow  Assuming nothing is cached, When I open stackoverflow.com, the request goes to the root, then to the .com TLD registry, which in turn returns the name server (NS record) for the stackoverflow domain, i.e. cf-dns01.stackoverflow.com. Q1: Does the TLD only return only the NS records for the domain?  After that, the request goes to cf-dns01.stackoverflow.com., which has and returns the A record(s) (=IP(s)) of stackoverflow.com.  Q2: where is the IP address of cf-dns01.stackoverflow.com configured, i.e. how is the authoritative name server's IP resolved? Especially in this case, when the name server is a subdomain of the domain it has to resolve.


I've had a  on coding-style, but I often read in the comments of some questions, that such questions are unwelcome on Stack Overflow even though there is still a  tag. So I searched for a Stack Exchange site which could be right for my question. My question is: could I post my question on Stack Overflow?


How to see $\cos x \leq \exp(-x^2/2)$ on $x \in [0,\pi/2]$?

Can anyone help me with the above inequality? I tried looking at the series expansion and I guess the answer indeed lies there, but I fail to see it.  Thanks


Derivative of $|x|$ using definition of the derivative.

Using the definition: $f’(x)=\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}$ i try to find the derivative of the absolute value function. My first two steps are, $f’(x)=\lim_{h\to 0} \frac{|x+h|-|x|}{h}$  rewritten as $\lim_{h\to 0} \frac{\sqrt{(x+h)^2}-\sqrt{x^2}}{h}$ It’s at this point that I’m not sure about my last step, and if it’s correct then I’m lost on how to proceed in order to get the h cancellation to evaluate the limit. I apologize if this is a duplicate. Thank you.


When you call the object.__repr__() method in Python you get something like this back:    <__main__.Test object at 0x2aba1c0cf890>     Is there any way to get a hold of the memory address if you overload __repr__(), other then calling super(Class, obj).__repr__() and regexing it out?


The arrow of time and the cosmology of a black hole interior

When solving the Einstein field equations in Schwarzschild metric for an observer falling into a black hole the radial coordinate r of the black hole and time t switch roles in the equations when r<2M.    If we transform into the resting coordinate system of an observer inside a black hole, the timelike geodesics will be along the radial dimension of the black hole. Would an observer inside the event horizon of a spherically symmetric black hole observer the radial dimension of the black hole as time? If yes, is it safe to assume that the laws of thermodynamics would hold inside the black hole, in which case the singularity of the black hole would as a zero entropy state be in the past along the radial "time" axis and the high entropy event horizon would be in the future along the same?  What would the cosmology of a spherically symmetric black hole look like from the perspective of an observer inside the black hole. It seems to me that from the perspective of an observer within the event horizon of the black hole:   The observable universe originates from a singularity (black hole singularity) The observable universe expands along the radial (time) dimension The exterior of the black hole is not observable from within the black hole There would be future boundary conditions defining the faith of the interior (event horizon) The interior in other than radial dimension would be relatively uniform for a static black hole   How does time behave inside a black hole from the perspective of an observer inside the black hole? Could such an observer see the interior of the black hole as a universe relatively similar to ours (assuming the arrow of time would be along the radial axis of the black hole).


Why does $a^{b}·a^{c}=a^{b+c}$ ?  I want proof for it, I asked professor and he replied: "I don't know, it's a property anyway that is true and that's all what you need to  know."


How to embed drupal content in other sites (remove X-Frame-Options: SAMEORIGIN)?

I tried to make a iframe with a drupal page but I received the following message:      Multiple "Refused to display (page adress) in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'."   Then, I tried to change the header of response in page controller using  $response->headers->set('X-Frame-Options', 'GOFORIT');  And I received the following message     Multiple 'X-Frame-Options' headers with conflicting values ('GOFORIT, SAMEORIGIN') encountered when loading '(page adress)'. Falling back to 'DENY'.   Drupal core puts the following code in all responses.  $response->headers->set('X-Frame-Options', 'SAMEORIGIN', FALSE);  So, how can I override the X-Frame-Options header for only this response to embed this page in other sites?  I'm using Drupal 8.0.0.


i dont understand here why put (*) in the argument what is mean?

hello guys I did not understand why we put * here   def print_people( # here # *people # here #): for person in people:     print("hello" + person)   print_people("blabla" , "love" , "blabla")


Suppose there are 15 people consisting of 8 women and 7 men.

How many ways are there to form a committee with at least 3 women and at least 2 men?  My answer is $2^{15}- 2^7\binom{8}{0}-2^7\binom{8}{1}-2^7\binom{8}{2}-2^8\binom{7}{0}-2^8\binom{7}{1}$ = 25984  but the answer given is 26280. Can someone tell me where I got wrong? Thank you!


Understanding the square of the group of units for 3-adic numbers

My final goal is to understand the group $\mathbb{Z}_3^*/(\mathbb{Z}_3^*)^3$. However, I am having a hard time understanding how exactly an element in $(\mathbb{Z}_3^*)^3$ looks like. In this case $\mathbb{Z}_3$ is the ring of 3-adic numbers. I'm quite lost in this and any hint, help or reference for this will be helpful. Thanks!


Random intercepts distribution looks normal but multimodal. Does this still follow the normality assumption?

My model gives me random intercepts in which the distribution looks like:   The model is as follows: mod <- lmer(response ~ 0 + item + (1|id), family = binomial)  Is this still a valid random effects distribution or does this indicate that there's something wrong with my model ?  Edit: this is the distribution of the random intercept of the model above. It was extracted using ranef() in R. This is what it looks like in the bigger picture.     When I increase the bin size, it looks like this:   Edit2: This model is an Item Response (IRT) model (or Rasch) Basically I have a list of patients and their answers to several survey questions. The answers of this survey are binary (e.g. do you exercise at least once a week, etc)  This then transformed into item-response format (wide: patient_id, Q1, Q2, ...Qn to long: patient_id, item (which is Q1,..,Qn) and response (which is the answers to the item column)  Then I fit this data into IRT above, extract the random intercepts as an indices to measure their health level (sort of)


Let $\phi : E \to E'$ be a bi-Lipschitz map between metric spaces. Show that $E$ is complete if and only if $E'$ is complete.   I'm unsure of how to construct this proof. I know from a previous exercise that if $(x_n)$ is a Cauchy sequence in $E$, then $(\phi(x_n))$ is a Cauchy sequence in $E'$, if required.   Many thanks!


First time Mac user. I am confused by the fact that the finder application is always open. For example, when switching apps with Cmd+Tab, it is always there, even when there are no windows opened for the app. Cmd-tabbing to Finder with no windows/tabs opened for it has no effect (it seems to me it would more intuitive to open a new tab when this action is chosen).   Furthermore, there is no 'Close app' option when I right click the Finder icon in the dock. Am I misunderstanding something about the Finder app? Is it required for proper functioning of Mac OS? From what I see, Finder is just a file browser, which by no means should be forced to be open 100% of the time.


Beamer file that was working is now failing at line 1

I had an old presentation in beamer that I wanted to update.  It worked previously, but now, when I run it, I get an error:  !Undefined control sequence. 1.1 \beamer@endinputifotherversion   Here is a minimal example  \documentclass{beamer} {   \mode<presentation> {   %\usetheme{Goettingen}   % or ...    \setbeamercovered{transparent}   % or whatever (possibly just delete it)   \usecolortheme{albatross}   \usecolortheme{sidebartab} }  \usepackage{natbib} \usepackage[english]{babel} % or whatever  \usepackage[latin1]{inputenc} % or whatever  \usepackage{booktabs} \usepackage{listings} \usepackage{times} \usepackage[T1]{fontenc} % Or whatever. Note that the encoding and the font should match. If T1 % does not look nice, try deleting the line with the fontenc.  \usepackage{listings} \usepackage{url} \lstloadlanguages{SAS} \lstset{language = SAS}   \setbeamercolor{navigation symbols}{fg = white, bg = white} \setbeamercolor{sectionintoc}{fg = white}  \title[PROC LOGISTIC: Traps for the unwary] % (optional, use only with long paper titles) {PROC LOGISTIC: Traps for the unwary}   \author{Peter L. Flom} % - Use the \inst{?} command only if the authors have different %   affiliation.  \institute[Peter Flom Consulting] % (optional, but mostly needed) {Peter Flom Consulting}  \date[Short Occasion] % (optional) {NESUG\\ September, 2008}  \subject{Talks} % This is only inserted into the PDF information catalog. Can be left % out.  \AtBeginSection[] {  \begin{frame}<beamer>     \frametitle{Outline}     \tableofcontents[currentsection]   \end{frame}  }   % If you wish to uncover everything in a step-wise fashion, uncomment % the following command:  %\beamerdefaultoverlayspecification{<+->}   \begin{document} \begin{frame}   \titlepage \end{frame}  \begin{frame}   \frametitle{Outline}   \tableofcontents[pausesections]   % You might wish to add the option [pausesections] \end{frame}   \section{Introduction} \begin{frame} \frametitle{Introduction - 1} \begin{itemize} \item  This paper covers some `gotchas' in SAS\textsuperscript\textregistered\ PROC LOGISTIC. \item  A `gotcha' is a mistake where the program runs, there may be a note or a warning, but no errors. \item  Output appears. But it's the wrong output. \item  Not a primer on PROC LOGISTIC, nor on logistic regression. \end{itemize} \end{frame}  \begin{frame} \frametitle{Introduction - 2} Each section has several subsections. \begin{enumerate} \item The `gotcha'. \item An example. \item Evidence you have that it occurs. \item How to fix it  --- sometimes with references \item Explanation (where needed) \end{enumerate} \end{frame}  \end{document}   I have no clue what is wrong here.


What is the difference between [@] and [*] when referencing bash array values?

says:  If the index number is @ or *, all members of an array are referenced.  When I do this: LIST=(1 2 3) for i in "${LIST[@]}"; do   echo "example.$i" done  it gives the desired result: example.1 example.2 example.3  But when I use ${LIST[*]}, I get example.1 2 3  instead. Why? Edit: when using printf, @ and * actually do give the same results.


What is ~ means in Linux how it works?    cd ~/   I am using it with CD command, but don't know how it is working.


How to prove that exponential kernel is positive definite?

The exponential kernel is defined by:  $$k(x,z) = e^{-\alpha\|x-z\|}$$ where $\alpha>0$, $x,z\in \Bbb{R}^d$, $\|x\|$ is the 2-norm.  The kernel matrix is defined by $K_{ij} = k(x_i,x_j)$, $i,j\in[1\ldots n]$.  How to prove that $K$ is a positive (semi-positive) definite matrix?


Let $𝑓$ be a one-to-one function from the set of natural numbers to itself such that $𝑓(𝑚𝑛) = 𝑓(𝑚)𝑓(𝑛)$ for all natural numbers $𝑚$ and $𝑛.$ What is the least possible value of $𝑓(999)?$  What I think is that I have a hunch for the answer and follow the intuitions, any help?


Django model default sort order using related table field

Is it possible to set the default sort order for a model to a field from a related model (rather than the integer key) i.e. something that yields a SQL order by clause with a field from both models? If so, how? I can do this via query_by but I can't figure out how to set it by default. Thanks.  class Foo(models.Model):     name = models.CharField(max_length=50)  class Bar(models.Model):     related = models.ForeignKey(Foo)     bar_date = models.DateField()      class Meta:         ordering = ('bar_date', 'related.name', )


Creating an instance from a class defined by a string

In a namespace I have an arbitrary number of classes fulfilling an interface IModel. Given the name of a class as a string, I want to instantiate that class and store the resulting object in a variable of type IModel.   As I have no experience in reflection, I did not figure out how to do it.


How is Captain America able to use Mjolnir to command lightning?

In , Captain America is able to wield Thor's hammer because he is worthy.  What I don't get is why he was able to use lightning bolts!  In Thor: Ragnarok, Odin tells Thor that Mjolnir was not the source of his powers. It was simply a tool to control his power. That means that Mjolnir doesn't create bolts of lightning, but rather helped Thor (the God of Thunder) control his powers.  So, how was Captain America able to use lightning bolts?


I have button when i click on it i want to Visible the Paragraph using jquery CSS function.By Default Paragraph is in hidden mode.
This is a paragraph1.

This is a paragraph2.

This is a paragrap3.
  <button>Click To show</button>   But this is not working i am interested to pass the value and based on the value i want to visible the particular paragraph.   var v=p2;   So when i click on the button and pass the value as "p2" i want to visible only paragraph second.


Find all values for a and b where the series converge?

I need to find all values of $a,b>0$ for which the series converge. I know that a geometric series converges if $|r| < 1$ but how can I find all the values for which the series converges in general?  $$ \sum_{n=0}^{\infty}(a^{n} - b^{n}) $$


Did an additional $32 billion necessarily get invested into Amazon.com stock on October 26th, 2017?

The share price went up about 6.9%, and the market cap is $466 billion. Does that mean that that much new money had to have been invested after hours? Would it otherwise be possible for the stock price to go up like that?


In Return of the Jedi we see Leia wearing a  helmet.     In   (By Inferno's Light) we see a prisoner wearing what appears to be the same helmet.   My question is: In DS9 episode 5.15 (By Inferno's Light) is one of the prisoners wearing Leia's Boushh helmet from Return of the Jedi?


If $k$ divides $n$ then there's only one subgroup of $G$ of order $k$

Let $G$ be a cyclic group of order $n$ generated by, say, $g$. Show   that if $k$ divides $n$, then there is one, and only one, subgroup of   $G$ of order $k$, and that this is generated by $g^{n/k}$.   I can see it being true if we take $n$ to be prime. The $k$ is either $1$ or $n$, thus if $k=1$, then the subgroup of order $1$ will be generated by $e$ and if $k=n$, then the subgroup will be $G$ itself generated by $g$ which is true since $n$ is prime.  How about in a case where $n$ is not prime?


Did Darth Sidious and Vader ever discover how to cheat death?

In Episode 3 Revenge of the Sith Palpatine/Sidious strings Anakin along to the dark side with the promise that together the two of them will be able to re-discover Darth Plagueis' secret to cheating death.      "To cheat death is a power only one has achieved, but if we work together, I know we can discover the secret."   From the end of Revenge of the Sith to their deaths in Return of the Jedi did Darth Sidious and Darth Vader ever manage to re-discover this secret?


I looking into writing my own init.d scripts to control several services running on my Linux server. I came across an example online which contained:  nohup $EXEC_SCRIPT 0<&- &> $LOG_FILE & echo $! > $PID_FILE   From what I understand:   nohup Catches the hangup signal  $EXEC_SCRIPT is a variable containing the command to be run  0<&- &> Not come across this before $LOG_FILE similar to $EXEC_SCRIPT but contains the log file path & starts logging to $LOG_FILE in the background? $! is the PID of the most last background command > writes the result of $! to the $PID_FILE   I can work through it with this knowledge but the 0<&- &> is completely throwing me off. I don't like to include things that I don't at least partially understand first.


memoir, hyperref, \MakeTextLowercase and \cftchapterfont

Using the combination \MakeTextLowercase and \cftchapterfont in the memoir class with the hyperref package causes strange issues when attempting to make the table of contents’ chapter titles minuscule.  \documentclass{memoir} \usepackage{hyperref} \renewcommand*{\cftchapterfont}{\MakeTextLowercase} \begin{document} \tableofcontents \chapter{This Is a Chapter} \end{document}     The first errors are like this, and then follows a load of missing/extra {/} and control sequences.  ! Undefined control sequence. \find@pdflink ...ode \protected@edef \Hy@testname                                                   {#2}\ifx \Hy@testname \@em... l.1 ...entsline {chapter}{Contents}{1}{section*.1}   I think some packages/fonts have an option to always use minuscule small caps, but I want to use garamondx and from my reading of the garamondx manual, I have yet to find a way. How can I make hyperref behave?


No SHA-1 collisions are actually known, though there are a number of cryptographic attacks to weaken it.  But, how likely is it that, of all the SHA-1 hashes computed since the invention of the algorithm, there has been a collision?  Not sure how to approach this, but it probably involves the Birthday Problem?  (if there's a better SE to ask this in, let me know)


Can a sorcerer cast the same spell twice if enough spell slots are available?

In D&D 5e, let's say that I have two level-1 spell slots available and want to cast Burning Hands. On one turn, I use one of the available spell slots to cast Burning Hands. On my next turn, I have one additional spell slot available. Am I allowed to use it for Burning Hands, or do I need to select a different spell to use the remaining spell slot?   I am asking this because I was told by someone more experienced that it doesn't work that way, but I thought the rules said otherwise.


How can I delete polygon nodes in Carto Builder?

Editing a polygon is possible by clicking on it, and the edit "pencil" icon appears, allowing you to drag or even add new coordinates. There is, however, no way to delete coordinates, as far as I can tell, except by doing an update function using SQL and manually finding and typing in the lat-long coordinates. That would be immensely tedious, since the coordinates' locations in my map are based on visual appearance rather than any quantitative relationship.


Einstein described his discovery of the equivalence principle as the "happiest thought of my life".  Why?  What, in broad conceptual terms, is the logical chain of reasoning that leads from the equivalence principle to general relativity?


Command run is not the one returned by the command `which`

$ which doxygen /home/gauthier/bin/doxygen $ $(which doxygen) -v 1.8.13 $ doxygen -v 1.8.11 # <- ??? $ doxygen error: Doxyfile not found and no input file specified! Doxygen version 1.8.11 Copyright Dimitri van Heesch 1997-2015 # ... doxygen's help $ type -a doxygen doxygen is /home/gauthier/bin/doxygen doxygen is /home/gauthier/bin/doxygen doxygen is /usr/bin/doxygen   I'm trying to setup a new version of doxygen, to use in parallel to the one already on my machine.  I downloaded binaries, placed them somewhere in /opt, and created a symlink to them in my ~/bin, which is in my PATH.  As seen in the terminal paste above, running doxygen does not seem to call to the same binary found by which doxygen.  What might be going on?


How to debug the script in logs for shell script?

I am having a script which i have set in the debug mode:  set -x #!/bin/sh  ALLCIRCLS="/var/tmp/release/ALLCIRCLS.txt" NONRBTIPS="/var/tmp/release/NONRBTIP.txt" RBTIPS="/var/tmp/release/RBTIPS.txt" NONRBTIPGNOCIP="/var/tmp/release/NONRBTIPGNOCIP.txt" NONRBTROOTIP="/var/tmp/release/NONRBTROOTIP.txt" LOGFILE="/var/tmp/release/log_result.log" release="/var/tmp/deployment/*"  for IP_ADDRESS in $(cat $NONRBTIPS); do    echo "TEST FOR ${IP_ADDRESS}" >> $LOGFILE    scp -r /var/tmp/deployment/* test@${IP_ADDRESS}:/var/mnt/promptbase/prompts/local_cms >> $LOGFILE    if [ $? -ne 0 ] ; then       echo "Secure copy is failed " >> $LOGFILE       exit 1    else       echo "Secure copy is successfull"    fi done   As it is in debug mode I am getting output as described below:  + ALLCIRCLS=/var/tmp/release/ALLCIRCLS.txt + NONRBTIPS=/var/tmp/release/NONRBTIP.txt + RBTIPS=/var/tmp/release/RBTIPS.txt + NONRBTIPGNOCIP=/var/tmp/release/NONRBTIPGNOCIP.txt + NONRBTROOTIP=/var/tmp/release/NONRBTROOTIP.txt + LOGFILE=/var/tmp/release/log_result.log + release='/var/tmp/deployment/*' ++ cat /var/tmp/release/NONRBTIP.txt + for IP_ADDRESS in '$(cat $NONRBTIPS)' + echo 'TEST FOR 172.19.117.198' + scp -r /var/tmp/deployment/ID_MB4_W2JUL19 test@172.19.117.198:/var/mnt/promptbase/prompts/local_cms   I would like to keep my terminal clean and print all the debugging of the script in the log file using $LOGFILE?


Excel - Disable AutoFormatting on Import

How can I stop Microsoft Excel from auto formatting data when imported from a text file?  Specifically, I want it to treat all of the values as text.  I am auditing insurance data in excel before it is uploaded to the new database.  The files come to me as tab delimited text files.  When loaded, Excel auto-formats the data causing leading 0's on Zip Codes, Routing Numbers and other codes, to be chopped off.    I don't have the patience to reformat all of the columns as text and guess how many zeros need to be replaced.  Nor do I want to click through the import wizard an specify that each column is text.  Ideally I just want to turn off Excel's Auto-Formatting completely, and just edit every cell as it were plain text.  I don't do any formula's or charts, just grid plain text editing.