How many zeros are there in $ 25!$ ? My answer was $6$. But i solved it by finding how many numbers are divisible by $5$ and $2$.here i was told to find out the zeros at the last end. But what is the method which is more accurate and can find out the number of zeros in eg $1000!$ or $10000!$ in the following cases: 1.Just at the last end 2.In the number altogether Or even the general method of finding the number of zeros in n! ?

Here is a riddle someone has been asked in a job interview: How many zero digits are there in $100!$?  Well, I found the first $24$ quite fast by counting how many times five divides $100!$ ($5$ divides $20$ times and $25$ divides it $4$ times).   However, there are more zero digits in the middle of the number (these can be found by hand, by typing factorial(100) in sage).  My question is whether there is a smart way to determine the number of zero digits in $100!$, and more generally in $n!$.  By the way, this will not affect the job interview as it was finished some time ago.


I am now using ubuntu12.04 with kernel 3.2.0-48. Where can i find some logs which will help me to find the reason? sorry for my poor english.

So, if there is some problem with my computer, be it hardware or software, what are the major log files and where are they located?  Also, is there a generic location where log files of the other packages might be located?


I recall reading that this is a no-no.  Makes sense, b/c the pattern/relationship may dramatically change outside of the interval.  My question is:  Is there a rule for this convention?  Interpolation vs. extrapolation?    Like if you have a correlation between auto price to auto mileage, and the range of miles is within 0 to 100k miles, you should not try to estimate the cost of a car with 120k miles.  Just estimate cars with 0 to 100k miles.    Is "extrapolation" totally invalid, or simply done with a disclaimer?

I computed a simple linear regression model from my experiment measures in order to make predictions. I have read that you should not calculate predictions for points that depart too far from the available data. However, I could not find any guidance to help me know how far I can extrapolate. For example, if I calculate the reading speed for a disk size of 50GB, I guess the result will be close to the reality. What about a disk size of 100GB, 500GB? How do I know if my predictions are close to the reality?  The details of my experiment are:     I am measuring the reading speed of a software by using different disk   size. So far I have measured it with 5GB to 30GB by increasing the   disk size of 5GB between experiments (6 measures in total).   My results are linear and the standard errors are small, in my opinion.


class Gui():     var = None     def refreshStats(args):         print(str(var)) clas = Gui() clas.refreshStats()   Trace  File "sample.py", line 5, in refreshStats     print(str(var)) NameError: name 'var' is not defined.   Why?

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


Both of the following questions also deal with the same issue, I don't believe this is a duplicate as this question   describes steps to create the situation described in the first when   not doing a merge (as discussed in the second)      Reference 1:         Reference 2:      I was able to reproduce this problem myself.  Here is how I did it.   I was in the middle of editing a question when it was closed.   I hit the save button and I got the banner saying I could not post because the question was closed.  A comment notification appeared and I clicked on it to look at the comment.  I hit the back button on the browser.  I was now able to hit the save button and post my answer.  Here is the question in question:     In reference to the grace period I believe this is a bug because the banner came up and I could not post the answer.  After moving off the page and coming back I was able to post the answer.  So the bug is one of two things   I should not have gotten the banner when I tried to post the first time I should not have been able to post when I returned to the page

I merged a question on programmers.stackexchange.com earlier today and 20 minutes or so later someone came along and answered it. Shouldn't that have been impossible?  Here's the . It was merged into .  Is it possible to merge the answer now or should the user repost manually?


I asked a question over on StackOverflow and got two answers to my question. The one answered my question in the most technical sense, but an integration of the two answers received is what I used in my actual code, since that actually delivers the result I was looking for.  I couldn't have done it without the two answers I received, but who do I give credit now? Which one should I mark as "correct"? Or should I answer my own question, mark it as correct, and just up-vote the other two? I just want to be fair to the people that helped me and give them the credit they deserve, I couldn't do it without them.  This question is different to the one  because without the one answer, the other doesn't entirely do what I want it to do, and vice versa.  Here is my question if you're interested:

In the following situations, which answers should I accept?   I have ask a question and get two identical answers. Sometimes, none of the answers completely answers my question.  But, I will get a complete answer if I combine two of them together. Suppose someone answers my question but I'm not sure it really helps me so I leave a comment. Then another person explains it to me and helps solve my problem. Should I accept the answer given by the first person?     Example for 3rd case:--  Here  answer was given by Marc but explained in details by Barry. So should I accept the answer given by Marc. I have told Barry that he can post his comment as answer but he did not do that.


I'm making a character for an indie game project aimed for the pc platform using unreal engine. I currently have 15 materials for every part, are they too much? If so, How many should I use? Texture Resolution used is 2k

Recently, I am trying to create 3D models for my own game project. However, when I do some researches on game models, I come up with the term - game-ready models and I could not find any clear definition online. Could anyone tell me about what exactly is game-ready models and how to know if my 3D models (created by Blender mainly) is suitable for games.  From what I know by far, quad topology is preferred in Blender. However, for most of the game engine, triangle topology is preferred (Please correct me if I am wrong). Does it mean I have to manually change the models in Blender from quad topology to triangle topology before importing to the game engine?  Thanks for any helps.


If not, is there any other way to say this? (I'm looking for synonyms, not rewordings such as "Others thought well of him.")

Like many others, I commonly find myself ending a sentence with a preposition.  Yes, it makes me cringe.  I usually rewrite the sentence, but sometimes (in emails) I just live with it.  To, with... you know who you are.  Should I keep fighting myself on this one, or is it okay in some circumstances?


Why is a field with no modifier visible in a subclass?  My super class:  public class SuperClass {  String s = "superString";      public void method(){        System.out.println("Super");     }  }   My sub class:  public class Test extends SuperClass{  public static void main(String args[]){     Test t = new Test();     System.out.println(t.s);   } }   I get no error message from eclipse, the program prints out: superString...  But it shouldn't as no modifier fields are only visible in the class and the package but not in sub classes, or what have I misunderstood? Thanks

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


I'm copy-editing a long text with lots of double whitespaces in between words and am wondering whether the latex compiler will remove these automatically, or whether I'll need to replace them with single whitespaces manually.  If it doesn't (remove them automatically), is there a way to make it do so?

I suppose this is too general of a question, but why does    \underbar{word}    give different answer from    \underbar{ word}    and then additional blanks do not count   \underbar{     word}


Good Morning everyone.  I am working on the title page of my thesis and since I am totally new in Latex I'm having some problem that I guess I am not able to fix.  From this code my purpose is to have a good symmetry between the two logos that I would like to be on the same line withe the two text precisely under each of them.  Then I would like the text "" little bit close to the center in respect to the left margin and to be at almost the half of the page.   Lastly I would like to put a straight line just over the date and the academic year (pushing them on the bottom of the page) in order to keep the symmetry with the top of the page.   I guess are not so difficult things but you have to know the right commands to do them, can anyone help me?   Thanks in advance   \documentclass[a4paper,12pt]{book} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{amsmath} \usepackage{hyperref} \usepackage{fancyhdr} \usepackage{bm} % {\bm ... }  \usepackage[absolute,overlay]{textpos}  % textblock \pagestyle{fancy}  \newcommand{\xx}{ {\bm x } }  \begin{document}  \begin{titlepage} \newcommand{\HRule}{\rule{\linewidth}{0.2mm}} \center \begin{textblock*}{3cm}(8cm,0.5cm)     \centering\includegraphics[width=3cm]{logo2.png} \end{textblock*}  \textsc{\LARGE Università degli Studi di Torino}\\[0.2cm] % Name of your university/college  \HRule \\[0.5cm]  \textsc{\Large Tesi di Laurea Magistrale in\\ Fisica dei Sistemi Complessi}\\[0.5cm] % Major heading such as course name \textsc{\large Dipartimento di Fisica}\\[0.5cm] % Minor heading such as course title  \HRule \\[0.4cm] { \huge \bfseries Master Thesis}\\[0.4cm] % Title of your document \HRule   \begin{textblock*}{7cm}(1cm,13cm)         \begin{flushleft}             \includegraphics[width=7cm]{Nordita_logo.pdf}\\[1.1cm]     \textbf{\emph{Supervisor at Nordita:} \\         Prof. Ralf \textsc{Eichhorn} }     \end{flushleft} \end{textblock*}  \begin{textblock*}{5cm}(15cm,13cm)     \begin{flushleft}             \includegraphics[width=3cm]{logo1.png}         \textbf{\emph{Supervisor at Turin University:}\\             Miguel \textsc{Onorato} }     \end{flushleft} \end{textblock*}  \begin{textblock*}{5cm}(1cm,17cm)     \begin{flushleft}         \textbf{\emph{Candidato:}             Kim \textsc{Nicoli} }\\             \textbf{\emph{Matricola:}              \textsc{766461} }\\     \end{flushleft} \end{textblock*}  \vspace{12cm}  \thispagestyle{empty}  %\vfill % Fill the rest of the page with whitespace {\large \today}\\ {\large Anno Accademico 2016-2017}    \end{titlepage} \end{document}

The standard titlepage is quite simple. I am looking for a very  and need help customizing my title page.  It should match the  classicthesis doctoral thesis template  Below a minimal working example:   \documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook} \XeTeXinputencoding iso-8859-1 \usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}  \usepackage[parts,pdfspacing,dottedtoc]{classicthesis}    \frontmatter  \begin{document}     \pagestyle{scrheadings}        %this is the place to set up my cover sheet.       %*******************************************************      % Abstract     %*******************************************************    %\renewcommand{\abstractname}{Abstract}    \pdfbookmark[1]{Résumé}{Résumé}   \begingroup    \let\clearpage\relax    \let\cleardoublepage\relax    \let\cleardoublepage\relax       \chapter{Résumé}     Résumé de la thèse en français\dots      \vfill      \chapter*{Summary}   Résumé de la thèse en anglais\dots    \endgroup             \vfill     \end{document}


What is the power series of a half-exponential function?  Half-exponential means that $f(f(x)) = y^x, y > 1$

