I can't understand why this Timer is animating jaggedly. Is this a platform-dependent problem? I'm writing a 2D game using this kind of animation and am frustrated with the uneven frame rate. Here's the code for a simplified example:  import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point;  import javax.swing.JPanel;  public class AnimationTest extends JPanel {     private static final long serialVersionUID = 1L;     private Point location = new Point(0, 300);     private int speed = 3;      public AnimationTest()     {         setPreferredSize(new Dimension(800, 600));     }      public void timeStep()     {         move();         repaint();         currentTime = System.nanoTime();         System.out.println(currentTime - previousTime);         previousTime = currentTime;     }      private void move()     {         location.x += speed;         if(location.x >= 800) location.x = 0;     }      @Override     protected void paintComponent(Graphics g)     {         Graphics2D g2d = (Graphics2D) g;         super.paintComponent(g2d);         g2d.fillOval(location.x, location.y, 40, 40);     } }   And here's the main method:  import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  import java.util.Timer; import java.util.TimerTask;  import javax.swing.JFrame; import javax.swing.WindowConstants;  public class AnimationTestMain {     public static void main(String[] args)     {         JFrame frame = new JFrame("Test");         final AnimationTest test = new AnimationTest();         frame.add(test);         frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);         frame.pack();         frame.setVisible(true);          int animationMethod = 0;          if(animationMethod == 0)         {             new javax.swing.Timer(10, new ActionListener()             {                 @Override                 public void actionPerformed(ActionEvent e)                 {                     test.timeStep();                 }             }).start();         }         else if(animationMethod == 1)         {             Thread thread = new Thread(new Runnable()             {                 @Override                 public void run()                 {                     while(true)                     {                         test.timeStep();                         try                         {                             Thread.sleep(10);                         } catch (InterruptedException e) {}                     }                 }             });             thread.start();         }         else if(animationMethod == 2)         {             java.util.Timer timer = new Timer();             timer.scheduleAtFixedRate(new TimerTask()             {                 @Override                 public void run()                 {                     while(true)                     {                         test.timeStep();                         try                         {                             Thread.sleep(10);                         } catch (InterruptedException e) {}                     }                 }             }, 0, 10);         }     } }   Modifying the animationMethod variable doesn't change much of the result. You can see the uneven frame rate in the nanosecond printouts. Help!

I have a method which should be delayed running for a specified amount of time.  Should I use  Thread thread = new Thread(() => {     Thread.Sleep(millisecond);     action(); }); thread.IsBackground = true; thread.Start();   Or  Timer timer = new Timer(o => action(), null, millisecond, -1);   I had read some  about using Thread.Sleep is bad design. But I don't really understand why.  But for using Timer, Timer has dispose method. Since the execution is delayed, I don't know how to dispose Timer. Do you have any suggestions?  Or if you have alternative codes for delayed execution are also appreciate.


The series  $$\sum\limits_{n = 1}^\infty  {\arctan \dfrac{2}{{{n^2}}}}$$ converges because it is asymptotic to $\dfrac{2}{n^2}$ which is convergent.  What is its sum and why?

Here is an interesting topic.  It comes from evaluating $$\sum_{k=1}^{\infty}tan^{-1}\left(\frac{1}{k^{2}}\right)$$  I managed to dig up an old paper I have on the sum of arctans by Boros and Moll.  It is called the Method of Zeros.  It is located here:   on page 6-7   I will post, verbatim, what it says.  Perhaps someone can figure out how they arrive at the solution.  They skip over the details and I do not know how they arrived at the general form they establish in [2].  "Based on the factorization of the product  $$p_{n}:=\prod_{k=1}^{n}(a_{k}+ib_{k}), \;\ a_{k},b_{k}\in R$$  The argument of $p_{n}$ is given by $$\text{arg}(p_{n})=\sum_{k=1}^{n}\tan^{-1}\left(\frac{b_{k}}{a_{k}}\right)$$  up to an integral multiple of $\pi$.  This can be applied to the case of a polynomial with real coefficients given by  $$p_{n}(z)=\prod_{k=1}^{n}(z-z_{k})$$  Then,  $$\text{arg}(p_{n}(z))=\sum_{k=1}^{n}\tan^{-1}\left(\frac{x-x_{k}}{y-y_{k}}\right)$$  up to an integral multiple of $\pi$.  The special case $$p_{n}(z)=z^{n}-1$$ has roots at   $$z_{k}=\cos(\frac{2\pi k}{n})+i\sin\left(\frac{2\pi k}{n}\right)$$,  so we get:  $$\text{arg}(z^{n}-1)=\sum_{k=1}^{n}\tan^{-1}\left(\frac{x-\cos\left(\frac{2\pi k}{n}\right)}{y-\sin\left(\frac{2\pi k}{n}\right)}\right)$$  The classical factorization  $$\sin(\pi z)=\pi z\prod_{k=1}^{\infty}\left(1-\frac{z^{2}}{k^{2}}\right)....[1]$$  shows that one can think of $\sin(\pi z)$ as a polynomial in z of infinite degree.  Euler than derived $$\sum_{k=1}^{\infty}\frac{1}{k^{2}}=\frac{{\pi}^{2}}{6}$$ by comparing the cubic terms of [1].  This now yields $$\sum_{k=1}^{\infty}\tan^{-1}\left(\frac{2xy}{k^{2}-x^{2}+y^{2}}\right)=\tan^{-1}(y/x)-\tan^{-1}\left(\frac{\tanh(\pi y)}{\tan(\pi x)}\right)....[2]$$"  That is it.  They mention Euler's famous sum of reciprocal of squares then just skip to "this then yields...."  Does anyone see how?.   Besides that, didn't Euler compare the square terms and not the cubic ones?.  So, for the problem at hand, we would let $x=y=\frac{1}{\sqrt{2}}$ and arrive at:  $$\sum_{k=1}^{\infty}\tan^{-1}\left(\frac{1}{k^{2}}\right)=\frac{\pi}{4}-\tan^{-1}\left(\frac{\tanh\left(\frac{\pi}{\sqrt{2}}\right)}{\tan\left(\frac{\pi}{\sqrt{2}}\right)}\right)\approx 1.42474......$$


I quite new to blender; i wand to make the following kind of track for a racing game i am working on. I am overwhelmed by the many things to stard; for this case is it better to start with the road or with the landscape ? I was thinking to use spline and extrude the road to be able to adapt the road; is it the proper way of doing it ? For the landscape i should start with a plane that i subdivide a lot but then how to get this random moving vertices ? Thanks !

I need to construct a track for a racing game. Can anyone suggest some good tutorials for creating a curved road.


So I'm an expatriate at a totally new place, and all bread sold in here got 2~4 days expiry and I usually don't finish it in that short period of time, I always store all kinds of breads and pastry/bakery in the freezer, and get them out before using by few hours, then get the rest back to the freezer.  So I was wondering is it safe to eat an expired bread? The color and smell of the bread never changed at all.  If it might make any difference, the type of bread I'm referring to is pita bread.

Just read this which basically says you can freeze and thaw food in the fridge any number of times.    I'm still unclear on one point. If I had food which would be good in the fridge for 4 days and i put it in the freezer after 3 days, when I put it back in the fridge is my food good after its thawed for another 4 days or 1 more day?


So after allocating char array in debugging windows I can see my array is filled with 0xCC. What does it mean? (-52 = 0xCC)

I know that the compiler will sometimes initialize memory with certain patterns such as 0xCD and 0xDD.  What I want to know is when and why this happens.  When  Is this specific to the compiler used?  Do malloc/new and free/delete work in the same way with regard to this?  Is it platform specific?  Will it occur on other operating systems, such as Linux or VxWorks?  Why  My understanding is this only occurs in Win32 debug configuration, and it is used to detect memory overruns and to help the compiler catch exceptions.  Can you give any practical examples as to how this initialization is useful?  I remember reading something (maybe in Code Complete 2) saying that it is good to initialize memory to a known pattern when allocating it, and certain patterns will trigger interrupts in Win32 which will result in exceptions showing in the debugger.  How portable is this?


when I am trying to login to mysql using mysql -u root -p I am getting the following error  mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)   I have put root as my password while mysql-server was getting installed.

In my server, everytime I try to access MySQL I get the error:        Access denied for user 'root'@'localhost' (using password: NO)   when I try mysqladmin -u root -p password I get        Access denied for user 'root'@'localhost' (using password: YES)   How can I access MySQL in my Ubuntu server 12.04?


How do I show that if a matrix $A \in \mathcal{M_{3}}(\mathbb{R})$ has a inverse, then $\det A^{\star}=\det^2A$?   I was trying to use that $A^{\star}= \det(A)\cdot A^{-1}$. Then what and why? If I go to det in that equality why should I get $(\det(A))^3\cdot \det(A^{-1})$?

I have the following proof that I would like to be walked through because I'm not intuitively seeing what to do:  If $A$ is $n\times n$, prove $\det\left(\operatorname{adj}(A)\right) = \det(A)^{n-1}$.  I know the property of $A\operatorname{adj}(A) = \det(A)I$ is important but I don't know how to apply it to get an answer. Any help is much appreciated.  Thanks,


