Wordpress archive page showing 404 Error This is the code for an archive page on my website, when I try to open this page, it brings up a 404 error and doesn't display any content. Is there a problem in this code that is stopping it? I am using the Custom Post Types plugin for the archive content.  &lt;?php get_header(); ?&gt;    &lt;style type="text/css"&gt; .b33 { float:left; width: 33%; padding-left: 25px; padding-top: 35px; } .b33 img  { max-width:100%; border:8px solid #91B49C;float:left; height:200px; overflow:hidden;}  &lt;/style&gt;  &lt;?php // IMAGE SLIDESHOW ?&gt; &lt;div id="content" style="border-bottom: 1px solid #664422; background-color:#F0FFF0; border-top: 1px solid #664422; margin-top:0; height:670px;"&gt; &lt;div id="inner-content" class="wrap cf"&gt; &lt;div class="fadein" style="width:100%; overflow:hidden; height:670px;"&gt;    &lt;img style="width:100%;border:8px solid #91B49C; margin:1em 0 1em 0;" src="&lt;?php echo get_site_url(); ?&gt;/wp-content/uploads/2016/05/Wedding-1.jpg"&gt;   &lt;img style="width:100%;border:8px solid #91B49C; margin:1em 0 1em 0;" src="&lt;?php echo get_site_url(); ?&gt;/wp-content/uploads/2016/05/Wedding-2.jpg"&gt;   &lt;img style="width:100%;border:8px solid #91B49C; margin:1em 0 1em 0;" src="&lt;?php echo get_site_url(); ?&gt;/wp-content/uploads/2016/05/Funeral-5.jpg"&gt;  &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php // END OF IMAGE SLIDESHOW ?&gt;     &lt;div id="content" style="background-color:#E0EEE0; margin-top:0; border-bottom:1px solid #664422;"&gt; &lt;div id="inner-content" class="wrap cf"&gt;     &lt;h1 class="page-title-text" style="text-align:center; font-family: 'Josefin Slab', serif; color:#664422;" &gt;Birthday &amp; Anniversary&lt;/h3&gt; &lt;/div&gt; &lt;/div&gt;       &lt;div id="primary" class="content-area" style="background-color:#F0FFF0; border-bottom:1px solid #664422;&gt;           &lt;div id="content" class="site-content" role="main"&gt;     &lt;div id="inner-content" class="wrap cf"&gt;             &lt;?php $loop = new WP_Query( array( 'post_type' =&gt; 'birthdays', 'order' =&gt; 'ASC', 'posts_per_page' =&gt; -1 ) ); ?&gt;     &lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;         &lt;div class="b33" style=" margin:0.5em 0.5em 0.5em 0.5em; border: 8px solid #91B49C; height:350px; width:31.5%; float:left; background-size: cover; background-repeat: no-repeat; overflow:hidden;  background-image: url('&lt;?php the_field( 'image' ); ?&gt;')"&gt;                 &lt;/div&gt;      &lt;?php endwhile; wp_reset_query(); ?&gt;      &lt;/div&gt;         &lt;/div&gt;&lt;!-- #content --&gt;     &lt;/div&gt;&lt;!-- #primary --&gt;    &lt;?php get_footer(); ?&gt;
CPT Template Not Showing - Getting 404 I'm developing a Custom Post Type plugin, which works fine in dev. Now that I've moved it to production, I'm getting a 404 when I try to display the template for the CPT.   So, two questions:  1- Is there some mechanism to determine the path WP took to get through the hierarchy?  2- Why wouldn't it just give me the single or index page?  I've dumped $wp_query and a stacktrace at the end of the 404. Here's part of what I found:  [query] =&gt; Array     (         [page] =&gt;          [pagename] =&gt; refletters/proximity     )  [request] =&gt; SELECT   wp_posts.* FROM wp_posts  WHERE 1=1  AND (wp_posts.ID = '0') AND wp_posts.post_type = 'page'  ORDER BY wp_posts.post_date DESC  [posts] =&gt; Array     (     )  [queried_object] =&gt;  [queried_object_id] =&gt; 0   And the stack trace:  2013-04-27 22:16:41 - 24.52.197.40 - TRACE - index.php - 404.php[39] -      wordpress/wp-content/themes/notoriousconsultant/404.php[39] - aaLog-&gt;logtrace     wordpress/wp-includes/template-loader.php[50] - include     wordpress/wp-blog-header.php[16] - require_once     wordpress/index.php[17] - require   Thanks for your help.
when EditText is empty and click calculateButton, app crashes How to prevent the screen lock while watching video (Netflix, Youtube, Amazon Prime) in Ubuntu 17.10 In earlier Ubuntu versions like 16.04 and 17.04 while watching YouTube videos in full-screen mode, the screen would not get locked automatically.  In Ubuntu 17.10 while watching videos in browser, system is getting locked. So Ubuntu 17.10 is considering this scenario as user is not doing anything.  Kindly suggest a solution for that. Java2D Performance Issues I'm having performance oddities with Java2D. I know of the sun.java2d.opengl VM parameter to enable 3D acceleration for 2D, but even using that has some weird issues.   Here are results of tests I ran:  Drawing a 25x18 map with 32x32 pixel tiles on a JComponent Image 1 = .bmp format, Image 2 = A .png format  Without -Dsun.java2d.opengl=true  120 FPS using .BMP image 1 13 FPS using .PNG image 2  With -Dsun.java2d.opengl=true  12 FPS using .BMP image 1 700 FPS using .PNG image 2  Without acceleration, I'm assuming some kind of transformation is taking place with every drawImage() I do in software, and is pulling down the FPS considerably in the case of .PNG. Why though, with acceleration, would the results switch (and PNG actually performs incredibly faster)?! Craziness!  .BMP Image 1 is translated to an image type of TYPE_INT_RGB. .PNG Image 2 is translated to an image type of TYPE_CUSTOM. In order to get consistent speed with and without opengl acceleration, I have to create a new BufferedImage with an image type of TYPE_INT_ARGB, and draw Image 1 or Image 2 to this new image.   Here are the results running with that:  Without -Dsun.java2d.opengl=true  120 FPS using .BMP image 1 120 FPS using .PNG image 2  With -Dsun.java2d.opengl=true  700 FPS using .BMP image 1 700 FPS using .PNG image 2  My real question is, can I assume that TYPE_INT_ARGB will be the native image type for all systems and platforms? I'm assuming this value could be different. Is there some way for me to get the native value so that I can always create new BufferedImages for maximum performance?   Thanks in advance... I am using the nnls() function from the nnls package in R to do a linear regression for regressors $x_i$ and observations $y$. The function delivers beta coefficients $\beta_i\geq{0}, \forall i$. However, is it possible to apply the constraints only to some regressors so that $$\beta_k \geq 0 \quad k \in \{1...,10\}, k\neq i \\  \beta_i \in \mathbb{R} \quad i \in \{1...,10\}$$ given that I have 10 regressor variables? The nnls package also offers the possibility to enforce some coefficients to be negative and others to be positive via the function nnnpls(). However, I only want the positive constraint for some parameters, the other ones can be either positive or negative (i.e., unconstrained). I came upon an interesting way to relatively quickly compute modular exponentiation with large numbers. However, I do not fully understand it and was hoping for a better explanation.  The method basically states if you have $x^y \bmod N$, it can be computed by repeatedly multiplying by $x$ modulo $N$:  $$x \bmod N \rightarrow x^2 \bmod N \rightarrow x^4 \bmod N \rightarrow x^8 \bmod N \rightarrow \ldots \rightarrow x^{2[\log y]} \bmod N$$  This is supposed to calculate in $\mathcal{O}(\log_2 N)$ time.  An example is given:  $$x^{25} = x^{11001_2} = x^{10000_2} * x^{1000_2} * x^{1_2} = x^{16} * x^8 * x^1$$  I don't really understand how this is faster. Aren't you just doing the same thing? You're just breaking down the exponents into representations of base $2$. Also where does $x^{2[\log y]}$ come from? If you're breaking it down into exponents of two where does a logarithm come from? (Aren't logs representations of numbers in exponents of $10$?)  I'm sorry if this appears to be a really stupid question - I have minimal knowledge in math.  Also, I wasn't sure if this belongs here or on stack exchange, so give me the word and I'll move it. Is there a spec that the id of elements should be made global variable? How to display Trash and Home folder icons? Inertial forces and centre of mass Is inertial force always attached to the centre of mass of the object? Why? What rules cause this to happen?  See the  below of the leaned bike in a corner.    The force $m\frac{v^2}{r}$ pointing to the right is the centrifugal force (inertial force - because it's a rotating reference frame, therefore a non-inertial reference frame). It is attached to the centre of gravity of the bike.  I'm thinking that inertial force is attached to the centre of mass because of the fact that it should simply avoid creating a torque on the object. That's intuitive, but there must be a general rule that allows us to conclude that. Install brother dcp195c, receiving data but nothing happens, why? Can someone please help me to install brother dcp195c drivers on Ubuntu v12?  Using the default driver, the printer says that it is receiving data but nothing happens. Reasons why not to update an Ubuntu version to a newer/older kernel version Suppose I define a new theorem "Theorem" and declare that its counter should be reset whenever the subsection counter is incremented or reset:  \newtheorem{theorem}{Theorem}[subsection]   At some point in my (article) document I start a new \section (say, section 2) without starting a \subsection. I expect the first theorem in this section to be numbered with "2.0.1" (which may be considered bad style). However, the theorem is numbered "2.0.2".  Is this "by design" (technically, I didn't start a new \subsection) or a bug? Moreover, what would be a proper workaround? (Such a workaround should not involve manually resetting the theorem counter, and it should work for whatever theorem type I may define in addition to "Theorem".)  \documentclass{article}  \newtheorem{theorem}{Theorem}[subsection]  \begin{document}  \section{bla}  \subsection{blubb}  \begin{theorem} Some text. \end{theorem}  \subsection{foo}  \begin{theorem} Some text. \end{theorem}  \section{bar}  \begin{theorem} Some text. \end{theorem}  \end{document}   EDIT: In response to Seamus' comment: The unexpected counter value also occurs with amsthm and ntheorem. Grep: unexpected results when searching for words in heading from man page Creating an index of quality from multiple variables to enable rank ordering I have four numeric variables. All of them are measures of soil quality. Higher the variable, higher the quality. The range for all of them is different:  Var1 from 1 to 10  Var2 from 1000 to 2000  Var3 from 150 to 300  Var4 from 0 to 5  I need to combine four variables into single soil quality score which will successfully rank order.  My idea is very simple. Standardize all four variables, sum them up and whatever you get is the score which should rank-order. Do you see any problem with applying this approach. Is there any other (better) approach that you would recommend?  Thanks  Edit:  Thanks guys. A lot of discussion went into "domain expertise"... Agriculture stuff... Whereas I expected more stats-talk. In terms of technique that I will be using... It will probably be simple z-score summation + logistic regression as an experiment. Because vast majority of samples has poor quality 90% I'm going to combine 3 quality categories into one and basically have binary problem (somequality vs no-quality). I kill two birds with one stone. I increase my sample in terms of event rate and I make a use of experts by getting them to clasify my samples. Expert classified samples will then be used to fit log-reg model to maximize level of concordance / discordance with the experts.... How does that sound to you? Finite Index of Subgroup of Subgroup Prove the following: If $H$ is a subgroup of finite index in a group $G$, and $K$ is a subgroup of $G$ containing $H$, then $K$ is of finite index in $G$ and $[G:H] = [G:K][K:H]$.  So this is basically a bijective proof? The number of cosets of $H$ in $G$ equals the number of cosets of $K$ in $G$ times the number of cosets of $H$ in $K$ by the multiplication principle?   Reference: Fraleigh p. 103  Question 10.35 in A First Course in Abstract Algebra Arranging GUI elements in QGIS 3 processing model user interface Using QGIS 3 graphical modeler I created a model with a variety of input parameters (> 10). When starting the model, a nice user interface is generated. But the arrangement of the GUI elements is totally confused and apparently unpredictable during creating the model. It does neither seem to depend on the arrangement of input parameters in the graphical modeler nor on the chronological order in which the input parameters are added to the model.   Is there a way that let's me arrange the GUI elements in the order I desire? My "network reputation" graph does not accurately reflect my accounts Why does this test program result in a java.lang.IllegalMonitorStateException?  public class test {     static Integer foo = new Integer(1);     public static void main(String[] args) {         synchronized(foo) {             foo++;             foo.notifyAll();         }         System.err.println("Success");     } }   Result:  Exception in thread "main" java.lang.IllegalMonitorStateException         at java.lang.Object.notifyAll(Native Method)         at test.main(test.java:6) Get attention to a new answer to an old question It happened to me that I found a solution to an older question. This question was commented by many people with comments like "very interesting, important, ..." such that I thought that my answer has also some value. My answer was the only one. It was upvoted and accepted by the asker. However, I assume, that very few of the "commentators" saw my answer, because the system does not inform automatically about new answers.   I think it would have been helpful for me and the commentators when they would get informed. I could achieve this by adding my own comment to their comments, because this triggers a system message. My question is: would this action be considered admissible or not? Are there some other possibilities? I'm a Canadian citizen with a Canadian passport. I booked a flight with American Airlines to Mexico City From Toronto Pearson and it says that "Passenger details are needed to check in".  Flight 1: YYZ -> DFW -> MEX Flight 2: MEX -> DFW -> YYZ     They already took my name, gender and such. It is now asking for my passport number and expiry date. That all seems reasonable. However, when I enter that I am a Canadian resident it asks for:  1) Street or hotel in US 2) City in US 3) State in US    My trip to DFW is only for a connecting flight. The fields are required so I can't submit my passport information without filling this in.    Is there something I'm missing? Question  I calculated the classical heat capacity of a diatomic gas as $C_V = (9/2)Nk_B$, however the accepted value is $C_V = (7/2)Nk_B$.  I assumed the classical Hamiltonian of two identical atoms bound together as $$ H = \dfrac{1}{2m}( |\bar{p}_2|^2 + |\bar{p}_2|^2)+ \dfrac{\alpha}{2} |\bar{q}_1-\bar{q}_2|^2. $$ I calculated the partition function of $N$ particles as $$ Z = \left( \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} e^{-\beta H} ~d^3q_1~d^3p_1~d^3q_2~d^3p_2 \right)^N \propto V^N T^{(9/2)N}. $$ I calcuated the heat capacity as $$ C_V = \dfrac{\partial }{\partial T} \left( k_B T^2 \dfrac{\partial \ln(Z)}{\partial T} \right) = \dfrac{9}{2}k_BN. $$  Why does the classical argument fail?  Classical Derivation  The partition function is \begin{align} Z &amp;=&amp; \left( \frac{1}{h^6} \int \mathrm{e}^{- \beta H(\bar{q}_1,\bar{q}_2,\bar{p}_1,\bar{p}_2)} ~d^{3}q_1 ~d^{3}q_2 ~d^{3}p_1   ~d^{3}p_2 \right)^N \\&amp;=&amp; \left( \frac{1}{h^6} \int \mathrm{e}^{- \beta ((|\bar{p}_1|^2+|\bar{p}_2|^2)/(2m)+\alpha |\bar{q}_1-\bar{q}_2|^2/2)} ~d^{3}q_1 ~d^{3}q_2 ~d^{3}p_1   ~d^{3}p_2 \right)^N \end{align} A useful gaussian integral \begin{align} \int_{-\infty}^{\infty} e^{-\gamma (x-x_0)^2}dx = \sqrt{\dfrac{\pi}{\gamma}} \end{align} The partition function can be evaluated using separated integrals \begin{align} \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta |\bar{p}_1|^2} ~d^{3}p_1 = \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta |\bar{p}_2|^2} ~d^{3}p_2 = \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \end{align} and \begin{align} \iiint_{-\infty}^{\infty} \iiint_{-\infty}^{\infty} \mathrm{e}^{- \beta \alpha |\bar{q}_1-\bar{q}_2|^2/2 } ~d^{3}q_1 ~d^{3}q_2 = \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 \iiint_{-\infty}^{\infty}  ~d^{3}q_1 = \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 V \end{align} The last set of integrals are improper integrals. One has to take the limit as the space approaches infinite containment. In that limit, integrating one set of variables $d^3q_2$ approaches the limit of a finite Gaussian term, while the other $d^3q_1$ approaches the diverging value of the total volume of the gas.  The partition function is \begin{align} Z &amp;=&amp; \left( h^{-6} \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \left(\sqrt{\dfrac{\pi}{\beta}}\right)^3 \left( \sqrt{\dfrac{\pi}{\beta \alpha/2}} \right)^3 V \right)^N \\&amp;=&amp; \left( h^{-6} \left(k_B T \pi\right)^{9/2} \left( \dfrac{2}{\alpha} \right)^{3/2} V \right)^N \\&amp;=&amp; \left( h^{-6} \left(k_B \pi\right)^{9/2} \left( \dfrac{2}{\alpha} \right)^{3/2} \right)^N V^N T^{9N/2} \end{align}