I was thinking, inspired by mathlinks, precisely from , if there exists a continuous real function $f:\mathbb R\to\mathbb R$ such that $$f(f(x))=e^x.$$ However I have not still been able to come up with an answer. I would like to share this problem with you.   I'm not aware of its level, though i wouldn't classify it as homework, so I'm not giving it the homework tag. If anybody feels that this problem is in reality easy or looks like an homework, please feel free to add that tag.    EDIT for those interested in the complex case, I've found this on MathOverflow. It's the first answer. Wow!


When I try to use "authorname et al" in the author field of my bibliography.bib, this is interpreted as part of the first author's name, and hence is not presented correctly. How can I use et al in my references list?

I'm using Jabref to manage my Bibliography.  Sometimes, I put directly:     First Author et al.   when adding the article author's name in Jabref.  When compiling my .tex file, LaTeX doesn't recognize the et. al as more names. It takes it as a name/surname.  This is an example of a Bibliography entry in Jabref.  @ARTICLE{Wolf2003,     author = {Wolf, K.et al.},     title = {Compensation mechanism in tumor cell migration: mesenchymal–amoeboid     transition after blocking of pericellular proteolysis},     journal = {J. Cell Biol.},     year = {2003},     volume = {160},     pages = {267–277},    }   This is a .texMWE with the bib entry mentioned:  \documentclass[11pt]{book}   \usepackage{cite}   \bibliographystyle{unsrt} \begin{document}   Here is the bib entry mentioned\cite{Wolf2003}    \bibliography{bibfile}  \end{document}   Here's the output:   How can I solve this problem?


I messed up when I created my original repo. Instead of making the project folder the repo I made it parent folder the project. So it looks like this: Repo:  The actual project unrelated stuff more unrelated stuff  Is there a way to make the actual project the repo, without destroying all the history of the files if I'll try to move it/delete the other stuff?

I have a  repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository.  How can I do this while keeping the history of the files within the subdirectory?  I guess I could make a clone and remove the unwanted parts of each clone, but I suppose this would give me the complete tree when checking out an older revision etc. This might be acceptable, but I would prefer to be able to pretend that the two repositories doesn't have a shared history.  Just to make it clear, I have the following structure:  XYZ/     .git/     XY1/     ABC/     XY2/   But I would like this instead:  XYZ/     .git/     XY1/     XY2/ ABC/     .git/     ABC/


A friend claims that because there is a 50% chance for a coin to land on heads, the fact that the last three coin flips landed on tails means that there is a higher chance for the coin to land on heads with the next flip. Could you explain this problem with this reasoning?

Original simple question:  "Given a fair coin that has been tossed 100 times, each time landing heads, would it be more likely that that the next coin flip be tails or heads"  The proportion of head to tails is 1 to 1 as number of trails approach infinity (this is a fact correct?). Therefore, if this must be the case, mustn't there be an enacting "force" per say that causes this state of being to (admitted unreachable, but technically eventual) case? Hence if there exist a force pushing the number of heads and tails towards one another, shouldn't there exist a higher chance of tails than (regardless of how significant) heads? Or is this thought process just illegitimate simple because the state exist on at the infinity case?


I keep seeing this icon (looks like an icon that its loading something) and don't know what it means.    Using the app in Canada (where its not officially out yet) if that helps.

I noticed, that when I freshly connected into the game (or sometimes during playing) a pokeball appears which probably symbolizes loading (see screenshot).  But what does it indicate ...   ... Server issues? ... Client connection issues? ... Location service issues? ... Other problems?     In this example the server seems to be one problem as the bar in the right bottom, which displays near pokemon, is empty. Is this assumption correct?  Another hint for this is the empty shop page:    I couldn't find a site where I can check the server status as well.


I'm using ubuntu 16.04LTS on intel Core i3-6006U, 2.0GHz Asus pc.When I boot the pc I realized that there are some hard drive problems and it's not able to boot on ubuntu. I tried the answer mentioned in this question:  and I run this command:  fsck -fy /dev/sda2    After that I rebooted the pc and it's able to boot on ubuntu successfully.However when I run :  apt-get update   I got many warnings and errors mentioned that the file system is read-only.  I tried different propositions mentioned in this question:  such as:   sudo fsck -Af -M mount -o remount / it returns : mount: cannot remount /dev/sda2 read-write, is write-protected   and the other solutions mentioned in the question but no vain.How can I fix this? Should I reinstall ubuntu or does this due to a hardware problem?

I've run across (personally or by proxy) a bunch of storage media that exhibited physical problems during their life. Hard disks, solid state drives and other flash storage media all fail after some time. The situation is worse with USB flash drives and flash cards because of the large amount of suppliers with inferior flash cell and flash controller quality.  How can I reliably detect if a storage drive suffers from physical damage?  Note that this question isn't about file system integrity (which can be checked with ).


I know that there are infinities of different magnitudes for countable things (e.g. via Cantor's diagonal argument), and that the ratios of the sizes of two such infinities may itself be infinite. However, how do ratios of infinities work for uncountable things? And can the ratio of two infinities of uncountable things be finite? Consider an infinitely large two-dimensional plane, consisting of a point $p$ and two unit vectors $v_1$ and $v_2$ rooted at $p$. Divide the infinite plane into two regions: $A$, the region of space spanned by the "wedge" centered at $p$, the "short way around" between $v_1$ and $v_2$, and $B$, the remainder of the plane (the "long way around"). The areas $|A|$ and $|B|$ are infinite, however it would seem that $|A| \over |B|$ is finite, since if a circle of any nonzero radius centered at $p$ is intersected with $A$ and $B$, the ratio of the areas of the two intersected regions would always be be the constant value $\theta \over {2\pi - \theta}$, where $\theta = cos^{-1}{{|v_1 . v_2|} \over {|v_1||v_2|}}$. (Actually maybe I am mistaken, and points on a plane are countable, by extension of Cantor's argument to two dimensions...)

Recently, I was wondering how division of aleph numbers would work. First, I thought about how finite cardinality division would work. What I came up with was that the result of $A/B$ where $A$ and $B$ are both cardinalities, is the number of times that each element of $B$ had to be mapped to an element of $A$ in order to ensure that all elements of $A$ were mapped to.  Extending this to aleph numbers, specifically, I thought that $\aleph_1/\aleph_0$ would be $\aleph_1$. The reasoning behind this is that there are an infinite ($\aleph_1$) number of real numbers between any two natural numbers. As such, that mapping would need to be applied.  Can anyone validate this idea? Is this how division of aleph numbers actually works, or am I totally off base?  Thanks.


How would I rotate the view port along the axis from my forehead to the monitor, like as if I was tilting my head (but more like tilting the viewport)

How do I rotate the viewport around the local (to the view port) - Z axis?  Basically what you would  get if you were to hit R with the camera selected in camera view.


I have a MDB file that can't be opened. It seems like it's corrupted. Is there a best practice how to fix that?  I've already tried this tool StellarPhoenixAccessDatabaseRepair but it didn't help.  I need to make this file works again...  Thanks

I'm at a client doing some quick fixes to their access application. It was a while I had a go with access, but I'm recovering quickly. However, I've discovered an interesting problem:  For some reports, I get a "Record is deleted" error. I've checked the reports, and it seems like there's a problem with one table. When opening that table, I find a record where all columns are marked "#deleted". So obviously, this row seems to be the culprit. However, when I try to delete that row, nothing really happens. If I re-open the table, the row still exists.   Is there a corruption in the db? How can I remove this record for good?  Edit: It's a MS2000-version  Solution: Simply compress/repair did not work. I converted the database to the 2003 file format instead, which did the trick. I've marked the first answer suggesting compress/repair, since it pointed me in the right direction. Thanks!


I am trying to determine whether $\sum_{k=m}^n {k \choose m} = {n+1 \choose m+1}$, so far I am assuming that this is a false statement, but was wondering if there was a proof indicating this is a true statement.

Let $n$ be a nonnegative integer, and $k$ a positive integer. Could someone explain to me why the identity $$ \sum_{i=0}^n\binom{i+k-1}{k-1}=\binom{n+k}{k} $$ holds?


I understand that the terms snap, crackle and pop aren't exactly official terms but I needed a compact title about various derivatives of position with time.  A body at rest has all it's time derivatives of position equal to $0$. When it starts to move it gains velocity. So it's velocity has changed implying acceleration. Acceleration has changed implying jerk and so on. So even the $1,000,000th$ derivative is not 0. Am I right about this or is there some flaw to my method?  If I'm right about this. So once the body starts to move why is it that we only consider the derivatives up to acceleration, hardly consider jerk and rarely mention higher derivatives? Intuition tells me that one the body starts to move, any change in speed can be attributed to acceleration and that takes care of everything and we need not consider anything beyond. But I would like to have a feel of the real answer. An amateur like me told me that higher derivatives are not considered for such problems and not even for some differential equations as the derivatives are small and ignoring them will result in a negligible error. The answer feels sound for engineering but not for theoretical physics. Is she right to say it's okay to ignore tiny values?  Also does it signify anything interesting when derivatives up to the 1000th derivative are all varying?   Either this is a valid question or I'm fundamentally flawed. Forgive me for wasting your time if it's the latter.  EDIT:  this is not a duplicate in any way. The question similar to mine assumes advanced knowledge of lagrangian mechanics and the category it came under was differential geometry and field theory. My question is on Newtonian mechanics and neither do I have the mathematical background to understand the answers to the other question. In fact I don't know enough Mathematics to understand the other question itself. ;-)

What is the reason for the observation that across the board fields in physics are generally governed by second order (partial) differential equations?    If someone on the street would flat out ask me that question, then I'd probably mumble something about physicists wanting to be able to use the Lagrangian approach. And to allow a positive rotation and translation invariant energy term, which allows for local propagation, you need something like $-\phi\Delta\phi$.  I assume the answer goes in this direction, but I can't really justify why more complex terms in the Lagrangian are not allowed or why higher orders are a physical problem. Even if these require more initial data, I don't see the a priori problem.  Furthermore you could come up with quantities in the spirit of $F\wedge F$ and $F \wedge *F$ and okay yes... maybe any made up scalar just doesn't describe physics or misses valuable symmetries. On there other hand in the whole renormalization business, they seem to be allowed to use lots and lots of terms in their Lagrangians. And if I understand correctly, supersymmetry theory is basically a method of introducing new Lagrangian densities too.   Do we know the limit for making up these objects? What is the fundamental justification for order two?


