Evaluate $\int \frac{1}{1+x^4}dx$.   I am finding it very difficult to evaluate this integral. I do not know any standard formula for this integral. I cannot think of a suitable substitution. I tried to evaluate the integral by partial fractions but it become a bit messy and integration by parts does not result in a simpler integral. How can you evaluate this integral without using partial fractions?

Can anyone give me a hint to evaluate this integral?  $$\int_0^\infty \frac{dx}{1+x^4}$$  I know it will involve the gamma function, but how?


What would happen/How would close votes appear in case of    1 too localised vote 2 not a real question votes 2 not constructive votes   How would message about closing look like?

When voting to close a question, it's possible for users to vote for any close reason, even if others have voted for different reasons. However, in the end, once the question reaches five close votes for any reason, only one of those reasons can be displayed.  How does the system determine which one close reason to display, given the votes made by users?


Let $c:I^2\rightarrow\mathbb{R}^3$ be the singular $2$-cube given by $$c(s,t)=(\frac{1}{2}s^2,st,\frac{1}{2}t^2)$$ Let $$\omega=xy^2dz$$  Questions:  i) Compute $c^*\omega$  ii) Compute $c^*d\omega$  iii) Compute $\int_cd\omega$  iv) Without using Stokes theorem, compute $\int_{\partial c}\omega$ (Hence verifying Stokes theorem)  Answers:  (Parts (i)-(iii) checked and are correct)   i) I have gotten: $c^*\omega=\frac{1}{2}s^4t^2dt$  ii) $c^*d\omega=d(\frac{1}{2}s^4t^2dt)=2s^3t^2ds\wedge dt$  iii) $\int_cd\omega=2\int_0^1(\int_0^1s^3t^2ds)dt=2\frac{1}{4}\frac{1}{3}=\frac{1}{6}$  iv) I am using the formula $\int_{\partial c}\omega=\sum_{j=1}^2\sum_{\alpha=0,1}(-1)^{j+\alpha}\int_0^1c^*_{(j,\alpha)}\omega$  I have computed that $c_{(1,0)}(t)=(0,0,\frac{1}{2}t^2),c_{(1,1)}(t)=(\frac{1}{2},t,\frac{1}{2}t^2),c_{(2,0)}(t)=(\frac{1}{2}t^2,0,0),c_{(2,1)}(t)=(\frac{1}{2}t^2,t,\frac{1}{2})$  So $c_{(1,0)}^*\omega=0,c_{(2,0)}^*\omega=0,c_{(2,1)}^*\omega=0$  Point of contention:  My calculation:   $c_{(1,1)}^*\omega$ is the only non-zero part for $\partial c$  And $c_{(1,1)}^*\omega=\omega(\frac{1}{2},t,\frac{1}{2}t^2)=\frac{1}{2}\cdot t^2\cdot d(\frac{1}{2}t^2)$ from the definition of $\omega=xy^2dz$  This gives $\omega(\frac{1}{2},t,\frac{1}{2}t^2)=\frac{1}{2}t^2\cdot tdt=\frac{1}{2}t^2\cdot tdt$  So I have gotten $c_{(1,1)}^*\omega=\frac{1}{2}t^3dt$  this is wrong since,  Answer given: $c_{(1,1)}^*\omega=\frac{1}{2}t^2dt$  and the next step is $$\int_{\partial c}\omega=\int_0^1\frac{1}{2}t^2dt=\frac{1}{6}$$  Which must be correct since this verifies Stokes theorem from part (iii)  And my answer must be wrong since it gives $\int_{\partial c}\omega=\frac{1}{8}$  The answer also has $c_{(1,1)}(t)=(\frac{1}{2},t,\frac{1}{2}t^2)$, but computes $c_{(1,1)}^*\omega$ as $\frac{1}{2}t^2dt$, whereas I get $\frac{1}{2}t^3dt$  Where am I going wrong with this calculation, it is probably a simple mistake, any help would be greatly appreciated.

Question: Let $c:I^2\rightarrow\mathbb{R}^3$ be the singular $2$-cube given by $$c(s,t)=\left(\frac{1}{2}s^2,st,\frac{1}{2}t^2\right)$$Let $x=(x,y,z)$ denote the cartesian coordinates on $\mathbb{R}^3$ and let $\omega$ be the $1$-form on $\mathbb{R}^3$ given by $$\omega=xy^2dz$$  i. Compute $c^*\omega$  ii. Compute $c^*d\omega$  iii. Compute $\int_cd\omega$  iv. Without using stokes theorem compute $\int_{\partial c}\omega$  Answer:   i. $(c^*\omega)(s,t)=(\omega\circ c)(s,t)=\omega\left(\frac{1}{2}s^2,st,\frac{1}{2}t^2\right)=(\frac{1}{2}s^2)(st)(d(\frac{1}{2}t^2))=(\frac{1}{2}s^3t)(tdt)=\frac{1}{2}s^3t^2dt$  ii. $d\omega=d(xy^2dz)=y^2dx\wedge dz+2xydy\wedge dz+xy^2d(dz)=y^2dx\wedge dz+2xydy\wedge dz$  $c^*d\omega=(st)^2d(\frac{1}{2}s^2)\wedge d(\frac{1}{2}t^2)+s^3td(st)\wedge d(\frac{1}{2}t^2)$  $=(st)^3ds\wedge dt+d^3t^3ds\wedge dt=2(st)^3ds\wedge dt$  I am stuck on parts iii. and iv.  Is there a formula for these types of problems?  I have not seen an example of one of these computed before  What is the name of this type of problem so that I can look up methods for it?  Any help would be greatly appreciated


I understand the way the four access modifiers work inside classes, however you can also put them before the keyword class, like: accessModifier class className{  accessModifier type var; }  I previously understood access modifiers as the members' visibility, so, e.g., private would mean the variable will only be visible inside the class; but how does that work behind the class? Also, in what situations should I put the access modifiers behind the class and why?

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


Nothing is printing why? It should print at least for one time, shouldn't it?  #include <stdio.h> #include <stdlib.h>  int main() {     float x = 1.1;     while (x == 1.1)     {         printf("\n%f", x);         x = x – 0.1;     } }   The program is running if I change "==" to ">="; how is x>=1.1 true when x is equal to 1.1 by definition.   #include <stdio.h> #include <stdlib.h>  int main() {     float x = 1.1;      while (x >= 1.1)     {         printf("\n%f", x);         x = x - 0.1;     } }

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


I am trying to make a python script to make entries in an excel file that will have daily entries. I want to check if a file exists then open it. if the file does not exist then I want to make a new file.  if have used os path exists to see if the file is present       workbook_status = os.path.exists("/log/"+workbookname+".xlxs")      if  workbook_status = "True":      # i want to open the file      Else:      #i want to create a new file

How do I check whether a file exists or not, without using the  statement?


I am taking some courses online (machine learning) and the instructor noted that a Taylor series can be used to approximate any function.  A student left a comment that a Taylor series cannot approximate ANY function, but noted that the instructor probably stated it unequivocally because it can certainly approximate any function we would need for the class.  I am curious, what functions cannot be approximated by a Taylor series?  Two things lead me to believe that any function CAN be approximated by a Taylor series:   In context of regression, it seems I can always continue to add terms and adjust the coefficients on those terms (or solve for them to reduce the error) to continually get a better approximation of points in my data set. The ambiguity of the word approximate suggests that we don't have to meet a strict criteria to say that a Taylor series approximates a function.   With those things in mind, I can also see a point to the opposite view.  For example, a function with large discontinuities such as  $f(x) = \begin{cases}sin(x)/x^2 & \text{if $x < 0$} \\ 2x & \text{if $x > 100$}\end{cases}$   seems like it wouldn't be well approximated by a Taylor series.  But then again, without some defenition of approximate, I don't see how we can say either way.

It's true that I'm not familiar with too many exotic functions, but I don't understand why there exist functions that cannot be described by a Taylor series?  What makes it okay to describe any particular functions with such a series? Is there any difference for different number sets? In the case of complex numbers maybe?  Could somebody provide an example?


