Getting Null pointer exception after login....need to click on a button after login. I created a login class and passed it's driver to this class in before test method. Now when it goes to  @Test method ...It throws an exception of Null Pointer.   Previously when I was using extend method it was working fine.        @Test(priority =1)   public void clickaddbutton2() {            WebDriverWait wait=new WebDriverWait(driver, 20);           WebElement addprojectbutton;           addprojectbutton = wait.until(ExpectedConditions.elementToBeClickable(By.xpath( "html/body/app-root/app-home/div/div/main/div[3]/div[1]/a/button")));           addprojectbutton.click();            String project_infurl = driver.getCurrentUrl();           System.out.println("This is the url : " +  project_infurl);           Assert.assertEquals(project_infurl, "http://192.168.1.82:8787/project-information");    }  @BeforeTest   public void beforeClass() throws Throwable {       LoginPage obj_login = new LoginPage(driver);      obj_login.setUp();      obj_login.verifyHomePageTitle();     }

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?


I think the answer is no. I tried to find finite subsets which has a total order under subset relation such as the following:   $\{\{a\},\{a,b\},\{a,b,c\},\{a,b,c,d\}\}$  Then I noticed that two sets with the same size cannot be present on this subset because they cannot be subsets of each other. Since there can be at most $1$ set with size $1$ and size $2$ and size $n$, I think such a subset would be at most countable. But I am not sure if my reasoning is correct. Please help me correct it if it is wrong. And if it is true, can you help me give a more formal proof?

How to find an uncountable subset of $P(\mathbb{N})$ such that every two elements of it can be compared. In fact, give an uncountable subset of $P(\mathbb{N})$ such that has totality property. We mean by $P(\mathbb{N})$, the powerset of natural numbers set $\mathbb{N}$.


I purchased ASUS Notebook G75VX with Win8 preinstalled. I have to install Linux on it (dual-boot with Win8 preferably). I have read a lot on this (I am new to all this) but nothing has yet worked for me.  All the illustrating images are at :    0) I Disabled SecureBoot (FastBoot) + burned  OpenSUSE 12.3 ISO DVD + burned  Ubuntu 12.04 ISO DVD. 1) I followed all the steps proposed by   and used EasyBCD without any success.  2) OpenSUSE 12.3 -- Kernel=Default:::::::::::: Trying to install it with Kernel at Default: I get nowhere very quickly. I do not even get to the first step of the installation (Choice of Language). The screen images that I get while trying to boot from DVD and installing OpenSUSE for the first time are labeled OpenSUSE_DVD_1.jpg    to   OpenSUSE_DVD_8.jpg.  3) OpenSUSE 12.3 -- Kernel=SafeSettings:::::::::::: Trying to install it with Kernel at SafeSettings: I almost got it :). Note that I would probably end up without graphics if I get Linux to work under SafeSettings -- just a hypothesis. I went through the installation process following TweakHound link above and using EasyBCD. Now, the Windows Boot Manager sees openSUSE 12.3: I have a choice to start Win8 or OpenSUSE. Windows keeps booting just fine. However, it refuses to boot into openSUSE. It gives me a message:  File: \NST\AutoNeoGrub0.mbr  Status: 0x000007b  Info: operating system could not be loaded because a required file is missing or contains errors  I verified more then once and the file C:\NST\AutoNeoGrub0.mbr is there ....  4) Ubuntu 12.04 LTS  --- DVD:::::::::::: I also tried Ubuntu 12.04 LTS. It would not start the installation from the DVD. Pictures of the screen related to this attempt are labeled Ubuntu_DVD_1.jpg ; Ubuntu_DVD_2.jpg ; Ubuntu_DVD_3.jpg.  5) Ubuntu 12.04 LTS  --- exe:::::::::::: Finally, I tried to install Ubuntu just as I would for any other software under Windows by double-clicking on  wubi.exe  file (Win8 was running, I wen to Computer-->DVD and simply double-clicked on  *.exe file). It went just fine. It finished the installation. I restarted the laptop. It presented a dual-boot screen (never saw this one before-- all blue and neat) offering the choice between Win8 and Ubuntu.  Again, Win8 boots fine but Ubuntu would not. It gives the same kind of error as for OpenSuse: could not find  Ubuntu  MBR file. Pictures of the screen are labeled Ubuntu_exe_1.jpg; Ubuntu_exe_2.jpg;Ubuntu_exe_3.jpg.  Of course, the Ubuntu MBR file is at its C: location and is not empty.    I am pretty desperate at this point.  Any help and insight would be extremely appreciated.  This wonderful ASUS monster machine is absolutely useless to me without Linux in it since all the numerical codes that I will use for my calculations run on Linux.  Many thanks !!

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


In Windows 10 the Blue Screen of Death:    hides the parameters of the kernel panic:    Ideally you would tell the user to write them down, or take a picture:  (0xC0000005, 0x8A9A8020, 0x8B39AEC4, 0x8B39ABC0)   And then i'd know:   The exception code that was not handled: 0xc0000005 (STATUS_ACCESS_VIOLATION) The address where the exception occurred: 0x8A9A8020 The address of the exception record: 0x8B39AEC4 The address of the context record: 0x8B39ABC0   It's obviously more useful when its something like:   Indicates the cause of the failure: 4 (Unable to create GUID string from binary GUID.) NTSTATUS code: 0xA00A0007 (E_OUTOFMEMORY)   But regardless of my motivations, i would like to disable the friendly BSOD in favor of the informative one.  Bonus Reading   MSDN:

I would like to know if there's any way to make Windows 10 show more details when crashing like Windows 7 did. In Windows 10, the Blue Screen of Death:    hides the parameters of the kernel panic:    The MSDN article  explains how to attach a debugger in the section titled "Reading Bug Check Information from the Debugger".  Motivation  I have a BSOD issue right now (). If you can help with it it would be great.  We do need the actual log files (called .dmp files) as they contain the only record of the sequence of events leading up to the crash, what drivers were loaded, what was responsible, etc.  Answered own question from Microsoft  Thanks for the help I just had to reinstall my windows using the UEFI method. It seems my BIOS firmware has buggy legacy support - I think.  When I'm using UEFI method to boot into a new version of Ubuntu there are no kernal panics. Everything runs smoothly.


I was created by god and I am going to be judged by god. It does not make any sense for me. You create one thing and say if you follow my orders you will go to heaven, otherwise you will go to hell. How am I supposed to make my own decisions if I am just part of a design? I am sure that it has already been thought by many philosophers. What did they think about this dilemma (at least for me)?

In various religions it is often preached that god has given humans free will. But at the same time those religions preach that there is punishment for sinning.  Assuming a god does exist, and god does punish people for sinning, doesn't that contradict the idea of free will because if humans know they will be punished by god for sinning, it might stop them from doing the action in the first place?