got closed as duplicate of .  The later question is both better worded (also has more votes) and better answers (more votes, and a workaround that's not in the original.)  Shouldn't there be an option to close an older question as an inferior duplicate of a newer question?  Or does the long-tail answer always have to be the older inferior question?

What's everyone's opinion on closing an older question as a duplicate of a newer one, if the newer one is clearly the better resource? I'm looking at a special case right now, where the two were posted by the same person; the  was migrated to SU before a commenter pointed out it was a . Is it considered good practice to close the older as a duplicate of the newer?  More generally, is it ok to do that for separate questions posted by different people, if the older question went unanswered but the newer has a good answer?  (I should probably mention I saw , but I think this is separate)


I know this question has been asked so many times on this website but neither do the questions nor the answers satisfy my requirements accordingly.  I'm yet to go to a university with a keen interest in Mathematics. So, no wonder I would like to see no-nonsene math (not heavy either) in a Physics textbook.  I started reading R. Shankar's Fundamentals of physics and I have started to understand the physical phenomenon. I love this book.  But I don't like the way he gets all the $\mathrm{d}t$'s cancelling $\mathrm{d}x$ from both sides.  So, here is my requirements:   An Introductory Physics Book having a good portion of Classical Mechanics The text should have fresh math. I would more than love to see a calculus-based approach.  Not more than 500 pages, please!

I'm a bachelor student majoring in math, and pretty interested in physics. I would like a book to study for classical mechanics, that will prepare me to work through . What books would be good for a beginner?


I am working on a date app where user will enter date and i am validating that date. Date format is dd/MM/yyyy. This is my code   import java.util.*; import java.text.SimpleDateFormat; import java.text.ParseException;  public class HelloWorld {   public static void main(String[] args) {  //Scanner sc = new Scanner(System.in);   String dat = "02/1/2018";   try {              SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");                 df.setLenient(false);                 df.parse(dat);                 System.out.print("valid");             } catch (ParseException e) {                 System.out.print("invalid");             }     }  }   This is working perfect and validating my date but when i enter my date like 22/02/2-19 that also come as valid. But it should be invalid because my year is 2-19.

I find it curious that the most obvious way to create Date objects in Java has been deprecated and appears to have been "substituted" with a not so obvious to use lenient calendar.  How do you check that a date, given as a combination of day, month, and year, is a valid date?  For instance, 2008-02-31 (as in yyyy-mm-dd) would be an invalid date.


Here is the code giving me trouble:      String more = "yes";     Scanner in = new Scanner(System.in);      while (more != "no") {             //do stuff                       System.out.println("Want to add more? (yes or no)");             more = in.nextLine();     }   So long as the user does not enter "no," the loop should continue. The issue is that when I enter no, it still doesn't stop.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Let $f:[0,1]\rightarrow\mathbb{R}$ be a continuous function such that $f(x^{2})=f(x)$, $\forall x\in [0,1]$. Prove that $f(x^{2n})=f(x)$, $\forall x\in [0,1], \ \ n\in\mathbb{N}$. Honestly, I don't know how to proceed. I though about induction but I don't know how it could work. It's clear that $$f(x^{2n})=f((x^{n})^{2})=f(x^{n})$$ But that $n$ could be an even number or an odd number and I don't know how to treat these cases. I would like an advice for the demonstration, thanks before.

Let $f:[0,1] \to \mathbb{R}$ be a continuous function such that $f(x)=f(x^2)$ for all $x \in [0,1]$.  Any hint/idea for proving that $f$ has to be constant?


I'm using Chrome as the default browser on all my devices (laptop, desktop, tablet, smartphone, etc.), and on all of them I'm logged in with my Google account. It happens that I did't use my laptop so much in the last months, so I'm having difficulties accessing the laptop related history on Chrome, because when I go to history I found weeks and weeks of browsing history generated on the other devices. Is there a way to quickly access the local browsing history on a specific device?

Where does Google Chrome for Linux store user specific data such as bookmarks ?  I can't find a .chrome or .google directory under my home directory, any other directory I should look at ?


I have several hundreds of directories and in each of these directories there are files with date in their filenames, like this:  $cd dir1 $ls  20190915.file.gz 20190916.file.gz 20190917.file.gz ...   Sometimes it happens that a certain file does not get generated in a certain folder. Continuing from the previous example, file 20190916.file.gz might be missing in dir2:  $cd dir2 $ls 20190915.file.gz 20190917.file.gz ...   How could I list only directory names that do not contain 20190916.file.gz?  $find . | grep 20190916 would list all folders that do contain this file, so basically I only need to somehow reverse the output of this command

I want to navigate through all the files in a folder and find out the missing file for a specific date.  Files are partitioned by hour and file name have yyyy-mm-dd-hh formatting.   So between 2017-07-01 and 2017-07-02 there will be 24 files from 2017-07-01-00 through 2017-07-01-23  How can I find missing hourly file if I pass above dates as start and end date?   Appreciate any input!


Is there a way to view & modify the code of standard lightning components that are visible when editing the Napili template in the community builder. I was wondering if I could modify some of the code and use it as lightning out.


Like below standards:  Class name should start with C -> CSomeClass Integers should have prefix i -> int iIndex; Bool prefix b -> bool bIndex; Const char * prefix szc -> char * szcIndex Pointers with prefix p -> int *piIndex;  Const should add prefix c -> const int ciIndex; for global variables use prefix g_ -> const double g_pi = 3.1415926535897; for private variables use prefix m_ -> class{ int m_x;}; for function arguments use prefix t_ -> SomeMethod(int t_x){m_x = t_x;}   Naming variables like this, is that a good idea or bad idea?

I know what Hungarian refers to - giving information about a variable, parameter, or type as a prefix to its name. Everyone seems to be rabidly against it, even though in some cases it seems to be a good idea. If I feel that useful information is being imparted, why shouldn't I put it right there where it's available?  See also:


I have to solve   $$ I=\int_{-r}^r \int_{-\sqrt{r^2-x^2}}^{\sqrt{r^2-x^2}} \sqrt{1 - \frac{x^2 + y^2}{x^2 + y^2 - r^2}} dy dx $$ with substitution and then the trick that $$\dfrac{1}{\sqrt{1 - x^2}} = \dfrac{ d{\arcsin(x)}}{dx}$$  Can someone give me a suggestion on what I should substitute in order to continue?  Thank you in advance.

I have to solve     $$\int_{-r}^{+r}\int_{-\sqrt{r^2-x^2}}^{+\sqrt{r^2-x^2}} \sqrt{1-\frac{x^2+y^2}{x^2+y^2-r^2}} \operatorname d y \operatorname d x$$  with substitution and then the trick that $\dfrac 1 {\sqrt{1-x^2}} = \dfrac{\mathsf d\;\arcsin(x)}{\mathsf d\;x\qquad\quad\;\,} $  can someone give me a tip on what I should substitute in order to continue?


I am curious to learn the difference between selecting from two tables and joining in the WHERE clause and explicitly using a JOIN clause.   For what it's worth, I'm using MSSQL not Oracle so I'm interested in the inner workings of this in a MSSQL so unless this causes the same effect as Oracle,  doesn't help me.  Take for example the following two statements:  SELECT a.Field1, a.Field2, b.Field1 FROM tbl_ExampleA a, tbl_ExampleB b WHERE a.Field1 = b.Field1   and  SELECT a.Field1, a.Field2, b.Field1 FROM tbl_ExampleA a     INNER JOIN tbl_ExampleB b     ON a.Field1 = b.Field1   They return the same results, but behind the scenes, what is happening differently?

Is there a difference in performance (in oracle) between  Select * from Table1 T1  Inner Join Table2 T2 On T1.ID = T2.ID   And  Select * from Table1 T1, Table2 T2  Where T1.ID = T2.ID   ?


I have a question about how to mount best a DSLR camera to an aeroplane. But now I'm wondering, where I would have to ask it? The camera does also have to be controlled from inside the plane.   In the aviation section, because they have the knowledge about aeroplanes, structure and aerodynamics.  In the photography, because they have experience with mounting cameras to all sort of things (GoPro)  Arduino/Raspery Pi - For how you would control the camera.  somewhere else?  I believe posting it to all sites is not a good answer, but how could I reach all the people? I believe duplicate questions wouldn't be a good Idea.  I know there has been a similar question before (where they said, ask similar questions on different networks and point to each other, but I doubt that this would be helpful in this case.  What should I do?  Are there some tags, where you could tag another Stack Exchange community, to include them as well?

First, this is about beta sites that might not even exist later, but imagine they will for the sake of this question. Taking the latest 10 questions on , I see 3 questions related to Mac OS X:    From my point of view, all 3 could also fit on , the 1st one could also be on SO, the 2nd and 3rd could also be on SU. How we will deal with this type of situation? When should we close a question as "Belongs on [...]"? I already see identical questions asked on 2 or 3 different sites (by the same or different users). Is there anything planned to link these questions or something like that? I mean something else than the already existing "Linked" feature. Something to include answers from site X in site Y or something like this.


I have one field named (OBID) identificator of an municipal. Second field is ZAPOSL which indicates the number of employees in several stores in this municipal.  I wolud like to summarize all employees in each municipal.  Example: If the municipal ID is for example 55, QGIS should sum all ZAPOSL numbers which correspond to the OBID = 55.  See figure: OBID = 55: ZAPOSL: 2+0+18+4+8+0+4 = 36  ArcView knows that as Summarize and creates a new table with the result...

If I have a code for each polygon and I have counted the area in m² for each of them (all this information is in single columns). How can I summarize these areas by codes (for example summarize all areas with code 100 etc.) in QGIS 2.6.1.?


Earlier, I had created some links to another folder using the following command.  sudo ln -s path_name link_name    These links are looking similar to the folders. I am not able to differentiate between a folder and a link. Is there a way to find the difference between a folder and a link to another folder?

What do the different colours in Ubuntu's ls command mean? For example, when I type the ls command in one of my folders, I get one of the files in light green, the other (which is a folder) in blue with green highlighting.   What do those colours mean, and there is any manual about all the colours?


How does one deduce the approximation of $\sqrt{7}$ to be $\frac{10837}{4096}$ by taking $x = \frac{1}{64}$ in the expansion of $\sqrt{1-x}$?  How should you approach such a question? I assume the first step would be to expand $\sqrt{1-x}$ which can only be done through binomial theorem (afaik).   That gives $\sqrt{1-x} = 1 - \frac{1}{2}(x) - \frac{1}{8}(x^2)$ + ... and so on.  How do you continue? I can't seem to figure out how taking $x = \frac{1}{64}$ accomplishes anything.

I am trying to solve a 2 part question, the first part is to expand $\sqrt{1-x}$ up to and including the term $x^2$ which I did.  This gives me $1-(0.5)x-(0.125)x^2 + ...$  However, the 2nd part of the question says that by taking $x=(1/64)$ in the expansion of part (i) -> which refers to the one above, deduce that $\sqrt 7 = 10837/4096$. How do i do this part?  EDIT (After Hint Given By SimpliFire):  $$ \sqrt{1-\frac1{64}}=\frac{\sqrt{63}}8=\frac38\sqrt7 $$ $$ =\frac83\sqrt{1-\frac1{64}}\;=\sqrt7 $$ $$ =\frac83\left(1-\frac12\left(\frac1{64}\right)-\frac18\left(\frac1{64}\right)^2\right)\; $$ $$ =\frac83\left(1-\frac1{128}-\frac1{32768}\right)\; $$ $$ =\frac83\left(\frac{32768}{32768}-\frac{256}{32768}-\frac1{32768}\right)\; $$ $$ =\frac83\left(\frac{32511}{32768}\right)\; $$ $$ =\frac{260088}{98304} $$ $$ \frac{10837}{4096}\;\approx\sqrt7 $$  I'm not sure if I can present it like this, if it is okay i will post it as my answer :X


I'm getting the exception shown below, when I run the following query with jdbc. This is a simplified example, the other parts of the preparedStatementSetter with setString and setInt, etc. ran successfully.  public List<EmployeeMonitoringResultTo> searchEmployeesForEmployerInRange(final GetEmployeesForEmployerInRangeCriteria criteria) {     final StringBuilder sql =      new StringBuilder(  "select * from CODES c ")                 .append("    where c.TYPE in ( ? )  "); // TYPE has DATA_TYPE 12, TYPE_NAME VARCHAR      return jdbcTemplate.query(         sql.toString(),         new PreparedStatementSetter() {             @Override             public void setValues(PreparedStatement ps) throws SQLException {                 ps.setArray(1, searchTypes());             }         },         new SpecificRowMapper<SpecType>()         );       }  private Array searchTypes() {     final Collection<String> collection = fetchStrings();      Array resultArray = null;;     try {         resultArray = jdbcTemplate.getDataSource().getConnection().createArrayOf("VARCHAR", collection.toArray());     } catch (SQLException e) {         log.error("Problem with created java.sql.Array", e);         throw e;     }      return resultArray; }      Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException:   [jcc][10349][11717][4.13.80] Unsupported cross conversion from source   type Object;. ERRORCODE=-4461, SQLSTATE=42815     at   com.ibm.db2.jcc.am.id.a(id.java:677)  at   com.ibm.db2.jcc.am.id.a(id.java:60)   at   com.ibm.db2.jcc.am.id.a(id.java:103)  at   com.ibm.db2.jcc.am.ic.a(ic.java:289)  at   com.ibm.db2.jcc.am.ic.a(ic.java:191)  at   com.ibm.db2.jcc.am.kc.a(kc.java:1943)     at   com.ibm.db2.jcc.am.go.a(go.java:2289)     at   com.ibm.db2.jcc.am.go.setArray(go.java:2254)  at   com.jolbox.bonecp.PreparedStatementHandle.setArray(PreparedStatementHandle.java:261)     at   net.sf.log4jdbc.PreparedStatementSpy.setArray(PreparedStatementSpy.java:349)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)     at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)     at java.lang.reflect.Method.invoke(Method.java:597)     at   org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)     ... 93 more

What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? placeholder represents one value, rather than a list of values.  Consider the following SQL statement:  SELECT my_column FROM my_table where search_column IN (?)   Using preparedStatement.setString( 1, "'A', 'B', 'C'" ); is essentially a non-working attempt at a workaround of the reasons for using ? in the first place.    What workarounds are available?


In the following code, the alignment position for & is computed automatically:  \begin{align*} x^2 + y^2 &= 1 \\ y &= \sqrt{1 - x^2}. \end{align*}   Now, I'd like to have all my equality signs (over many equations/aligns in many sections and subsections) aligned at the same position, preferably by just manually giving a position. Is this possible, and how?

I am fairly new to TeX and need to create my math assignment with TeX.  I have succeeded aligning all my calculations with the use of \begin{align*} and \intertext{}, however in my document i have sections and subsections and if I \end{align*} and begin after the sections or subsections the alignment is off.  I have gone through google but all I can find is about \begin{equation} and has no mentioning of sections nor graphics.  How do I (if it is possible) make the alignment through the entire document?  Example:  \section{Opgave 1}  \subsection{a) Beregn arealet, der begrænses af kurven for $f(x) = x^{3}$, x-aksen og linjerne $x = -1$ og $x = 1$.} \begin{align*} % This \intertext{Først beregnes det bestemte integrale imellem $x = 0$ og $x = 1$:} \int_0^1 x^{3}\ dx &= 0.25\\ \intertext{Da den er symetrisk omkring 0 kan vi tage det dobbelte areal:} 0.25 \cdot 2 &= 0.50\\ \end{align*}  \begin{center} \includegraphics[width=100mm]{opg1graph.png}\\ Opg. 1, a) \end{center}  \pagebreak  \subsection{b) Bestem arealet af den lukkede figur, der dannes af parablen med regneforskriften $f(x) = -x^2 + 2x + 1$ og den rette linje med regneforskriften $g(x) = -0,5x + 1$} \begin{align*} % Is not aligned with this \intertext{Først findes de punkter hvor $g(x)$ afgrænser $f(x)$:} f(x) &= g(x) \\ -x^2 + 2\cdot x + 1 &= -0.5\cdot x + 1 \\ solve(-x^2 + 2\cdot x + 1 &= -0.5\cdot x + 1,x) \\ x &= 0\\ x &= 2.5\\ \intertext{Så tager vi det bestemte integrale imellem $x = 0$ og $x = 2.5$:} \int_0^{2.5} -x^2 + 2x + 1\ dx &= 3.54167 \pagebreak \intertext{Og det bestemte integrale for $g(x)$, for at fjerne arealet under linjen:} \int_0^{2.5} -0.5\cdot x + 1 dx &= 0.9375 \intertext{Nu trækkes arealet under linjen fra:} 3.54167 - 0.9375 &= 2.60417\\ \end{align*}


Let's say that I want to teleport a player who doesn't hold a name tag called "abc" to X Y Z.  All I could come up with was [/data get entity @p SelectedItem.tag.display.Name] and I'm stuck here because I don't know how to compare such data (that is, if it's possible).

I'm trying to make a command block that spawns an item in front of you if you are holding an item with a specific name. I've got these two working scripts;  /testfor @p[r=10] {Inventory:[{tag:{display:{Name:"Item Name"}}}]}  /testfor @p[r=10] {SelectedItemSlot:0,Inventory:[{Slot:0b,id:"minecraft:diamond_sword"}]}   but I can't get them together. The block should only look for an item in the active slot.


I have a list:  lst=[1,1,2,2,3,3,4,4]   After this code:  lst = list(set(lst))  print(lst)   I get this output:  [1, 2, 3, 4]   Also, I have another list:  lst=[6,6,7,7,8,8,9,9]   After this code:  lst = list(set(lst))  print(lst)   I get this output  [8, 9, 6, 7]   This output is not in the original order of the list ([6,7,8,9]). But I expected to get this order.  Also, I have a another list:  lst=[6,6,7,7,8,8,9,9,1,1]   After this code:  lst = list(set(lst))  print(lst)   I get this output:  [1, 6, 7, 8, 9]   But I want the output as [6, 7, 8, 9, 1].   So my question is: how can I take the set of a list while retaining the original order order of list? Thanks in advance.

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


I tried to post an answer in the   I got this:    ...but I am able to  in the formatting sandbox    ...and I have more than 10 rep on MSE:    One needs 10 reputation to post an answer in a protected post, but I have more than 10, and I am allowed to post comments, which is a 50 rep privilege.  Then why am I not allowed to post an answer in the formatting sandbox?

Questions can be protected (i.e. marked "highly active").   What does it mean for a question to be protected? Why are some questions protected? Who can protect and unprotect questions? Who can answer a protected question? How are protected questions displayed? When should I protect or unprotect a question? When does the Community user protect a question?


As I understand, Nuclear Fusion occurs when the nuclear forces overcome the electrostatic forces that act repulsively. But, what are these electrostatic forces? Are there force-carrying particles just photons?

I am trying to understand the idea of a force carrier with the following example.  Let's say there are two charges $A$ and $B$ that are a fixed distance from each other. What is causing the force on $B$ by $A$?  Classically charge $A$ has an associated electric field which causes a force on $B$. From the standard model, photons are the force carrier for the electromagnetic force. With this view does it mean that $A$ is constantly emitting photons but in a way that the magnetic component cancels out? If that is the case then doesn't that mean that charge $A$ is constantly losing energy?


I don't remember the exact title, but it was part of a book of short stories, some of which I am also looking for. Its title was along the lines of 'My name is Devil', or 'I am Devil/Satan'.  Basically, a small Martian expedition travels to Earth after a great plague/war occurred, and the Martians don't find much. The Martians speak telepathically, too.  They leave one behind, who resides in a cave. He eventually finds a boy, and I think he has to touch the alien to speak with him, and the kid tells the Martian  'you're a devil'.  The kid and Martian eventually travel with a sled-toboggan type floating vehicle to an old man, who explains to the Martian how some kind of virus wiped them all out. They start a colony, where they find many different kinds of people.  I believe years pass, and the virus comes back. people leave, but the alien and I think the infected human go away for a few days, and both return, healthy again.  In the ending, the Alien goes to hibernation, that apparently happens to all of the Martians. A second Martian expedition arrives, and are surprised to see the thriving colony. The boy from the beginning meets them, tells them his name, and asks them when will the original Martian wake up.  The Martians go inside, and announce he will be waking up soon.

I'm looking for the title of an anthology of children's science fiction stories from the 1950s. The best of the bunch involved a Martian who visited earth, and realized we'd blown ourselves up in a nuclear war and had fallen into savagery. The Martian is a vegetarian who subsists on biscuits made by a machine he brought with him, and communicates by using one of his tentacles to feed messages direction to/from the brain of the person he's talking to.  Inadvertently left behind by his expedition, he initially befriended some children, and eventually managed to rebuild civilization. Presently he dies, but when another expedition comes a generation later, they find the civilization he rebuilt.  there were other stories, but that was the best one.   If I can't find the name of the book it was in, I'd be happy to settle for the name of the author and the title of the story.


I have string with Unicode character, example Hãy đợi đấy.  I need an (ASCII) output Hay doi day.  How can I remove the accents?

I'm trying to convert some strings that are in French Canadian and basically, I'd like to be able to take out the French accent marks in the letters while keeping the letter. (E.g. convert é to e, so crème brûlée would become creme brulee)  What is the best method for achieving this?


i have a select option   <select> <option>aaa</option> <option>ccc</option> <option>ddd</option> <option>bbb</option> </select>   How to sort them.  so output will  aaa bbb ccc ddd   this question is asked to me in an interview answer if any Know Thanks In advance

is there a quick way to sort the items of a select element? Or I have to resort to writing javascript?  Please any ideas.  <select size="4" name="lstALL" multiple="multiple" id="lstALL" tabindex="12" style="font-size:XX-Small;height:95%;width:100%;"> <option value="0"> XXX</option> <option value="1203">ABC</option> <option value="1013">MMM</option> </select>


Having a little debate here at work... What is the correct way to pluralize an acronym where the last initial represents a word that itself is a plural / ends with a "s" ? Our specific example, for context: COW (Cellular On Wheels). If it makes a difference, we are saying this acronym as the word "cow", not C.O.W. Is it COWs? or just COW? My thought is it should be COWs. The counter point is that this would then make it Cellular On Wheelss (double s)

In computer science we discuss an abstract machine called a "deterministic finite automaton". The standard initialism for this term is "DFA". This makes sense in the singular usage of the initialism.  However, the pluralization of the word "automaton" is "automata". One speaks of "an automaton" or "many automata". Consequently, it seems intuitive to form an initialism of the phrase "deterministic finite automata" as "DFA".   This does not seem correct, as "DFA" could be either plural or singular. On the other hand, "DFAs" also does not seem correct because it would seem to expand to "deterministic finite automatons", a phrase which no self-respecting computer scientist would ever utter.   This appears to be a duplicate of the question here   But that question was never clearly resolved. What to do?


I had wubi installed on my pc with Windows 7 and recently I removed wubi and the partition I had my wubi installed (I removed wubi because I had installed Ubuntu on a separate partition as a dual boot). This lead me to grub rescue problem. But I was able to resolve this my issuing the commands mentioned in the first answer .  This got me my windows and ubuntu on the grub back but had to re-issue the commands every time I restarted my machine. To get rid of this I used the  tool to fix it as was suggested on the web.   Now this had lead me to a situation where I have ubuntu but can't see the windows 7 on the grub list. Can someone please let me know how do I get it back?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I am calculating the Intraclass Correlation coefficient (ICC) as per the method of Shrout-Fleiss (1979), using the (3, 1) model in which the judges are fixed as are the targets.  Some of my ICC values are negative.  Is this to be expected?  How to interpret this?  I understand that the maximum ICC is 1.0, but is there a minimum value?  How are negative values interpreted?


I was trying to construct a 10x10 cross bar switch using relays -- something like:    Question: is it possible to construct this by using solid state components (power transistors?) -- and if it is how would one go about doing it?  Would appreciate any pointers.  NOTES:   The target application was to be able to wire together discreet analog components: say OpAms, diodes, transistors I was trying to build a hybrid analog-digital computer -- just for fun -- where the digital side would wire together the analog components using a crossbar switch. Using relays becomes very expansive very quickly say if I wanted to have a 100x100 crossbar. An attempt at specs: V=36V, Imax = 10mA R ~= 0 (approaching zero -- a few Ohms should be fine) f ~= 0 Hertz [you switch once every few seconds or minutes] -- Note these are what I think would be ideal, a subset or partially covering set should do for now too So I the cross-bar or equivalent switching fabric could be an Integrated Circuit The Analog components (discreete) that the will connected to the switching fabric will include: Resistors, Capacitors, OpAms, Transistors, Diodes, Differential Amps, Voltage Summers (if I remember from my undergrad?) A typical example of circuit that I want to wire together using such a cross bar is below:

I'm looking to build a guitar pedal switcher based on a Raspberry Pi or Arduino (have not yet decided, but I have an unused Raspberry around and I lean towards that). Anyway, digital logic.  Now, I need to switch audio signal obviously and I need to do it quietly (both physical silence and electrical silence). Please note that the signal is line level throughout most of the build, except for the input which is much lower. I will probably have 2 or 3 loops before the preamp so those may not encounter line level signal.  From what I read and know, so far, mechanical relays are not really an option due to the clicking noise they make. I also read something about FETs, but that's a bit out of my league and I would appreciate any info on these.  PS: I will probably use different power rails for the digital and analog paths.  PS2: The whole thing will be mounted in a 1U rack enclosure, so please tell me if I should take into consideration any thermal issues.


we have recently implemented social login to our website. We are running ads to that website and after implementing the social login we lost all conversion data - everything is accounted to facebook.  Also we have kind of "sub-website" shop-domain.com where are some products that are sold separately and user can migrate between domain.com and shop-domain.com and vice versa. Can this loose conversions as well?   My question is:  how can we configure analytics / ads / website to correctly count the conversions?  What have I done:  In google analytics documentation I found something called linker to fix user migration between domains and page referrer after login. But it doesnt seem to help  gtag('config', 'UA-XXXXXXX-1', {         'linker': {             'domains': ['domain.com', 'domain.eu', 'shop-domain.com', 'shop-domain.eu']         },         'page_referrer':'domain.com'     });   Thanks for any suggestions

I am seeing quite a few conversions which have as source "accounts.google.com" (almost 40%).  AFAIK, in the new Universal Analytics as soon as a user has a Referrer set a new session is started. So if a user is getting on my page, and creates an account using social auth (e.g. Google accounts) when being redirected back, will this create a new session? I guess this would explain that there are many conversions coming from accounts.google.com - is it safe to enter accounts.google.com into the Referral Exclusion List? And more - what about Facebook logins, those would show up as facebook.com, but i probably don't want to exclude facebook.com as referrer?  Any ideas how to deal with UA referrers and social logins?


Possibly only during the last [your timezone - SO timezone] hours of ban, but, for obvious reasons, that's hard to verify as an end user.  Update, as I fell for an attention test with a too-short late answer again: it seems likely that this shows up when the the icon usually lights up to invite you to review because there are too many items in the review queue(s)

This is not a duplicate of , because this reports different things from that question. That question is specifically about the case where the user has run out of daily reviews; this question reports different problems outlined in the below bullets. While this post also formerly covered that, that has since been edited out. The review queues indicator shows all reviews in a queue a user has access to, no matter if that user is able to review them.  As a result, there are various circumstances where the review indicator gives false information:  There are items in a queue which the user does not have the reputation to review. (I only know of this happening in the suggested edits queue, where tag wiki edits land in the same queue as post edits.) This once . The only pending edits in the suggested edits review queue are the user's own tag wiki edits. (Users with 5,000 reputation but less than 20,000 can review tag wiki edits, but can't bindingly edit them.) There is a single pending suggested edit, which is currently being reviewed by someone else and has been "checked out" to that reviewer. The reviewer has already voted on a post in the queue (e.g. flagging a current Low Quality post as NAA or VLQ externally, or externally voting to close or reopen a post currently in one of those queues) The reviewer has skipped reviews The user has reviewed all items in a queue, but they have not left it yet  There have been numerous calls to fix all different aspects of this, as you can see by the links above. However, at heart it is all one problem: the indicator appears for queues when a user can’t review the items in the queue. I suggest solving this problem once and for all, by making sure that users are not notified for reviews they can do nothing about. So here’s my plea: please don’t show us the indicator for reviews we cannot perform!


I have a circle moving on a spherical surface. If the camera angle is fixed, is there a way to calculate the original circle's offset from the centre given the distorted ellipse formed when the circle moves to the edge of the sphere(as seen from the camera)? I've looked into Listing's plane and the Tissot directrix(because I'm working with eyeball rotation), but neither seems to provide a clear solution to this. I've also looked papers regarding eyeball roation but they seem to focus on the physiological aspects rather than the math of the movement. In other words: In the picture above, given one of the outer nine images as well as the middle one, I want to calculate how much the circle(i.e. iris) has moved/rotated from its position in the middle picture. I assume it has to do with comparing the distorted ellipse with the circle, but I can't seem to find out how. Is there some formula for this?


I'm creating a server/clinet, but I've a problem. If I boot the server and the client for the first time, everthing works fine. Then I close them, I boot them again in few seconds, and I receive e "connection refused" error in the client. I always boot the server first, and the client after. Here's the code. DoLogin is an easy function with 2 read and 2 write. What's wrong in this code?  server.c  int main(){     int ds_sock;     struct sockaddr_in my_addr;     ds_sock=socket(AF_INET,SOCK_STREAM,0);      memset(&my_addr,0,sizeof(my_addr));     my_addr.sin_family=AF_INET;     my_addr.sin_port=htons(25000);     my_addr.sin_addr.s_addr=INADDR_ANY;      if(bind(ds_sock,(struct sockaddr *)&my_addr,sizeof(my_addr))<0){         printf("Error in bind");     }      listen(ds_sock,2);     int ds_sock_acc;     struct sockaddr_in addr;     size_t sin_size = sizeof(struct sockaddr_in);      if((ds_sock_acc=accept(ds_sock,(struct sockaddr *)&addr,&sin_size))<1){         printf("Error accept");     }     printf("Connected\n");     char *usr = DoLogin(ds_sock_acc);     printf("%s is connected\n",usr);      close(ds_sock_acc);     close(ds_sock);      return 0; }   client.c  int main(){     int ds_sock;     ds_sock = socket(AF_INET, SOCK_STREAM,0);      int ret;     struct sockaddr_in Eaddr;     Eaddr.sin_family = AF_INET;     Eaddr.sin_port = htons(25000);     Eaddr.sin_addr.s_addr=inet_addr("127.0.0.1");     ret = connect(ds_sock,(struct sockaddr *)&Eaddr,sizeof(Eaddr));     if(ret==-1){          printf("Error connect");         perror("error:");         exit(EXIT_FAILURE);     }     printf("Connect OK\n");     char *usr = DoLogin(ds_sock);     printf("Logged in as %s\n",usr);      close(ds_sock);     return 0; }

How do I make sure that a socket bound to a port is properly released on process exit such that the port can be reused without bind() failing with EADDRINUSE? I've written a tiny program which just creates a socket, binds it to a fixed port, waits for a connection and then immediately terminates. When I rerun the program, the bind() call fails with EADDRINUSE, but if I wait a few minutes, it succeeds.  Is there a way I can explicitly "unbind" the socket, thereby freeing the port number?


i had try enter other thing that not related to what i want and it will prompt the else if statement ask me enter again ..but why when i enter the correct thing it still ask me to choose again ??? why ??   here is part of my code  :    public static void choose() {      Scanner read=new Scanner(System.in);     String shape = "";       do{      System.out.println("which shape you would like to choose");     shape=read.nextLine();          if(shape.equals("rectangle"))     {         System.out.println("enter width");          width=Double.parseDouble(read.nextLine());         System.out.println("enter length");         length=Double.parseDouble(read.nextLine());         System.out.println("enter color");        String color = read.nextLine();       }     else if (shape.equals("box"))     {         System.out.println("enter width");          width=Double.parseDouble(read.nextLine());         System.out.println("enter length");         length=Double.parseDouble(read.nextLine());         System.out.println("enter height");         height=Double.parseDouble(read.nextLine());         System.out.println("enter color");         String color = read.nextLine();       }     else      {         System.out.println("please enter only rectangle and box");      }      }while((shape !="rectangle" && shape !="box"));   here my run  :   which shape you would like to choose abc please enter only rectangle and box which shape you would like to choose box enter width 9 enter length 8 enter height 8  enter color   blue  which shape you would like to choose

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I am a first year physics student, but I am 20 years old (pretty old for my country, average starting age is 18), because I started after leaving med school, which I find extremely jailed in "memorization walls", with no place for analytical problem solving, something that I have loved all my life. I started to love physics because I was introduced to neuroscience, which lead me to information theory, probability analisis, mathematics and physics. I decided to study physics not only because I practically become obsessed with any problem I encourage, but also because I find physics to be the only "real" foundation of the understanting of nature, thanks to its mathematical basis. Well, now the problem is that I constantly see that most physicists that discover great things all started very very young, which is not my case. So, besides I am really good at math (the first of my class), I am sometimes dissapointed about the fact that I am maybe too old to make a difference, and this sometimes brings me back to think if I made the right decision when I left med school.  The thread here is about sharing information about cases of physicists that did great discoveries without being extremely precocious or "geniuses" since they were kids. Also your opinion about this kind of situation would be of real help.  What do you think of this and my decision?

I would begin by apologizing for a soft question. Reading the FAQ, I have tried to formulate my  question precisely in the last paragraph and you may skip the following paragraph where I make subjective observations, which I think may be relevant and any comments would be more than helpful. By formal education I mean registering in an academic department in a university as a grad/Phd Student.  Subjective belief: I feel I am personally not upto the mark of high-quality physics students. I need to learn a lot more, and do a lot more problems to be any good. I've noticed that Physics particularly is a very selective field dominated by hard-working and primarily young people who accomplish a lot at an early age (olympiads/contests, early phd's from very good places, etc). Even among this bunch a lot get filtered out and wouldn't get faculty positions. Theoretical Physicists tend to be outliers in a field almost entirely composed of outliers. And to learn from such a community, I feel an academic environment is essential, and not just reading books in isolation. So I beleive academia is the only legitimate environment that functions to produce sane physicists who know their field. However, if one has been set-back for some reason but carries the self-beleif that he can be smart enough to do it, would ageing be a parameter. I read a statement in Kleppner's undergrad mechancis book that "by finishing all this at the age of 26, Newton set the trend which follows today, that great advances are made by young physicists". I haven't found a counterexample so I would trust academic departments have the same criterion.  Q: Do people who missed out all the action in their 13-20 ages miss out on having a good career? What are the possible reasons to take a hiatus of "self-study" for a 22-year old so that he may be a good candiate for a respectable physics career (Phd/postdoc etc) later.


I am running Mac OS X 10.10 Yosemite and have Xcode 6.4 installed.  In order to run my Apache Cordova app on iPhone 6 with iOS 9 i need to have Xcode 7 and higher.  Is there a way to install and use Xcode 7 along with Xcode 6 on my Mac? If yes please advise with the steps.  Edit  I was able to install Xcode 7.3 beta 2, but i can't open the app. When i go to /Applications folder and do open Xcode-beta.app i get this error LSOpenURLsWithRole() failed with error -10825 for the file /Applications/Xcode-beta.app.

Is it possible to have more than one version of Xcode installed at the same time?   If so, please post any tip, tricks, or potential issues to watch out for.  EDIT:  The reason I want to install multiple versions is to try out the new sdk beta, but if the new Xcode is buggy I want to be able to use the older version for my existing projects.


I am trying to copy large amounts of data using SSH so all I have is the CLI.  I am using the cp -a /source/* /dest/ method but I can't tell how fast it is copying or what the progress is.  Is there anything I can add to this command to see this info?

Otherwise, is there any alternative command line utility that can achieve this?


In the light clock experiment of the time dilation theory, why does the light travel in triangles for the light clock in motion when the outside observer is viewing it.  I'm not able to understand why does the light travel a longer distance for the light clock in motion as compared to the stationery light clock. The distance between the mirrors in both the light clock is the same. The only difference is that one is in motion and the other is not. If the distance between the mirrors in both the light clocks is the same, then why does light have to travel in triangles for the light clock in motion when the outside observer is viewing it. Why can't it travel straight as it does in the stationery light clock.  Please explain. I'm unable to understand the concept of time dilation.

From this ,     Let’s say Alice is holding a light clock, and Bob is watching her run by, while holding it, with speed V.  Alice is standing still (according to Alice), and the time,$ \tau$, between ticks is easy to figure out: it’s just $\tau = \frac{d}{C}$.  From Bob’s perspective the photon in the clock doesn’t just travel up and down, it must also travel sideways, to keep up with Alice. The additional sideways motion means that the photon has to cover a greater distance, and since it travels at a fixed speed (EEP y’all!) it must take more time   My question is, why does photon need to travel sideways to hit the Alice light clock?


I've found questions here at ELU related to the meaning of the expression (I'm clear on that), but this is about the best way to punctuate the expression in the title. Possibilities:     a. It's almost ready. I just need to go through it once more to dot the "i"s and cross the "t"s.      b. It's almost ready. I just need to go through it once more to dot the i's and cross the t's.      c. It's almost ready. I just need to go through it once more to dot the is and cross the ts.   a. shows what I would naturally do.  b. shows what appears to be most common (used in posts on this site as well as in Wikipedia), but it using that apostrophe for plural sticks in my craw. I did find some support for this, , but this also suggests using the apostrophe for letter grades (see c. below).   c. seems terribly confusing, although it follows the convention of pluralizing letter grades (which are not so confusing because they are capitalized).   So... which is it?

When writing (a blog post, script, etc..) what is the proper way to indicate two or more instances of a single letter? For instance, in Monty Python's Bookshop Sketch:     C: I wonder if you might have a copy of "Rarnaby Budge"?      P: No, as I say, we're right out of Edmund Wells!      C: No, not Edmund Wells - Charles Dikkens.      P: (pause - eagerly) Charles Dickens??      C: Yes.      P: (excitedly) You mean "Barnaby Rudge"!      C: No, "Rarnaby Budge" by Charles Dikkens.  That's Dikkens with two Ks, the      well-known Dutch author.      P: (slight pause) No, well we don't have "Rarnaby Budge" by Charles Dikkens      with two Ks, the well-known Dutch author, and perhaps to save time I      should add that we don't have "Karnaby Fudge" by Darles Chickens, or      "Farmer of Sludge" by Marles Pickens, or even "Stickwick Stapers" by Farles      Wickens with four M's and a silent Q!!!!!  Why don't you try W. H. Smith's?      C: Ah did, They sent me here.   I had always believed that plural never uses an apostrophe before the 's' (it's only used for possession), but I have rarely seen in written material the format "four Ms". (On a side note, whoever wrote  also used "two Ks".)  On a side note, and perhaps this should be a separate question, if a Compact Disc is a CD, then two Compact Discs would be two CDs right? (I see "CD's" written everywhere)


Does light hitting a mirror stop before being reflected. And if so does it have to accelerate back up to the speed of light. In other words, when light is emitted by any means is it instantly travelling at the speed of light or is there any, however brief, acceleration period?

When a photon of light hits a mirror does the exact same photon of light bounce back or is it absorbed then one with the same properties emitted? If the same one is bounced back does it's velocity take all values on $[-c,c]$ or does it just jump from $c$ to $-c$ when it hits the mirror?  Or, is the phenomenon of a mirror better explained using a wave analogy? If so, what is this explanation?


I think the wave function of a free electron is nonzero almost everywhere. In particular there are regions of space arbitrarily far away where the electron has positive probability of being found. If I prepare an electron in a particular position, then wait a small amount of time and then check to see if it has appeared in a region that is too far away for it to reach even if it traveled at the speed of light, there is a positive probability that I (or my assistant, who is coordinating with me) will find it there.   What have I missed? This seems a lot like spooky action at a distance, but with spooky action no matter/information actually moves faster than light, wheras in this situation the electron actually moves a greater distance than light could in a given amount of time.

Consider a free electron in space. Let us suppose we measure its position to be at point A with a high degree of accuracy at time 0. If I recall my QM correctly, as time passes the wave function spreads out, and there is a small but finite chance of finding it pretty much anywhere in the universe. Suppose it's measured one second later by a different observer more than one light second away and, although extremely unlikely, this observer discovers that electron. I.e. the electron appears to have traversed the intervening distance faster than light speed. What's going on here?  I can think of several, not necessarily contradictory, possibilities:   I'm misremembering how wave functions work, and in particular the wave function has zero (not just very small) amplitude beyond the light speed cone. Since we can't control this travel, no information is transmitted and therefore special relativity is preserved (similar to how non-local correlations from EPR type experiments don't transmit information) Although the difference between positions is greater than could have been traversed by the electron traveling at c, had we measured the momentum instead, we would have always found it to be less than $m_e c$ and it's really the instantaneous momentum that special relativity restricts; not the distance divided by time. My question is ill-posed, and somehow meaningless.   Would anyone care to explain how this issue is resolved?


I am new in javascript so please be patient with me. I have an html code in which I have an html date input. I want to check with javascript if this date is before a specific date. How can i achieve that? And can the check be done before the user submits the form?(I mean can the check be done by the time the user selects the date and not after he hits the submit button cause after the date input there are more inputs before the form ends)

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


Attempt to invoke virtual method 'void androidx.viewpager.widget.ViewPager.setAdapter(androidx.viewpager.widget.PagerAdapter)' on a null object reference  I'm trying to implement sliding tab layout using android material design. But it gives me NullPointerException. Here is my code so far:  public class HomeFragment extends Fragment {  private HomeViewModel homeViewModel; private List<Slide> listSlides; private ViewPager slidePager; private TabLayout indicator;    public View onCreateView(@NonNull LayoutInflater inflater,                          ViewGroup container, Bundle savedInstanceState) {      homeViewModel =             ViewModelProviders.of(this).get(HomeViewModel.class);     View root = inflater.inflate(R.layout.fragment_home, container, false);       listSlides = new ArrayList<>();      listSlides.add(new Slide(R.drawable.a, "slide title"));      listSlides.add(new Slide(R.drawable.b, "slide title"));       final SliderPagerAdapter adapter = new SliderPagerAdapter(getContext(), listSlides);       homeViewModel.getText().observe(this, new Observer<String>() {          @Override          public void onChanged(@Nullable String s) {              slidePager.setAdapter(adapter);          }      });        return root;  }   }  public class SliderPagerAdapter extends PagerAdapter {  private Context mText; private List<Slide> mList;  public SliderPagerAdapter(Context mText, List<Slide> mList) {     this.mText = mText;     this.mList = mList; }   @NonNull @Override public Object instantiateItem(@NonNull ViewGroup container, int position) {       LayoutInflater inflater = (LayoutInflater) mText.getSystemService(Context.LAYOUT_INFLATER_SERVICE);     View slideLayout = inflater.inflate(R.layout.slider_item,null);      ImageView slideImg = slideLayout.findViewById(R.id.slide_img);     TextView slideText= slideLayout.findViewById(R.id.slide_title);      slideImg.setImageResource(mList.get(position).getImage());     slideText.setText(mList.get(position).getTitle());      container.addView(slideLayout);     return slideLayout;   }  @Override public int getCount() {     return mList.size(); }  @Override public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {     return view == object; }  @Override public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {     container.removeView((View) object); }   }

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 am trying create a table using a cross join or Cartesian Product subquery that creates a table with a large number of rows, like at least 148 million rows.  I get this     ERROR 1114 (HY000): The table is full.   I plan on filtering and querying the table later on, but how can I create this table?

There is a SAN mounted 1TB partition for Mysql backups in our server with version 5.0.45-log. From two days, im seeing the log entries ERROR 1114 (HY000) at line 6308 in file & The table user_analysis is full. The mysqldump is 3.2GB. I assue that it will create an issue while restoring this DB.    1. Can we analyse the Dump / backup inconsistancy without restoring (testing), if so how ?   I can aware that this error is occurring due to one table named user_analysis.    Even a single table error leads to dump / backup incosistancy which leads to restoration failure. In my case daily backup is completing successfully. This issue might also cause due to insufficient space. But i had aroung 82GB free space in the SAN mounted partition. I could also see innoDB free space in the table.    blade_server:master_db> show table status like "user_analysis"\G   *************************** 1. row ***************************                    Name: user_analysis                  Engine: InnoDB                 Version: 10              Row_format: Compact                    Rows: 1312878          Avg_row_length: 33             Data_length: 43581440         Max_data_length: 0            Index_length: 19447808               Data_free: 0          Auto_increment: 1312171             Create_time: 2011-11-25 03:00:41             Update_time: NULL              Check_time: NULL               Collation: utf8_general_ci                Checksum: NULL          Create_options:     Comment: InnoDB free: 13190144 kB; (`user_id`) REFER `master_db/users`(`user_id`)       1 row in set (0.01 sec)        blade_server:master_db> select (13190144) /1024/1024;       +-----------------------+       | (13190144) /1024/1024 |       +-----------------------+       |           12.57910156 |        +-----------------------+       1 row in set (0.00 sec)      Where we had around 12.57 GB InnoDBfree space.   InnoDB is per file :     mysql> show variables like "innodb_data_file_path"\G    *************************** 1. row ***************************       Variable_name: innodb_data_file_path       Value:   ibdata1:1000M;ibdata2:1000M;ibdata3:1000M;ibdata4:1000M;ibdata5:1000M;ibdata6:1000M;ibdata7:1000M;ibdata8:1000M;ibdata9:1000M;ibdata10:1000M;ibdata11:1000M;ibdata12:1000M   2. What could be the root cause to this error ? I dont have any diskspace issues.     Where can we pin point for this error ?   3. Will table is full" triggering in logs due to too low maximum size     for"innodb_data_file_path".


How do I install Ubuntu on my old desktop which functioned perfectly well till I got problems with Windows XP? At the moment all I can do is open a few of the files I saved to my USB. All my Excel and Word files on it cannot be opened though because my trying to improve XP by reinstalling it using the original cd resulted in all the programs I had including Office vanishing.   I cannot go to any webpages either as essential files are missing. My desktop only has 256 MB of RAM. My technical skills are zero unfortunately.

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


I am wondering if is there a way that we can mathematically or statistically identify seasonality in time series without the need to look at its plot?

This post is the continuation of another post related to a . Basically, at this point I'm interested in a robust way to discover the periodicity/seasonality of a generic time series affected by a lot of noise. From a developer point of view, I would like a simple interface such as:  unsigned int discover_period(vector<double> v);  Where v is the array containing the samples, and the return value is the period of the signal. The main point is that, again, I can't make any assumption regarding the analyzed signal. I already tried an approach based on the signal autocorrelation (detecting the peaks of a correlogram), but it's not robust as I would like.


Which site does this question belong on?  It is my contention that any and every endless loop is going to end rather sooner than later. Just for curiosity: "What is currently the longest-running known implementation of an endless loop?"  I'm in search for a technical device with an active program running an endless loop. It needs to be a known technical implementation within this universe, not some hypothetical machine / idea or abstract concept.

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I added  to install pop theme on my Ubuntu 20.04. Now, when I am trying to open settings or execute command gnome-control-center, I am getting this error: (gnome-control-center:8538): GLib-GIO-ERROR **: 17:32:51.519: Settings schema 'org.gnome.shell.extensions.pop-shell' is not installed Trace/breakpoint trap (core dumped)  I have already tried installing pop-shell but I am still receiving this error.

I'm trying to open System Settings but it won't open in any way. Using GUI, Settings are trying to load for a moment and then they are gone. Using Terminal (gnome-control-center), I get: (gnome-control-center:8823): GLib-ERROR **: 14:44:15.433: ../../../glib/gmem.c:138: failed to allocate 13477064712 bytes Trap Trace/breakpoint (core dumped)  I tried: sudo apt-get remove gnome-control-center sudo apt autoremove sudo apt-get install gnome-control-center  With multiple reboots, but I had no result. UPDATE!: Same errors persist BUT, when I type: sudo gnome-control-center  (instead of just "gnome-control-center") suddenly System Settings appear! Is it a user permissions issue? Any suggestions? UPDATE#2: After some system updates, sudo gnome-control-center now spawns "Segmentation fault".


I use the app version and this "red block" (I don't know why it's called that) but it's in the dungeons with the Blood Crawlers and Hearts, and it won't break.  How can I break the "red block?"

I decided it was time to investigate the corruption, but I can't break the corrupted rock (or whatever it is that looks like rock inside the corrupted area). My silver pickaxe or bombs simply don't do anything to it.  How can I break it?


i have two tables  TABLE 1 and TABLE 2  And i am running this select query to fetch the data , it takes long time to run   SELECT TABLE1.* , TABLE2.COL1 , TABLE2.COL4 FROM TABLE1, TABLE2      WHERE TABLE1.COL1 IN('1','TEXT','HO TED')      AND TABLE1.COL2= 1800 AND TABLE2.COL1 = 10519198      AND TABLE1.COL3>= 100 AND TABLE1.COL4= TABLE2.col2 AND TABLE2.COL3=('TEXT')   Any suggestions ? so that i could improve performance of this select query .  Does too many AND affects my performance ?  Thanks in advance

I have two tables: TABLE1 and TABLE2.  And I am running this select query to fetch the data. It takes long time to run:  SELECT TABLE1.* , TABLE2.COL1 , TABLE2.COL4 FROM TABLE1, TABLE2      WHERE TABLE1.COL1 IN ('1','TEXT','HO TED')        AND TABLE1.COL2= 1800   AND TABLE2.COL1 = 10519198        AND TABLE1.COL3>= 100   AND TABLE1.COL4= TABLE2.COL2   AND TABLE2.COL3=('TEXT')   How could I improve the performance of this select query? Does too many AND affect my performance?


Let $ f \in C^1([a,b],\Bbb R)$ such that $f(a)=f(b)=0$ with $a \lt b $. If $M=\sup\limits_{x\in[a,b]}\lvert f'(x)\rvert $, show that:  $$ \left|\int_a^bf(t)dt\right|\le\frac{(b-a)^2M}{4}  $$  I tried this  for the MVT: $f'(t)=\frac{f(t)-f(a)}{t-a}  $  then $f'(t)(t-a)=f(t)$  then $$ \left|\int_a^bf(t)dt\right| =\left|\int_a^bf'(x)(t-a)dt\right|\le \left|\int_a^bM(t-a)dt\right|=\left|M\int_a^b(t-a)dt\right|=\left|\frac{(b-a)^2M}{2}\right|$$ now  $$\left|\frac{(b-a)^2M}{2}\right|=\frac{(b-a)^2M}{2} $$  Maybe I made some mistake in development. I don't understand why I reached 2.

Hey guys I've been stuck on this problem for a while and I've still got no headway into how I'm supposed to do this. Any tips or guiding points would be helpful.  Let $f$ be a differentiable function such that $f′$ is continuous on $[0,1]$, and $M$ the maximum value of $|f′(x)|$ on $[0,1]$. Prove that if $f(0) = f(1) = 0$, then  $$\int_0^1 |f(x)| dx\leq\frac{M}{4}$$  I've come to a conclusion via Rolle's theorem that there exists a c between 0 and 1 where f'(c) = 0 and that would be a local extrema. But nothing past that other than the fact that the max value of M is 1.


#!/bin/sh   JAVA_DIR=/opt/test echo "Editing $TEST_BIN/httpmon, setting correct java path to $PW_DIR/jre/bin/java" sed -i 's/"$install_dir\/jre\/jre"/"$JAVA_DIR"/g' httpmon1 > httpmon2 echo "done"  what is wrong in this shell script?

If I run these commands from a script:  #my.sh PWD=bla sed 's/xxx/'$PWD'/' ... $ ./my.sh xxx bla   it is fine.  But, if I run:  #my.sh sed 's/xxx/'$PWD'/' ... $ ./my.sh $ sed: -e expression #1, char 8: Unknown option to `s'    I read in tutorials that to substitute environment variables from shell you need to stop, and 'out quote' the $varname part so that it is not substituted directly, which is what I did, and which works only if the variable is defined immediately before.  How can I get sed to recognize a $var as an environment variable as it is defined in the shell?


We are using SQL Server 2005, but this question can be for any .  Which of the following is more efficient, when selecting all columns from a view?  Select * from view    or   Select col1, col2, ..., colN from view

I've seen a number of people claim that you should specifically name each column you want in your select query.  Assuming I'm going to use all of the columns anyway, why would I not use SELECT *?  Even considering the question **, I don't think this is an exact duplicate as I'm approaching the issue from a slightly different perspective.    One of our principles is to not optimize before it's time.  With that in mind, it seems like using SELECT * should be the preferred method until it is proven to be a resource issue or the schema is pretty much set in stone.  Which, as we know, won't occur until development is completely done.  That said, is there an overriding issue to not use SELECT *?


Prove that:  $$ {a\over b} + {b \over c} + {c \over a} \ge 3 $$  Assuming $a, b, c > 0$. I was able to prove that this is true:  $$ {a\over b} + {b \over a} \ge 2 $$  by just rearranging it to get:  $$ a^2 + b^2 > 2ab $$  I figured if I would then repeat this with a,c and then b,c; I could sum the three inequalities to get closer to the third; so I get to:  $$ {a\over b} + {b \over c} + {c \over a} + {b\over a} + {c \over b} + {a \over c} \ge 6 $$  Now because of the symmetry; it certainly seems like the top inequality should be true; but I'm having trouble arguing past this point.

Disclaimer: The statement may be false, but for now I'm operating under the assumption it's true and trying to prove it.   My workings:  I got a common denominator and expressed it as:  $$\frac{ab^2 + bc^2 + ca^2}{abc} \ge 3$$ $$ab^2 + bc^2 + ca^2 \ge 3abc$$  This is where I'm stuck. I feel as if I keep encountering this same result in various different problems and always am stumped on how to show it is true.   I tried to look at similar problems and it seems AM-GM inequality is the usual line of attack, so using that I reasoned, $$a^2 + b^2 + c^2 \ge 3abc$$, and now I need to establish $$ca^2 + ab^2 + bc^2 \ge a^2 + b^2 + c^2$$  However, this doesn't seem like it'd be true for general positive $a,b,c$.


Prove that the equation tanz=z has only real roots....I am stuck on this so any help would be nice... Many things do not work  for example one cannot just graph like in calculus and look at the intersection points.....

Prove that the equation $\tan(z)=z$ has only real roots. How to do it? The idea is that the increment of the argument need to look at the boundary of the square with a side of $\pi n$ and another that $\tan(z)-z$ has a pole at $0$. I do not know how to use it.


I am working on my own "everyday face" project - taking pictures of myself to combine them in a sequence afterwards.   I'm wondering what is the easiest and fastest way to align all pictures so my eyes would be in the exactly the same position for all of the pictures.   Parameters like the distance from my face to the camera and position of head in all pictures are very similar, but change a little bit from picture to picture.   What is the fastest way to align the pictures based on the position of the eyes?

Do you know any open source tool to automatically align images, similar to the auto align feature in Photoshop?


I'm not yet 18, but I have been studying business for quite a while, paper trading, investments, etc. at this point, I'd like to try my hand at building some credit and making some money, but I am still a minor, which makes this quite difficult. My parents have bad credit, and though it hasn't influenced my own business education, it means I can't loan on their names, and I can't back loans on their assets.  While I am also interested in what trading and investment options exist for minors, first things first, how can I take out a loan or line of credit as a minor without being weighed down by my parents' credit history?

I am under 18, currently shopping for a car. Like many people, I don't have enough money sitting in my bank account to purchase a good car, around $6,000 to $10,000. However, credit checks have prevented me from being able to lease, and loan, due to my parents' bad credit. I personally am quite responsible with money, but short of emancipating, which has quite significant legal disadvantages, I can't find any ways of breaking free from my parents' credit history. Any ideas?  Note: Rather than making assumptions about my financial background, just assume I am trying to get credit for leverage in an investment but I'm underage and my parents have bad credit. How would I do it?


My document consists of several chapters. At the end of each chapter there is a section for appendices. What would be the correct way to number figures and tables in the appendices as. For example, Figure 1 in the appendix of chapter three should be numbered as: 3.A1  I have found some  of how to prefix figure numbers for appendices, but not for my special case.

I want to "reset" the figure counting in my document when the appendix starts, and follow a different pattern than 1, 2, 3... Specifically, I want figures in the appendix to start with A.1, A.2 onward, instead of continuing on from the main document. How can I do this?  \documentclass[twoside]{article}  \usepackage{graphicx,dblfloatfix}   \usepackage{titlesec}% Allows customization of titles \titleformat{\section}[block]{\large\scshape\centering{\Roman{section}.}}{}{1em}{} % Change the look of the section titles   \begin{document}  \section{Introduction} \subsection{Problem description} Blah blah \begin{figure}[!htb]     \centering      \includegraphics{decon}     \caption{Call this figure 1.} \label{fig1}  \end{figure} \appendix \section{Figures}  \begin{figure}[!htb]     \centering      \includegraphics{decon}     \caption{Call this figure A.1.} \label{figa1}  \end{figure}  \begin{figure}[!htb]     \centering      \includegraphics{decon}     \caption{Call this figure A.2.} \label{figa2}  \end{figure}  \end{document}


How to install two versions of PHP in Ubuntu 14.04. Help me, please.  I need test the app of my client in PHP 5.3 because the server run in this version, but I can not uninstall the PHP 5.5 of my workstation because of my recent work

I want to have both PHP 5.2.17 and PHP 5.3.5 installed on my Ubuntu machine and switch as per my necessity. How can I achieve this?


I can open gedit using the terminal but I want to be able to open the folder that has gedit, how?

Possible Duplicate:          For example the following are the same  # /usr/bin/php updateDatabase.php  # php updateDatabase.php   But how would I infer the location of the php command to be in /usr/bin?


I tried installing beanstalkd with sudo apt-get install beanstalkd (also with -f option) and I get the following error:  Reading package lists... Done Building dependency tree Reading state information... Done You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies:   beanstalkd: Depends: libevent-1.4-2 (>= 1.4.13-stable) but it is not going to be installed   mysql-server-5.1: Depends: mysql-client-5.1 (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed                     Depends: libmysqlclient16 (>= 5.1.21-1) but it is not going to be installed                     Depends: mysql-server-core-5.1 (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed                     PreDepends: mysql-common (>= 5.1.62-0ubuntu0.10.04.1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I'm not sure what some of the status bar icons mean on my Android Nexus 5 device (I'm referring to the icons in top right of screen, adjacent to the time). I've googled frequently but I keep getting back a list of icons to use in app development.   I'm looking for a list of the system status bar icons and an explanation of the meaning of that icon. I'm interested specifically in the vanilla Android Lollipop OS on Nexus.

Is there a complete list of these? I've seen lots of Q&A about "What does x icon mean" but it would be really useful if there were a complete list for reference!


The classical saying is to say that gravity is an "Attractive" force meaning that massive objects like a planet will attract other massive objects like an apple. But is it not actually the empty space that repels massive matter away from it forcing it to go towards the nearest massive object because space-time around it is less repulsive?  We do know that a massive object. "Bends" Space time around it. The apple will follow the curve of space time from the less stretched, less repulsive, point of departure to its arrival, in contact with the planet where the space time is stretched the most and least repulsive. The planet warps Space time, But it is the shape of space time that "pushes" the apple to the planet. The apple is in contact with space time at all times while it travels to its destination.

This question is actually related to my earlier question ("").  The fact that objects move a lot in the universe and that the universe is expanding, can imply that gravity is a repulsive force that increases with distance.. so the farthest objects repel us more.  This can still explain several existing observations, e.g., why does the apple fall?   Motion is the result of such repulsion. Two objects unlucky enough not to be moving relative to each other get squished due to the repulsion of the rest of the universe  around them. The earth repels the apple less than the stars so it is pushed towards the earth.   Furthermore, it can explain the expanding universe without the need for dark energy.  This could be demonstrated in a thought experiment. If we take a lot of same-charge particles (with small mass) such as electrons and lock them in a large box at a low enough temperature. The mutual repulsion of the particles may cause similar motion as if due to gravitational attraction.   Another experiment would be to measure the slight changes in our weight during day and night when the sun and earth align (if their masses are large enough to detect the feeble change in repulsion).   [EDIT: the question in the original form may not have been clear. It is "can we model".. with a yes/no answer and why (not). If downvoting, please justify.


I have synced a folder which contains some pictures to my iPhone. The synced photos are successfully copied to my iPhone. But I can not see any "delete" option in my iPhone to remove the synced photos.  The "Camera Roll" which has the pictures that I took via the iPhone's camera have an option "delete" in the bottom of the picture. But synced photos does not have that delete button.  Should I use iTunes/Mac to delete synced photos? Can't I delete the synced photos with a single touch?

My iPhone 5 has an album which has been saved onto it through iTunes from another laptop, when I try and delete the album through iTunes it doesn't seem to give me the option to do so. If anyone could be able to inform me on how to complete the action of deleting the album I would appreciate it, Thank you.


It's a known problem, but the standard solution doesn't seem to work for me any more. You can see the problem and the usual solution here:    It helped me fix the problem on Ubuntu 14.04, but today I have updated to 14.10, and the viber icon is now back on the same spot, blocking the "x", and the solution posted in that post doesn't seem to work anymore. Has anyone managed to move the icon on 14.10?

This question is basically the same question as , but the guy there didn't get any answer.   So I am also posting it as I couldn't find any answer anywhere.    As you can see there is a very annoying icon of viber on the top left, that is on top of the exit symbol "x" of the other applications. Is it possible to remove that thing completely, or to move it at the place where the skype or the dropbox is?  I have Ubuntu 14.04 Desktop edition installed.


I am wanting 'cite' entries that don't have a corresponding 'bibitem' entry to show up in red, along with the name of the missing reference label. I had found a  that suggested a solution, but it only displayed [?citation?]. I would prefer it to display [?nameOfMissingKey?], but I am fairly new to LaTeX, so not sure the best way to tweak this.  Any help would be appreciated.  BTW the suggested solution was:  \documentclass{article} \usepackage{xcolor} \newcommand*{\missingreference}{\colorbox{red}{?reference?}} \newcommand*{\missingcitation}{\colorbox{red}{?citation?}} \makeatletter \def\@setref#1#2#3{%   \ifx#1\relax    \protect\G@refundefinedtrue    \nfss@text{\reset@font\missingreference}%    \@latex@warning{Reference `#3' on page \thepage \space              undefined}%   \else    \expandafter#2#1\null   \fi} \def\@citex[#1]#2{\leavevmode   \let\@citea\@empty   \@cite{\@for\@citeb:=#2\do     {\@citea\def\@citea{,\penalty\@m\ }%      \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%      \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi      \@ifundefined{b@\@citeb}{\hbox{\reset@font\missingcitation}%        \G@refundefinedtrue        \@latex@warning          {Citation `\@citeb' on page \thepage \space undefined}}%        {\@cite@ofmt{\csname b@\@citeb\endcsname}}}}{#1}} \makeatother \begin{document}  This is a missing reference: \ref{somefig}.  This is a mssing citation: \cite{somebib}.  \end{document}

While working on a document, it would be helpful if instead of a ? for unresolved references or citations the tag used in the \ref{thisthings} or \cite{Bloke1978} could appear instead.  Is there a package that turns on this behaviour?


I have this pale blue dot above Firefox (I have seen in on other apps also.)  I have only noticed this in Mojave.   What does it mean?  My Dock is in the vertical position.    Here is is in the horizontal position:    More info from Dock:  $ defaults read com.apple.dock.plist | grep "file-label"                 "file-label" = Siri;                 "file-label" = Launchpad;                 "file-label" = Safari;                 "file-label" = Mail;                 "file-label" = Contacts;                 "file-label" = Notes;                 "file-label" = Reminders;                 "file-label" = Maps;                 "file-label" = Photos;                 "file-label" = Messages;                 "file-label" = FaceTime;                 "file-label" = Pages;                 "file-label" = Numbers;                 "file-label" = Keynote;                 "file-label" = News;                 "file-label" = iTunes;                 "file-label" = Books;                 "file-label" = "App Store";                 "file-label" = "System Preferences";                 "file-label" = iTerm;                 "file-label" = Downloads;                 "file-label" = "Workspace ONE Intelligent Hub";                 "file-label" = "Activity Monitor";                 "file-label" = Firefox;

After Visual Studio Code update, its icon on Dock has changed to a very tiny one which is literally inaccessible!  There is no way you can click on it or view options.  Does anyone know how to remove it from the Dock?  macOS: Mojave (10.14)


I would like to know what's the recommended procedure to submit a request for a newer software version?  An example: I really like gThumb a lot, but the current version in Ubuntu 13.04 & 13.10 is 3.0.2. The last gThumb is 3.2.3 and was released this last august.  So, how to submit the request about refreshing a software like gThumb?  Thanks?

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


In the video on YouTube, , it claims that a ticking watch has more mass then a non ticking watch due to the intrinsic KE, PE and thermal energy of the watch's internal movements that manifests itself as part of the watch's mass.  Is this correct ?  To me there is something wrong with this argument, but I cannot put my finger on it.

I know that if some object acquires potential energy, it also gains  (rest) mass - is it the same for kinetic energy?


Let $f: \mathbb R \to \mathbb R$ be a continuous function. Which one of the following sets cannot be the image of $(0,1]$ under $f$?   $\{0\}$ $(0,1)$ $[0,1)$ $[0,1]$.   We know that $(0,1]$ is neither open nor closed, since $f$ is continuous, "every inverse mapping of closed set is closed" by the result above, $\{0\}, (0,1), [0,1]$ are sets that cannot be image of $(0,1]$. Am I right?  My argument: Inverse exists only when function is one one and onto, so will there be continuous function such that inverse never exists but the image of $(0,1]$ be one of the above three sets?

Let $f:\mathbb R\to\mathbb R$ continuous function. Which of the following sets can not be image of $(0,1]$ under $f$?          A. $\{0\}$.          B. $(0,1)$.          C.$[0,1)$.          D.$[0,1]$.      My effort: Continuous image of connected set connected. $(0,1]$ is connected and remove $1$ from the set left the set connected...but removing any point from $(0,1)$ make it disconnected.....I am not sure though


Please I need orientation on this issue. All my undergraduate lecturers that know much about me are in their Ph.D. final year, but they all have been in the system since 16years ago with MSc degree. My MSc supervisor is the only professor that can say much about my research capability. All my undergraduate lecturers are now in their Ph.D. final year. Can I they recommend me for Ph.D. admission? I need three referees, my MSc supervisor and two others would come from my undergraduate degree lecturers. Is this advisable? Thanks.

I am currently a Master's student and planning to apply for PhD. Now, I have directly worked with two professors for research projects. Unfortunately, those two are the only professors I have taken more than one course with too. With no other professor I had two or more classes so they do not know me well. I could be able to convince one of them to write letters for me. But surely that's gonna be a canned recommendation like "I taught him this course and he's got an A". Besides as an introvert, I am not memorable at all. I don't drop by during office hours to have small chats or ask many questions in the class. On the other hand, I have a PhD student in my research group. He doesn't have the credentials or experience, but he can write a more personal and accurate recommendation letter for me. I have worked with him closely and he can give his opinion from both our personal and academic interactions.   Edit: just to be clear, the two professors I have worked with already agreed to give me LORs. I need a third letter.  Edit 2: I have another option. I have worked as a TA for one semester. The instructor can give me an LOR. But he is neither a tenured professor nor a Ph.D. degree holder himself. So I am not much sure about this option. Is it gonna "hurt" my application?  Edit 3: I collaborated with the PhD student before and we are co-authors of two papers.


Im trying to prove that if $f\colon \mathbb{R}\to\mathbb{R}$ such that for all $x,y\in\mathbb{R}$ we have $\lvert f(x)-f(y)\rvert \leq (x-y)^2$ then $f$ is constant.  I have shown that if $f$ is differentiable, then the statement is true. But without the differentiability condition, I'm having a hard time.

Let $f\colon \mathbb{R} \rightarrow \mathbb{R}$ be a function. In order to prove that every function that verifies $\lvert f(x)-f(y)\rvert \leq(x-y)^2$ for all $x,y$, is constant, I have considered on applying the Lagrange's theorem. There exists some $c\in[x,y]$ for which:  $$\frac{\lvert f(x)-f(y)\rvert}{x-y}=f'(c)\leq (x-y)$$  Which would certainly lead to success if I'm able to prove that that is $0$, the problem is I don't know how to proceed with the proof. Any help appreciated.


I think that thesis writing is a big project which can be divided into several small-scale tasks. The contribution of the thesis must be done with student himself/herself, but other tasks such as figure preparation, writing in LaTex, editing, training, advising, etc. can be outsourced. Am I right? In your opinion what kind of tasks can be outsourced and how?

It is really difficult for me to decide on this situation: when someone calls me and asks for work-for-hire for his/her thesis. I don't know what to do. I want to help and earn money but I think this way of earning money is unethical.  I think that receiving the title of thesis and giving back prepared manuscript is the intention that some people have, when asking for their thesis to be written.  There are plenty of websites offering such services!   The question is that: Is it legal and or ethical to write someone else's master's thesis as work-for-hire?


If i run df -h i see the following Filesystem      Size  Used Avail Use% Mounted on udev             15G   12K   15G   1% /dev tmpfs           3.0G  388K  3.0G   1% /run /dev/xvda1       40G   16G   23G  41% / none            4.0K     0  4.0K   0% /sys/fs/cgroup none            5.0M     0  5.0M   0% /run/lock none             15G     0   15G   0% /run/shm none            100M     0  100M   0% /run/user /dev/md0        305G  271G   35G  89% /mnt  You can see that the disk mounted under /mnt is supposed to have 271G of data stored. When i cd into /mnt tho and run find ./ -maxdepth 1 -type d -exec du -sh '{}' ';' to see all file and sizes there is only 8G of data 0   ./crash_dumps 0   ./gor 20K ./varnish 1.9M    ./tmp 72M ./filebeat 436M    ./logstash-forwarder 7.9G    ./nginx 8.4G    ./  What is wrong with my reasoning ? Why am i not seeing 271G of content?

I have a SCSI disk in a server (hardware Raid 1), 32G, ext3 filesytem. df tells me that the disk is 100% full. If I delete 1G this is correctly shown.  However, if I run a du -h -x / then du tells me that only 12G are used (I use -x because of some Samba mounts).  So my question is not about subtle differences between the du and df commands but about how I can find out what causes this huge difference?  I rebooted the machine for a fsck that went w/out errors. Should I run badblocks? lsof shows me no open deleted files, lost+found is empty and there is no obvious warn/err/fail statement in the messages file.  Feel free to ask for further details of the setup.


I used 16.04.1 for a day, i had some problems and now i want to return to Windows 10. I dont have access to a Windows device. I'm downloading the Windows ISO right now, while searching for Rufus alternatives. I havent found an explained solution on this after searching for like 20-30 minutes. This was my first time on Linux, and i dont know much about making a bootable usb on Linux.   What should i do, which programs and how?

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


Isn't there a difference (or aren't there differences) with the following?   I only drive to work on Fridays I drive only to work on Fridays I drive to work only on Fridays I drive to work on Fridays only   Though C and D may be the same.  Don't people usually mean C or D even if they say A?  I ask because in "Word Crimes", Weird Al says "You should only write in emoticons" but I think he should have said "You should write only in emoticons" or "you should write in emoticons only", right?

Which sentence is correct?        (A) Mosquito larvae can only be seen through a microscope.   (B) Mosquito larvae can be only seen through a microscope.   (C) Mosquito larvae can be seen only through a microscope.


I wrote this code that simply sums a list of n numbers, to practice with floating point arithmetic, and I don't understand this:  I am working with float, this means I have 7 digits of precision, therefore, if I do the operation 10002*10002=100040004, the result in data type float will be 100040000.000000, since I lost any digit beyond the 7th (the program still knows the exponent, as seen ).  If the input in this program is   3 10000 10001 10002   You will see that, however, when this program computes 30003*30003=900180009 we have 30003*30003=900180032.000000  I understand this 32 appears becasue I am working with float, and my goal is not to make the program more precise but understand why this is happening. Why is it 900180032.000000 and not 900180000.000000? Why does this decimal noise (32) appear in 30003*30003 and not in 10002*10002 even when the magnitude of the numbers are the same? Thank you for your time.  #include <stdio.h> #include <math.h> #define MAX_SIZE 200   int main()  { int numbers[MAX_SIZE];  int i, N; float sum=0; float sumb=0; float sumc=0;  printf("introduce n" ); scanf("%d", &N);  printf("write %d numbers:\n", N); for(i=0; i<N; i++) {     scanf("%d", &numbers[i]); }  int r=0;  while (r<N){     sum=sum+numbers[r];     sumb=sumb+(numbers[r]*numbers[r]);      printf("sum is %f\n",sum);     printf("sumb is %f\n",sumb);     r++; } sumc=(sum*sum); printf("sumc is %f\n",sumc); }

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


I cannot update Ubuntu 16.04 due to the following error:   Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/   How should I proceed in trying to update?

Version: Ubuntu 16.04  I have used it some weeks, but now it gives me this message when I'm trying to install software and update or upgrade:  Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) /var/lib/apt/lists/ locked   followed by this:    .  and another error:  ** (appstreamcli:4560): WARNING **: Exception: Unable to get write lock on /var/cache/app-info/xapian/default: already locked   What should I do?