So I been at this for a few hours now and it returns the correct Year, and Day but for some odd reason it returns the wrong month. I'm sure its a simple fix but I can't seem to figure it out.  package gregoriancalendar;  import java.util.GregorianCalendar;  public class Calendar8_5 {    public static void main(String[] args){  GregorianCalendar calendar = new GregorianCalendar(); System.out.println("Current Year, Month & Date: "); System.out.println("Year is " + calendar.get(1)); System.out.println("Month is " + calendar.get(2)); System.out.println("Day is " + calendar.get(5));   calendar.setTimeInMillis(1234567898765L); //Elapse Time System.out.println("Set Value of 1234567898765L"); System.out.println("Year is " + calendar.get(1)); System.out.println("Month is " + calendar.get(2)); System.out.println("Day is " + calendar.get(5));    }   }

In java.util.Calendar, January is defined as month 0, not month 1. Is there any specific reason to that ?  I have seen many people getting confused about that...


I have a Wordpress in a directory like mydomain.com/page/ and I'd like to show the posts on my parent directory, like mydomain.com/my-post-url How can I do this? Thanks in advance!  EDIT: I still need the pages to be under mydomain.com/page/about, mydomain.com/page/cart I need only the posts to be shown on a parent directory of the WP website  EDIT 2: I have a plain intro HTML file on the root folder, that's why changing the configuration doens't work. I need to keep this mydomain.com/index.html custom html

I am having a tough time removing the subfolders from the URL in my WordPress site.  Currently, the URL format is: www.mysite.com/subfolder/index.php/category/postname  I would like to remove both the subfolder AND index.php from the URL.  The site must stay in a subfolder of root on my server.   My current htaccess file is:  <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /subfolder/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /subfolder/index.php [L] </IfModule>   I've tried to add the following, although it did not work.  Options +FollowSymlinks RewriteEngine on RewriteRule ^subfolder/(.*)$ http://www.mysite.com/$1 [R=301,L] RewriteRule .* index.php/$0 [PT,L]


A fair coin is flipped successively at random until the first head is observed. Let the random variable X denote the number of flips of the coin that are required. Then the space of x is  S={x: x=1,2,3,4, ....}. Later we learn that, under certain conditions, we can assign probabilities to these outcomes in S with the function  $f(x)=(1/2)^x, x=1,2,3,4,...$  Compute the mean $ \mu$.   I know $ \mu =E(X)= \sum_{x=1}^ \infty x \cdot f(x)=1 \cdot (1/2)^1+2 \cdot(1/2)^2+3\cdot (1/2)^3+....=1/2+1/2+3/8+...$  I have thought about factoring 1/2 out, but I still could not figure out the mean. I know $\sum_{x=1} ^ \infty f(x)=1.$ I just need the help of rewriting the expected value in terms of $\sum_{x=1} ^ \infty f(x)$. Any help is appreciated. Thank you.   After looking at the multiple ways to solving this, I am going with the summation direction. This is what I have done so far, but I am still not there yet. Any correction of the following is appreciated.   New:   $ \sum_{x=1}^\infty \frac {x}{2^x}= \sum_{x=0}^\infty \frac{x+1}{2^{x+1}}=\sum_{x=0}^\infty \frac {x}{2^{x+1}}+ \sum_{x=0}^\infty \frac {1}{2^{x+1}}= \frac {1}{2} \sum_{x=0}^ \infty \frac {x}{2^x}+ \frac {1}{2} \sum_{x=0}^ \infty \frac {1}{2^x}$  From here, I do not see how $\frac {1}{2} \sum_{x=0}^ \infty \frac {1}{2^x}=1$?


I want to convert a number to string and then wanna check whether its palindrome or not. But when i execute im getting not palindrome.  import java.util.Scanner;  class PalindromeNumberCheck {     public static void main(String arg[])     {         Scanner input = new Scanner(System.in);         System.out.println("Enter the number to be checked");         int i = input.nextInt();         String str1 = Integer.toString(i);         String temp = str1;         String reverse = "";         for (int l = temp.length()-1; l >= 0; l--)          {             reverse = reverse + temp.charAt(l);         }         System.out.println(reverse);         System.out.println(str1);         if ( str1 == reverse)             System.out.println("Palindrome");         else             System.out.println("Not Palindrome");     } }     Palindrome is a word, phrase, or sequence that reads the same backwards as forwards, e.g. madam or nurses run.

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 have a question, and this is it in entirety:     Let R be a non-zero ring(that is, R contains at least one element other than the zero element). Prove that $R \times R$ is NOT an integral domain.   Now I haven't done a problem like this before, and it seems to be(from the Wikipedia definition) that this ring $R$ needs to be commutative to be an integral domain. Which it isn't stated to be here. What exactly am I meant to do? I haven't been given anything else than the area in grey.

Let $R$ and $S$ be two commutative rings with unity. Prove that $R\times S$ is NOT an integral domain.   This is the best I could think of so far, please give me a push in the right direction and correct me.  It suffices to show that $R\times S$ has zero-divisors  Therefore, let $a$ be an element of $R$ and $b$ be an element of $S$, thus $R\times S$ has elements of the form $(a,b)$.  Consider the elements $A=(a,0)$ and $B=(0,b)$, such that $a$ does not equal zero and $b$ does not equal zero. Then $AB = 0$. Therefore $R\times S$ has zero divisors.


I would like to explicitly write out a n x n matrices in my paper, but once n \geq 11, I get compiling errors and it refuses to print the matrix.  Here is what I have:  \documentclass{standalone} \usepackage{amsmath,mathtools,amsthm} \usepackage{array}  \begin{document}  $$\begin{bmatrix*}[r] 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ -\fract{1}{2} & -\fract{1}{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0  & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0  & 0  & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0  & 0  & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2}& 0 & 0 & 0 & 0 & 0\\ 0 & 0  & 0  & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0 & 0\\ 0 & 0  & 0  & 0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2} & 0 & 0 & 0\\ 0 & 0  & 0  & 0 & 0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2}\sqrt{2}  & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & -\fract{1}{2}\sqrt{2} & \fract{1}{2} & \fract{-1}{2}\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \end{bmatrix*} $$  \end{document}   I do not see any errors for this 11 x 11 matrix.  However, when I type this in a blank standalone document, I get an error that says:  "Missing $ inserted.    $$\begin{bmatrix*}[r]"  Is there another way to write an 11 x 11 (or larger) matrix so that it compiles?  Or is it impossible to type matrices this large into LaTeX?  (If it helps, I am using writelatex.com to compile my thesis.)

I'm using bmatrix environment from the amsmath package, and I'm trying to do something like this:  \documentclass{article} \usepackage{amsmath}   \begin{document}      \begin{equation}          \begin{bmatrix}              1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11\\          \end{bmatrix}     \end{equation}  \end{document}   However, pdfLaTeX returns an error: "Extra alignment tab has been changed to \cr", and in the output the extra element is moved to the next row. (If I remove one element, then it works perfectly fine). I guess this means that I've hit some hard limit on the number of tab stops in a matrix. Is there a way to change this?  The elements in the matrix are short and could fit perfectly on a single row.


The situation is after some event, like a dinner or a party, and the last people to leave are saying their goodbyes.  Then, just as they're at the door, they start chatting with the host, and before anyone realizes it, they've been standing in the foyer for about 1-2 hours and still haven't left.  I've been in this situation often, and for some reason I thought it had a name or phrase, like "suck in the foyer saying goodbye" or something.  I tried googling it, and I got results like "long goodbye", when someone says goodbye to someone they know they won't see for a long time, which is not at all what I'm looking for.

There is a Hungarian expression, küszöbgörcs, which literally means "threshold-cramp", and is used to describe that long conversation you have in the entryway, with all the guests awkwardly holding their coats and purses, and every so often somebody says something like "Ok, we really have to leave now, but just one more thing...", and then the conversation is good for another half an hour at least.  I've searched in vain for an equivalent idiom in English, yet I feel sure it must exist: I know English speakers are equally susceptible to this malady, it's not a uniquely Hungarian thing. I will sometimes use literal translations, like the aforementioned threshold-cramp (or doorway-spasm), but then I need to explain it, and that's less than satisfactory. (Plus it leads to more threshold cramping.)


During the past SPAM wave on Ask Ubuntu, I was forced to protect several questions using my 15k privilege; now I'm looking for them to unprotect them now that the SPAM is gone.  Where is a list of all questions I protected?  I'm using both support and feature-request tag, if such doesn't exist so it could be created.

Having a record of all actions taken on a site, as is provided by the "activity" and "votes" tabs of our profile, comes in handy very often. Perhaps the most common case is being able to find a question I've interacted with in the past, to see if anything has changed about it. This applies to questions a user has protected as much as anything else. Users are theoretically encouraged to unprotect questions when it's no longer necessary, as emphasized , but in practice they often do not. In many cases it's hard to blame them: unless they specifically marked it as a favourite, the site doesn't keep any record of the question to allow them to find it again. We should help users more easily review their own protections in the future.    For personal review, the votes tab is adequate, but there may also be value in displaying this publicly in the activity tab. There may be users with a history of repeatedly protecting questions over-eagerly. It would be useful to be able to review other users' protection histories to see if this is the case. Even if this is not available to regular users, it may be helpful to moderators, unless their user activity views already allow them to filter down to see this.


In , a dry cell battery, a wound copper wire and a few magnets (see image below) are being used to create what can be described as "train". It looks fascinating but how does this experiment work?  Update 8th August 2016: This problem has been completely worked out in a paper that was published in the January 2016 issue of American Journal of Physics.     Link: Am. J. Phys. 84, 21 (2016);


give me suggestion on this problem. I have 2 nic cards public ip (eth1) and private ip (eth2). now i have a linux system having centos 6.4. I made this system software router so can access internet on my client system. and it working properly.  for previous software router i do natting like this.    iptables -F iptables -t nat -F iptables -t mangle -F iptables -X iptables -t  nat -X iptables -t mangle -X iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE iptables -A FORWARD -i eth1 -j ACCEPT echo 1 > /proc/sys/net/ipv4/ip_forward service iptables save service iptables restart               and it work fine i am able to access internet over client system.  but now i want to attach 3 nic card (eth3) in same system for public ip as well and want my client system access internet through that public ip also. In this case what will i do. and one thing i also want that if any case my one service provider gets down that time i want to up another service provider. in that case what to do.  for this tell me  the proper way so can build this successfully.

I'm new on CentOS. I have a CentOS 6.4 system having 2 NIC cards. I want to setup a gateway so I can get internet from public ip over 1st nic card (eth1) and forward the network over 2nd nic card (eth2) so it can be accessible to my local network. I made a DNS server in same system. my gateway system is able to ping to both DNS and google but my client systems are not.  I tried to set the iptables rules it works ping to local gateway but unable to ping to public DNS and www.google.com from client system..when I ping to google.com said that host is unreachable.  How can I implement this, please help me?   public ip is(eth1) : x.x.x.x my local network is (eth2) : 192.168.x.x   I used this for setting up iptables:  iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE iptables --append FORWARD --in-interface eth2 -j ACCEPT  echo 1 > /proc/sys/net/ipv4/ip_forward   Routing table:  Kernel IP routing table Destination          Gateway             Genmask           Flags     Metric      Ref    Use Iface local ip             0.0.0.0             255.255.255.0       U        0          0        0 eth2 public ip            0.0.0.0             255.255.255.0       U        0          0        0 eth1  0.0.0.0         my local gateway         0.0.0.0             UG       0          0        0 eth2   Iptables:  Chain PREROUTING (policy ACCEPT 9761 packets, 1239K bytes)  pkts bytes target     prot opt in     out     source               destination  Chain POSTROUTING (policy ACCEPT 14666 packets, 1001K bytes)  pkts bytes target     prot opt in     out     source               destination   345 41722 MASQUERADE  all  --  *      Auto_eth1  0.0.0.0/0            0.0.0.0/0  Chain OUTPUT (policy ACCEPT 15011 packets, 1043K bytes)  pkts bytes target     prot opt in     out     source               destination   Please tell me what are changes I have to do in configuration.