This is my first question in StackOverflow, I normally am able to find the answers to my questions online but this particular one I can't make work. So, I'm making a text-based game in c++ and I'm using inheritance and polymorphism in it. I want to store Equipment (derived) in an inventory of Items(base) and then use dynamic_cast to get the properties of the derived class. I made a small example that represents what I'm trying to do and what can be done. (Notice that I know that it is caused by object-slicing I just want to understand why it just doesn't work with arrays but works with the rest). #include <iostream>  using namespace std;  class Equipment {     public:     int i = 20;     string s = "nothing here";     Equipment(){};     virtual ~Equipment(){}; };  class Weapon: public Equipment {     public:     int V = 900;     Weapon(){}; };  int main2(Equipment* e) {     Weapon& weapon3 = dynamic_cast<Weapon&>(*e);     cout << weapon3.V << endl;     return 0; }  int setEquipment(Equipment* e) {     Equipment &equipment = *e;      Weapon& weapon2 = dynamic_cast<Weapon&>(*e);      Equipment* inventory;     inventory = new Equipment[3];     inventory[0] = *e;      Equipment &equipment2 = inventory[0];      Equipment inventory2[3];     inventory2[0] = equipment;      Equipment *inventory3[3];     inventory3[0] = &equipment;     inventory3[1] = e;      cout << weapon2.V << endl;     cout << "METHOD A: "; // WORKS FINE     main2(&equipment);     // cout << "METHOD B: "; // DOESN'T WORK     // main2(&equipment2);     // cout << "METHOD C: "; // DOESN'T WORK     // main2(&inventory[0]);     // cout << "METHOD D: "; // DOESN'T WORK     // main2(&inventory2[0]);     cout << "METHOD E: "; // IT ALSO WORKS!!!!!!     main2(inventory3[1]);  }  int main() {     Weapon weapon1;     setEquipment(&weapon1); }  I wanted to implement something like METHOD C in my code. I tried to implement METHOD E in my actual code but I'm getting a lot of bad_alloc errors. (All the methods that don't work on the example gives me a std::bad_cast error).

Someone mentioned it in the IRC as the slicing problem.


I simplify the problem. I wanna know why this can't compile:  Error message: undefined reference to 'Foo<int>::j'  a.h  #pragma once template<typename T>   class Foo{     public:         int bar(){             return j;         }     private:         static int j; };   a.cpp  #include "a.h" template<typename T> int Foo<T>::j = 3;   main.cpp  #include "a.h" #include <iostream> using namespace std;      int main() {       Foo<int> f;       cout << f.bar();       return 0;     }

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


In R I tried to measure the accuracy by performing a classification analysis using logistic regression analysis. I found that there are two ways to measure accuracy. One is AUC measurement using ROC curve and the other is accuracy using confusionMatrix.  When confusionMatrix is used, the probability exceeding 0.5 is regarded as 1, the value less than 0.5 is regarded as 0, and it is judged whether or not it matches the actual value.  If so, what should be considered as the model accuracy? Obviously, the values of AUC and confusionMatrix obtained from one algorithm are different. What is the different?

I have a binary classification problem and I experiment different classifiers on it: I want to compare the classifiers. which one is a better measure AUC or accuracy? And why?  Raondom Forest: AUC: 0.828  Accuracy: 79.6667 %            SVM: AUC: 0.542  Accuracy: 85.6667 %


I am using GIT with TFS for the version control in my android studio   What is use of TFS here with GIT. Becuase GIT has default control in studio. What does TFS does here

What are the differences between git pull and git fetch?


I want to ask a  in , but whenever I click the , it loads(Pre-filled) the fields with old question. See the below screenshot or check this recorded .  Note: I already submitted that  yesterday, but don't know why it saved as draft.        And also I faced a similar issue  yesterday

I've seen lately that new question editing is stored somewhere for later use if we wander off the new question without posting it and then return back to the page. Which is a good functionality addition in it's own right.  What I'd like to also have is the Discard this draft functionality that would clear form data and forget it. Somehow we find an answer in the meantime and the question isn't valid any more.  So having a Discard saved draft or something similar would be a nice contra-functionality to auto-save to remove stored data. The way it's implemented now seems too hidden hidden and unpredictable to users.  Additional edit  When adding hidden auto functionality usually means creating the opposite as well by either giving the possibility to preference of not having automatism at all or giving the possibility to clear what's been auto saved.  Let's see how GMail doesn't work (and I think we all agree that from UX perspective it does the job as expected:   User clicks Compose message User starts writing a new email message User decides to not send the message and checks their inbox User clicks Compose message again A clean form is presented to user (old one being part of drafts)   I'm not suggesting we should have something like Saved drafts but we surely should have the possibility to clear previous question draft.  Since this new functionality was introduced I should point out that I would use the discard functionality more frequently than the saved one. I do welcome saving messages, but discarding of saved drafts is anything but a rare situation one might want to do. It wouldn't be a problem if this was a 1% against 99%. To me it's more like 50/50.  Best possible solution  When providing saved drafts there should (from the UX perspective) be the opposite functionality as well. Namely discarding of it. But first thing we should be asking ourselves is:    do users more frequently need pre-filled saved question draft or do users more frequently need empty form with the possibility to populate it with a saved draft   User testing should provide the usage frequency between the two and the one that's more likely to happen (my guess is that there would be a big difference between the two) should be implemented. So one of these:   Pre-populate question fields with saved draft on question form load, while also providing a button to clear the draft and start writing anew without the need to manually clear all the fields (which would be the optimal solution in case of a single field form) Question form should always load empty while also having a button that would pre-populate it with a saved draft.   I think this would be the best consensus related to saved question drafts and their usage. But as we've seen this issue has been swept under the rug for an indefinite time.


Whenever I was to store something to show someone here, I run  command-with-output | pastebinit.   That returns the link to the paste online. For example:  echo sometext | pastebinit   gave me the link    Which I can share. How can I do this with a file - for example a log file. Surely I don't have to open - > copy all - > open paste.ubuntu.com -> paste it?

My GUI does not work. I can only see a text terminal. I would like to send my logs to  but I don't know how. Without a graphical interface, I am lost.   Is there any way to submit a file to pastebin without needing any GUI?


I used QGIS 3.2 to load OSM data obtained from Geofabrik as      Layer/ Add Layer/ Add Vector Layer   The problem is that QGIS does not show roads completely compared to the OpenStreetMap website. I converted the .osm format to .xml and searched for the ID of missing line segments from the OSM website. I found out the  tag with the specified ID exists in the XML file so the Geofabrik data is the same as OSM webpage. I also installed QuickOSM plugin in QGIS with no success of loading the whole data. Is it some bugs in QGIS or something else?

In QGIS 1.8 I used the openstreetmap plugin to request data from the server, or open a .osm XML file, which produced 3 layers (polygons, polylines and points) in QGIS.  This was great (give or take the 64bit bug which highly affects the freshly mapped area I work on), but how do I do that in QGIS 2.x?   I can't find any updated documentation about it.  In the vector menu, I've tried importing from osm servers, I get a .osm file, but then I'm stuck. There's a menu option for loading an XML file, but it produces a spatialite db, which apparently only has non-geometry tables when I try to add it as a spatialite layer. If I open the attribute table, I can see node ids, ways and so on, but I can't figure out how to actually make use of them.  I've also tried adding a vector layer from a .osm XML file. I get a gpsbabel window that shows nothing, then finally an invalid data source message in QGIS.


I am a Manual Tester having 2.9 yrs of experience Now that i want to learn Selenium., can anyone tell me what all i need to learn in Java which helps in learning Selenium

I want to learn Selenium WebDriver automation using Java. I have done manual testing before and want to learn automation. I just know the basics of Core Java.   Could you please suggest me the Core topics which one would require to perform test automation using Selenium WebDriver?   What topics on which a tester must concentrate and what topics to ignore in java programming?


My small cakes for example muffins are not rising correctly.  They rise lopsidedly and spill over the paper cases.  Nothing wrong with oven.  I've tried various things, eg wetter mixture, drier mixture, smaller quantity in case, larger quantity in case, it's as if the fan  is blowing the cake mixture off to once side.  Doesn't happen with all my cakes mainly the small ones.  Any ideas ?

I have a very small multi-function oven (about the size of a microwave) and for baking, the recommended setting is the "convection" one.  Things bake fine in terms of taste, but muffins and cupcakes often get a sort of windswept look.  The fan has clearly blown them into a lopsided shape while they're rising, but before they've set.  With cupcakes, it's easy enough to trim them and hide it with icing, but not for muffins.  Is there any way to avoid this effect, other than trying to bake them on a setting without the convection fan?  Does this happen in larger convection ovens as well or is it just because mine is so small?


I am trying to import networkx module in QGIS 2.18.16 but getting the error message. Any suggestions?  Traceback (most recent call last):   File "<input>", line 1, in <module>   File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\qgis\utils.py", line 607, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)   File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\networkx\__init__.py", line 74, in <module>     from networkx import release ImportError: cannot import name release

How to install and how to compile networkx python on QGIS?  I always get an error that no module named networkx in the console of QGIS I copied the file networkx in C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib\site-packages and there are not change.


I use javascript to generate a file and download it.  It seems, that depending on the version of chrome, the download file names can be auto renamed to 'download'. Is there a way to avoid it?  this is my code:  var link = document.createElement("a"); link.setAttribute("href", 'data:application/octet-stream,' + 'file content here'); link.setAttribute("download", 'file1.txt');  link.click();   This is not a duplicated question, because I'm using the latest Chrome and the previously suggested hyperlink is exactly what I'm using. I think, Chrome v34 works fine, but once my Chrome auto updated to v35, it went back to 'download' file name.

If for example you follow the link:  data:application/octet-stream;base64,SGVsbG8=  The browser will prompt you to download a file consisting of the data held as base64 in the hyperlink itself.  Is there any way of suggesting a default name in the markup?  If not, is there a JavaScript solution?


Is there any way to make Windows Explorer list the Files and Folder together and not Folders First?  So Folders and Files are sorted together by file name:  Antelope[dir] Antelope.txt Badger[dir] Badger.txt .... Zebra[dir] Zebra.doc

When Windows Explorer sorts files, it first sorts files from directories and only then sorts each group using the sort specified (My default is DateCreated). I don't like this as the default behavior.   I would like it to be a simple sort (without separating files from folders). Is it possible to change, and if so how?


I update 16.04 and I don't remember my username, can't open my computer how to know username please help.  I tried press and hold shift that didn't work, i also tried clrt+alt+f7 in that screen disappeared.  Please help

When I installed the latest update of Ubuntu, I was asked for the username but I do not remember what my username is. How do I find out what my username is?


If I have some nested and indented statements that echo a multi-line string into a file, the indents from the original shell (in my case bash) will be carried over into the target file.  To avoid this, I remove indents from the echo'ed output, but this loses that indented code formatting in my source, for example,  #! /bin/bash  function configure_default_vhost() {      case "$2" in         [--production])               echo "<VirtualHost *:80> # These lines are "breaking" out of the preffered indenting redirect 404 / ErrorDocument 404 </VirtualHost> " > /etc/apache/sites-availabe/000-default.conf     esac }   I'm aiming to get something as close as possible to this:  #! /bin/bash  function configure_default_vhost() {      case "$2" in         [--production])               echo "<VirtualHost *:80>                     # These lines are aligned with the preffered indenting                     redirect 404 /                     ErrorDocument 404                     </VirtualHost>                     " > /etc/apache/sites-availabe/000-default.conf     esac }   (Note: this question has been listed as a possible duplicate of a HEREDOC related question. I'm not sure where the correct place to respond to this is so I'll put here for now (someone please let know if otherwise). My question is about indenting code blocks, and heredoc is only one of the many ways to acheive this and actually HEREDOC wasn't the solution I went with.)

If there's a "First World Problems" for scripting, this would be it.   I have the following code in a script I'm updating:  if [ $diffLines -eq 1 ]; then         dateLastChanged=$(stat --format '%y' /.bbdata | awk '{print $1" "$2}' | sed 's/\.[0-9]*//g')          mailx -r "Systems and Operations <sysadmin@[redacted].edu>" -s "Warning Stale BB Data" jadavis6@[redacted].edu <<EOI         Last Change: $dateLastChanged          This is an automated warning of stale data for the UNC-G Blackboard Snapshot process. EOI  else         echo "$diffLines have changed" fi   The script sends email without issues, but the mailx command is nested within an if statement so I appear to be left with two choices:    Put EOI on a new line and break indentation patterns or Keep with indentation but use something like an echo statement to get mailx to suck up my email.   I'm open to alternatives to heredoc, but if there's a way to get around this it's my preferred syntax.


How do I detect the file extension of a media file missing its file extension? I accidentally removed it. Self-Answer. The question has been asked already  and , but the questions have been closed.

Sometimes I get the url of a video embedded in a webpage and download it, just to find the file has no extension name. I can play the video with a player, so it must be legal. How do I determine the extension name of the video file in such circumstance?


I have an idea! How about we make a fair-and-square vote about whether we should have a private messaging system or not?  You can make a public announcement in the side bar of all the Stack Exchange websites and make a simple poll where people can vote (anyone, without any reputation restrictions).  CURRENT RESULTS ON POLL: 64% (32)    Yes 36% (18)    No  Edit: Please use the poll here instead so anyone can vote, even without 125 reputation:   EDIT: I don't have time anymore to do this. I have too much work.  See here:  there are quite some answers that are for PMs.  For spam prevention, it could be possible to block a person from sending messages to you.  There should be a private messaging system if someone wants to give a work offer to someone privately, or if you just want to ask them a very specific question only they know the answer to, or if your post is closed and you want to explain why you think the post should be opened, or if you revised the post and want to notify the moderators.  Also, private messaging allows you to contact people without both sides knowing each other's email. So, that means more people would agree to allow people to contact them.     Every user on the StackExchange sites has the right to include contact info on their profile page. If they don't, then they probably do not want to be contacted by email or through a private message.   NOT TRUE! Some people don't put their emails in their profile so that there wouldn't be a hundred accounts created using it by some troll! This already happened to me a couple of times.  Also, I agree that the mods would receive a million PMs hourly, but we can limit Private Messaging to people with high reputation. That would keep spammers out, because you would need to work to get Private Messaging enabled.

There has been quite a few times that I wished I could send a message to another user on SO - not ask a question for everyone to see, but just a short message informing them of something or requesting them to do something.  Are there any plans to allow this to happen in the future?  Related:


I have 4 fields (project_id,domain_name,link_log,url) in unique key in my local database for store unique data,   data like -  project_id(int)--> 1224; domain_name (varchar)--> 'javatpoint.com'; link_log (int)--> 0 or 1; url (varchar)--> ''  according to sql the unique show like.. "1224-javatpoint.com-0-"  i want same unique key in salesforce.

I have an object in which there are two fields i.e Phone no. & email. The combination of these fields should be unique Right now I can create just one unique field But I want their composite to work like a unique field.   I know that I can create composite key in SQL but I dont know how to achieve this in salesforce.


I am trying to create a path with some text like this:    I have tried  \documentclass[tikz,border=10pt]{standalone}  \begin{document}  \begin{tikzpicture}     \draw (0,0) -- (2,0) -- (3,1) -- (5,1) -- (6,2) -- (8,2); \end{tikzpicture}  \end{document}   which produces    but I don't know how to place text at the appropriate places.  I can also draw the red line with the text at the right with  \draw [red] (0,0) -- (8,0) node [above, near end] {text};

actually it's an easy question, but I could find an answer with Google or the included search on StackExchange ;)  How do I add in the middle of the line a node with Tikz? I want somethink like this:  -------------->      text   Normally I did it with an additional node at command. If I will resize the the arrow then I need to change the position of the node also.  ---------->    text   Which is not the best way for big things. I try to find something in the manual and didn't find an answer yet.   Thanks.  Best regards.


I've been playing with the Ubuntu Mini 18.04 LTS ISO tonight and tried to install a ppa for GIMP because 2.8 just won't cut it. The ppa I used is ppa:otto-kesselgulasch/gimp.   Doing apt-get update and apt-get upgrade, it shows that nothing was upgraded. I installed update-manager to see if it can do it, but it claims that my system is up to date.   Looking at the output of the terminal for apt-get upgrade and apt-get install gimp, one thing caught my eye, and 1 not upgraded. I'm not sure exactly what that means and how it can help me, I just have a feeling that's important to this. Here's some terminal output to start with.  james@ubuntu:~$ sudo apt-get update Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]    Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]     Hit:4 http://ppa.launchpad.net/libreoffice/ppa/ubuntu bionic InRelease          Hit:5 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu bionic InRelease  Fetched 177 kB in 1s (288 kB/s)                                 Reading package lists... Done james@ubuntu:~$ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages have been kept back:   gimp-data 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. james@ubuntu:~$ sudo apt-get install gimp Reading package lists... Done Building dependency tree        Reading state information... Done gimp is already the newest version (2.8.22-1). 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.   Output of sudo apt-get --with-new-pkgs upgrade.  james@ubuntu:~$ sudo apt-get --with-new-pkgs upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   Output of apt-cache policy gimp gimp-data.  james@ubuntu:~$ apt-cache policy gimp gimp-data gimp:   Installed: 2.8.22-1   Candidate: 2.8.22-1   Version table:  *** 2.8.22-1 500         500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages         100 /var/lib/dpkg/status gimp-data:   Installed: 2.8.22-1   Candidate: 2.10.8+om-0ubu18.04.3~ppa   Version table:      2.10.8+om-0ubu18.04.3~ppa 500         500 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu bionic/main amd64 Packages         500 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu bionic/main i386 Packages  *** 2.8.22-1 500         500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages         500 http://us.archive.ubuntu.com/ubuntu bionic/universe i386 Packages         100 /var/lib/dpkg/status

I want to Setup GIMP 2.10 on Ubuntu 16.04 (Xenial Xerus) without flatpak.  can it be possible now or on future??


I have 2 files and 1 directory in /home/ubuntu1 /home/ubuntu1 ├── code.py ├── code.pyc └── templates     └── index.html  I'm trying to copy all of them to /home/ubuntu2 I've tried cp *.*, which is to copy only files. I've also tried cp -R, which turns out to copy only directory. Is there a command could be used to copy everything in a directory?

I want to copy a directory from one place to another folder.   sudo cp is the command, but after that what should I type? The destination or source first?


In Dr.Einstein's theory of General Relativity-- he goes to great lengths to explain how the force of gravity is merely an illusion and in the case of the falling apple-- it is the earth accelerating to meet the apple's inertial frame. But it is well known that gravity is one of the four fundamental forces. I would like to know the reason for this apparent contradiction. Is it or is it not a force?

I have studied some of Einstein's Theory of General Relativity, and I understand that it states that gravity isn't a force but rather the effects of objects curving space-time. If this is true, then why are we instructed in middle school that it is a force?


I've got the problem that my little sister got an virus on my laptop, so I had a BSoD all the time, he didn't even boot windows. After a lot changes windows booted and all my data was there too, but now regulary I'm getting a new blue screen. Every time a other error. I think it's an virus who infects all my dll's. I can't even start programs like Firefox... need help how to solve that... can't open anti virus program - seems infected too, on reinstall I got BSoD again and crash... My local time changed too. Got Windows 10 Pro 64x Thank you

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


Prime ideal in $k[x,y]$, which is not maximal, is generated by one element. ($k$ is a field)   Why it is true? I know that dimension of $k[x,y]$ is equal 2 and also that $k[x,y]$ is UFD. I have problems to connect these two facts. I would like any hint.

Suppose that $k$ is an algebraically closed field. Then what do the prime ideals in the polynomial ring $k[x,y]$ look like?   As far as I know, the maximal ideals of $k[x,y]$ are of the form $(x-a,y-b)$ where $a,b\in k$. What can we say about the prime ideals? Are there similar results? And what about $k[x,y,z], k[x,y,z,w]$ and so on. Would someone be kind enough to give me some hints or referrence on this topic? Thank you very much!


There is a slight possibility I could have worded the title incorrectly and  I apologize if this comes across as already answered (and I just have not found it).  Having said that I have searched this site for several hours and have come across several very involved attempts (not clear enough) of using reflection, which I don't want to use because of performance reasons. I am already using Type.GetType() which searches through the .dll to find the type.  So, without further ado, here goes..  I have a method in a class that accepts a generic type:  public class SomeClass {     public TList Execute<TList, TItem>(string text)         where TList : ICollection<TItem>, new()         where TItem : new()     {         TList list = new TList();         TItem item = new TItem();         ...set properties and add to list...         ...implementation not important...         return list;     } }   Usage (calling method):  public void callingMethod(string typeNameString, string typeItemNameString) {     Type T = Type.GetType(typeNameString);     Type Ti = Type.GetType(typeItemNameString);      SomeClass sc = new SomeClass();      // and here is where things falls apart drastically..     // not sure exactly what to do here as it seems noting works     var result = sc.Execute<T,Ti>("hello text"); //no luck..'T' is a variable but used as a type     var result = sc.Execute<Type.GetType(typeNameString),Ti>("hello text"); //no luck...operator '<' cannot be appliedto operands of type 'method group' and 'Type'      //This works fine     List<Invoice> _invoices = sc.Execute<Invoices, Invoice>("hello text"); }  public class Invoice { //properties omitted }  public class Invoices : List<Invoice> {}   This seems like a very straight forward/logical approach, but is proving not to be the case.  What am I missing?  I appreciate the time and dedication individuals take to respond to questions on this forum.

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I'm currently making a custom map in Minecraft, and I'm a bit new to command blocks. I'm trying to have the player put on a player head named "Training Helmet" and then as soon as they put it on they are teleported to a certain coordinate. This is what I have been tying, but it's not working for me (obviously).  In the first command block (repeating, unconditional, activated with a lever):  /testfor @p {Inventory:[Slot:103b,id:"minecraft:skull"{SkullOwner: dannymastr9000},tag:{display:{Name:"Training Helmet"}}}]}   In the second command block (repeating, conditional, always active):  /tp @p -160 102 60   Any Idea on how to fix it? Thanks!

I'm building a CTF map of sorts, using command blocks in vanilla 1.8. I've discovered two commands for detecting if an item is in a players inventory:  /clear @a[team=Red] banner 4 0  /testfor @a[team=Red] {Inventory:[{id:"minecraft:banner"}]}  Those work fine, unless you want to perform a command ON the player carrying that item. For example: I want to cause the player who picks up a banner of the opposite team, to automatically equip that banner in their head slot with a command similar to this:  /replaceitem entity @a[???????] slot.armor.head banner 1 4  Can this be done? If not, is there a way to mark a specific player carrying an item using scoreboards?


I use Ubuntu and TeXLive. When asking a question one is requested to provide an MWE. Sometimes an MWE needs to include an image, which should then be available to anyone who wants to process the MWE. I do not want to make some of my images generally available, e.g., for copyright reasons. By searching back through old questions I found that an image called example-image seemed to be generally available in TeXLive. I also recall seeing a tiger image somewhere or other (try texdoc tiger) but when I tried to include it in a draft MWE I got an error saying file not found. Is there any list/catalogue of images that could be used in an MWE that any TeXLive (or other) distribution would provide.  What I, and I assume others, would like to do is:  \includegraphics[...]{IMAGE}   where IMAGE is generally available, but could be one of a variety of images. My latest MWE would ideally include 12 different images but only uses one.

How to make an example image in LaTeX, a dummy image, a spot holder? I have seen it before, but I can't remember how they would made. It would be nice to be able to use example images - if you should help anyone or you need to question in this community. You might say I could , but I tried - and are obviously too stupid to find anything.  \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[ngerman, danish]{babel} \usepackage[T1]{fontenc} %\usepackage[]{}  \begin{document}  \iffalse \begin{figure} \includegraphics[scale=1]{•}  \end{figure} \fi  \end{document}   Is it also possible to resize the example image? So I need a usepackage to make an image without including an immage. An placeholder so anyone can try my code without needing images - just needing my tex-code. I hope you understand?  Kind regards!


I'm planning to dual boot my laptop with Windows 7 and Ubuntu 13.10. I'm using an HP Pavilion DV6-6140tx laptop, which is packed with AMD 6770M 1GB GPU. For windows, I'm using a third party AMD CCC driver and it works like charm and GPU switching happens butter smooth. I just want to know where I can find the best driver for Ubuntu(for my laptop) ?

I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver?      There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:


The Player's Handbook states that:     Once you cast it this way [with the feat], you must finish a long rest before you can cast it in this way again.   With the new  for the PHB, it says:     Using this feat, you can cast the spell once at its lowest level, and you must finish a long rest before you can cast it in this way again.   Essentially the same statement, just grammatically correct. However, the special attention to "in this way" makes me wonder if this means you may cast the spell for free once per long rest (at first level), but you may also cast the spell using your native spell slots at any level for which you are capable. Is this incorrect?

Can you cast a spell learned from the Magic Initiate feat using spell slots? Say I play a wizard who learns cure wounds by taking the Magic Initiate feat. Could I cast that spell using the Wizard's spell slots?


I'm not a native English speaker and use my native language most of the time.  E.G. when I type in my password in my screen saver, authentication fails as my keyboard layout has been set to my native language instead of English (when I surf the Web, I use my mother tongue almost everywhere).  Also, it's annoying when I'm trying to launch a terminal emulator and perform something, say, ssh access or something else, because if I forget to switch my keyboard layout from what was set in the browser, I misspell a command in the terminal window!  Yes, I know, that one may switch to a "per-application" keyboard layout control. But this is NOT what I want. My question is how can one use all the applications the usual way (need to switch between layouts) except some arbitrary applications, which don't need any typing in my native language (terminal, screensaver password prompt, Synaptic, etc...), because I assume that I will never want to type in something in my native language, say, in the terminal emulator.  So, is there some way to restrict KB layout to English on a per-application basis?  P.S. Also, it would be nice if I could restrict layout to Engilsh for some in-browser elements, say, address bar. What if I know exactly that I will never want to type in anything except WWW addresses there? Can I restrict the input language?

Is it possible to assign default keyboard language for specific applications? I know that there is an option to always start an application with a default keyboard language but this is not what I want.  I'm looking for something similar to "fixed workspaces" which you can set using CompizConfig (You set Chrome to always open at X1Y1, terminal at X2Y1 etc). Something where I would set Chrome: Czech, terminal: English, Spotify: English, ...


I am relatively new to C. I have encountered quite a few segmentation faults but I was able to find the error within a few minutes. However this one's got me confused. Here's a new function I was trying to write. This basically is the C equivalent of the python code       r=t[M:N]   Here's my C code with a test case      #include <stdio.h>      char* subarraym(char* a, int M, int N)     {     char* s;     int i;     for (i=M; i<N; i++){ s[i-M]=a[i]; }     return s;     }     main()    {    char* t="Aldehydes and Ketones";    char* r=subarraym(t,2,10);    printf("%c\n",r[4]);    return 0;    }   The expected answer was 'd'. However I got a segmentation fault. Extra Info: I was using GCC

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I have these problems :   Proof If $AB-I$ invertible then $BA-I$ invertible. Proof If $I-AB$ invertible then $I-BA$ invertible.   I think I solve it correctly, But I'm not so sure, I'll be glad to receive feedback.   If $AB-I$ invertible then :  $$\det|AB-I| \neq 0 \implies \\ \det|A-I||B| \neq 0 \implies \\ \det|B||A-I| \neq 0  \implies\\ \det|BA-I| \neq 0$$    Therefore $BA-I$ invertible.   If $I-AB$ invertible then :   $$\det|I-AB| \neq 0 \implies \\ \det|I-B||A| \neq 0 \implies \\ \det|I-BA| \neq 0$$  Therefore $I-BA$ invertible.

The problem is from  Algebra by Artin, Chapter 1, Miscellaneous Problems, Exercise 8. I have been trying for a long time now to solve it but I am unsuccessful.      Let $A,B$ be $m \times n$ and $n \times m$ matrices. Prove that $I_m - AB$ is invertible if and only if $I_n - BA$ is invertible.    Please provide with only a hint.


So, as the title says, I want to prove that $\left \{ f\in \mathbb{N}^\mathbb{N}\mid f\text{ is injective} \right \}$ isn't countable - by diagonalization. How can I create such $f$ that I cannot count? edit: Let's assume by contradiction that  $\left \{ f\in \mathbb{N}^\mathbb{N}\mid f\text{ is injective} \right \}$ is indeed countable. Lets mark: $f_0 = (a_{00},a_{01},...,a_{0n....}$ $f_1 = (a_{10},a_{11},...,a_{1n....}$ $f_2 = (a_{20},a_{21},...,a_{2n....}$ and so on... Lets create $F' = (a_0,a_1,a_2,...,a_n...$ such that $a_{i}=\begin{cases} a_{ii}+1 & if\;a_{ii}+1\notin \left \{ a_1,...,a_{i-1} \right \}\\ max\left \{ a_1,...,a_{i-1} \right \}+1 & otherwise \end{cases}$ Is this build sufficient?

I want to use Cantor's diagonalisation argument to prove that the set S of surjective functions of the form $\Bbb{N} \to \Bbb{N}$ is uncountable. The normal procedure is creating a matrix and filling it with elements of S and introducing a new surjective function $p$.The problem that I'm having is that I don't know in which way to change the diagonal elements so that $p$ should, but cannot be in the matrix.  Can someone help me, or at least give me some tips?


i m getting strange behavior. when i m accessing my list in QuestionMenuAdapter. I have four classes.  1.TestActivity 2.TestActivityDrawerFragment 3.QuestionMenuAdapter 4.QuestionFetch  what i m doing is that... i m creating the object of QuestionFetch class in my TestActivity class. then i m passing the list of Question (that i m getting from QuestionFetch class) to TestActivityDrawerFragment via setUp method, and here list obtain form TestActivity is passing to QuestionMenuAdapter.  now in QuestionMenuAdapter ,in the onBindViewHolder() i m getting my question one by one .... but i got NPE  below is my Code QuestionFetch Class  public class QuestionFetch { List<Question> questionList=new ArrayList<>();  public List<Question> getQuestionList() {     return questionList; }   public QuestionFetch() {      for(int i=0;i<15;++i)     {          String option[]=new String[4];         Question item=new Question();         item.setQuestion("What is my name"+i);         item.setCorrectOptionIndex(i%4);         item.setNegativeMarks("1/2");         item.setSolution("deepak is name set by mom"+i);         item.setTypeOfQuestion("four");         for(int j=0;j<4;++j)             option[j]="deepak"+(i+j);         item.setOptions(option);         questionList.add(item);      } }   }  now in TestActivity i m creating the object of QuestionFetch Class  questionFetch=new QuestionFetch();     drawerFragment=(TestActivityDrawerFragment) getSupportFragmentManager()             .findFragmentById(R.id.test_navigation_drawer_fragment);      // here passing the list of Questions to setUp method of TestActivityDrawerFragment     drawerFragment.setUp((DrawerLayout) findViewById(R.id.test_drawer_layout),questionFetch.getQuestionList());   now in TestActivityDrawerFragment class  public void setUp( DrawerLayout drawerLayout,List<Question> data) {      this.data=data;}   and in onCreateView passing this list to QuestionMenuAdapter  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     // Inflate the layout for this fragment      data=new QuestionFetch().getQuestionList();     // here is list is in data     adapter=new QuestionMenuAdapter(getActivity(),data);     adapter.setOnClickListener(this);     return inflater.inflate(R.layout.fragment_navigation_drawer, container, false); }   and finally i m accessing my list in onBindViewHolder() in QuestionMenuAdapter class  public class QuestionMenuAdapter extends RecyclerView.Adapter<QuestionMenuAdapter.PageViewHolder>{    Context context; boolean addOrRemoveItemClicked=false; private LayoutInflater inflater; ClickListener clickListener; List<Question> data= Collections.emptyList();  public QuestionMenuAdapter(Context context, List<Question> data) {     inflater = LayoutInflater.from(context);      this.context=context;     this.data=data;     //here i have checked that my question is getting but not in onBindVievHolder    Toast.makeTosat(context,""+this.data.get(0).getQuestion,Toast.LENGTH_SHORT).show();   }  @Override public void onBindViewHolder(QuestionMenuAdapter.PageViewHolder holder, int position) {      holder.customTextView.setText(""+(position+1));    // here i m getting NPE     holder.questionText.setText(data.get(position).getQuestion()); }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Sometimes I come across integrals like this $$\int x^{dx}$$ on the internet. What does this mean? Also, what is the standard nomenclature? Edit- Apparently, this is called a 'geometric integral', see .

If you go to 's YouTube channel and scroll through some of his videos you see him solving the following integral:  $$\int x^{dx}-1$$  he explains that this is a Product integral. My questions are the following:   1 - What is the geometric meaning of a product integral?  2 - does it make sense to have:  $$\int f(x,dx)$$  and if $f(x,dx) = g(x)dx$ then it's just a regular integrals and if $f(x,dx) = g(x)^{dx}$ it's just a product integral?  I'll leave the link to the video .


I'm looking to try out edge modeling a human head in a method similar to the one shown in . I plan on using this , but I can't seem to be able to find a way to set it up like in that video. The method he used to add those reference images is gone in 2.8, and I don't know how to achieve the same effect.  What should I do? What's the best way to set up a background/reference image for edge modeling a head? Are there any ways to do it like in that video?

Cannot find Background Images feature to add in a photo in Blender 2.8  Where is it?


We just recently started using the grapple mechanics in D&D 5e. I was wondering if it was possible to set up multiple opportunity attacks by grappling an enemy creature and then moving it out of your allies reach.   Since it is not specifically forbidden in any of the rulings pertaining to grapple or opportunity attacks, I'm inclined to allow it in my games. This does create a power balancing problem though, giving advantage to the bigger group (which seems only logical). Making an encounter with 10 low level enemies possibly more dangerous then an encounter with 1 high level enemy.  I would like to know if any other DM's have run into this issue, or maybe its no issue at all.

What provokes an opportunity attack?  In 3.X moving out of a threatened square, standing up from prone, casting a spell (unless cast defensively), or making a ranged attack provoked, while in 4e moving out of a threatened square or making a ranged/area attack provoked.


I am running Ubuntu 12.04 TLS. Is there a way to produce an ISO installable image of my current system so as I could burn the image on a flash drive and be able to install it on an other PC ? Please provide details. thanks

I'm a new Linux user. I've reinstalled my Wubi from scratch at least ten times the last few weeks because while getting the system up and running (drivers, , etc.) I've broken something (X, grub, unknowns) and I can't get it back to work. Especially for a newbie like me, it's easier (and much faster) to just reinstall the whole shebang than try to troubleshoot several layers of failed "fixing" attempts. Coming from Windows, I expect that there is some "disk image" utility that I can run to make a snapshot of my Linux install (and of the boot partition!!) before I meddle with stuff. Then, after I've foobar'ed my machine, I would somehow restore my machine back to that working snapshot. What's the Linux equivalent of Windows disk imagers like  or ?  Note: I found a similar question:


From what I understand, pulling in one's arms on a rotating stool would decrease the radius, thus decreasing the moment of inertia. If we decrease the radius enough to halve the moment of inertia, we would double rotational kinetic energy, since the angular velocity (which is squared) would double. If this is so, where is this energy coming from? It doesn't seem as if an external force is doing work on the system. Is there some form of potential energy here being converted to kinetic energy?

This may be a very basic question but I am not seeing how it works. Consider the standard example of an ice skate rotating about his/her center of mass and pulling in his/her arms. The torque is zero so we have conservation of angular momentum. This implies that $\omega$ increases to keep $I\omega$ constant, but then $K_{rot}=\frac{1}{2}I\omega^2$ doesn't stay constant, it increases. This implies that there is work done, but what force is doing this work?


I am running my below shell script from machineA which is copying the files machineB and machineC into machineA. If the files are not there in machineB, then it should be there in machineC.  The below shell script will copy the files into TEST1 and TEST2 directory in machineA..  #!/bin/bash set -e  readonly TEST1=/data01/test1 readonly TEST2=/data02/test2 readonly SERVER_LOCATION=(machineB machineC) readonly FILE_LOCATION=/data/snapshot  dir1=$(ssh -o "StrictHostKeyChecking no" david@${SERVER_LOCATION[0]} ls -dt1 "$FILE_LOCATION"/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] | head -n1) dir2=$(ssh -o "StrictHostKeyChecking no" david@${SERVER_LOCATION[1]} ls -dt1 "$FILE_LOCATION"/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] | head -n1)  echo $dir1 echo $dir2  if [ "$dir1" = "$dir2" ] then     rm -rf $TEST1/*     rm -rf $TEST2/*     for el in $test1_partition     do         scp david@${SERVER_LOCATION[0]}:$dir1/pp_monthly_9800_"$el"_200003_5.data $TEST1/. || scp david@${SERVER_LOCATION[1]}:$dir2/pp_monthly_9800_"$el"_200003_5.data $TEST1/.     done     for sl in $test2_partition     do             scp david@${SERVER_LOCATION[0]}:$dir1/pp_monthly_9800_"$sl"_200003_5.data $TEST2/. || scp david@${SERVER_LOCATION[1]}:$dir2/pp_monthly_9800_"$sl"_200003_5.data $TEST2/.     done fi     Currently it copies the file from machineB and machineC into machineA TEST1 directory first, and if it is done, then only it will go and copy the files from machineB and machineC into machineA TEST2 directory.. Is there any way I transfer the files both in TEST1 and TEST2 directory simultaneously?  I am running Ubuntu 12.04

I have a file servers.txt, with list of servers:  server1.mydomain.com server2.mydomain.com server3.mydomain.com   when I read the file line by line with while and echo each line, all works as expected. All lines are printed.  $ while read HOST ; do echo $HOST ; done < servers.txt server1.mydomain.com server2.mydomain.com server3.mydomain.com   However, when I want to ssh to all servers and execute a command, suddenly my while loop stops working:  $ while read HOST ; do ssh $HOST "uname -a" ; done < servers.txt Linux server1 2.6.30.4-1 #1 SMP Wed Aug 12 19:55:12 EDT 2009 i686 GNU/Linux   This only connects to the first server in the list, not to all of them. I don't understand what is happening here. Can somebody please explain?  This is even stranger, since using for loop works fine:  $ for HOST in $(cat servers.txt ) ; do ssh $HOST "uname -a" ; done Linux server1 2.6.30.4-1 #1 SMP Wed Aug 12 19:55:12 EDT 2009 i686 GNU/Linux Linux server2 2.6.30.4-1 #1 SMP Wed Aug 12 19:55:12 EDT 2009 i686 GNU/Linux Linux server3 2.6.30.4-1 #1 SMP Wed Aug 12 19:55:12 EDT 2009 i686 GNU/Linux   It must be something specific to ssh, because other commands work fine, such as ping:  $ while read HOST ; do ping -c 1 $HOST ; done < servers.txt


This was an equality written in p15, Titchmarsh,      $$ \int_0^{\infty} \frac{ \sin y }{y^{s+1}} \,dy = - \Gamma(-s) \sin \frac{1}{2} s \pi $$   How is this true? The RHS, by definition is equal to  $$ \int_0^{\infty} \frac{ e^{-y} \sin \frac{1}{2} s\pi }{y^{s+1}} \,dy $$ which I do not see how it equates to the LHS.

How can I calculate the following integral:   $$\int_0^\infty x ^{-\frac{1}{3}}\sin x \, dx$$   WolframAlpha gives me $$ \frac{\pi}{\Gamma\Big(\frac{1}{3}\Big)}$$  How does WolframAlpha get this?  I don't understand how we can rearrange the formula in order to apply the gamma-function here. Any helpful and detailed hint/answer is appreciated.


I'm new to unit testing with powermockito and currently i'm trying to test a method that calls java.util.Timer.scheduleAtFixedRate. I've tried to run the test but it failed and showed NullPointerException at the line where an object invoke a method that i suppose my object here is not null. Here is my code, i've summarized the part that may cause the problem. DailyReminderTest.java @RunWith(PowerMockRunner.class) @PrepareForTest(DailyReminder.class) public class DailyReminderTest {      @InjectMocks     DailyReminder dailyReminder;      @Mock     User user;      @Mock     Timer mockTimer;      @Mock     TimerTask mockTask;          @BeforeEach     public void setUp() {         TimerTask task = new MyTask(user);         mockTask = mock(task.getClass());          dailyReminder = new DailyReminder() {             @Override             public Timer createTimer() {                 return mockTimer;             }              @Override             public TimerTask createTask() {                 return mockTask;             }         };     }      @Test     void testRemind() throws Exception {         dailyReminder.remind();  // here is the line where NullPointerException occured         verify(mockTimer).scheduleAtFixedRate(eq(mockTask), any(Date.class), anyLong());     } }  DailyReminder.java public class DailyReminder {      private Timer timer;     private TimerTask task;     private User user;     private Date dateStart;     private final Duration fixedDuration = Duration.of(1, ChronoUnit.DAYS);          // some constructor here...          public void remind() {         timer = createTimer();         task = createTask();         timer.scheduleAtFixedRate(task, dateStart, fixedDuration.toMillis());     }      public Timer createTimer() {         return new Timer();     }      public TimerTask createTask() {         return new MyTask(user);     } }  I also have tried assertNull(dailyReminder) however the stack trace shows org.opentest4j.AssertionFailedError: expected: <null> but was: <Daily Reminder>  which is weird that dailyReminder there wasn't null. Is there any explanation for this?


Ok clearly it is because it is getting so many down votes.   But can something be done so that is stays visible?   Had I not noticed it when I did, I might have missed it.

I just noticed a particular MSE post today on a topic I care about that was posted almost a week ago, which I entirely missed before. I'm a pretty avid MSE user, and this happens quite rarely to me.     was created by an SE employee, and is essentially the final answer to , which is the 10th most upvoted MSE post with a bit more than 900 upvotes right now. So it's kind of an important post, and on a topic I care about, but I still missed it entirely until it was linked in a comment somewhere else.  The reason I missed it is because it's heavily downvoted. This means that as it has below -8 score, it's hidden from the home page entirely, drastically reducing the visibility of the post. In particular, the negative score removes all visibility a question usually receives from being bumped due to edits, new answers and bounties.   Many of the recent heavily-downvoted Meta posts by SE have been featured manually, which grants them a lot of visibility beyond the particular meta site. This masked the problem pretty efficiently, but it is more of a workaround, and one that isn't applicable to all situations.  Voting means something different on meta sites, and not every downvoted question should be hidden from view. Closed downvoted questions can certainly still be affected by the usual rules on the home page, and that should cover the vast majority of questions that actually have a purpose being on the home page. But open questions should be displayed on the home page on meta sites even if they're heavily downvoted.


If you have Area 51 followed, the network drop-down does not display the reputation for the site:    Is this an error or a bug? As with the other quirks of Area 51 mentioned in , it's hard to tell.

is in the list of SE sites of the new top-bar included. But since  it should be in my top 5 sites to be consistent.  BTW I don't get notified about new rep on Area51 as well.


Today I looked at by user page on bitcoin.SE:    I click on "Track the next one >":    ...and it shows that I still haven't earned it.  I checked my badges, and I don't have the bronze transactions badge.

Update:  Thanks for all the feedback and bug reports! I am locking this thread so people don't keep answering it when we no longer monitor it.  If you see a bug or want to raise a feature request, please do so in the usual manner, as a new question.    Some of you may have noticed that  the  and  pages that we have been talking about for a while now on .  Most? Well, yes, the new design is dependent on a SE network-wide update (a new base css framework) that the design team have been working on. This is an ongoing effort and we will be launching the new pages as sites are moved to the new design.  You've all been hugely helpful already - much of what we love most in here came from  and  you gave us on Meta.     But it's possible that it's not quite perfect yet. If you find any bugs and have any feedback to give, please post these as answers to this post.  Just post one issue per answer - that would help us focus on specific items one at a time.


Disclaimer: I'm not asking whether the Big Bang happened at a point. I'm asking whether the fact that the universe is isotropic and that the Big Bang happened contradict each other.  To be honest I am just starting to learn General Relativity and cosmology but I feel like this question has a profound basis. If we assume that the universe "started" by the Big Bang (which I naively imagine as just the expansion of a sphere) then surely it must have started out from a certain point, which is still in our sphere universe. However we also know that the universe is isotropic, that there are no "special" points. How can these two facts coexist since if the Big Bang really did happen then there must be a characteristic point in our universe, a special point, which contradicts the principle of isotropy. So what am I missing, if I'm missing anything?

TV documentaries invariably show the Big Bang as an exploding ball of fire expanding outwards. Did the Big Bang really explode outwards from a point like this? If not, what did happen?


I want to know how to freshly install ubuntu. I currently made a bootable disk, but when I plugged it in and turn my pc on, it doesn't do anything. I was expecting that the window will come up and show me the "on-screen" instructions. I don't think this is problem. I want to know how... Sorry for this "noobish" question.

I would like to see a full how-to guide on how to install Ubuntu.


I'm willing to generate random Colors in Java (using any constructor), but I need them to be not too close to another visually speaking. A variable influencing how close is acceptable would be perfect.  RGB comparison doesn't seem to be quite efficient, according to how our eyes work. I don't want a fixed list either.  Would HSV or HSB work great there ?  Thanks for helping !  Edit : More specifically, I need to display a certain amount of Squares (1 to ~20+) which all need to have distinct Colors that couldn't be confused. I don't want a List (even a big one) because this is what I'm already using, despite having better.

I wrote the two methods below to automatically select N distinct colors. It works by defining a piecewise linear function on the RGB cube. The benefit of this is you can also get a progressive scale if that's what you want, but when N gets large the colors can start to look similar. I can also imagine evenly subdividing the RGB cube into a lattice and then drawing points. Does anyone know any other methods? I'm ruling out defining a list and then just cycling through it. I should also say I don't generally care if they clash or don't look nice, they just have to be visually distinct.  public static List<Color> pick(int num) {     List<Color> colors = new ArrayList<Color>();     if (num < 2)         return colors;     float dx = 1.0f / (float) (num - 1);     for (int i = 0; i < num; i++) {         colors.add(get(i * dx));     }     return colors; }  public static Color get(float x) {     float r = 0.0f;     float g = 0.0f;     float b = 1.0f;     if (x >= 0.0f && x < 0.2f) {         x = x / 0.2f;         r = 0.0f;         g = x;         b = 1.0f;     } else if (x >= 0.2f && x < 0.4f) {         x = (x - 0.2f) / 0.2f;         r = 0.0f;         g = 1.0f;         b = 1.0f - x;     } else if (x >= 0.4f && x < 0.6f) {         x = (x - 0.4f) / 0.2f;         r = x;         g = 1.0f;         b = 0.0f;     } else if (x >= 0.6f && x < 0.8f) {         x = (x - 0.6f) / 0.2f;         r = 1.0f;         g = 1.0f - x;         b = 0.0f;     } else if (x >= 0.8f && x <= 1.0f) {         x = (x - 0.8f) / 0.2f;         r = 1.0f;         g = 0.0f;         b = x;     }     return new Color(r, g, b); }


In the book of pattern recognition and machine learning equation (1.66) says:   Using Bayes’ theorem, the posterior distribution $\bf{w}$ for is proportional  to the product of the prior distribution and the likelihood function.    $$ p(\bf{w}|\bf{x},\bf{t}, \alpha, \beta) \propto p(\bf{t}|\bf{w},\bf{x}, \beta) p(\alpha|\bf{w}) $$  I do know that Bayes's theorem is $P(A,B)=P(A|B)P(B)=P(B|A)P(A)$ but I don't quite know how to derive this so many variable case. Besides, what is the proportion constant, why the remaining is a constant?

According to Bayes' theorem, $P(y|\theta)P(\theta) = P(\theta|y)P(y)$. But according to my econometric text, it says that $P(\theta|y) \propto P(y|\theta)P(\theta)$. Why is it like this? I don't get why $P(y)$ is ignored.


Frederic Schuller claims in his lectures that state of a QM system is NOT a vector in a Hilbert Space. Physicists simply make a mistake here. And they make some complementary mistake elsewhere which makes the effect of this mistake go away. How true is this claim?

Is it true that the states of a quantum system are represented by vectors in a Hilbert space?   When does the term "ray" come into play in this context?


One should be able to mark as answer their own answer to their own question after a certain amount of upvotes.  I think 10 would suffice.  Why the two day wait for a good self-answer!?

I got this message today while trying to accept my answer on my own question.  Why must I wait this time, if I am sure that the answer I answered is the right one, just want to understand the point of view?  I faced that just today on Super user and didn't get this message before.


As far as I understand, pressure acts downwards on a surface of a body in water because pressure $P$ is given by  $$ P = \frac{F}{A} = \frac{m \, g}{A} $$ where $F$ is the gravitational force on the body of mass $m$ with surface area $A$, and $g$ is the gravitational acceleration.    But I cannot see how pressure acts in all directions; namely, at the sides where apparently $F \neq mg$.

I have a final exam tomorrow for fluid mechanics and I was just looking over the practice exam questions. They do not provide solutions. But pretty much I have to define pressure at a point and also say why pressure is scalar instead of a vector.  I am thinking pressure at a point is $P=\lim_{\delta A \to 0} \frac{\delta F}{\delta A}$. Please let me know if I am wrong.   But I do not know at all why pressure is a scalar instead of a vector. I know it has something to do with $d \mathbf{F}=-Pd \mathbf{A}$


I have a problem in Quantum mechanics 1 with Operators. I have to prove the following equation. I tried it for about 4 hours without any result:  Condition: $[[\hat A,\hat B],\hat A]=[[\hat A,\hat B],\hat B]=0$  $$ e^{\hat A} \hat B = (\hat B + [\hat A,\hat B]) e^{\hat A} $$   Info: $e^{\hat A}=\sum\limits_{n=0}^\infty \frac{(\hat A) ^n}{n!}$  Maybe you could help me?  I've done these steps:  $$ [e^{\hat A}, \hat B] = [\hat A,\hat B] e^{\hat A} = e^{\hat A} [\hat A,\hat B]  $$  $$ \sum\limits_{n=0}^\infty \left( \frac{(\hat A)^n}{n!} \hat B - \hat B \frac{(\hat A)^n}{n!}\right) = \sum\limits_{n=0}^\infty \left( \frac{(\hat A)^n}{n!} \hat A \hat B - \frac{(\hat A)^n}{n!} \hat B  \hat A\right)  $$  But now I don't know how to go on...

I am trying to show that $[A,B^n] = nB^{n-1}[A,B]$ where A and B are two Hermitian operators that commute with their commutator. However, I am running into a little problem and would like a hint of how to proceed.  If A and B commute then $[A,B] = ABA^{-1}B^{-1} = e$ where e is the identity element of the group.  $$\therefore AB=BA$$  $$n=1; [A,B^1] = (1)B^0[A,B] = e$$ This statement is certainly true. however moving on to $n = 2$ I find...  $$[A,B^2] = AB^2A^{-1}B^{-2} = ABBA^{-1}B^{-1}B^{-1} = BBAA^{-1}B^{-1}B^{-1}$$  Where in the last step I have used the fact that A and B commute to rearange the terms. However, it is plain to see that this last term simply reduces to the identity as well and for the n = 2 case we have:  $$[A,B^2] = e \ne 2B[A,B] = 2Be = 2B$$  Clearly I have assumed something I shouldn't have. The fact that there is a multiplicative factor of n implies I should be adding things, but I thought if I kept it as general as possible, the answer should just fall out naturally. I don't want an answer please, only guidance.


Why every real symmetric matrix has at least one real eigenvalue?

This question is in reference to  proof of the Spectral Theorem.   Let $A$ be a symmetric matrix. Take $u$ to be an orthonormal vector (such that $u^Tu=1$). Then if $u$ is an eigenvector of $A$, then $Au=\lambda u$. This implies that $\lambda=u^TAu$.   The article says that this proves that $\lambda$ is real. I don't follow why this is. Both $u$ and $A$ can contain complex entries! Why would $u^TAu$ have to be real?


Subgroup lattice is sometimes said to represent the structure of a group.But does it give a complete information about the group.I mean from a given subgroup lattice is it possible to construct a new group.We can frame the question saying that whether two nonisomorphic groups can have the same lattice structure or not.Then subgroup lattice will not be sufficient to determine the structure of a group.

If we have a two lattices (partially ordered) - one for subgroups, one for factor groups, and we know order of the group we want to have these subgroup and factor group lattices, is such a group unique up to isomorphism (if exists)? Or is there a counterexample?  If that's true, are sufficient conditions on the order and subgroup lattices to guarantee uniqueness? Another way - what if we now lattice for subgroup and group of automorphism of group; is that group uniquely determined by that information?  Thanks for help. (sorry for English)


Let $t(n)$ denote the n$^{th}$ triangular number.  Let $T(n)$ denote the sum of the first $n$ triangular numbers.  Is there a formula for $T(n)$?

Does anyone know the sum of all triangle numbers? I.e  1+3+6+10+15+21...  I've tried everything, but it might help you if I tell you one useful discovery I've made:   I know that the sum of alternating triangle numbers, 1-3+6-10... Is equal to 1/8 and that to change 1+3+6... Into 1-3+6... You would subtract 6+20+42+70... which is every other triangular number (not the hexagonals) multiplied by two.   1/8 plus this value is 1+3+6+10+...  A final note: I tried to split the triangle numbers into hexagonals and that series and then I got the squares of the odd numbers. Using dirichlet lambda functions This gave me 0 but I don't think this could be right. A number of other sums gave me -1/24 and 3/8 but I have no idea


I have an object with a set of prototype methods. How do I invoke that method given is name and arg list?  So I have and object:  scarpa.MyThing = function() { }   MyThing has a prototype method:  scarpa.MyThing.prototype.beAwesome = function(a, b, c) {     // do awesome stuff here with a, b, and c }   Now, I want to call beAwesome from another prototype method:  scarpa.MyThing.prototype.genericCaller = function(methodName, d, e, f) {      // this does not work for me     this.call(methodName, d, e, f)  }   Here is the call to genericCaller:  this.genericCaller('beAwesome', alpha, zeta, bravo);   I am stuck on the proper syntax for the call within genericCaller.  Can someone please enlighten me? Thanks.

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I had browse for this issue in the forums, but the answers I found are not concrete or refers to older version of ubuntu.   I am using ubuntu 14  (3.13.0-35-generic #62-Ubuntu x86_64 x86_64 x86_64) and the RAM usage usually reach the 100%. even with a just-booted system, it is more than 50%.  is this normal in this version of ubuntu? for a 4 GB RAM machine it would be better to switch to lubuntu or other desktop with less RAM requirements?   $ free -h             total       used       free     shared    buffers     cached Mem:         3.9G       2.3G       1.6G       23M       318M       1.0G -/+ buffers/cache:      1.0G       2.9G Swap:        4,0G         0B       4,0G

I am using System Monitor 2.28.0.  When I look in the Resources tab, I see a nice graph with for memory and swap.  Memory is about 60% 2.3 GiB of 3.8.  When I type the command free, I got :               total       used       free     shared    buffers     cached Mem:       3994908    3962396      32512          0     100852    1477032 -/+ buffers/cache:    2384512    1610396 Swap:      8000328      28468    7971860   cat /proc/meminfo | grep MemFree give  MemFree:           34536 kB   The situation has remained the save for several minute.  I started a lot of process with a script and the script is waiting for the free memory to get lower.  According to what I am seeing in the Process tab (or with top), the number in System Monitor seem a lot closed to the total of the memory of the process that the one reported by free.   Thanks


I have a couple of wireless connections available. I wish to automatically switch to a network connection when my Ethernet cable is plugged or unplugged. If I plug my cable in, it should disconnect my wireless connection. If I unplug my cable, then it connects my wireless. Can I achieve this without any third party software?

Is is possible to force IP connections over the wired ethernet if it is connected and over wireless LAN if the wired ethernet is unavailabe (e.g. cable disconnected). Both network connections would be part of the same subnet.


I have some points I want to understand: I have a script written in bash syntax and does not contain the shebang line (#!/bin/bash) and my default shell is tcsh.   when giving execute permission to the file and run it in the default shell  (tcsh) by typing the full path of the file, it runs correctly. How the script is  run correctly in tcsh and without typing the shebang line? for the same file in the default shell tcsh if I use the source command to run  it, it gives syntax error (even if I used the shebang bash line) why?   after some trials I found the following:Thanks, this seems correct I did some trials and reached the following: - Using source (dot operator is alias only in bash) command to run a file:   - Executes it even if it has no execute permission   - Runs it using the current shell irrespective of the shebang line - If the shebang line exists and the file is run by typing its name (total path) ( here need execute permission), the file is run using the shell in the shebang line. If the shebang line does not exist and run by the name, the bash is always used in my case irrespective of the current shell. I do not why, is it because the bash comes first in the /bin file??????? can you check that with me

Suppose the default shell for my account is zsh but I opened the terminal and fired up bash and executed a script named prac002.sh, which shell interpreter would be used to execute the script, zsh or bash? Consider the following example:  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % sudo cat /etc/passwd | grep papagolf [sudo] password for papagolf:  papagolf:x:1000:1001:Rex,,,:/home/papagolf:/usr/bin/zsh # papagolf's default shell is zsh  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % bash # I fired up bash. (See that '%' prompt in zsh changes to '$' prompt, indicating bash.)  papagolf@Sierra:~/My Files/My Programs/Learning/Shell$ ./prac002.sh  Enter username : Rex Rex # Which interpreter did it just use?   **EDIT : ** Here's the content of the script  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % cat ./prac002.sh  read -p "Enter username : " uname echo $uname


I think this involve's using LaGrange's Theorem, but I can't understand it. Initially, I thought each power of a 1 through n-1=6 will have an inverse of order 7, giving 12 with the 0-th power leftover. Any explanation appreciated! There's a similar thread to this, but can't make heads or tails of it.

If $G$ has at least $7$ elements of order $7$, then prove that $G$ has at least $12$ elements of order $7$.   I know that an element having order $7$ means that for any $a$ in $G$, $a^7=e$ where $e$ is the identity element. The inverses also have same order, so I thought maybe of the $7$ elements, $6$ had their inverse as well. However, then this would just mean there had to be $8$ elements, not $12$ for the $7$th element to have it's inverse.


Good day to everyone,  I would like to ask this question. I was wondering what is considered to be the hardest area of mathematics, so I searched in forums and outside of answers like Langlands programe and Cohomology there was this answew called Irational number theory, where it was stated that we basically have no idea of how to even solve the basic questions. Which leads me to my question.   Do we have number systems of higher cardinality then Reals? I don´t mean number systems like Complex numbers, Quartions, ... as all of them have the same cardinality as Reals, I mean number systems like the power set of Reals and power set of that power set etc. And do we do some math(outside of set theoretic math), meaning have big open problems like the millenium prize problems in those number systems? Or is it more or less corect to say that almost all of our current math research is done in Computable numbers and mathematics in those "higher infinities" is too hard for our finite brains?   Thank you for your answer.

As most of you know, the set $\omega$ with cardinality $\aleph_0$ corresponds to what we normally know as the natural numbers $\mathbb{N}$, and the set $\mathcal{P}(\omega)$ with cardinality $\aleph_1$ corresponds to what we call the real numbers $\mathbb{R}$.  Now, my question is whether there are currently known any number systems which we actually have some rough understanding of that correspond to higher cardinalities than $\mathbb{R}$? Of course, it is easy to construct a set with cardinality $\aleph_2 > \aleph_1$ by taking the power set again $\mathcal{P}(\mathcal{P}(\omega))$, but can we get any grasp on what kind of systems might have this cardinality? And if such a number system exists, how far up the chain of cardinalities do we have to go before we longer have any understanding?


Is there any grammar reason why Cookie Monster is not Cookies Monster, in plural. In other languages, its name is translated into plural, otherwise it could be interpreted as it was made of cookie.  Thx

Sorry for the title, it is not very evident and intuitive but I really do not how to tell it better...  Well, you know, several times, or better, many times, we use this form:  If I want to say:      "development of special weapons was   the first point in Hitler's   program..."   I will say this (a better form):      "special weapon development was..."   OK...  is it      "special weapon development"   or      "special weapons development" (note   the plural...)   what's the grammar rule in order to understand how to use this very used form?