If you use the optional argument of “displayquote” from “csquotes” it breaks the “displayquote” environment's optional argument, where you are supposed to put in a cite text. This is really not a thing that should break, given i do exactly what I'm supposed to do. Here a full example: % !TeX program = lualatex % !TeX encoding = UTF-8 % !TeX spellcheck = de_DE \documentclass[12pt,a4paper,titlepage,numbers=noenddot,oneside]{scrbook} \KOMAoption{listof}{totocnumbered, leveldown}  % deutsch \usepackage[english, german, ngerman]{babel} \usepackage[english, german, ngerman]{isodate} \usepackage{lmodern} % font \usepackage[autostyle, german=quotes]{csquotes} % deutsche Anführungszeichen mit \enquote  % Referenzen \usepackage[style=numeric-comp, sortcites=true, sorting=none, defernumbers=true, %maxcitenames=3, minbibnames=3, % cite up to three authors in bib backref=true, backend=biber]{biblatex} %\usepackage[nottoc,numbib]{tocbibind} % fügt Referenzen zu TOC hinzu \usepackage{nameref}  % test bib \begin{filecontents}{\jobname.bib} @misc{dsgvo-eu-2016-679,     author={{Europäisches Parlament} and {Europäischer Rat}},     title = {Verordnung (EU) 2016/679 des Europäischen Parlaments und des Rates vom 27. April 2016 zum Schutz natürlicher Personen bei der Verarbeitung personenbezogener Daten, zum freien Datenverkehr und zur Aufhebung der Richtlinie 95/46/EG (Datenschutz-Grundverordnung) (Text von Bedeutung für den EWR)},     date={2016-04-27},     note = {Deutsche Fassung},     journal = {Amtsblatt der Europäischen Union},     url = {https://data.europa.eu/eli/reg/2016/679/oj} } \end{filecontents} \addbibresource{biblatex-examples.bib} \addbibresource{\jobname.bib}  \begin{document}  Zitat: \begin{displayquote}[\cite[Erwägungsgrund 6]{dsgvo-eu-2016-679}] Das Ausmaß der Erhebung und des Austauschs personenbezogener Daten hat eindrucksvoll zugenommen. Die Technik macht es möglich, dass private Unternehmen und Behörden im Rahmen ihrer Tätigkeiten in einem noch nie dagewesenen Umfang auf personenbezogene Daten zurückgreifen. Zunehmend machen auch natürliche Personen Informationen öffentlich weltweit zugänglich. Die Technik hat das wirtschaftliche und gesellschaftliche Leben verändert und dürfte den Verkehr personenbezogener Daten innerhalb der Union sowie die Datenübermittlung an Drittländer und internationale Organisationen noch weiter erleichtern, wobei ein hohes Datenschutzniveau zu gewährleisten ist. \end{displayquote}  \printbibliography \end{document}  LuaLaTex then throws me a lot of strange error like “Runaway argument?” or “Emergency stop. […] (job aborted, no legal \end found)”. If you omit the optional argument in the cite and cite \cite{dsgvo-eu-2016-679} instead of \cite[Erwägungsgrund 6]{dsgvo-eu-2016-679}, it works flawlessly. Why does this happen and how can I fix it?

LaTeX seems to be having problems handling nested optional arguments. I've included a minimal code example that generates the error:  \documentclass[12pt,oneside]{book} \begin{document}  \newcommand{\termbad}[2][]{#2#1} \newcommand{\termgood}[2][]{#2#1}  \newcommand{\up}[1]{#1} \newcommand{\dd}[1][]{#1}  \termgood{\up{Tart}}{Pop} \termbad[\up{Tart}]{Pop}      \termgood{\dd[Tart]}{Pop} \termbad[{\dd[Tart]}]{Pop} %\termbad[\dd[Tart]]{Pop}   \end{document}   If you run this code, it works. If you remove the % in the second to last line, it fails with:  Runaway argument?  Tart{Pop} \par \par \end {document}  !File ended while scanning use of \dd.   After further tinkering, I have discovered the problem: LaTeX is reading the ] for the inner optional argument as the end of the outer optional argument and then passing a malformed argument in. So it is passing in \dd[Tart as the optional argument to \termbad instead of \dd[Tart].  This still feels like a bug to me. Nesting braces in arguments works, brackets should as well. The following are workarounds:   Enclose the inner optional argument in braces (as in the line before %). Redefine your inner function to require its argument instead of using optional arguments. Redefine your outer function to require its argument instead of using optional arguments.   Any one of the three works around the issue.  (Reposted here; question was originally posted to stackexchange and then closed instead of being migrated.)


I need to design a Python script that will take a CSV input, search for a matching polygon in our SDE data for each line, and then extract certain information about data that intersects with the polygon.  This is straightforward, except that about 5% of the input values will not be exact matches (e.g. a parcel number will have hyphens in the CSV, but the SDE value has no hyphens). I've got a few tests in there to handle these cases, but it will inevitably result in some situations where the script returns multiple possible candidate polygons and the user needs to be able to indicate which is correct. For example, the number may pull up Polygon A and Polygon B as possibilities, and it's up to the GIS analyst to visually examine to decide which is in the correct region.  If I was running the script in IDLE, then I could simply use raw_input to get that user input and proceed with the rest of the steps. Is there an equivalent mid-script method in ArcMap that accepts user input? I am only aware of the initial tool parameters, which wouldn't be useful for this issue.

I want to prompt for user input after all parameters have been specified for the script tool. I've seen many forum posts and stackexchange questions about this, and they all conclude that it's unnecessary, but I think my case is an exception. I want to give the user an opportunity to confirm data, such as how many sets of GPS coordinates there are. They will be yes/no questions ("is this data obviously incorrect?"), and the script tool parameter input form doesn't seem like it'd work well for this.  I know Tkinter's event handler causes problems with ArcGIS, and other framworks have similar problems. One workaround I found is to have your script call another script that runs as a separate process, and display the GUI from the second process, but that seems a little too hackish.    Apparently wxPython does work, but it's not included with python. I need to be able to distribute these scripts without any extra requirements other than ArcGIS, so that wouldn't work for me.    To clarify, the most important use would be to prompt the user when my software validation checks can't validate the data. For example, I have a list of IDs that I want to validate, but the format isn't consistent. I want to be able to prompt the user with a yes/no dialog if I can't validate in software (eg. the ID doesn't match one of the common patterns). It's possible that new ID formats will be created without my knowledge.    Another example: I have a file that contains, among other things, a table of start & stop times. I want to validate each row of the table individually, and cramming all of that data, plus the other checks, into the warning window would get ugly fast.


I am using article class file. I need the output each author command will be printed in seperate authors. But the output is printed last authors only.  How to implement the optional box values like [aff={1}]. Kindly provide the ideas. How to print the abstract text before the maketitle. Kindly provide the ideas   The below mentioned coding is insert inside the tex file:  \author[aff={1}]{Rahuman} \author[aff={2}]{Kumaran} \address{address one} \address{address two}   My Required ouput is:  Rahuman1, Kumaran2 1 address one 2 address one

My goal is adding more than one author with different affiliations, it will look like something:  Author A, Author B, Author C, Author D and Author E        A,B,C Department of Computer Science       D,E Department of Mechanical Engineering          Email A,B,C,D,E @university.edu                  Latex University   is that possible to do it without using any packages, if not packages are welcome.  Thanks  Edit: i came up with Thorsten Donig's solution however i have the problem of symbols that appear weirdly.


I have a model that stores the identity of the current user who is creating the new record.  How can I modify the ActionResult Create() to capture the current user's name and assign it to paCrtdBy?  Here is the model:  using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Web;  namespace phaud.Models { public class phauds {     [DatabaseGenerated(DatabaseGeneratedOption.Identity)]     public int Id { get; set; }     [Required]     [Display(Name = "Created By")]     [MaxLength(128)]     public string paCrtdBy { get; set; }      private DateTime _createdOn = DateTime.Now;      [Required]     [Display(Name = "Record Date")]     [DataType(DataType.DateTime)]     public DateTime paCrtdDt {         get         {             return (_createdOn == DateTime.MinValue) ? DateTime.Now : _createdOn;         }         set         {             _createdOn = value;         }      }    }  }   Here is the controller code for CREATE():      // GET: phauds/Create     public ActionResult Create()     {                     ViewBag.DropDownValues1 = new SelectList(new[] { 3, 6, 9 });         ViewBag.DropDownValues2 = new SelectList(new[] { 9, 18, 27 });          return View();     }      // POST: phauds/Create     // To protect from overposting attacks, please enable the specific properties you want to bind to, for      // more details see https://go.microsoft.com/fwlink/?LinkId=317598.     [HttpPost]     [ValidateAntiForgeryToken]     public ActionResult Create([Bind(Include = "Id,paCrtdBy,paCrtdDt,repId,callId,callDt,q_opClsCall,q_asstOffer,q_reassrCaller,q_empathy,q_prof,q_recap,q_deadAir,cmnts")] phauds phauds)     {         string userName = User.Identity.Name;         //How do I assign the value of userName to the paCrtdBy field in the phauds.cs          //How to assign DateTime.Now to paCrtdDt instead of doing it in the model          if (ModelState.IsValid)         {             db.phauds.Add(phauds);             db.SaveChanges();             return RedirectToAction("Index");         }          return View(phauds);     }

In a forms model, I used to get the current logged-in user by:  Page.CurrentUser   How do I get the current user inside a controller class in ASP.NET MVC?


I can see the HTML is not embedded in Badges Page.         Is it any issue in my browser or bug?

I was reading through some badge descriptions and noticed that Synonymizer's description needs to be updated. As it stands, there is raw HTML (an href) in the description:    EDIT: after reading comments by @ColeJohnson, I have come to the understanding that this post comes off as whiny. I want to make it very clear that I wasn't ever trying to complain. My first reaction was to fix the perceived error myself. When I realized I was unable to do so, I figured the best course of action would be to find someone who would be able to make the necessary edits. Hence the post here.


I have 3 files - main, Array.hh, and Array.cc. When I do "g++ main.cc Array.cc", I get all kinds of linker errors, e.g.: "undefined reference to Array<<\double>>::Array(int)"  I read the other stackoverflow entries for linker errors with templates, but they are recommending to split the HH and CC files, which I have already done. So what can be the problem here?  Edit: Thanks for the replies. I had not understood the posts I had read previously. Merging the Array.cc into the Array.hh solves the problem. Closed.  main.cc:  #include "Array.hh" #include <iostream>  int main() {     Array<int> anArray(12);     Array<double> adArray(12);      for (int nCount = 0; nCount < 12; nCount++) {         anArray[nCount] = nCount;         adArray[nCount] = nCount + 0.5;     }      for (int nCount = 11; nCount >= 0; nCount--)         std::cout << anArray[nCount] << "\t" << adArray[nCount]         << std::endl;      return 0; }   Array.hh:  template <typename T> class Array {     private:         int m_nLength;         T *m_ptData;      public:         Array();         Array(int nLength);         ~Array();         void Erase();         T& operator[](int nIndex);         int GetLength(); };   Array.cc  #include "Array.hh" template <typename T> Array<T>::Array() {     m_nLength = 0;     m_ptData = 0; }  template <typename T> Array<T>::Array(int nLength) {     m_ptData= new T[nLength];     m_nLength = nLength; }  template <typename T> Array<T>::~Array() { delete[] m_ptData; }  template <typename T> void Array<T>::Erase() {     delete[] m_ptData;     m_ptData= 0;     m_nLength = 0; }  template <typename T> int Array<T>::GetLength() { return m_nLength; }

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.)


I'm preparing my taxes with Turbotax, and its asking me for all the bank accounts I earned interest from. One of these accounts has earned less than $10 total for the year. Because of that this bank is not providing me with a 1099-INT form.   Since I earned less than $10 from that bank, can I skip reporting this bank to Turbotax/my tax filing? If not, how do I report the interest without the bank giving me a 1099?

One of my bank accounts earned $1.50 for the entire year.  Because the amount is under $10 they did not send a 1099-INT form.   Is this bank policy or IRS policy?  Does that $1.50 need to be reported?  I'm not worried about the difference that this small amount makes on my taxes bur rather what is legally required.


When i go to put a material on an object or even have no material the cube in material preview mode looks like this: Material Preview  Solid mode  In the shading tab it does a thing where the cube is sort of transparent but the surface is textured with the background?  I've tried going back to factory settings and uninstalling and reinstalling. I was initially using 2.8 and then updated to 2.9 but the problem still persists, so perhaps it's an issue with my computer (windows 10). I hope I explained it well enough because I'm not really sure even how to, also sorry if this is a duplicate, but I struggled to even find the terminology required to describe the problem. Anyway thanks in advance.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


Suppose we have a data set with a binary outcome variable $y$. The predictor variables are $x,w$ and $z$. This is the training data set. We obtain a logistic regression model from this training data set. Now suppose we have a test data set and want to predict $y$. In R, we use the  predict  function to do this. But we end up with predicted probabilities instead of $1$ or $0$. How would we convert the probabilities to either a $1$ or $0$?

I am using logistic regression to solve the classification problem.  g = glm(target ~ ., data=trainData, family = binomial("logit"))   There are two classes (target): 0 and 1   When I run the prediction function, it returns probabilities.  p = predict(g, testData, type = "response")   However, it is not clear to me how to understand which class has been assigned?  Real  p   1   0.17568578 1   0.41698474 1   0.19151927 1   0.25587242 1   0.25604452 0   0.39976069 0   0.39910282 0   0.16879320   I appreciate if someone can explain me how this works based on the above example. Thanks


Could we (as a couple) stay together in a hotel in Dubai?

I'd wish to visit Dubai with my girlfriend, but after reading  and  I started to get a little worried about it. How should I book an hotel? Must I book two singles? Could it be a problem if we walk together in the city and go together to restaurants and malls without being married?


I searched, but I can't find specifically how to render animated 2D sprites with an alpha channel onto a 3D polygon, z=0, in OpenGL ES 2.0.  This is just a basic 2D concept, but since I'm using, OpenGL ES 2.0, I need to use 3D vertex data to render to the viewport. I'm also assuming I'll need a 0.01 like z-depth projection matrix.  I don't know if I load parts of the bitmap first onto the texture data, or just use a large texture and manipulate the UV onto the 2D/3D vertices? Should it all be done in a shader?, if so, how would that be done (using uniforms and attributes in a shader)? What is the best technique for this? When do I update the animation as well, in the draw function or a separate update function?

I've found a bunch of tutorials on how to make this work on Open GL 1 & 1.1 but I can't find it for 2.0.   I would work it out by loading the texture and use a matrix on the vertex shader to move through the sprite sheet.   I'm looking for the most efficient way to do it. I've read that when you do the thing I'm proposing you are constantly changing the VBO's and that that is not good.   Edit: Been doing some research myself. Came upon this two  and referring to the one before . I can't use PBO's since i'm using ES version of OpenGL so I suppose the best way is to make FBO's but, what I still don't get, is if I should create a Sprite atlas/batch and make a FBO/loadtexture for each frame of if I should load every frame into the buffer and change just de texture directions.


If I have an equation, say, $$ y = x! +1 $$ Is it possible to rewrite the equation in terms of $x$?  For example, a simple algebraic equation might be $y = x^2$ --- and to rewrite it in terms of $x$, one might say $x = \sqrt{y}$.   I don't mind if the function isn't continuous, but I am curious as to whether or not this is possible... Thank you very much!

Since $\Gamma$ is not one to one over the complex domain, Is it possible to define some principal values ( analogues to  Principal Roots for the Root function ) so we can have a $\Gamma^{-1} (z)$ (inverse $\Gamma$ function)?


Can someone help me to find the sum?     $$\sum_{n=1}^{\infty}{\frac{n}{2^n}}$$

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


I'm on Ubuntu 20.04, I did sudo apt update && sudo apt install -y pcscd ... Reading package lists... Done Building dependency tree        Reading state information... Done Package pcscd is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  It's strange because it shows here:

How do I get to the Universe Repository in supported versions of Ubuntu?


I have a question about how to catch the exception in the initialization list.   For example, we have a class Foo derived from Bar  class Foo {  public: Foo(int i) {throw 0; }  }  class Bar : public Foo{  public:  Bar() : Foo(1) {}  }

Here's a curious one. I have a class A. It has an item of class B, which I want to initialize in the constructor of A using an initializer list, like so:  class A {     public:     A(const B& b): mB(b) { };      private:     B mB; };   Is there a way to catch exceptions that might be thrown by mB's copy-constructor while still using the initializer list method? Or would I have to initialize mB within the constructor's braces in order to have a try/catch?


How should I write abbreviation for "okay"?  The options are: ok, Ok, OK.  I've never took any notice of it, but recently someone (that he's not a native English speaker) told me that I should write OK. Is that true?

I'm confused when I have to write "Ok" in a writing, because I don't know if "OK" and "Ok" are both orthographically correct or just one is.


I am travelling from India to Vancouver with my family which includes my wife, my 5-year-old daughter, and my 9-month-old son. We all have Indian passports.  We have a layover at Narita Airport Tokyo for 11 hours 30 minutes and want to book a hotel.  Do we need a visa to go outside the airport. What else can we do?

I am travelling from Singapore to San Francisco and the airline has a layover of 7.5 hours at Tokyo Airport (NRT). I am wondering if I would be allowed to go out to experience the city for a while in some form a visitor visa.  I know Singapore has such facilities, but does anyone know if I can do it in Tokyo? Any suggestions or pointers are welcome. Note - I do not have a visa for Japan yet, but I am hoping that 1 day visitor visa could be possible at airport.


It would be nice if, when a user votes to close a question, they get a ping the first time it is edited, so that they can review their vote and determine if they want to keep their vote to close.  This is slightly different behavior from what was suggested here:   That question suggests pinging users AFTER the question has been closed and then edited.  The intent is that, if someone fixes their question before it's closed, the original voters could come back and potentially retract their votes, keeping the original asker from having to arbitrarily ask to reopen the question.

Requested Feature  I'd like to get a notification when a question that I've voted to close (but isn't closed yet) is edited, so I can review the changed question and retract my close vote if appropriate.  Workings and Rationale  Questions can be voted to be closed for a number of (custom) reasons. Those reasons are requests to the OP to adjust their question — to make them less broad, to make them on topic, to provide a test case, and so on. The OP (or another user) may edit the question to address the issue, but the close votes remain. If another user casts the final vote, the question is closed, even though the original issue was resolved.  To prevent that, the close voters should be notified that the question was edited, so that they can review the edited question and adjust their vote accordingly.  This is for a question in the process of being closed only.  Related Feature Requests   Not a duplicate, since my request is about questions in the process of being closed, while that request is about questions that are already closed. That could notify users years after they've closed the question. That seems unnecessary and we have the regular re-open process to deal with it anyway.   Same request as mine, but (incorrectly, IMHO) closed as a duplicate of the former.


I've got an iPhone 4, not quite sure which version of iOS, but I keep current.  Recently, I got an update for one of the apps, started it, and then for some reason it got stuck on "Waiting..." indefinitely.  Another app later offered an upgrade, and when I accepted it got stuck on "Waiting...".  This has been a few days now, with both 3G and wireless available, with no change.  The apps don't have the "delete" button when I touch and hold on them, and I tried deleting them in iTunes but after syncing my iPhone there was no visible change.  (They're free apps, so deleting and reloading is a fine solution, but knowing how to kick-start the updater would be nice.)  The App Store app simply tells me they've been updated.  Any suggestions?

I tried to download the "Dictionary Free" app from the App Store four days ago, but it's been stuck in "Waiting" ever since. I've tried everything: rebooting the phone, restoring from an iTunes backup, side-loading the app from iTunes, but nothing has worked.  When I turn Airplane Mode on and then off again, I get an alert popup that says "Unable to download application. It will be available for download when you log in to the iTunes Store on your computer".  I've tried what it recommends, but nothing seems to work.


I learned the following dice game from another forum. It was not solved there. The dice game is as follows.   You start tossing six dice. After each toss you  must put aside at least one of the dice tossed. You continue to toss until you have no dice remaining. You cannot reintroduce a die once it has been put aside.   In order to get a score in this game you must have retained both a 2 and a 4. You get no score for them but without them you get no score at all. Your score is the sum of the remaining 4 dice.   The question is  what is the maximal expected score and how to act in order to maximize your expected score. I would guess it is optimal to put  each time exactly one die aside as long you have not obtained both a 2 and a 4.

I learned the following dice game from another forum. It was not solved there. The dice game is as follows.   Toss 6 dice. Each toss you can keep one or more up to the total number of dice tossed. You continue to toss until you have no dice remaining. You may not reintroduce a die once it has been kept.   In order to get a score in this game you must have retained both a 2 and a 4. You get no score for them but without them you get no score at all . Your score is the sum of the remaining 4 dice.   The question is how to act in order to maximize your expected score.


Let's say $f:A \to B$ is a function between metric spaces, and that $f$ is continuous at $a \in A$.  Does it imply that there exists a ball $B(a,r)$ such that $f$ is continuous for every point of $B(a,r)$ ?  I can't think of a counterexample. Thanks!

Is the function $f(x) = \lim_{k \to +\infty} \tan{kx}$ a right example?  But I do not know whether this is a function at first. Is this a function?  Could you give a correct real-valued function that is continuous at precisely one point?  Thanks.


Let $(X,Y)$ a bivariate normal variable $f(x,y)=\frac{1}{2\pi \sqrt{1-\rho^2}}e^{\frac{1}{2(1-\rho^2)}(x^2-2\rho xy+y^2)}$. Let $Z=\frac{Y-\rho X}{\sqrt{1-\rho^2}}$.  Find the law of $Z$.  Say if $X$ and $Z$ are independent or not.  Find $\mathbb{P}(X>0,Y>0)$.    Already by eye it can be noticed that the mean vector is $\mu=\begin{bmatrix} 0\\ 0\end{bmatrix} $ and the covariance matrix is $\sum=\begin{bmatrix}1 & -\rho\\ -\rho & 1\end{bmatrix}$  . I also know that $Z=X_1+...+X_n\sim N_n(A\mu,A^T\sum A)$, thus $Z$ is a linear of $X$ and $Y$ with $\frac{1}{\sqrt{1-\rho^2}}=const.$. Can I say that $Z\sim N(0,2-2\rho)$?

Given   $$ f_{XY}(x,y) = \frac{1}{2\pi \sqrt{1-\rho^2}} \exp \left( -\frac{x^2 +y^2 - 2\rho xy}{2(1-\rho^2)} \right) $$  $Y = Z\sqrt{1-\rho^2} + \rho X$  And   $$ f_{XZ}(x,z) = \frac{1}{2\pi } \exp \left( -\frac{x^2 +z^2}{2} \right) $$  Show that $P(X>0,Y>0)= \frac{1}{4}+\frac{1}{2\pi}(\arcsin \rho) $  I'm supposed to use the fact that X and Z are independent standard normal random variables, but I don't quite understand how. Any help would be greatly appreciated.


I'm doing some data analysis on a small dataset (35 individuals) and I'm wondering whether my findings are statistically significant. Individuals are asked questions before and after a treatment, so it's a paired dataset.  Therefore, I've put the data in Libreoffice Calc and applied the TTEST function. Unfortunately, the information online about this function is really sparse. The  say "Returns the probability associated with a Student's t-Test.", but I can't find any examples how to interpret this value.  Am I right in assuming that the returned value is the probabilty that the null hypothesis is true (p-value). I.e. a TTEST value 0.0011 would mean that there is a 0.11 % chance that the treatment wasn't actually helping, but the results are just random?  I'm looking for an answer that is specific for Libreoffice Calc's TTEST function.  Thanks for your help!

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


C# adds a decimal at the end in the result, my code:  public static double CalcCompoundedInterest() {     return (1.1 * 1.1); }   Result: 1.2100000000000002  Does someone have a clue why this happens?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have a problem when trying to add the word "Figure" before the actual number in the list of figures. I guess it will be the same for all languages, since the langauge setting will make it in my language automatically. But what I have so far is only the number like the upper line, and it should be like the second line (which was poorly made with paint, just in case you wonder).    Here is the code I am using for figures so far:  \begin{figure}[ht] \centering \includegraphics[width=1.0\textwidth]{imageName.png} \caption[CaptionText]{CaptionText\footnotemark.} \end{figure} \footnotetext{CaptionTextn. Available under \url{www.nowhere.com}, seen on Date.}

I'm using the caption package.  In the List-Of-Figures I get only the numbers, but I also want to have the prefix. It currently looks like that:     List of Figures   1 Caption of Figure 1........1   2 Caption of Figure 2........9     And I want it to look like:     List of Figures   Figure 1: Caption of Figure 1...1   Figure 2: Caption of Figure 2...9     The same format is already used for the captions themselves.


I know that if $T(\bf{X})$ is a sufficient statistic for $\theta$, then the conditional distribution of $\bf{X}$ given $T(\bf{X})$ doesn't depend on $\theta$. However, I am not sure why this makes sense.   It seems that we will never know $\theta$, and that $\bf{X}$ to begin with already depends on $\theta$, and that $T(\bf{X})$ is a "coarser" summary than $\bf{X}$, so how can it be that given $T(\bf{X})$, the distribution of $\bf{X}$ no longer depends on $\theta$? Is there an intuition here?

According to the definition of sufficiency, a statistic is sufficient for a parameter if the conditional distribution of $X$ given a value of statistic does not depend upon the parameter.   What I am trying to understand is how does conditional distribution of $X$ not being a function of the parameter fit into the intuitive meaning of sufficiency i.e statistic value holding the same amount of information as that of the respective sample.


I have recently installed Ubuntu 12.04  and on updating driver from GUI additional driver, it prompts me for the missing of broadcom driver . on accepting the download option. the message get prompted   Sorry, installation of this driver failed.  Please have a look at the log file for details: /var/log/jockey.log   i am new with ubuntu can any one suggest how can i over come this issue and get wifi network enabled on my compaq presario kernel 3.8

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


n passengers board an airplane with exactly $n$ seats. The first passenger has lost the ticket and picks a seat randomly. But after that, the rest of passengers will: Take their own seat if it is still available, Pick other seats randomly when they find their seat occupied  What is the probability that the $n$-th person can get his own seat? The answer is  $1$, if $n = 1 $ $0.5$ if $n > 1$  Following is my attempt For $n = 2$  let's have passengers $A$ and $B$  Sample space = {$AB,BA$}  Favorable = {$AB$}  Probability = #{$AB$}/#{$AB,BA$}= $\frac{1}{2} = 0.5$  For $n = 3$  we have passengers $A,B,C$  Sample Space = {$ABC,ACB,BAC,BCA,CBA,CAB$}  Favorable = {$ABC,BAC$}  Probability = $\frac{2}{6} = \frac{1}{3}$  Can anyone explain me in this way ?

This is a neat little problem that I was discussing today with my lab group out at lunch. Not particularly difficult but interesting implications nonetheless  Imagine there are a 100 people in line to board a plane that seats 100. The first person in line realizes he lost his boarding pass so when he boards he decides to take a random seat instead. Every person that boards the plane after him will either take their "proper" seat, or if that seat is taken, a random seat instead.  Question: What is the probability that the last person that boards will end up in his/her proper seat.  Moreover, and this is the part I'm still pondering about. Can you think of a physical system that would follow this combinatorial statistics? Maybe a spin wave function in a crystal etc...


I am not good in bash, i can do basic but when it comes into multiple if statements, then i am a no brainer for them.  I currently have the following statement made.  var=$(cat /sys/block/vda/queue/rotational) dtype='nil' if [ $var = 0 ]; then         dtype=' SSD ' elif [ $var = 1 ]; then         dtype=' HDD ' fi   Since many machines use sda instead of vda, im looking for a way to make it that there would be multiple? if statements (atleast thats how i understand it)  Basically. If the first  var=$(cat /sys/block/vda/queue/rotational) command gives me and error, it would not print that one out. and it would choose this command instead. (Only if the first one is not working)   var1=$(cat /sys/block/sda/queue/rotational) dtype='nil' if [ $var = 0 ]; then         dtype=' SSD ' elif [ $var = 1 ]; then         dtype=' HDD ' fi

How can I do something like this in bash?  if "`command` returns any error"; then     echo "Returned an error" else     echo "Proceed..." fi


If the universe started out isotropic and homogenous and of all fundamental particles then how could there now be any concentration of energy anywhere?  If you say that nothing is really homogenous because of the grainy quantum nature then what about when it was all compressed in one Planck volume?  Is the universe allowed to do this because it emerged hot, essentially getting all its heat from nowhere?  All that heat dissipated into the CBR.  But nonetheless some things are hotter than others and we can do meaningful work now while in the beginning everything was the same state, temperature and particles.

The Big Bang theory assumes that our universe started from a very/infinitely dense and extremely/infinitely hot state. But on the other side, it is often claimed that our universe must have been started in a state with very low or even zero entropy.   Now the third law of thermodynamic states that if the entropy of a system approaches a minimum, it's temperature approaches absolut zero.  So how can it be that the beginning universe had a high temperature and a low entropy at the same time? Wouldn't such a state be in contradiction to the third law of thermodynamics?


I have a script file (it's .bashrc actually), in this file I have a lot of variables and functions which are used only inside this script, but these variables and functions are publicly visible for any bash session. To avoid collisions, make me (as a shell user) to understand that this variables are internal and avoid unnecessary autocompletion I added a prefix _bashrc_ for each variable and functions, e.g. _bashrc_extensions, but such prefixes looks ugly for me.  The idea I have in mind is to reduce scope of visibility to be able to remove these prefixes, but the only way I know in bash is to use local keyword, which can be used only inside a function. So I'm thinking about a function without a name which will be called immediately, something like this:  function {   local path=$1   # do something with $path } "$HOME/.mypath"   Does something similar exist in bash?

My .bashrc had some code that was repetitive so I used a function to simplify it  do_stuff() {   local version=$1   export FOO_${version}_X="17"   export FOO_${version}_Y="42" }  do_stuff '5.1' do_stuff '5.2'   However, now when I use my shell the "do_stuff" name is in scope so I can tab-complete and run that function (potentially messing up my environment variables). Is there a way to make "do_stuff" visible only inside the .bashrc?


Consider a sequence of real numbers $\{a_n\}_n$. Let $\{a_{n_j}\}_j$ be a subsequence of $\{a_n\}_n$. Suppose I have shown that $\limsup_{j \rightarrow \infty} a_{n_j}=L$ with $|L|<\infty$. Is it true that $\limsup_{n \rightarrow \infty} a_{n}\geq L$?

Here are two equivalent definitions of $\limsup_{n\rightarrow\infty} a_n$:   Let $u_n=\sup\{a_n, a_{n+1}, a_{n+2},\ldots\}$. Then $$\limsup_{n\rightarrow\infty} a_n = \lim_{n\rightarrow\infty} u_n =    \lim_{n\rightarrow\infty}\left(\sup\{a_n,a_{n+1},\ldots\}\right)$$ Let $E$ be the set of all subsequential limits of $\{a_n\}$. Then $$\limsup_{n\rightarrow\infty} a_n = \sup E$$   I'm curious as to which one people usually learn first, or which one people find more intuitive. Baby Rudin only has the second definition, but doesn't mention the first as far as I know.  As far as intuition, I think of the second definition as "the biggest limit point." I'm not sure how to think of the first definition though. I can see that $u_n \ge u_{n+1}$ for all $n$, but I'm not sure how to interpret the limit of those $u_n$ conceptually.  Are there any other ways to conceptualize $\limsup$?


Sometimes I want to sort stuff, but not the header. So, for example, when I list loaded modules in Apache, there is a 1-line header that gets included in the sort:   $ /usr/local/apache2/bin/apachectl -M | sort   alias_module (shared)  asis_module (static)  cache_disk_module (static)  cache_module (static)  core_module (static)  data_module (static)  env_module (shared)  ext_filter_module (static)  file_cache_module (static)  filter_module (shared)  headers_module (shared)  heartbeat_module (static)  heartmonitor_module (static)  http_module (static)  include_module (static)  info_module (static) Loaded Modules:  log_config_module (shared)  macro_module (static)  mime_module (shared)  mpm_event_module (static)  ratelimit_module (static)  reqtimeout_module (shared)  setenvif_module (shared)  so_module (static)  ssl_module (static)  status_module (shared)  substitute_module (static)  unixd_module (static)  version_module (shared)  watchdog_module (static)   I tried using the -b option, but that had no effect. In any case, ignoring leading spaces would just be a workaround anyway. What I really want to do is exclude N lines of header from the sort. How can I do that?

I am getting output from a program that first produces one line that is a bunch of column headers, and then a bunch of lines of data. I want to cut various columns of this output and view it sorted according to various columns. Without the headers, the cutting and sorting is easily accomplished via the -k option to sort along with cut or awk to view a subset of the columns. However, this method of sorting mixes the column headers in with the rest of the lines of output. Is there an easy way to keep the headers at the top?


Find a set of polynomials $\{P_1, \dots, P_n\},$ all of whose   coefficients are complex numbers, whose common zero set is $\{(3 + 2i,  -i), (0, 1 - 4i)\}$ in $\mathbb{C}^2.$   When there's only one point, such as $\{(3 + 2i, -i)\},$ the answer is easy enough. We can use something like $P_1 = x - (3+2i)$ and $P_2 = y - (-i),$ and the zero sets of these polynomials will intersect in the given point. I tried something similar in the stated problem, but $P_1 = x - (3+2i), P_2 = y - (-i), P_3 = x - 0,$ and $P_4 = y - (1 - 4i)$ would have an empty common zero set.   I also tried $P_1 = (x - (3+2i))(x - 0)$ and $P_2 = (y - (-i))(y - (1 - 4i)),$ but this would have a common zero set that is too large: $$\{(3 + 2i,-i), (3 + 2i, 1 - 4i), (0, -i), (0, 1 - 4i)\}.$$  If we were working over $\mathbb{R}^2$ and looking for a common zero set that is a finite set of points, such as $\{(1, 2), (0, 5)\},$ then I would use $$P_1 = ((x-1)^2 + (y-2)^2)((x-0)^2 + (y-5)^2).$$ This works because $(x-1)^2$ and $(y-2)^2$ must be non-negative, so the only solution to $(x-1)^2 + (y-2)^2 = 0$ is $(1, 2).$ Something like this wouldn't work in $\mathbb{C}^2$ since we can't claim that $(x-1)^2$ must be non-negative.  So I've tried a few things and feel I am close, but I don't quite have the solution. While my question is for a specific set of points, I'm looking for a method that can be generalized to any finite set of points in $\mathbb{C}^2.$

I am reading Gathmann's free online notes on Algebraic Geometry. One exercise asks to show that     "Every affine variety in $\mathbb A^n$ consisting of finitely many points can be written as the zero locus of $n$ polynomials".    There is a hint says "interpolation". I don't know how to start with the hint.   If $n=2$, we can use interpolation to get 1 polynomial for finitely many points. But we need to show 2 polynomials instead. I am also not sure how to apply interpolation for higher dimensions. Anyone can help? Thank you!


LaTeX is more or less built to typeset books, particularly (but not exclusively) scientific literature. It is less obvious that LaTeX is also extremely good at producing   Songbooks Play scripts Chess diagrams Linguistic literature and IPA Bibles Dictionaries Presentations Tolkien alphabets   Can people mention other surprising and inspring uses of LaTeX that go beyond scientific literature?  This question is meant as a place to showcase surprising uses of TeX, made by you or others, a bit similar to the posting , which focuses on beautiful TeX and LaTeX documents.

I think the questions says it all! :)  By TeX, I mean any derivative of TeX as long as the code is clearly a derivative of TeX, i.e. that it could belong on TeX.SX (and not pure Lua for example).  I'll give two answers myself so you see what I mean.


Is there a composite integer $n \geq 9$ such that $n \nmid (n-1)!$?  If we are not talking about composites then by Wilson's theorem we have $n \nmid (n-1)!$.

I have a proof and need some feedback. It seems really obvious that the statement is true but it is always the obvious ones that are a little trickier to prove. So I would appreciate any feedback. Thank you!  Here is what I am asked to prove:     If $n$ is composite then $(n-1)! \equiv 0 \pmod n$.   Proof:  $n$ is composite $\implies n=ab$ where $a,b \in \mathbb{Z}$ and $0<a,b<n$.  Case 1: If $a=b$ then $n=a^{2}$. Now $n \mid (n-1)! \implies a \mid (n-1)!$, so $$\begin{aligned} (n-1)! &\equiv 1\times 2\times \dotsb \times a \times\dotsb\times (n-a)\times\dotsb\times (n-1) \\ &\equiv 1\times 2\times \dotsb\times a \times\dotsb\times -a\times\dotsb\times -1 \\ &\equiv 0 \pmod n \end{aligned}$$  Case 2: $0<a<b<n$.  Then, since $a \mid n$, $b \mid n$ and $n \mid (n-1)!$ we have that $a \mid (n-1)!$ and $b \mid (n-1)!$.  So this implies $(n-1)! \equiv 1\times 2\times \dotsb\times a \times\dotsb\times b\times\dotsb\times (n-1) \equiv 0 \pmod n$, Q.E.D.


I just copied a website to a new server (files + db) then I have the exact same php scripts and the exact same db. I have that table :  CREATE TABLE `cours` (   `idcours` int(11) NOT NULL,   `titrecours` varchar(256) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8;   And that record :  INSERT INTO `creforma_cours` (`idcours`, `titrecours`) VALUES (-1040, 'DÃ©monstration');   The HEX value for DÃ©monstration is 44C383C2A96D6F6E7374726174696F6E (checked in original and new db)  I display that value with php print without any decoding (the php file if in UTF8 no bom). On the original website, it is displayed Démonstration but on the new one it is displayed DÃ©monstration.  How can it be different ? Is there a configuration of php or mariadb-server that can prevent decoding ?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I have wanted to propose something along these lines, but a comment by rjzii  it very well:     @GeorgeStocker In all fairness, an official SE post should just be locked from the beginning as a matter of policy. I'm not sure if the back-end supports locking the question and still allowing responses to be made.   During the time that the announcement in question was locked, it was not possible to add answers to the question, comment on it, or vote on it, even though the purpose of the lock was apparently just to protect the exact content/text of the question (as it was an official announcement and not a problem statement with scope for community improvement), rather than to prevent answers, voting, etc.  Let's create a new lock, the Official Announcement Lock (TM). This lock will prevent edits to the question, and possibly closure, but will allow all other actions - commenting, answering, adding bounties, and voting up or down. The text might look like this:     Locked as an official announcement. This is an official announcement from Stack Exchange and may not be edited by the community. If you wish to provide constructive feedback on or respond to this post, you may vote on it or post an answer. If you believe that this post needs an edit, flag the question or raise a new question on Meta.

(Similar to )  It would be nice if diamond mods could have the ability to prevent edits on a question/answer.    For example, the famous  answer has been (in the not recent past) defaced by a user who decided it was inappropriate.  Recently, the answer has shown up in the mod queue as flagged for the same reason.  I'd like to prevent someone from editing the answer (it is perfect), but locking it prevents people from upvoting.  The option to "prevent edits" would be nice.  Not only in this instance, but also in instances where edit wars are going on over a question/answer.


Can we measure limit of precision of measuring wavelength using ? If yes how can we do that?

I understand we cannot state with arbitrary precision the position and momentum of a micro-particle as we superpose infinite waves to create a wave packet at the exact position of the particle and hence cannot say which wave is corresponding to its momentum. This is theoretically said. Also some people say that measurement of one disturbs the other and some say it's reality.  Firstly, the theoretical explanation: why should I consider that a wave out of many superposed will give us the momentum or position? We might use another single wave which is not sine in nature and might get the results. Or why won't a single sine wave suffice? This all considers the micro-particle as wave because of de Broglie.  Secondly, the practical thing seems legit.  Thirdly, the electron must have some kinetic energy and position. It is who we are measuring and can't get it exact so why blame the electron as in theoretical concept. How we quantify the uncertainty, it must depend on the measuring device and various other factors.  I might need to edit this post based on your answer so that I can explain more clearly my thinking.  Edit: From here is what gets the measurement problem:        Text: Imagine that you're blind and over time you've developed a technique for determining how far away an object is by throwing a medicine ball at it. If you throw your medicine ball at a nearby stool, the ball will return quickly, and you'll know that it's close. If you throw the ball at something across the street from you, it'll take longer to return, and you'll know that the object is far away.   The problem is that when you throw a ball -- especially a heavy one like a medicine ball -- at something like a stool, the ball will knock the stool across the room and may even have enough momentum to bounce back. You can say where the stool was, but not where it is now. What's more, you could calculate the velocity of the stool after you hit it with the ball, but you have no idea what its velocity was before you hit it.   This is the problem revealed by Heisenberg's Uncertainty Principle. To know the velocity of a quark we must measure it, and to measure it, we are forced to affect it. The same goes for observing an object's position. Uncertainty about an object's position and velocity makes it difficult for a physicist to determine much about the object.   Edit: After seeing this answer one of my doubts is very well cleared, the other answers are also written and helpful:        Text: There is a definine velocity and momentum, we just don't know it.   Nope. There is no definite velocity--this was the older interpretation. The particle has all (possible) velocities at once;it is in a wavefunction, a superposition of all of these states. This can actually be verified by stuff like the double-slit experiment with one photon--we cannot explain single-photon-fringes unless we accept the fact that the photon is in "both slits at once".So, it's not a knowledge limit. The particle really has no definite position/whatever.


I have a QVariant that stores a double value. One place the value is coming from is a QDoubleSpinBox (but not only!), which has a min (0.3) and max (1.0) as limits.  I've noticed that I get an exception (the code is written like this) when I set the value below the minimum. What's surprising is that I'm actually setting the value to 0.3.  Through debugging I found out that the following code is the reason why this is happening:  // value is QVariant auto valueDouble = value.toDouble(); // use valueDouble   What happens is that when I set the value to 0.3 internally   value = 0.3 valueDouble = 2.9999999999999999   And 2.9999... is definitely below 0.3 hence the reason why I get the exception. Of course the 0.3 is probably a display "error" by the debugger inside Qt Creator. Nevertheless I'm more concerned about the internal error.  I also tried using QVariant::toFloat() and I got 0.300000012.  Needless to say this not only creates poor user experience but internally also leads to all sorts of issues.  I can make it so that the QDoubleSpinBox doesn't allow such behaviour however as I've mentioned such values comes from different locations in the applications so this issue needs to be handled on a deeper level.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have just noticed a funny Python lists' behaviour: matrix = [[0] * 3] * 2  matrix[0][0] = 1 print(matrix)  Output: [[1, 0, 0], [1, 0, 0]]  matrix[1][0] = 5 print(matrix)  Output: [[5, 0, 0], [5, 0, 0]]  How can I fix it? I'm figuring out, how to make matrix transposition, so I created such function: def transpose(matrix):   transMat = [[0] * len(matrix)] * len(matrix[0])    for i in range(len(transMat)):     for j in range(len(transMat[i])):       transMat[i][j] = matrix[j][i]  But because of this Python's feature it doesn't work. How can I avoid it?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


In the  there's no indication why the stub should be locked, since the only difference between a merged question and a duplicate is that answers in one were moved to another question, why is locking needed? This puts us on situations where we can't delete bad signposts or a off topic question which was the merging target. It's possible that this behavior is altered so that it no longer locks the source?

Questions can be merged into other questions.   What is a merged question? When should questions be merged? Who can merge questions? How do I request it? What happens to merged posts? Anything else I should know about merged questions?


I have a tool where, if I insert a graph, it gives me back the number of weakly connected components and the strongly connected components.   When I insert any undirected graph, the numbers of these two properties are the same.  When I insert any directed graph, the numbers of these two properties are different.  Is this indeed correct? If so, why is the undirected the same?

How is the following graph a weakly connected graph?


This completely sums up the problem I am having right now:  class A{ public:     int Avar;     A(int Avar = 0){this->Avar = Avar;} };  class B{ private:     static A *AArray; public:     static void setAArray(); };  int main(){     return 0; }  void B::setAArray(){     A *data;     data = new A[10];     AArray = data; // <- delete this line and the program complies }   This piece of code says I have an undefined reference to 'B::AArray' and won't compile. How do I resolve this if I want a static pointer to an array of class A objects in class B?  Note: my class does not use multiple files currently and everything is under one .cc file  Edit: the question that is marked as duplicate as does not deal with a pointer or with an array of objects from another class. Tried solution from said post with no results.

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


I have a directory with some .flac files:  [test]$ ls  'test file (with $ign & parentheses).flac'  'test file with spaces.flac'   I want to run an ffmpeg test command on those files, i used find with -exec argument to achieve this:  find ./ -type f  -iregex '.*\.flac'  -exec sh -c 'ffmtest=$(ffmpeg -v error -i "{}" -f null - 2>&1);if [ -n "$ffmtest" ];then echo -e "{}\n" $ffmtest;fi ' \;   Little explanation for my code:  The find command will find the .flac files and pass the names to the ffmpeg command for testing. The ffmpeg command tests the file and return an error string to stdout(because of the redirection at the end) or nothing if no error is found, the if statement following the ffmpeg command is used so that if ffmtest variable contains an error then print the name of the file with the error followed by the error string(if the file contains no error then nothing will be printed).  My code works as expected but it fails if the filename contains a $ sign followed by a letter  so for the test files mentioned above the output i get is this  [test]$ find ./ -type f  -iregex '.*\.flac'  -exec sh -c 'ffmtest=$(ffmpeg -v error -i "{}" -f null - 2>&1);if [ -n "$ffmtest" ];then echo -e "{}\n" $ffmtest;fi ' \; ./test file (with  & parentheses).flac  ./test file (with & parentheses).flac: No such file or directory   you can see that the test file with no $ sign was tested properly and ffmpeg didn't output any errors but it failed to even open the file with the $ sign in the name, you can see from the output of ffmpeg and echo that the filename was interpreted and the $ sign followed by the letters were treated as a variable.  So how can I tell find to escape such characters ?

I'm trying to use find to echo 0 into some files, but apparently this only works with sh -c:  find /proc/sys/net/ipv6 -name accept_ra -exec sh -c 'echo 0 > {}' \;   But using sh -c with find -exec makes me feel very uneasy because I suspect quoting problems. I fiddled a bit with it and apparently my suspicions were justified:   My test setup:  martin@dogmeat ~ % cd findtest  martin@dogmeat ~/findtest % echo one > file\ with\ spaces martin@dogmeat ~/findtest % echo two > file\ with\ \'single\ quotes\' martin@dogmeat ~/findtest % echo three > file\ with\ \"double\ quotes\" martin@dogmeat ~/findtest % ll insgesamt 12K -rw-rw-r-- 1 martin martin 6 Sep 17 12:01 file with "double quotes" -rw-rw-r-- 1 martin martin 4 Sep 17 12:01 file with 'single quotes' -rw-rw-r-- 1 martin martin 4 Sep 17 12:01 file with spaces  Using find -exec without sh -c seems to work without problems - no quoting necessary here:  martin@dogmeat ~ % find findtest -type f -exec cat {} \; one two three  But when I'm using sh -c {} seems to require some kind of quoting:  martin@dogmeat ~ % LANG=C find findtest -type f -exec sh -c 'cat {}' \; cat: findtest/file: No such file or directory cat: with: No such file or directory cat: spaces: No such file or directory cat: findtest/file: No such file or directory cat: with: No such file or directory cat: single quotes: No such file or directory cat: findtest/file: No such file or directory cat: with: No such file or directory cat: double quotes: No such file or directory  Double quotes work as long as no file name contains double quotes:  martin@dogmeat ~ % LANG=C find findtest -type f -exec sh -c 'cat "{}"' \; one two cat: findtest/file with double: No such file or directory cat: quotes: No such file or directory  Single quotes work as long as no file name contains single quotes:  martin@dogmeat ~ % LANG=C find findtest -type f -exec sh -c "cat '{}'" \; one cat: findtest/file with single: No such file or directory cat: quotes: No such file or directory three    I haven't found a solution that works in all cases. Is there something I'm overlooking, or is using sh -c in find -exec inherently unsafe?


I have a function foo that returns two values. Currently, I am iterating through a list as follows: A,B = [],[] for i in arr:     a,b = foo(i)     A.append(a)     B.append(b)  Is there a more pythonic way to accomplish this? I thought the following was sort of ugly, but maybe it's the best way? A,B = np.array([foo(i) for i in arr]).T

I have a list of 2-item tuples and I'd like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item.  For example:  original = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] # and I want to become... result = (['a', 'b', 'c', 'd'], [1, 2, 3, 4])   Is there a builtin function that does that?


I'm eager to use my respin of Ubuntu 14.04 on my other machines. The problem is that since Remastersys and Ubuntu Builder are discontinued, it's hard to find a good alternative. For some reason UCK won't work on my computer (even with various tweaks people post to make it work). It doesn't have to be a GUI program, but at least a bit usable. I also want to customize Ubiquity and install it with a USB. The system will be used within my company.  Thanks in advance!

I need an alternative software of Remastersys since it's not working in my system (Ubuntu 12.04.)  I want software just like remastersys. I don't want to install any new packages, I just want a piece of software that makes an ISO of my current system without any added packages.


Edit: I've opened  in the code-prettify project on GitHub.    The author of the question  noted in the comments that:     As expected, the broken SE syntax colouring now indicates to inexperienced eyes that the '> ' prompts are part of typed strings and the warning messages further destroy any highlighting utility.   I turned off the syntax highlighting by adding the <!-- language: lang-none --> tag, as described in the relevant meta thread:      However, it got me to wondering: why doesn't Stack Exchange support proper shell session syntax highlighting?  Oddly enough, including the tag <!-- language: shell_session --> does turn on some sort of syntax highlighting, even though I don't see shell_session anywhere in the supported languages list in the above linked Meta thread.  However, the syntax highlighting isn't great—it looks more like shell syntax highlighting than shell session syntax highlighting.  As noted, it doesn't properly identify the default PS2 prompt of > and highlights it as though it is part of the quoted string.  GitLab.com has shell_session syntax highlighting, as mentioned .  I checked and GitLab's highlighting does properly handle PS2 detection, and even error message detection.  Since the shell_session tag isn't even mentioned in  (and so I'm not sure why it does anything at all here on Stack Exchange), how can I propose improvements to the Stack Exchange functionality of shell_session highlighting so it can improve to be more like GitLab's?    Here is what GitLab's syntax highlighting looks like:    And here is Stack Exchange's highlighting of the same block:

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


With QGIS 2.12.3, I have two projected EPSG:2927 point shapefiles, A and B.  I would like to create a selection of A points that are within 100 meters of any B point.  This is easy in Arc, using the Select by Location tool with the search distance option.    I am aware of two Select by Location tools in QGIS (Vector -> Research Tools -> Select by Location and the Spatial Query plugin).  However, neither has a search distance option.  In summary, how to do a QGIS Select by Location with a search distance?

I have a point layer in QGIS. Each point represents a tree and each tree has information about its height as an attribute. I would like to build a query/expression to select all those trees that have an other tree higher than 7 meters within their 20-meter-buffer (20 meter radius).  I managed to do this "manually" by creating a 20-meter-buffer around all trees higher than 7 meters (after the selection of the trees higher than 7 meters) and then selected the ones within the buffer but I was wondering if its possible with a query/expression.  (maybe with a bit more complex one)  Unfortunately I do not have PostGIS so this should be done with Select by expression or Query Builder if possible.  (It would be also helpful to know if it's simply impossible)


I am looking for a better way to balance columns at the end of each chapter of a two-column layout.  I have found several relevant approaches:   use \documentclass[onecolumn]{memoir} and \usepackage{multicols}, then wrap the content of each chapter with a multicol environment. This has proven mostly successful, but doesn't allow column floats and does some strange things with the vertical space at the top of the environment. I find myself using \noindent and negative \vspace to align text at the beginning when needed... as at the beginning of a chapter if the first element is a \section. use \documentclass[twocolumn]{memoir} and \usepackage{balance}, with a \balance command in the first column of the last page of each chapter. This should do a better job of the two-column layout, including allowing column floats and correctly aligning text at the start of the chapter. It will cause some complications for me because the documents are machine-generated and I am trying to avoid manual intervention for predictable situations. Also, I will note that when I actually tried this, very bad things happened (apparently an infinite loop). use \documentclass[twocolumn]{memoir} and \usepackage{flushend}, but that applies only to the end of the document, and not the other chapter ends. \flushcolsend does not seem to be recognized in my deployment (TexLive 2013, looks like), so I have not been able to test that.   I have found  of course, but that was two and a half years ago. I am wondering if there is a newer and better solution now. Balanced columns at the end of each chapter (or at any \clearpage, I suppose) seems like something that would be commonly desired.  MWE: Chapter 2 does what I want for all chapters (because it's the end of the document).  \documentclass[twocolumn]{memoir} \usepackage{lipsum} \usepackage{flushend}  % margins set explicitly to force consistence between MWEs \setlrmarginsandblock{0.75in}{0.75in}{*} \setulmarginsandblock{1.00in}{0.7in}{*} \setheadfoot{0.70in}{0.3in} \setheaderspaces{*}{0.15in}{*} \checkandfixthelayout  \begin{document} \chapter{Chapter 1} \lipsum[1-10] \chapter{Chapter 2} \lipsum[11-20] \end{document}   I can get balanced columns using multicol, but that costs me column floats (which would be nice to have, if not critical) and manual intervention at the beginning of the environment).  \documentclass[onecolumn]{memoir} \usepackage{lipsum} \usepackage{multicol}  % margins set explicitly to force consistence between MWEs \setlrmarginsandblock{0.75in}{0.75in}{*} \setulmarginsandblock{1.00in}{0.7in}{*} \setheadfoot{0.70in}{0.3in} \setheaderspaces{*}{0.15in}{*} \checkandfixthelayout  \begin{document} \chapter{Chapter 1} \begin{multicols}{2} \lipsum[1-10] \end{multicols} \chapter{Chapter 2} \begin{multicols}{2} \lipsum[11-20] \end{multicols} \end{document}   It feels like redefining \clearpage might be my way forward, if nothing else, but beyond that I have little idea what change to make.

In a twocolumn layout, how can I balance columns at the end of each chapter?   Package multicol is not appreciated because it doesn't offer nice float placement in the columns (floats are not allowed inside multicols  environment, [H] placement is not floating) Package flushend does the jobs, but only for the last page of the document... why not for the last page of every chapter ? FWIW, every chapter of my document starts on a new page FWIW, I use the memoir class, but I don't think it matters here


I'm pretty inexperienced with LaTex, but I'm trying to make this table, and all of the cells are finally lined up correctly with their text in them, etc., etc., but for some reason the very last cell's text "0.9" is lifted above the others. I'm not sure why, the number may feel a bit elitist, or maybe he got caught up on a cliff and can't come down. Either way, I need the text to be level with the other numbers. Here's the code I used:  \documentclass{article}  \usepackage{calc} \usepackage{ifthen} \usepackage{tikz} \usepackage{pgfplots} \usepackage{mathtools} \usepackage[margin=1in]{geometry} \usepackage{amsmath} \usepackage{amssymb} \usepackage{array} \begin{document} \begin{center}  \begin{flushleft}Figure 1 \end{flushleft} Average Percent of \textit{Doremifasolati Arangeous} Frequencies (\%) \begin{tabular}{ | m{2cm} | m{2cm}| m{2cm} | m{2cm} | m{2cm}| m{2cm} | m{2cm} | }  \hline Doramus & Refaltido & Misanit & Fanatha & Sonphay & Laoli & Tidanme\\  \hline  $ 60% $ & $17% $ & $6% $ & $6% $ & $5.1% $ & $5% $ & $0.9% $  \\ \hline \end{tabular}  \end{document}    Thank you.

Unfortunatly, I have a problem with m-columns (array package) in tables with adjusted row height. Somehow in the last column (only there) the text is not centered vertically.  Check it out:    \documentclass{article} \usepackage{array}  \begin{document}  \begin{tabular}{|m{0.18cm}|m{0.18cm}|m{0.18cm}|} \hline a & b & c  \\[2ex] \hline 0 & 0 & 0  \\ \hline \end{tabular}  \end{document}


Is it true or false that a ring is never a direct sum of infinitely many non-zero left ideals?  It should be false because we can make a direct product of infinite copies of $\Bbb{R}$, and every copy is a left ideal.   But it was written in a book I was doing. I don't understand the reasoning behind it.

Let $R$ be a ring with unity. Let $ (a_i),i\in I $ be a family of non-zero ideals of $R$. Suppose that $R$ is a direct sum of the family $ (a_i),i\in I $ (i.e the additive group $R$ is a direct sum of the subgroups  $ a_i,i\in I $). I wish to prove that in this case $I$ must be a finite set.   I will explain the argument which I gave until the point of my question:   Take the identity element $ 1\in R $. Since $R$ is the direct sum of the $a_i$, there exists a finite subset $I_0 \subseteq I$ and elements $e_i \in a_i \setminus 0 , i \in I_0$ such that $1 = \sum_{i \in I_0} e_i $. Then, for every $x \in R$ we have $x = x.1 = \sum_{i \in I_0} xe_i \in \sum_{i \in I_0} a_i $ since each $a_i$ is an ideal, and so $R = \sum_{i \in I_0} a_i $.  My idea now is to prove that one must have $I = I_0$, but I have a feeling that I'm missing something trivial. Can anyone help me with this final step if possible? Thank you in advance.  On a final note, I'm assuming that each $a_i$ is an ideal, but as far as I was informed, this is also true for left ideals (or  right ideals).


I have two different files (rigs) which I would like to append one to the other, I did this by appending the object of one. Although now the material of this object is missing. How do i append it?

I have created several designs for a particular project and they are related, but I don't want to have to keep recreating any similar elements, such as shared materials or textures.  How can I use the existing data in a new Blender file?


Use de Moivre's theorem to find   $$\sum_{n=1}^{N} 2^{-n}\sin(n\theta)$$   How to find sum of imaginary parts of geometric progression, or use exponential form of complex numbers to find the summation in terms of N, sine, and cosine??

The question states:    I'm not sure what to do here. I used the geometric sum to do $2^{-n}$, but I can't think of a way to sum $\sin(n\theta)$ to get the required RHS.    Further working     Apologies for maybe being slow or missing something obvious here... I don't know how to get it into required form.


I have been working on my bachelors thesis for 10-11 months now and am about to hand it in. Without bragging, my topic was by far harder and more work than most bachelor theses.  Now I am wondering whether I should add an inscription to my parents in it. I really want to show that I am grateful for giving me the opportunity to study. Now I have read up on some advice on the internet saying that I probably shouldn't do it because bachelor theses are generally only meant for a small amount of people.  With my thesis this is different as I am planning on releasing at as a documentation of my work (my bachelor thesis was to write an improved version of an existing API).  What do you think?  EDIT:  I am talking about a short "To my parents." on a separate page in the beginning.  EDIT2:  Please remember, a Bachelor thesis is different to a dissertation.

I'm at the stage in writing my dissertation where most of the substantive aspects are finished and the only tasks left are more or less administrative. However, one thing that I've been avoiding is writing the "Acknowledgements" section. Obviously I will thank my supervisor, committee members, other faculty and staff that have played a meaningful role in my education, other students who have been friends and co-workers, my close friends, and my family (in that order!), but I'm struggling with how to approach it. Does anyone have advice or hot tips about what to do or not do that they'd be willing to share? Is it possible to make it meaningful without sounding contrived or pedantic or disingenuous? Do I go with the standard disclaimer about how any errors that remain after getting all that wonderful help and support are mine alone...? Thanks!


What is the metric tensor describing spacetime around an infinitely long rod?

I'm trying to find the metric describing the spacetime around an infinite cylinder of radius $\rho$ and mass density $m$. Since the spacetime is  and cylindrically symmetric, the metric must be of the following form:  $$\mathrm{d}s^2 = a(r) c^2 \mathrm{d}t^2 - b(r) \mathrm{d}r^2 - c(r) \mathrm{d}z^2 - r^2 \mathrm{d}\theta^2$$  Using  I obtained the following :  \begin{align} G_{tt} &= \frac{a(r) \left(c(r) \left(r b'(r) c'(r)-2 b(r) \left(r c''(r)+c'(r)\right)\right)+2 c(r)^2 b'(r)+r b(r) c'(r)^2\right)}{4 r b(r)^2 c(r)^2} \\ G_{rr} &= \frac{\left(r a'(r)+2 a(r)\right) c'(r)+2 c(r) a'(r)}{4 r a(r) c(r)} \\ G_{zz} &= -\frac{c(r) \left(r b(r) a'(r)^2+a(r) \left(r a'(r) b'(r)-2 b(r) \left(r a''(r)+a'(r)\right)\right)+2 a(r)^2 b'(r)\right)}{4 r a(r)^2 b(r)^2} \\ G_{\theta\theta} &= -\frac{r^2 \left(a(r) c(r) b'(r) \left(c(r) a'(r)+a(r) c'(r)\right)+b(r) \left(-a(r) c(r) \left(a'(r) c'(r)+2 a(r) c''(r)\right)+c(r)^2 \left(a'(r)^2-2 a(r) a''(r)\right)+a(r)^2 c'(r)^2\right)\right)}{4 a(r)^2 b(r)^2 c(r)^2} \end{align}  with all nondiagonal components equal to zero. From the , the  is $$T_{\mu\nu} = \frac{c^4}{8\pi G} G_{\mu\nu}$$  How can I proceed from here? Can the equations be simplified any further?


Ubuntu 14.04  I know that Ctrl + Pagedown/Pageup is used for tab switching Also we can change it in Edit > Keyboard shortcuts. I want to change the shortcut to Ctrl + Tab (forward) and Ctrl + Shift + Tab (previous) but it doesn't let me do so. I am habitual of changing tabs with these keys (as in browsers). Is there anyway to change the shortcut to Ctrl + Tab? So far I am using ` and ~ (exactly above the tab key) for my ease. but tab would be wonderful.  Thanks in advance

Keyboard shortcuts in gnome-terminal (Ctrl+Tab and Ctrl+Shift+Tab) in 12.04 don't seem to be working. Is there a setting that I dont know of?


In the book, “MECHANICS I” by BM Sharma (Cengage publications), I found following statement on page 6.9  Tension in a string remains same throughout if it is assumed to be massless and is equal to applied force on string. However if a string has mass, the tension  at different points will be different being maximum to the applied force at the end through which force is applied and minimum at other end connected to body.  I really can't understand what this statement wants to convey. Why would the tension be maximum on the direction along which the force is applied and minimum on the other end?

In an ideal case, we assume strings and ropes to be massless and having same tension throughout.  However, I was doing some questions which involved a rope with mass.  The question was that if a uniform thick rope of length 5 m is resting on a horizontal smooth (assume frictionless) surface and is pulled by a force of 5N from one end, then what is the tension in the rope at the point 1 m away from the end where force is applied? (sorry for the poor image)    I came to the conclusion that since rope is not fixed, tension anywhere should be zero. However, when I checked the answer, it was 4 N. I failed to understand how.  Then the next part of the question was that if the rope now hangs between two fixed points which are at same level, then what would be the tension in the rope at its lowest point?    The answer has to be expressed in terms of mass of string m, acceleration due to gravity and $\theta$ where $\theta$ is the angle that tangents to the rope make with the horizontal.  I took that force acting on lowest point is mg, since it is center of mass and hence T = mg. However, according to the answer it depends upon $\theta$ as well. However, I failed to see what I was doing wrong?  I would appreciate any help in solving these questions, since I have no clue of where exactly I am wrong. I did search the Internet and a few books, but everywhere they assumed string/rope to be massless.


I have installed Ubuntu 14.04 LTS on a HP pavilion Laptop. I am getting this error and unable to get into desktop.   I have tried this "" method but no matter what I do I cannot open GRUB menu neither can I fix this issue.  I believe I took the wrong decision to shift from Windows to Ubuntu just for being open source. I completely formatted OEM Windows 8 and now I am left with dead laptop.  NOTE: I cannot log into any menu so I can enter any commands, all I see is tty1 menu (Black screen command prompt style)

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


I have files Deep.flac and A1 - Rolling In The Deep.flac  I wrote the script below, however it can only work with Deep.flac It cannot seem to work with filenames with spaces. I am learning unix system though my OSX.   Basically, I am using sox to convert my flac to aiff while keeping the name of the files intact.  My Script convertX2Y.sh:  #!/bin/bash  # Author: Rei Yash Dean # Copyright: Free # Script: to convert flac files to aiff using sox; while keeping file name unchanged  for x in *.flac; do sox $x $(basename $x .flac).aiff; done   The error it returns is:  sox FAIL formats: can't open input file `The': No such file or directory

I've got a script that scp's a file from remote host back to local. Sometimes the file names contain spaces. scp does not like spaces in its file names. For some reason my attempts at handling the spaces have not resulted in the correct scp path.  Code:  PATH=/var/root/Documents/MyFile OG-v1.2.3.pkg scp $PATH Me@10.1.10.33:/Users/Me/Desktop   Results in  Cannot find directory: var/root/Documents/MyFile Cannot find directory: OG-v1.2.3.pkg   Enclosing PATH in quotes "$PATH" gives the same error.  Swapping the spaces for escaped spaces also is not working, although as far as I can tell it should:  ESC_PATH=${PATH/' '/'\ '}   although printing the escaped path shows that the edit worked:  echo $ESC_PATH > /var/root/Documents/MyFile\ OG-v1.2.3.pkg


Find the radius of the circle inscbribed inside the square. The distance from the side of the square to circle is (2,1)

Given this configuration :  We're given that the rectangle is of the dimensions 20 cm by 10 cm, and we have to find the radius of the circle. If we somehow know the distance between the circle and the corner of the square then we can easily find the radius. (It's equal to $ \sqrt{2}\times R-R$) I really can't understand how to solve it. Any help appreciated.


I upgraded from 16.10 to 17.04 and my laptop connects to home wifi but acts as if the network is not working, no website would load. It's not the browser, none of the apps work. A dozen reboots of laptop and router did nothing. Other laptops (win7), phones and tv use this network without issues. All was fine this morning but then the home wifi just stopped working on ubuntu (after waking it from sleep). For a few minutes it worked fine connected to the extender of that home wifi but then stopped that too.  Ubuntu connects and uses my mobile hotspot without issues, so far. Any ideas? None of the fixes in previously asked similar questions worked for me so I was told in another thread to ask my own question.

I suspect that the name server provided by my ADSL modem/router is buggy. Whenever I browse to a website for the first time in ubuntu, resolving the domain name takes at least 15 seconds.  To work around that problem, I changed the nameserver configuration in /etc/resolv.conf from 192.168.1.1 (my ADSL modem) to 8.8.8.8 (google's primary DNS). This seems to fix the problem, but unfortunately my changes to /etc/resolv.conf are overwritten by "NetworkManager" at each startup.  What is the proper way to configure the name server IP in ubuntu 10.4?


My PC machine is in ubuntu 16.04.  I want to login the tty, However ,when I input my username and press the 'enter' button , I can't input my password straight after that.It seems that two 'enter's were input automatically somehow .  I could login tty normally before.The only thing I did meanwhile was configuring ssh on the PC machine for my laptop to access it .

I upgraded from 16.04 to 18.04. When I press Ctrl+Alt+F3 I get the terminal which prompts for the username. When I type my username and press Enter, it doesn't wait for my password (its as if I pressed Enter without entering anything). Even if I enter something, the text shown in plaintext and then it keeps on saying my password is wrong. After few times, the screen is cleared and it prompts for my username again and the same loop goes on.


Say $n\in \mathbb N$ with n odd and $n|y^2-1$ for some $y \in\mathbb N$. Show that $n=gcd(n,y-1)gcd(n,y+1)$. Also show a counterexample when $n$ is even.   I know that $n|y^2-1=(y+1)(y-1)$ so $n|(y+1)$ and $n|(y-1)$.   Since $n|(y+1)$ we can say $y+1=nx$ for some $x\in \mathbb Z$.  Similarly $n|(y-1)$ we can say $y-1=ny$ for some $y\in \mathbb Z$.  So $y^2-1=(y+1)(y-1)=n^2xy$.  I am having issues connecting this back to what we are trying to show.

Hi I'm practicing some number theory and I've come across the following problem,  Suppose $n \geq 1$ is an odd integer that divides $a^2 - 1$ for some integer $a > 1$. Prove that,  $$n = \gcd(a-1, n)\gcd(a+1, n)$$  Now I know that the $\gcd(a-1, a+1) = 1$ if $a$ is even and $2$ if $a$ is odd and I believe this is relevant but I can't solve the problem. I've not really any idea where to start so even just help with that would be great.  Thanks


My laptop(running on windows 7) is able to read CDs but not DVDs. When I insert a DVD it tries it's best to read it i.e.. it makes lot of noise, shows a CD icon near the cursor and shows progress bar loading forever on the explorer, but never reads it. I tried reinstalling the DVD driver(MATSHITA DVD-RAM UJ8D1 ATA Device), but that didn't help. I also used a program developed by Microsoft called "Fix It" to troubleshoot DVD driver errors, but that didn't help. I remember that I had disabled auto-play a few months back, so now I have enabled it  to check if that was causing the errors, but no use, still the problem is persisting. I also looked into •HKEY_LOCAL_MACHINE •SYSTEM •CurrentControlSet •Control •Class •{4D36E965-E325-11CE-BFC1-08002BE10318} and did not find upper and lower filters When a DVD is loaded, I double clicked on DVD/CD RW drive in My Computer, the DVD R/RW ejects and says "Insert a disc, Please insert a Disk to Drive F:"    What can I do now?

My laptop has a Matshita uj8b1as DVD/r/RW drive, and recently it started refusing to read data from DVDs, I thought there was something wrong with the setting of the software so I reinstalled Windows 7. But even with Windows 7 freshly installed, it still wouldn't read from a DVD.   I wanted to know if this is a hardware failure, so i tried loading a boot CD when the computer booted up. The drive read the boot CD without problems. but the Drive wouldn't read the DVD I put in there.   I also looked into •HKEY_LOCAL_MACHINE •SYSTEM •CurrentControlSet •Control •Class •{4D36E965-E325-11CE-BFC1-08002BE10318} and did not find upper and lower filters  When a DVD is loaded, I double clicked on DVD/CD RW drive in My Computer, the DVD R/RW ejects and says "Insert a disc, Please insert a Disk to Drive F:" I tried everything I knew how to do (reinstalling Windows 7, Uninstalling the driver and reinstalling it in Windows Device Manager) but I still couldn't fix the problem. I want to be able to use the drive again. I really appreciate your help!


My laptop have already installed Windows 10 in UEFI but I mistakenly dual boot Ubuntu OS In legacy mode. So everytime I have to change BIOS SETUP settings to UEFI for Windows and legacy and legacy first for Ubuntu. So what I do to when I start my pc it ask me which OS to use(it also ask currently but don't run the other one according to BIOS setting)

So it's time to ask my first question, something I've been struggling with for a while now. I know there are some questions around the same topic, however, none of them (which I could find) have been of any help.  Before you ask, I want to do some explaining of the core problem.  Why have I not just installed it in UEFI mode?  I was unable to boot the install (or live mode for that matter) in uefi mode. After some time spent searching on google I noticed that several people have had this exact problem: after the menu appears (the uefi one), whatever I do simply results in a black screen.  After reading this article , I though I'd try installing ubuntu in legacy mode, and then use boot-repair to convert my install to uefi.   NOTE: I am dual booting ubutnu alongside Windows 10. Currently I have to enter the bios settings to enable uefi boot in order to enter windows and vice versa.   What I have tried  Boot-repair  I then tried, of course, boot-repair while in a legacy mode session only to get this error message:     The current session is in Legacy mode. Please reboot the computer, and use this software in an EFI session. This will enable this feature. For example, use a live-USB of Boot-Repair-Disk-64bit (www.sourceforge.net/p/boot-repair-cd), after making sure your BIOS is set up to boot USB in EFI mode.   Boot-repair live usb  I tried creating a live usb with boot-repair 64bit only to encounter the same problem as when booting the ubuntu install  Why do I need to boot with UEFI?  Well I don't REALLY need too boot using UEFI, however, my current windows install does, and it would be great to be able to choose whether to boot windows or ubuntu without having to switch between legacy and uefi.  Need any more information?  Is there a way to manually create the /boot partition and do the necessary changes for my system to boot efi?  Other suggestions?  Thanks  EDIT:  While I have tried both on and off, secured boot has been turned off for most of my attempts.  Edit #2: (In response to Rod Smith and comments regarding more info)   I have tried rEFInd boot manager, it encounters the very same problem I have tried rufus (Windows) and unetbootin (Ubuntu) for creating the usb media, both of which producing valid media (for other computers at least) I have a friend with (almost) the same computer with the same problem Very few distros work, Arch and Gentoo are among those who do work I have a GTX 1060 card on a Multicom laptop Windows does indeed use GPT and UEFI boot   Many of my assumptions have been made after reading this post right here:   Especially the text right after something describing my problem:     There is no solution for these errors and the workaround is to disable UEFI to enable the Ubuntu installer to run in legacy mode; after which boot-repair can be used to install grub-efi which then allows/needs UEFI switched back on before Ubuntu will boot using UEFI.   I actually assumed I couldn't reach the F6 menu at all, but now I haven't had time to recheck that.


Calculate:   $$\lim_{n\to\infty} \frac{ (1^{1^p}2^{2^p}\cdot...\cdot n^{n^p})^{ 1/n^{p+1} }}{n^{1/(p+1)}}$$   I've done some steps as follows: $$a_n:=\frac{ (1^{1^p}2^{2^p}\cdot...\cdot n^{n^p})^{ 1/n^{p+1} }}{n^{1/(p+1)}} \iff \ln a_n=\frac{1}{n^{p+1}}\big(\sum_{k=1}^nk^p\ln k-\frac{n^{p+1}}{p+1}\ln n\big) \iff \\\ln a_n =\frac{1}{n}\sum_{k=1}^n\big[\big(\frac{k}{n}\big)^p\ln \frac{k}{n}\big]+\frac{1}{n}\sum_{k=1}^n\big(\frac{k}{n}\big)^p\ln n-\frac{\ln n}{p+1}.$$ Then, I was wondering if I could make some integrals out of it but still there are some odd terms.   I think my approach isn't so good...

Prove that for real number $p\geq  0$ we have   $$\lim_{n\to\infty}\frac{(1^{1^p} \cdot2^{2^p}\cdots n^{n^p})^\frac{1}{n^{p+1}}}{n^\frac{1}{(p+1)}} = \exp\left(\dfrac{-1}{(p+1)^2}\right).$$


How do I upgrade Ubuntu 12.10 to Ubuntu 13.04 using a bootable USB? S  I have a laptop, this is dual boot, Ubuntu 12.10 and Windows 7. I want to upgrade to 13.04 using bootable USB.

I have dual boot Win7/Ubuntu 12.10. I have a 13.04 live USB. How can I upgrade the 12.10 install from the live USB?  I read previous questions here that answer this question - they all say that the upgrade option comes up when you hit install. In my case, the options that come up are "Install Ubuntu alongside other OSes", fresh install, and "something else". I tried the first and last of those options, and neither of them showed any option for upgrades.


I'm trying to install Tor on Ubuntu the way that the Tor website says and I'm getting nowhere. I added these to the first file then the second then both at the same time.   You need to add the following entry in /etc/apt/sources.list or a new file in /etc/apt/sources.list.d/:  deb https://deb.torproject.org/torproject.org bionic main deb-src https://deb.torproject.org/torproject.org bionic main    Then went to add the gpg but that didn't work the first command just sat on a blank terminal line for about 5 minutes then basically timed out. Saying it didn't get anything and the second didn't work without the first.   Then add the gpg key used to sign the packages by running the following commands at your command prompt:  gpg --keyserver keys.gnupg.net --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -    Has anyone used these instructions and made it work or have any ideas on how to make it work?

In Ubuntu 13.04 I used to use the ppa:upubuntu-com/tor64  PPA to install the 64-bit Tor Browser Bundle. However, in Ubuntu 13.10 it doesn't work anymore. How do I install the Tor Browser Bundle in Ubuntu?


For example: def main():     if something == True:         player()     elif something_else == True:         computer()  def player():     # do something here     check_winner()  # check something      computer()  # let the computer do something  def check_winner():      check something     if someone wins:         end()      def computer():     # do something here     check_winner() # check something     player() # go back to player function   def end():     if condition:         # the player wants to play again:         main()     elif not condition:         # the player doesn't want to play again:         # stop the program            # whatever i do here won't matter because it will go back to player() or computer()  main()  # start the program  My problem is that if a certain condition becomes true (in the function check_winner) and function end() executes it will go back to computer() or player() because there's no line that tells the computer to stop executing player() or computer(). How do you stop functions in Python?

I am aware of the die() command in PHP which exits a script early.  How can I do this in Python?