I am doing a PCA on 24 satisfaction variables from a survey.  Respondents indicate their levels of satisfaction towards different aspects of the service.  These variables are all measured in same unit, 1-5, 1= very dissatisfied, 5= very satisfied.  x1-x3 are about pier, x4-x11 are about staff, x12-x16 are about food, x17-x18, x19-x22, x23-x24 are related  EDIT: if the principal components show a satisfaction variable with high eigenvector loading value,   does it mean that respondent is satisfied with that aspect of service,  or does it mean that the respondent puts more weight on that aspect of service when he/she thinks of his overall satisfaction of the service.   If the answer is the former one, I should find the factor with lowest/negative score across all PCs and interpret that that aspect of service needs to be improved, yes?

What are the main differences between performing principal component analysis (PCA) on the correlation matrix and on the covariance matrix? Do they give the same results?


n = 4  chessboard_lines_initial = [[0]*n]*n chessboard_lines = copy.deepcopy(chessboard_lines_initial) print(chessboard_lines) #Output:  #[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]  chessboard_lines[2][2] = 1 print(chessboard_lines) #Output:  #[[0, 0, 1, 0], [0, 0, 1, 0], [0, 0, 1, 0], [0, 0, 1, 0]] #However, I was expecting  #[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0]]   however, if I directly assign [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] to chessboard_lines, then it works.  Not sure why the copy.deepcopy(chessboard_lines_initial) is not working in this case.

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


My mother was travelling from India to US and airline person pointed out that her indian passport is damaged. After multiple request they let her travel but asked her to replace the damaged passport at Indian embassy in US. When i assessed the damage, i realized it's not really that bad. I am attaching the picture .It seems some paper has come out but the strings inside is still intact. No one in US immigration objected on port of entry. My question is, is it fine to continue with this passport and replace it when she go back to india sometime next year or i should get it change it asap?

My Indian passport threading is coming off i.e. the cover of the passport is coming off, there are only 2 threads remaining.   Will it be a problem at the airport when going abroad ? Also anyone who has experience of getting a replacement passport fairly quick ? Because I need to get a passport in like 15 days.


For example, current time is 10:10.  then when will the train leave?   The train will leave in 10 minutes. The train will leave in 10 minutes' time. The train will leave after 10 minutes.   If the train leave at 10:20, what can we say?

The class will be over in 10 minutes. The class will be over after 10 minutes.  I know the first is correct but why?


We know the speed of a photon is constant.  Yet when any other object changes direction, its velocity must go to zero. Thus,  my question is how does a photon avoid this? I assume that to change direction, a photon must be absorbed and then re-emmitted?

After all, it does change direction when reflection occurs. So shouldn't it also accelerate? And since the acceleration cannot increase the speed of light, mustn't it slow down?


The , if an answer in the Low Quality Posts review queue gets six Recommend Deletion posts, it gets deleted immediately, and the post is marked simply as 'deleted on ...', such as  (physics 10k+ or SE team only).  However, I'm a bit confused by  (again physics 10k+ or SE team only):        The post got six Recommend Deletion votes, which should have deleted it on the spot, but it lingered on for another hour until a moderator deleted it (and turned it into a comment). Do Looks OK votes somehow count against recommended deletions? (My understanding was that they do, but only regarding whether the post stays on the queue or gets taken off it.) If so, does the existing documentation, such as the linked post above, need to be clarified on this regard?    Edit:  Answer revision history and timeline as requested:                In the other example, the timeline and revision history both say 'post deleted from review' attributing it to the reviewers.

I see a "review" link on the top of the page, which takes me to a few "review queues".   What is a "review queue"? What are the various queues for? What can I do in each queue?


I would like to find the content of all the outer square brackets pairs in a string.  If an outer pair has an inner pair then it should not be matched separately.  For example string: [abc][123][cde[456[aq[]1q1]]] results should be:   abc 123 cde[456[aq[]1q1]]   Any help will be highly appreciated...

Is it possible to write a regular expression that matches a nested pattern that occurs an unknown number of times? For example, can a regular expression match an opening and closing brace when there are an unknown number of open/close braces nested within the outer braces?  For example:  public MyMethod() {   if (test)   {     // More { }   }    // More { } } // End   Should match:  {   if (test)   {     // More { }   }    // More { } }


So, my configuration is with 2 separate physical drives. One with Linux one with Windows. Boot selection I am doing from bios (Linux was installed without the windows SSD plugged in). Everything was sugar and nice until I need it to reinstall windows and from Windows 10 installer by mistake I deleted also the SSD with linux. I immediately realized and did nothing over it hoping that there will be a queue of events that will be triggered by a "apply changes to disk" but this was not the case.  Is there any way how I can recover my partition? thank you!

I was installing ubuntu 12.04 on my system. There were 4 partitions on my system and I selected one of the four partition for the installation and chose the option of resizing the partition. Initially my partition was of size 100+GB and i created another partition out of it of size 15GB (EXT4). Now the moment I changed this partition structure my original partition got lost along with its data and I am left with 50GB partition and 50GB unallocated free space.   Now the data that I have lost is meant a lot to me and I want to recover that data. So is there any way I can recover it? And I haven't checked "format" option while resizing the partition.


Lef $f,g: I \rightarrow I^2$ be continuous and $f(0) = (a,0), f(1) =  (b,1)$ and $g(0) = (0,c), g(1) = (1,d)$.  Prove that there exist $t_1, t_2 \in I$ such that $f(t_1)=g(t_2)$   The book is hinting to use (if $h : D^n \rightarrow D^n$ continuously then there exists a fixed point) to find a function from $I^2 \rightarrow I^2$, but I can't find anything that works even if I replace $D^n$ with $I^n$ by homeomorphism.

I'm looking for a simple argument to the following:  Given two (continuous) paths on the unit square, one from (0,0) to (1,1) and the other from (1,0) to (0,1), prove that the paths cross at some point $(x_0, y_0)$.  I have constructed a topological argument for why this is true using compactness (and a proof by contradiction), but the person I'm working with seems to think there is a "simple" and "well-known" argument that says the two paths must cross.  I haven't been able to find such a result.  Does anyone know of one?  Thanks!


I'm not looking for a proof, but rather an explanation, because I know there's something wrong with my thinking. So, I know that $$ e = \lim_{n\to\infty} (1+\dfrac{1}{n})^n $$ And also $$ e = \sum_{k=0}^{\infty} \dfrac{1}{k!} $$ And I'm confused as to why $e$ can be irrational, since both of those definitions are a rational number(?). I know that addition under rationals is closed, so I'm confused as both of these can be rearranged to something with rationals (e.g. sum of rationals, or $(\dfrac{n+1}{n})^n$), so I guess my question is, is why these rationals converge to an irrational? Thanks.

I'm solving an exercise, and at some point I have to prove that any inteval $(a,b)$, with $a,b \in \mathbb R$, is  the union of intervals $[\alpha,\beta)$, with $\alpha \in \mathbb R$ and $\beta \in \mathbb Q$. The values of $\alpha$ are easy to find: $$(a,b) = \bigcup _{n = k}^{\infty} [a + \frac{1}{n},\text{____})$$ For a value of $k$ sufficiently large such that $a + 1/k \in (a,b)$. But the problem is that I don't know what to put in the place of $\text{_____}$, because we have to put a sequence of rational numbers, but the limit of the sequence has to be the real number $b$. Is it even possible for a sequence of rational numbers to have a limit that is not rational? Because a sequence of real numbers never has a limit that is complex for example, so if $(a_n)_n \in \mathbb Q$ it makes scene that $\lim_n a_n \in \mathbb Q$, but I can be wrong. Is this possible? If so what should be the sequence in _____?


Why do we use the adjective "Marxist" and not "Marxonian"? Please explain the use of these unusual suffixes. Another one that comes to mind is "Draconian". How do we decide what suffix to use? What are the rules?   I read an article about Cognitive Psychology by Albert Ellis, and the author later refers to it as "Ellisonian".  Thank you in advance. English is my second language.

This is a question bugging me for a long long time, especially for a non-native speaker like myself.  We have physicist standing for the people doing physics research, as is linguist, chemist, etc.  But for math, the counterpart of "-ist" suddenly becomes "-ian": I call myself a mathematician.   What bugs even more is that we have physician as well, yet representing a totally different occupation with physicist.  This is not the end, in mathematics, we have so many adjectives derived from the names of mathematicians. Through some wikipedia-fu I learned they are called eponymous adjectives, most of which I used often end with "-ian": Newtonian potential, Cartesian coordinate system, Lorentzian transformation etc. These words often indicate somewhat the relationship of possession.   Yet again, not all possessive relations are represented using "-ian", there are: Maxwell's equations, not Maxwellian equations; Gauss's divergence law, not Gaussian law (even though there are tons of things with Gaussian in it).  What confuses me even more, is that "-ian" after people's name can not only represent "of someone", it also can stand for "a believer or supporter of someone's theory". For example, I call myself a Kantian. There is Leibnizian as well, the supporter of Leibniz's philosophy.  Now my questions are:   Is there a standard rule to decide which one to use, "-ian" or "-ist", when describing an occupation? For eponymous adjectives, my vague impression is that: when something is derived not by that specific person, but rather whose derivation bears the spirit of that someone's theory, then we use "-ian". For example, Newtonian potential is not invented by Newton, yet Maxwell's equations are unified by Maxwell. But another example is that Descartes invented Cartesian coordinate system, but the system is not called  Descartes'  coordinate system...How to tell if we want to invent some new terms? For example, if I proved a new theorem using some idea from Newton, do I call the proof Newton's argument or Newtonian argument? Can "-ian" be used interchangeably in "I am a Kantian" and "This is a Kantian style argument."? or there is some tradition for each word ending with "-ian"? i.e., Some words ending with "-ian" can be only used as noun or adj.


My girlfriend and I are trying to play Minecraft together on the same wireless connection. It should be very simple; open a single player game, pause then open it up to LAN. Then the other person would connect. However, the game does not show up entirely, and we have tried disabling the firewall to see if that was the problem, which had no affect on the issue, also using direct connect with our IPv4 address, as well as a combination of both. Nothing seems to make the game appear, even waiting for long amounts of time. The only software I think may tamper with the connection would be Hamachi, but we both have it powered off and closed. Is there a solution for this or should I just contact my provider?

My LAN server won't let my cousin join me or me join my cousin. It won't show up on the multiplayer screen - it keeps saying "scanning for LAN servers" but it never finds it. I am at his house and we use different computers but it won't connect. How can I fix this?


I created a project on Eclipse with SQLite Database. It is a data entry system in which the user enters the login credentials and if the credentials match with the data stored in the database he is allowed to login and insert or update information.  This is working perfectly fine with the Emulator device, but when I transferred the .apk file to my Android mobile, it throws an exception "No such table". I want to know how the database which is present on Eclipse be transferred to my phone along with the apk file. Thanks in advance. PS: I am using DB Browser for SQLite to create tables.

If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.


This is a follow-up to . That was about telling Voldemort about the Foe-Glass device, this one is about using the Foe Glass while at Hogwarts.  Barty Crouch Jr., while impersonating Alastor "Mad-Eye" Moody, had Moody's  in his office during Harry Potter's fourth year at Hogwarts. Near the end of the book, Goblet of Fire, the Foe Glass shows Albus Dumbledore, Minerva McGonagall, and Severus Snape just before they burst into the room to arrest Barty Crouch Jr.  This proves that all three were enemies of Crouch and therefore of the Death Eaters too. So Barty Jr. had an entire year to look through the Foe-Glass and know Snape was not really a Death Eater. It would be a major oversight for him to not check out friend and foe around Hogwarts.  Could he have used the Foe-Glass to learn Snape was not a true Death Eater?  If he did, he would have warned Voldemort and the other Death Eaters.  Edit: Not sure why this was flagged as a duplicate of my earlier question. As mentioned above, that question is "Did he tell Voldemort about the Foe-Glass?" which is different from this question "Did he use the Foe-Glass to learn Snape's allegiance?" It's quite possible for Barty Crouch Jr. to tell Voldemort about the Foe Glass and not learn about Snape's allegiance. It's also possible for him to learn about Snape's allegiance and not mention that or the use of the Foe-Glass to Voldemort. Neither condition implies the other. He could do both tell Voldy about the Foe-Glass and learn Snape's allegiance, or he could do neither.

Barty Crouch Jr., while impersonating Alastor "Mad-Eye" Moody, had Moody's  in his office during Harry Potter's fourth year at Hogwarts. Near the end of the book, Harry Potter and the Goblet of Fire, the Foe-Glass shows Albus Dumbledore, Minerva McGonagall, and Severus Snape just before they burst into the room to arrest Barty Crouch Jr.  Barty Jr. had an entire year to learn about the Foe-Glass. He could have told Voldemort on any day that year about the Foe-Glass. If he did tell his master, I am sure Voldemort would have insisted on keeping the device for himself.  Voldemort could use the device to find out if any Death Eaters near him are really enemies.  Although the  says the Foe-Glass is a dark detector, we know from  and from the book itself that it shows the foes of whomever physically possesses it.  There is no indication he ever told Voldemort about it. Why not?


I'm intending the following: • If the system_picks field includes the text "Medication Dispenser", make the div with the id "ifYesMed" visible. • Otherwise, hide the div "ifYesMed" What am I missing in the code below? <apex:page standardController="Account">   <apex:stylesheet value="{!$Resource.styleforAccountLightningPage}"/>

      Medication Dispenser Device Number:&nbsp;&nbsp;<apex:OutputField value="{!Account.MED_Device_Number__c}"/>

         </apex:page>  Per recommendations, I have updated my function to function showMedNumber (){            if (CONTAINS(Systems_Pick__c, "Medication Dispenser")){             <apex:outputPanel>             document.getElementById("ifYesMed").style.display = "block";             </apex:outputPanel>         } else {             document.getElementById("ifYesMed").style.display = "none";         } }  I'm still not getting the intended results.  Can anyone assist by letting me know how I should change my code exactly? Thank you!

In visualforce page I have a custom picklist with the values "Show" and "Hide" and two command buttons(Button A & Button B). When the picklist value is "Show", Button B needs to be displayed and when it's "Hide" then Button B needs to be hidden.  For that I have tried below code  Visualforce page :  <apex:page showHeader="false" controller="picklistRenderController"> <apex:form >     <apex:pageBlock >         <apex:selectList value="{!selectId}" size="1">             <apex:selectOptions value="{!display}"></apex:selectOptions>             <apex:actionSupport event="onchange" action="{!displayButton}" reRender="d"/>         </apex:selectList>         <apex:pageBlockButtons location="bottom" id="d">             <apex:commandButton action="{buttonA}" value="Button A"/>             <apex:commandButton action="{buttonB}" value="Button B" rendered="{!selectId=='show'}"/>         </apex:pageBlockButtons>      </apex:pageBlock> </apex:form> </apex:page>   Controller is :  public class picklistRenderController {    public List<selectoption> display { get; set; }   public String selectId { get; set; }    public PageReference buttonB() {      return null;   }    public PageReference buttonA() {       return null;   }    public PageReference displayButton() {        return null;   }     public picklistRenderController()   {      display =new List<selectoption>();      display.add(new selectoption('none','-select-'));      display.add(new selectoption('show','show'));      display.add(new selectoption('hide','hide'));   } }   But I couldn't able to get this work. Please help me on this.


I was working in phpMyAdmin (XAMPP localhost) to add a user for a new database I created for a local WordPress website, and came upon the list of users named "root". Since I did not remember ever creating these root users, I tried to delete them. I don't know what I clicked. I don't remember hitting any delete button, but this resulted in deletion of root. After that, all my databases were gone along with all users. Now only "Database operations information_schema" is there in phpMyAdmin panel.  Now when I click on the "Databases" tab in phpMyAdmin, it simply returns a red warning "No privileges to create databases". There's no user tab. I can still see my databases in MySQL folder in XAMPP folder, and all WordPress websites work fine. But I am unable to create a new database/user nor am I seeing my existing databases. I searched google, and found a similar query here with a solution.  However, I tried most of the steps in the solution, but nothing came up. Could anyone please help me with a solution to add root user as well as databases back in phpMyAdmin using XAMPP localhost? I'm a novice, so need step-by-step instructions please. Your help will be greatly appreciated. Thank you!

I'm test-running a Joomla installation (locally, using WAMP) with an MySQL database supporting it...this is in preparation to moving everything online once I have it configured.    I was working in phpMyAdmin to change the password of a superuser I had set up with a login-name other than "root."  While doing so, I saw three additional "root" users, and on the phpMyAdmin home page, a warning about these root users not having a password.  I thought that since I created my own superuser with "All Privileges," I didn't need the root users...so I deleted them.  Immediately things stopped working...and now, when I click on the "Users" tab in phpMyAdmin, it simply returns a red bar that says "No Privileges"...my specific superuser is gone.  However, it seems I can still move around in phpMyAdmin (maybe because I'm still logged in?).  Could someone please tell me step-by-step how (if?) I can re-add the root users using phpMyAdmin?  I see instructions posted in various places, but they seem to address users who are using terminal windows or some other program.  I'd  hate to see months of work go down the drain!  EDIT:  Using Windows, I've tried the following:   There is no file called "resetroot.bat" anywhere in the wamp/sql folders, as someone suggested...so that option is out.  I've tried to access MySQL using a terminal connection:  in the MySQL root folder there is a file called mysql.exe that seems to grant this when executed (there is no "mysql_safe.exe" as some solutions have suggested).  However, I have been unsuccessful in starting mysql with the --skip-grant-tables option from outside mysql.exe, and when I try to do it from within mysql.exe, I just get an odd prompt ("->") and no other commands seem to work.   Please keep in mind that I am a newbie at this!  I am trying different things, but without any success...that is why I'll probably need step-by-step instructions.


I recently saw  on Cooking.SE. The comments section there is a disaster, so I flagged for moderator attention on the first comment on the answer. However, I'm not sure if I should have flagged the very first comment, or the first comment that went off-topic and started the train wreck in the first place.  If the entire comments section is a mess, which comment should I flag for moderator attention?  To be clear, in this question I don't care about whether or not the answer is low-quality, NAA, should be deleted, etc. I'm focusing on the fact that comments need to be cleaned up.

When multiple comments on a single post need attention, what works best for the diamond moderator workflow?  Flag each comment Flag one comment and use the "Other" section to indicate which comments should be addressed Something else  For example, in exchanges such as:  Person A: Post your code Person B: You should really post your code OP: Okay, I posted the code  The first two are obsolete after the edit, and the third will be obsolete after the first two are removed. I assume that there may be specific cases where one is better than the other, such as those that trigger an automatic reaction. Which method should be used to reduce the overall workload?


How do you calculate all the least cost pathways that exists for a region? I would like the output map to display all routes (and was wondering whether this can be done in one set of operations). I want to determine this by taking into account two things: slope and valley floors.    I have been informed that I need a DEM raster, and distance rasters to valley floors and rivers. I have a river system shapefile (once is in a polygon and the other is in a line format) but I don't know exactly how to create these rasters. As it stands, this is what the DEM raster and the riverways shapefile look like:    I have followed the tutorials in ArcGIS help 10.1 but I just don't seem to be going anywhere. I am able to create least cost pathways between two points based solely on slope, and I have tried reclassifying via building models but have been unsuccessful in creating images that display meaningful results - I think the biggest issue is inputting or creating distance rasters to valley floors/rivers and combining that with the slope raster.  Can anyone explain in layman's terms how I could create distance rasters to valley floors/rivers from a polygon or line shapefile and how this can be combined with a slope raster to create an output map displaying all existing least cost pathways for a selected study area?   Please, any help, advice, suggestions or comments would be immensely appreciated!

How do you calculate the distance of about 10 sites scattered across a region to bodies of water (rivers and lakes) using ArcGIS 10.1?  I have the lat/lon coordinates of the 10 sites as a point feature class and I have downloaded the Surface Water Area (polygon shapefile) for the study  area from the UK Ordnance Survey webpage.  I want to determine the easiest route-ways that are available in the study area by taking into account slope and proximity to rivers. I understand that I can achieve this by running a cost path analysis if I have a dem raster, slope raster and distance rasters to rivers and valley floors. But I am not sure how to create distance rasters to rivers and valley floors using Spatial analyst tools.


I've been given homework and am almost done but this strip of code in a C program is preventing me from completion: if ((month==1,3,5,7,8,10,12 && day>31)){         printf("error only 31 days in that month");         return 0;     }    else if (month==4,6,9,11 && day>30){         printf("error only 30 days in that month");         return 0;       }     else if (month==2 && leapyear && day>29){         printf("error only 29 days in that month");         return 0;         }         else if (month==2 && day>28){             printf("error only 28 days in that month");             return 0;         }  I wanted to say that if the month was 1 and the input was greater than 31 then it would do an error and stop and that is the problem. If I input 4 in months and the day is 34, it will print the first statement. Is there anything I can do? Also, bear with me; I'm still kinda new to programming.


Here I am thinking ...  Why do I see much more often the use of #define instead of enum in other people's code when defining error codes for the return value of functions?  Is there a reason for this, or is it just a matter of taste? As far as I know, enums are much more safer and debugger friendlier.

In a C++ project I'm working on, I have a flag kind of value which can have four values. Those four flags can be combined. Flags describe the records in database and can be:   new record deleted record modified record existing record   Now, for each record I wish to keep this attribute, so I could use an enum:  enum { xNew, xDeleted, xModified, xExisting }   However, in other places in code, I need to select which records are to be visible to the user, so I'd like to be able to pass that as a single parameter, like:   showRecords(xNew | xDeleted);   So, it seems I have three possible appoaches:  #define X_NEW      0x01 #define X_DELETED  0x02 #define X_MODIFIED 0x04 #define X_EXISTING 0x08   or  typedef enum { xNew = 1, xDeleted, xModified = 4, xExisting = 8 } RecordType;   or   namespace RecordType {     static const uint8 xNew = 1;     static const uint8 xDeleted = 2;     static const uint8 xModified = 4;     static const uint8 xExisting = 8; }   Space requirements are important (byte vs int) but not crucial. With defines I lose type safety, and with enum I lose some space (integers) and probably have to cast when I want to do a bitwise operation. With const I think I also lose type safety since a random uint8 could get in by mistake.  Is there some other cleaner way?  If not, what would you use and why?  P.S. The rest of the code is rather clean modern C++ without #defines, and I have used namespaces and templates in few spaces, so those aren't out of question either.


So, between yesterday and today,  dropped by ~13k. I believe I was somewhere in the range of ~906k and now I'm down to ~893k.     Sure, it's a (wildly) fuzzy metric... but barring some change to the algorithm, I wouldn't expect that the number of people I've "reached" could decrease. Certainly, I haven't noticed this behavior (until now) since the release of this feature.  So, three things:   What, specifically, could cause this? User-deletion/hard-deleted posts? Is this behavior intended? ? Is there any chance of developing around this going forward? It seems like there's already . Can that exception be applied to people reached as well?    For reference, Jaydles explains the feature in . Scroll down to the How it currently works (and why) section.

I posted this  a few weeks ago. The photo I posted shows that I had impacted 25k people. Now it says this:   I only impacted 1k people, 24k less than what my impact was a few weeks ago! I am sure that 24k people didn't delete their accounts within a few weeks and this is probably a bug. What happened to my impact score?


I worked differential linear equation and at end of equation I got this integral.Can someone give me a hint to do this: $$\int \frac{1}{\left(u^2+1\right)^2}du$$

I am in the middle of a problem and having trouble integrating the following integral:  $$\int_{-1}^1\frac1{(1+x^2)^2}\mathrm dx$$  I tried doing partial fractions and got:  $$1=A(1+x^2)+B(1+x^2)$$  I have no clue how to solve this since it is obvious there is no way to cancel out either $A$ or $B$ to get the other variable. Please guide me.  Thank you.


When i am trying to add custom marker it throws NullPointerException,   java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.model.Marker com.google.android.gms.maps.GoogleMap.addMarker(com.google.android.gms.maps.model.MarkerOptions)' on a null object reference   Here is my map activity    public class GoogleMapActivity extends AppCompatActivity        {           double latitude, longitude;          GoogleMap map;         protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_google_map);         SupportMapFragment mapFragment = (SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);         mapFragment.getMapAsync(this);      }       private void getCurrentLocation()       {      Location location = LocationServices.FusedLocationApi.getLastLocation(googleApiClient);         if (location != null) {             //Getting longitude and latitude             longitude = location.getLongitude();             latitude = location.getLatitude();             moveMap();         }       }     private void moveMap()     {         LatLng latLng = new LatLng(latitude, longitude);              map.addMarker(new MarkerOptions()                      .position(latLng)                     .draggable(true)                     .title("Current Location"));              map.moveCamera(CameraUpdateFactory.newLatLng(latLng));             map.animateCamera(CameraUpdateFactory.zoomTo(15));           }      @Override     public boolean onCreateOptionsMenu(Menu menu) {         getMenuInflater().inflate(R.menu.googlemap, menu);         return true;     }      @Override     public boolean onOptionsItemSelected(MenuItem item) {         int id = item.getItemId();         if (id == R.id.action_search) {             getCurrentLocation();             moveMap();          }         return super.onOptionsItemSelected(item);      }   }   How can i fix this problem?

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 have created a form. Whenever someone pastes the url of a website such as  in that form and after hitting the submit button, it will convert the webpage to pdf and prompt us to save in the disk. Can anyone please tell me how to do this ? I know about DOMPDF

I have an HTML (not XHTML) document that renders fine in Firefox 3 and IE 7.  It uses fairly basic CSS to style it and renders fine in HTML.  I'm now after a way of converting it to PDF.  I have tried:   : it had huge problems with tables.  I factored out my large nested tables and it helped (before it was just consuming up to 128M of memory then dying--thats my limit on memory in php.ini) but it makes a complete mess of tables and doesn't seem to get images.  The tables were just basic stuff with some border styles to add some lines at various points; : I actually had better luck with this.  It rendered some of the images (all the images are Google Chart URLs) and the table formatting was much better but it seemed to have some complexity problem I haven't figured out yet and kept dying with unknown node_type() errors.  Not sure where to go from here; and : this seems to work fine on basic HTML but has almost no support for CSS whatsoever so you have to do everything in HTML (I didn't realize it was still 2001 in Htmldoc-land...) so it's useless to me.   I tried a Windows app called Html2Pdf Pilot that actually did a pretty decent job but I need something that at a minimum runs on Linux and ideally runs on-demand via PHP on the Webserver.  What am I missing, or how can I resolve this issue?


I am using Ubuntu as my only operating system , now I want to dual boot with windows 10

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


In Kim experiment  I take out all the beam splitters, mirrors, and detectors for idler photons. But I leave idler photons travel freely in the universe. I look in D0 after I detect the last signal photon and I detect formless blob. I do not detect interference pattern even though I have no "which path" information just because In Principle "which path" information is incorporated in idler photons that travel and can be obtained any time in the future if one decides to.   So, I look at D0 and definitely I SEE formless blob.  Now, a year later I decide to put in only mirrors and detectors for IDLER photons(no beam splitters) that will provide me with "which path" information for every idler photon. After I detect the last idler photon I decide to look at D0 again. Will I see only two fringes on D0? If yes, does it mean that I have changed the past( the formless blob)? If No, does it mean that just because I looked at D0 a year ago and saw formless blob I will see a formless blob again(I cannot change the past)? What if I have not looked at D0 a year ago...will I see two fringes now?

Lets assume that in the delayed eraser in Kim experiment  we can split the original photon into 2 photons, namely signal and idler photon, but we only have D0 detector and no other detectors, no beam splitters , no mirrors. We will let the idler photons travel freely in the universe without being detected or analysed  by any device. As we have no "which path" information about the signal photons shall we receive interference pattern on D0?


I'm looking for a nice cut of meat that would nicely fall apart when you put a fork to it. It doesn't have to follow the "authentic" recipe. I've tried various packs of "stew meat" before and it always comes out pretty rough. I'm willing to acknowledge I'm not cooking it properly or long enough. But I'm also wondering if maybe a brisket or a specific cut of meat would work better.

What cut of beef should I use for a beef stew?  I heard that you want a little bit of fat in the meat, but what part the animal is best to use?


I know "Sonic Visualiser", from the Ubuntu Software Center, and it is a very good tool!  But... It works with pre-recorded audio files only.  Is there something like that but to work with real time audio?  I mean, some software which works with the audio we are using in real time into our computer (whatever the source was, jack, alsa and/or pulseaudio).  Is there something like this? Where?

On my home stereo I have a spectrograph that has a 2D matrix, whereby the X axis is the frequency (deep bass on the left, vocals in the center, treble on the right), and the Y axis is the volume or power of the sound at that frequency.  I have seen things like this for Ubuntu, but they work on MP3 files or other pre recorded songs.  Is there anything that can do this real time for a microphone attached or simply the system mixer?


What do I name an Eevee to make it evolve into a Umbreon?

So I just caught an Eevee. Now, I need 25 candies to evolve it. The fact is that in the GameBoy color versions, that Pokémon needed a stone to evolve instead of experience. Depending of the stone he was fed with (thunder, water or fire), he was evolving in a different Pokémon.   Is the stone feature also in Pokémon Go? If not, what decide the evolution of this Pokémon?   Bonus point : If it's possible, how can I get a stone?


Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  >>> 6/3 2 >>> 6//3 2


For instance if I wanted to type  $Ctrl+Alt+Delete   and it would return the same as  $reboot   this way when editing custom taskbar launchers we can execute key commands via terminal. Would I write a bash script or is there an editable script where commands such as reboot live? Sorry if this was over your head those of you who down voted for no reason rather than answering.

I'm a web developer. When I want to start working, always i'm executing some command on terminal. For example:  sudo service apache2 start sudo service mysql start sublime   For speed up this process, I create a .sh file which contain these commands.   Now, when I want to start working, I'm just executing this .sh file and all services (mysql, apache2 etc.) starting.   Is it possible to create a custom command for this? For example if I type sudo start-working to terminal, it will execute these commands


I'm struggling a bit to arrive at the conclusion that $f(z)$ is a constant.  Suppose $f(z)$ is holomorphic on and inside the unit disk, and that it has no zeroes on the interior.  Also, assume that $|f(e^{i\theta}|$ = 1, for $0<\theta< 2\pi$.  Then by the maximum principle, the maximum of $f(z)$ is attained on the boundary -- that is, the unit circle.  But since $g:=\large \frac {1}{f(z)}$ is holomorphic on and inside the unit disk, too, then it also attains its maximum on the boundary, and so this forces $f(z)$ to be minimal on the circle as well.  Knowing now that $f(z)$ attains both its max and min on the circle, how can I conclude that it is constant?  This is tricky of course since $f(z)$ could assume infinitely many different values that have modulus = 1.  So, I hope to make use of the open mapping theorem.  Is this too ambitious?  If I can say that the open set, namely the interior of the unit disk, maps onto the unit circle in the w-plane, then we know that the image is compact, and by Heine-Borel's theorem, the image is closed and bounded.  In particular, the image is closed.  By the open mapping theorem, the holomorphic function $f(z)$ must be constant.  ...unfortunately I don't see why $f(z)$ has to be an onto mapping carrying the interior of the unit disk onto the unit circle in the w-plane.  Any hints or comments are welcome.  Thanks,

Let $f$ be non-constant analytic in a neighborhood of the closed unit disk such that $|f|=1$ on the unit circle. Show that $f$ has a zero inside the unit disk. It has been suggested to argue this by contradiction and using the maximum principle. However, is it possible to argue this question using properties of conformal maps since doesn't $f$ map the unit circle to itself? Regardless, I don't understand what information the Maximum Principle would give me to argue by contradiction. Why couldn't $0<|f|<1$ inside the disk?


I found a symbol on the left side of my screen in Overwatch. It looks like a lightning bolt with an arrow around it. Here is my sketch of it as I was unable to take a screenshot in time.  Can anyone tell me what this means?

One has a forward loop with a thunderbolt in the middle, and the other has pages stacked against each other.  Sometimes one or the other flash, sometimes they both flash, and sometimes they flash rapidly or just don't flash very often.  They always appear in the upper left of the hero select screen.  What are these symbols and what do they do?


I had a Windows partition and I nuked it in favor of a VirtualBox VM.  Now I could use the extra space it was occupying. LVM2 is in use on the Linux side but the Windows partition which has since been removed pre-dates the LVM setup. The space in question is to be added to the /home partition. I've created an admin user who has a home dir that is not in /home so that I can log in as him and get this done. Procedure? Do I need to mess with the volume group? Do I need to use fdisk first or can I use a pv* command?  This situation seems more complicated than gparted or lvm (the GUI tool) can manage.   Additional info:  dude@machine:~$ sudo lvs    LV     VG        Attr      LSize   Pool Origin Data%  Move Log Copy%  Convert   home   ubuntu-vg -wi-ao--- 214.87g                                              root   ubuntu-vg -wi-ao--- 191.39g                                              swap_1 ubuntu-vg -wi-a----  31.94g                                            dude@machine:~$ sudo fdisk -l /dev/sdb  Disk /dev/sdb: 500.1 GB, 500106780160 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976771055 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xca18e148  Note: Below sdb3 is physical and sdb5 logical but it's the same space.      Device Boot      Start         End      Blocks   Id  System /dev/sdb3       526147582   976769023   225310721    5  Extended  /dev/sdb5       526147584   976769023   225310720   8e  Linux LVM  dude@machine:~$ df -T Filesystem                  Type     1K-blocks     Used Available Use% Mounted on /dev/mapper/ubuntu--vg-root ext4     197401876 13355496 173995820   8% / none                        tmpfs            4        0         4   0% /sys/fs/cgroup udev                        devtmpfs  16428232        4  16428228   1% /dev tmpfs                       tmpfs      3288660     1580   3287080   1% /run none                        tmpfs         5120        0      5120   0% /run/lock none                        tmpfs     16443284    19692  16423592   1% /run/shm none                        tmpfs       102400       44    102356   1% /run/user /dev/sda1                   ext2        240972    51593    176938  23% /boot /dev/mapper/ubuntu--vg-home ext4     221638340 24327232 186029496  12% /home /home/dude/.Private          ecryptfs 221638340 24327232 186029496  12% /home/dude

I want to shrink my second (LVM) partition, in order to create a new partition in the newly freed space. I am using the Live CD to do so, because I know I can't resize/move this partition while it is in use. When I opened GParted in the Live CD, I realized that I could not resize the partition, because when I right-click it, the option "resize/move" is disabled.  I tried to unmount it, to "lazy" unmount it (umount -l /dev/sda2) but it didn't work.  A screenshot from GParted:


I am running debian 8.1 and working on this for hours now! I try to auto mount seagate and medion on boot if they are plugged in, but if the server is booting without one of these LABELs it stucks here for 1:30min and boots into maintainace mode:  Give root password for maintenace (or type Control-D to continue):   I just want to mount my usb devices if they are present.. : /    /etc/fstab:  # /etc/fstab: static file system information.  #FIXED #<file system>                             <mount point>   <type>   <options>           <dump>   <pass> UUID=f243951c-f61c-4af7-88c5-79ba0a33caf8  /               ext4     errors=remount-ro   0        1 UUID=28737539-1569-4db7-9ea3-d74473502f39  none            swap     sw                  0        0  #REMOVABLE #<file system>   <mount point>   <type>    <options>                    <dump>   <pass> #LABEL=medion     /mnt/medion     ntfs-3g   rw,noauto,nobootwait,nofail  0        2 LABEL=seagate    /mnt/seagate    ntfs-3g   rw,nobootwait,nofail         0        2

I have added this entry to my /etc/fstab   /dev/sdb1 /user_data xfs rw 0 0   Which works fine, the issue i am getting it sometime i remove this drive and when i do and  reboot my machine it goes into emergency mode.  I have tried adding   /etc/systemd/system/local-fs.target.d/nofail.conf    with  OnFailure=  in it but i  still get the same result  is there something else i can do to stop this happening   Thanks


I am a dual user running Kali Linux and Windows 8.1 . A few days before, I had removed the swap partition that I had installed for Kali Linux during the installation, since my windows was running out of space. Now, I do not know how to make Kali Linux recognize the swap partition for it. The consequence I have to face is that it takes 2 full minutes to boot into Kali Linux. I am posting the system specs below:  Manufacturer and Model: Dell Latitude E5440   Version: Kali Linux Rolling 2020.3  I guess this is unimportant, but just posting it. Thanks! Another thing, I want Kali Linux to realize that I have given it a partition not during the installation procedure, but when it runs on the OS environment. GParted is not helping at all, although I try to provide it a Swap partition. It remains enabled, but during the next boot, Kali does not use it and it stays useless.

I've got a swap partition, but the System Monitor in Linux Mint says, 'Swap not available'. I guess I've forgot to set 'Use as: swap' on install.  How to fix this?


How to get root access in android ?. While  I am trying su or sudo in my samsung galaxy core phone ,I am getting /system/bin/sh :sudo :not found

This is a common question asked by those who want to root their phones. How exactly do I root my Android device? Are there risks involved?


I need to obtain column F in the following example    Basically, I need to match the index, and return the value in column B, with the complication of having to return the sum in case there is more than one match for my index. I would normally just use VLOOKUP, but that only returns the first match, and I can think of some manual ways to deal with this, but I was wondering what the cleanest way is.

I have the table below and i want it to read through columns A-B and then sum the values that match their names in columns C-D.  So that in a column elsewhere of a list of names i have the sum of their values from this table. For example Ed features in both columns with a value of 1 and 3, so would return a value of 4. Struggling to get this to work nicely. My actual table consists of 4 columns names and two sets of 4 columns with numbers.    A       B       C   D Steve   Jeff    4   1 James   Calum   1   1 Alex    Andy    2   1 Peter   Ed      0   3 Owen    Harry   1   2 Jeff    Steve   4   1 James   Calum   1   1 Andy    Alex    2   1 Peter   Owen    0   3 Ed      Harry   1   2


Website like Medium allow us to republish the our content on their site. They will give footer credit as well as they add canonical tag to our site....  If we republish our articles on that type of site, Will I have a better or bad SEO impact for my site?

I’m writing a series of blog posts and I’m finding a little bit of a conundrum. I want the audience that can be manufactured on Medium but I also want the SEO that comes from long form text on my website.  Is there any type of SEO conflict that would arise from putting the exact same posts on both?


I have uploaded my app on playstore and it got about 600 downloads in a week ,the problem is that there are about 20 instances of crashing that I have seen on firebase.I tested my app on various phones but it didn't occur to me but about 20 crashes have been reported.I have seen the code multiple times and also searched and read about problem but couldn't find a solution.  Code is of about 150 lines so,Link-  Actually I am loading a webView here is my code in fragment-  I have 3 fragments and the error reported is-  Exception java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources   android.content.Context.getResources()' on a null object reference android.widget.Toast.<init> (Toast.java:102)  android.widget.Toast.makeText (Toast.java:266)  com.package.a$6.onReceivedError () com.android.webview.chromium.WebViewContentsClientAdapter.onReceivedError2 (WebViewContentsClientAdapter.java:260)  org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleM essage (AwContentsClientCallbackHelper.java:38)  android.os.Handler.dispatchMessage (Handler.java:102)  android.os.Looper.loop (Looper.java:157)  android.app.ActivityThread.main (ActivityThread.java:5571)  java.lang.reflect.Method.invoke (Method.java)  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:745)  com.android.internal.os.ZygoteInit.main (ZygoteInit.java:635).   Please give a word.

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 found the above sentence on a quiz. Mom should be capitalized because it is used as a  proper noun in the above sentence.

My daughter's English text book has a note which reads if you are directly talking to a person about the only person in your house, it can be capitalized.   For example:     "Mommy, have you seen my tab?"  "What would I do with it? Ask your Sister. She's fond of playing on it"   I want to confirm the capitalization of 'sister' here. This is new to me, actually!   And yes, it has nothing to do with emphasizing 'sister' that many may think the reason of capitalizing. Say--     "Yes, last night I asked Mommy about it, but then she gave a reluctant smile!"


I'm describing a situation which is similar to the situation in the previous paragraph, which of the following alternatives are more correct? In general, is there a rule for this?  "You will again be given N things." vs. "You will be again given N things."

For example:     Ever wish you could share information broadly   Could it be rewritten to:     Ever wish you could broadly share information   Are there any rules for the position of the adverbs.


I was doing django project about processing request.data and from.cleaned_data issues. When user only inputs specify fields, it will send request to my server. Next, the form class process the request, except processing inputed fields and return no inputted fields from form built-in fields.  This is request data:  <QueryDict: {u'is_public': [u'True']}>   This is cleaned data from from class:  {'name': u'', 'devie_type': u'', 'is_public': True, 'serial_num': u'', 'is_online': False, 'operation_system': u''}   I know these are dictionary type. I hope getting their union keys of them and values of cleaned data. I expect that it returns:  {u'is_public': True}   This is my attempt:  a = {} for k in request.data:     if k in the_form.cleaned_data:         a[k] = the_form.cleaned_data[k] print a   Is it readable? or is there any built-in functions about processing union dictionary in python?

I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. >>> x = {'a': 1, 'b': 2} >>> y = {'b': 10, 'c': 11} >>> z = x.update(y) >>> print(z) None >>> x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.)


Can anyone please recommend me a good number theory book to read? I want lots of answers to get a good idea. I am a 1st year university student, so it would be good if there are no deep terms and the theory is explained well.

What would be a good book to learn basic number theory? If possible a book which also has a collection of practice problems? Thanks.


Is there a way one can permanently deal with this ever recurring error of:  dpkg: error: dpkg frontend is locked by another process   And:  E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/cache/apt/archives/   I have tried all the sudo rm solutions but it keeps coming back over and over again.  I am using Ubuntu 18.04.03.

How can I programmatically/script disable apt unattended upgrades? Running Ubuntu 16.04.


I have an SSD + HDD combination for my laptop. I have my SSD running Windows 10 and I want my HDD to get used for all Ubuntu's stuff (bootloader, kernels, root directory, swap, home, etc.). Please tell me how can I achieve that in Ubuntu partitioning, with what should be type of partition.

I want to install Ubuntu and learn Linux.  I've been using Raspbian a bit and really would like to get away from Windows as much as possible.  The only problem is some of the games I use requires Windows for now.  Also, I'm taking classes through Coursera and using online tutorials to learn Linux from and would like an operating system installed besides the Raspbian I have on my Pi.  I have a desktop computer with Windows 10 installed on a SSD (M.2 if it matters) and another HDD used to store files. I have a new 1 TB HDD I'd like to install Ubuntu on. My plan is to install it and place the GRUB bootloader on the new drive.  I can then point the UEFI to that drive as the primary boot drive and GRUB should allow me to choose Linux or Windows. My thought is if I do this, I can change the boot order in UEFI back to C:\ drive and have the machine boot directly to Windows as it does now. Then I have the option of having a dual boot system or a Windows only system. Is this viable?  Should I use the whole drive for Linux?    Also, I'm reading a couple different opinions on disabling Secure Boot and Fast Boot from the UEFI.  Any reason not to disable these in my plan above?  Any other advice is welcome. I appreciate the help!


I have accidentally spilt coffee on my keyboard. I unplugged it and let it dry for half an hour, then I reattached it and it worked perfectly for one hour of continuous use - but then I tried a couple of keys and realized that the Caps Lock key not only activates the Caps Lock, but also types 3. The same happens with the 3 key: it types 3 but also activates Caps Lock.  Something similar happens with another couple of keys on the left hand side of the keyboard. Eventually, I unplugged the keyboard, and I will leave it for a couple of days until I plug it back in and see if it works properly.  Any suggestions? Is it possible to fix it? Is there still moisture inside it? What do you think?  I have to mention that it is a Razer model, so an expensive "mechanical" keyboard.

For the first time in my entire life yesterday, I accidentally spilled some latte in my ergonomic keyboard.  The keys are starting to stick a bit now, and I was just wondering if there was some way to get those keys unstuck short of buying a new keyboard.  Update   Last week I accidentally choked on some ironically named "Berry Blast Naked Juice" and spewed it all over my Microsoft Ergonomic 4000 keyboard at work.  This time I had to clean the entire keyboard.  Ah, after watching  on YouTube on how to clean the keyboard I tried nearly the same thing on my keyboard.   I just took the keys off, and washed them in the sink.     The keyboard still works, but I had to wait an entire week for the thing to dry out enough for use.  Although the keys looked dry to me when I initially reinstalled them in the keyboard, my belief is that there was still some water drops lodged in the dark/hollow cylinders that extend up into the key.  These water droplets are probably what caused all of the extra j's I would get when pressing the backspace key when I first tried it out a week ago.  After a week of letting it dry out, it seems to work again.    A small note about reinstalling the spacebar Also one more tip I would like to add, if you are re-installing the spacebar make sure that the connected side of the wire is attached to the actual spacebar key (it snaps right into place); Also, the disconnected part of the grey wire that lies bellow the space bar should fit between the two planks that jettison away from the back and forward keys/caplocks indicator lights.    Connect this end to the  Spacebar Key   ------------------------------------  |                                    |  <- grey wire from bellow the spacebar.  |                                    |   ---                              ---   | |             |                | | <- planks                  \ /             caplocks lights


I want to redirect url's like:  to   How do I do this?

My code doesn't work with second level tld's like domain.co.uk Here is my conf:   # add www.   if ($host ~ ^(?!www)) {    rewrite ^/(.*)$ http://www.$host/$1 permanent;   }    # remove subdomain   if ($host ~ "^www\.(.*)\.(.*\.([a-z]{2,4}|[a-z]{2}\.[a-z]{2}))") {    set $host_without_sub $2;    rewrite ^/(.*)$ http://www.$host_without_sub/$1 permanent;   }


Does anyone have any comments as to the legality of this CSS method to horizontally centre a DIV (with unknown width) inside a parent DIV. The inner DIV is set to 'display: inline-block;' and its containing DIV uses 'text-align: center;'. The 'display: inline-block;' allows the DIV to be considered as an inline element which allows the 'text-align: center;' to act upon it. The outer div is just a demo container. Any comments?

How can I horizontally center a
 within another
 using CSS?

Foo foo


I alternate between left-handed and right-handed mouse on even/odd days for reasons not relevant here. I use for such thing a widget in Kubuntu 12.04  When it is left-handed day, my mouse understand wells that the primary button should be secondary and vice versa. The problem is that on those days the touchpad thinks "Hey, today one tap means secondary button" and it becomes nearly useless.  This happens because in the touchpad configuration settings of Kubuntu 12.04 you can assign left vs right mouse button to the action "Tapping with one finger", and not the primary vs secundary button. Therefore, on left-handed days one tap on the touchpad means "secondary".  Sure you linux experts can tell me a way to swap both mouse buttons and the meaning of touchpad taps INDEPENDENTLY and by konsole, so that I can run a script on even/odd days and forget about this nasty thing.

I see that I can configure mouse and touchpad all in one panel (Ubuntu 13.10, defaults, Gnome). Which is to some extend. Namely, I want to have the touchpad differently configured then the mouse and ...  When I have an (USB) mouse attached I use it normally left-handed. Therefore I switch the buttons to left-handed. But when I use the touchpad I feel little bit lost with that kind of configuration. Therefore I wanna have it right-handed.  Is there a way to achieve the following: when I plugin a mouse (respectively when it is detected) automatically switch to left-handed and when I unplug it, switch automatically to right-handed?


I wish to carry out a line of site analysis similar to the subject in here (preferably within QGIS):   Scenario:  I have two points, A and B. Point A is a signal provider and Point B is a signal receiver. Point A is at X altitude and Point B is at    Y altitude. There may be hills between Points A and B (represented by either vector contour lines or a raster DTM) that block Point B from receiving signal.  Data:   A vector shapefile containing hundreds of points (the viewing position / Point A)  A vector shapefile containing several thousands of points (each point in this shapefile represents a position that needs to be viewed / Point B) A 50 m resolution DTM in raster format (currently looking for higher resolution free data for the UK)     Question:  How can I establish that Point As are able to view all of Point Bs (via say, a mask?). And how do I run this as a batch process? At the moment I can only run the line of sight (LOS) analysis for one coordinate at a time:

Is it possible using QGIS or GRASS to perform a Zone of Visual Impact assessment? E.g. where can a 100m high structure be seen at a viewing height of 1.8m within 30km, taking into account elevation (also maybe buildings and wooded areas)? I'm pretty new to GIS but am having to learn pretty quickly for work. Any help would be much appreciated.


Quoting Quirrell from Harry Potter and the Philosopher's Stone, chapter 17, "The Man with Two Faces":     "No, no, no. I tried to kill you. Your friend Miss Granger accidentally knocked me over as she rushed to set fire to Snape at that Quidditch match. She broke my eye contact with you. Another few seconds and I'd have got you off that broom. I'd have managed it before then if Snape hadn't been muttering a countercurse, trying to save you."   Why was there no further investigation after this incident?  Snape merely decided to referee the next match to protect Harry. But why wasn't Quirrell interrogated/sacked immediately for attempted murder of a student? They were already suspecting Quirrell and some basic investigations must have revealed that it was him cursing Harry's broomstick.     Unfortunately, while everyone else was running around looking for it, Snape, who already suspected me, went straight to the third floor to head me off -- and not only did my troll fail to beat you to death, that three-headed dog didn't even manage to bite Snape's leg off properly.      "Yes," said Quirrell idly, walking around the mirror to look at the back. "He was on to me by that time, trying to find out how far I'd got. He suspected me all along. Tried to frighten me -- as though he could, when I had Lord Voldemort on my side..."   And     Harry leaned forward. Quirrell was mumbling something. Snape interrupted him.      "Have you found out how to get past that beast of Hagrid's yet?"      "B-b-but Severus, I--"      "You don't want me as your enemy, Quirrell," said Snape, taking a step toward him.      "I-I don't know what you--"      "You know perfectly well what I mean."      Harry Potter and the Philosopher's Stone, Chapter 13, Nicholas Flamel         Dumbledore turned a page, and said, without looking up, “Keep an eye on Quirrell, won’t you?”      Harry Potter and the Deathly Hallows, chapter 33, "The Prince's Tale"   Why wasn't Quirrell sacked, and arrested/questioned further about Voldemort if they knew he was trying to steal the Philosopher's stone for Voldemort, and was in contact with him?   Why didn't Dumbledore act more seriously? How could he have let Quirrell continue as a teacher after all this?

In "Harry Potter and the Deathly Hallows", from Snape's memory that Harry views, we learn that Dumbledore had misgivings about Quirrell, when he said to Snape:     Keep an eye on Quirrell, won't you?   If he knew something was off, why not remove him from a very sensitive position of teaching DADA to kids?


Prove $19 \cdot8^n + 17$ is not a prime number. (n is a natural number)   How can I prove this statement?

On a Google search, I've notice that often the "trick" involves factoring the expression (and thus showing that the expression isn't prime), but I can't see it. Is this how you would go about it in this case, or would that be a dead end? Any hints?


Before trying to say this was answered elsewhere or is a duplicate - PLEASE fully read.  All other solutions are cache-busters forcing image reload EVERYTIME.  I only want to force image reload on condition of new image size - but keeping same image name.  On my server I am naming images ceLogo_C1001.png - the 1001 is the customer ID, the image is the company logo.  If the client updates their image on the server side, the image is still named ceLogo_C1001.png.      <img ng-src='myserver.com/clients/images/ceLogo_C1001.png'>   However, in the app, the image isn't updating and is showing the old ceLogo_C1001.png - not the new one.  I believe this is because the old image and the new image have the same name.  Is there anyway to get the app to force reload the image if it recognizes the image size is different from the last one - even though the images still have the same name?  I am trying to force a certain uniformity in naming...without having to add dates or incremental numbers (IE: ceLogo_C1001_1.png) to force a name change - which would then force an image reload.

Background  I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill the fields (date, place, title, description, links, etc.) and save it. On that form I allow the administrator to upload an image related to the event. On the HTML page displaying the form, I am also showing a preview of the picture uploaded (HTML img tag).  The Problem  The problem happens when the administrator wants to change the picture. He would just have to hit the "browse" button, pick a new picture and press ok. And this works fine.  Once the image is uploaded, my back-end CGI handles the upload and reloads the form properly.  The problem is that the image shown does not get refreshed. The old image is still shown, even though the database holds the right image. I have narrowed it down to the fact that the IMAGE IS CACHED in the web browser. If the administrator hits the RELOAD button in Firefox/Explorer/Safari, everything gets refreshed fine and the new image just appears.  My Solution - Not Working  I am trying to control the cache by writing a HTTP Expires instruction with a date very far in the past.  Expires: Mon, 15 Sep 2003 1:00:00 GMT   Remember that I am on the administrative side and I don't really care if the pages takes a little longer to load because they are always expired.  But, this does not work either.  Notes  When uploading an image, its filename is not kept in the database. It is renamed as Image.jpg (to simply things out when using it). When replacing the existing image with a new one, the name doesn't change either. Just the content of the image file changes.  The webserver is provided by the hosting service/ISP. It uses Apache.  Question  Is there a way to force the web browser to NOT cache things from this page, not even images?  I am juggling with the option to actually "save the filename" with the database. This way, if the image is changed, the src of the IMG tag will also change. However, this requires a lot of changes throughout the site and I rather not do it if I have a better solution. Also, this will still not work if the new image uploaded has the same name (say the image is photoshopped a bit and re-uploaded).


Why do we need to define the value of $p \implies q$ when $p$ is false?    Is there any problem if we don't define the value of $p \implies q$ when $p$ is false?    I didn't learn the value of $p \implies q$ when I was a high-school student. But I didn't have a problem at all.    Why do mathematicians define the value of $p \implies q$ when $p$ is false?  I cannot understand that.    I know if we define the value of $p \implies q$ correctly, we can prove for example $\emptyset \subset A$ for any set $A$. Maybe it is convenient. But do we need to define the value of $p \implies q$ when $p$ is false just for a convenience?

I am struggling to understand this. According to truth tables, if $P$ is false, it doesn't matter whether $Q$ is true or not: Either way, $P \implies Q$ is true.  Usually when I see examples of this people make up some crazy premise for $P$ as a way of showing that $Q$ can be true or false when $P$ is something outrageous and obviously untrue, such as "If the moon is made of bacon-wrapped apple-monkey carburetors, then I am a better wakeborder than Gauss."  $P$ is clearly false, but $P \implies Q$ is true no matter what the state of $Q$ is, and I don't understand why.  Are we saying "If $P$ is false, then all bets are off and $Q$ can be anything, either true or false, and not contradict our earlier claim, and if it isn't false, it must be true"?  Otherwise why can't we say that if $P$ is false, then we can't make any claims one way or the other on whether or not it implies anything at all?


Smaug (and all other dragons) were created by Morgoth as species as warfighting machines.  As such, the desire to amass bling seems to be a somewhat... tangential feature, to put it mildly. If I was implementing the dragon, it'd get cut as creeping featurism from any project plan.  So, is there an in-universe explanation from Tolkien on whether this desire for riches was:   A designed feature by Morgoth, somehow beneficial to the goals for making dragons An inadvertent side effect of some other design decisions (e.g. he used Dwarf DNA, for lack of a better terminology) An inevitable conclusion of his life history given some other features Morgoth designed Just a random bug, unique to Smaug, not explained by anything     I'm only interested in in-Universe explanation. The fact that Tolkien was basing Smaug on  (warning: TVTropes link. Enter at peril) is 100% obvious and doesn't need stating. Besides, please note that most of said archetypical dragons were NOT created as engines of war by sentient master.

In The Hobbit, . But why did he have so much to steal from? He's a Dragon! He is not the kind of dragon that . He doesn't need wealth to buy a luxury cavern and/or pay his servant.   Why did Smaug gather his treasure?


So my program won't stop when the user inputs quit and also the variables keep adding up each time it's ran, when I only one them to count the characters in one run, then count the next input. So the program counts the specific characters in a string but I want it to count no matter what the first time and after the first time I want the user to have the option to say stop and end the program  public class Count {     public static void main (String[] args) {         String phrase;    // a string of characters         int blankCount;   // the number of blanks (spaces) in the phrase          int length;       // the length of the phrase         char ch;          // an individual character in the string          Scanner scanner = new Scanner(System.in);          System.out.println ();         System.out.println ("Character Counter");         System.out.println ();         System.out.print ("Enter a sentence or phrase: ");          blankCount = 0;         int aCount = 0;         int eCount = 0;         int sCount = 0;         int tCount = 0;         int timesRan = 0;             do {                 phrase = scanner.nextLine();             length = phrase.length();              for(int i=0; i<length; i++){                 switch(phrase.charAt(i)){                 case ' ':                     blankCount++;                     break;                 case 'a':                     aCount++;                     break;                 case 'A':                     aCount++;                     break;                 case 'e':                     eCount++;                     break;                 case 'E':                     eCount++;                     break;                 case 's':                     sCount++;                     break;                 case 'S':                     sCount++;                     break;                 case 't':                     tCount++;                     break;                 case 'T':                     tCount++;                     break;                 }                 timesRan++;                   }             System.out.println ("Number of space characters: " + blankCount);             System.out.println ("Number of a's: " + aCount);             System.out.println ("Number of e's: " + eCount);             System.out.println ("Number of s's: " + sCount);             System.out.println ("Number of t's: " + tCount);              System.out.print("Enter a phrase or enter quit, to quit: ");         } while(phrase != "quit" && timesRan >= 0);     }     }

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?


He escaped several times but was finally caught. If the sentence has to be started with 'In spite of', which of the following will be correct? 1. In spite of his escaping several times, he has finally been caught. Or, 2. In spite of escaping several times, he was finally caught.  Similarly, which is grammatically more correct? 'In spite of his being poor, he was happy.' or 'In spite of being poor, he was happy.'

Most dictionaries suggest that inspite and despite are synonymous, but are there any specific instances when their usage is not interchangeable?


I have implemented a warning popup to indicate that Your changes will be lost using a HostListener @HostListener('window:beforeunload', ['$event'])   unloadNotification($event: any) {     if (!this.canDeactivate()) {       $event.returnValue = `You have unsaved changes`;     }   }  I can see the popup but that's the default popup from the browser so is it possible to override that with a custom popup (like angular material dialog)

I need to warn users about unsaved changes before they leave a page (a pretty common problem). window.onbeforeunload = handler  This works but it raises a default dialog with an irritating standard message that wraps my own text. I need to either completely replace the standard message, so my text is clear, or (even better) replace the entire dialog with a modal dialog using jQuery. So far I have failed and I haven't found anyone else who seems to have an answer. Is it even possible? Javascript in my page: <script type="text/javascript">        window.onbeforeunload = closeIt; </script>  The closeIt() function: function closeIt() {   if (changes == "true" || files == "true")   {       return "Here you can append a custom message to the default dialog.";   } }  Using jQuery and jqModal I have tried this kind of thing (using a custom confirm dialog): $(window).beforeunload(function () {     confirm('new message: ' + this.href + ' !', this.href);     return false; });  which also doesn't work - I cannot seem to bind to the beforeunload event.