Finding a number in special part of the table with in limited rows. Mysql PHP
mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc... expects parameter 1 to be resource
How can I display site logo, name and slogan? Two-finger swipe 'breaks' heads-up notifications on Lollipop? I have a Nexus 7 (2013) and a Moto X (2014) running Lollipop. On both of these, if I get a heads-up notification (i.e., those that show up on top of the screen when the device is unlocked) and swipe down on it with 2 fingers, it 'breaks' further heads-up notifications:   I can't tap on them to open the responsible app For, e.g., an incoming phone call with 'answer' and 'dismiss' buttons, tapping the buttons does nothing. I can't answer phone calls anymore!   I can still swipe to the side to dismiss the notifications, and they still disappear on their own after a few seconds. I haven't been able to find a way to get the correct behavior back aside from a restart.  Yeah, the obvious workaround is to not two-finger swipe on them, but it's second nature as that same gesture expands notifications in other contexts.  I'm guessing the problem is generic, but I've triggered it on Hangouts and Phone notifications.  Do others experience the same thing? Any known 'fixes' aside from restarting? There is an exercise in Humphreys's An Introduction to Lie Algebras and Representation Theory: "Any nilpotent Lie algebra contains a codimension 1 ideal".  The proof I am thinking of is the following.  Suppose the Lie algebra $L$ satisfies $L\neq[L,L]$. Then $\pi\colon L\to L/[L,L]$ is a projection onto an abelian algebra. Choose a codimension 1 subspace $I\subset L/[L,L]$. Then $I$ is an ideal and its preimage $\pi^{-1}(I)$ is necessarily an ideal in $L$, because any subspace containing the derived algebra is an ideal. Moreover, $\pi^{-1}(I)$ has codimension 1. $\square$  The only condition on $L$ is that $L\neq[L,L]$, which holds for solvable Lie algebras as well. Is this proof correct? How come Humphreys didn't set the exercise with "nilpotent" replaced by "solvable"? We have previously determined that  or  can attune to magic items, but one of those is a sapient creature, and the other "always obeys your commands".  A paladin's steed (per the Find Steed spell) is also 'unusually intelligent' and falls within the score range for sapient creatures.  But what about a regular old animal? If my ranger has a wolf companion, can he make that wolf attune to, say, an Amulet of Health? According to the Beast Master archetype, a companion animal "obeys your commands as best it can".  Is spending an hour 'focused only on the item' (as required for attunement) something a beast can manage?  Or what if it's not an Animal Companion, but just a riding horse, a pet dog, a trained magpie?  I know, probably this is going to be down to the DM to determine, but is there any guidance we can use to help decide whether my cat can attune to an item, and whether rubbing it with catnip would help? NSString by removing the initial zeros? Moving from HTTP to HTTPS in Google Search Console I'm moving from HTTP to HTTPS for my entire site. The site is currently added to Google Search Console (formerly Google Webmaster Tools) as www.example.com and all the pages are indexed without using SSL.  How do I go about moving to the new HTTPS URLs on Google Search Console?   Do I just submit an updated sitemap which has the HTTPS URLs or do I add a new site as https://www.example.com and submit the sitemap with HTTPS URLs? All current URLs are set to redirect to their HTTPS counterparts. Do I add multiple properties to Google Search Console? Find the order of $8/9, 14/5,48/28$ in the additive group of $\mathbb{Q}/\mathbb{Z}$ Find the order of $8/9, 14/5,48/28$ in the additive group of $\mathbb{Q}/\mathbb{Z}$    JUNK  Guessing asking for $8/9 * k = 0 $ (being a whole integer) for smallest integer so for this one is 9 . another guess would be the smallest element of $Q/Z$ being something like $9/8$  $14/5$ would be 5  $48/28=12/7$ would be 7? I have the following code that shows either a bug or a misunderstanding on my part.  I sent the same list, but modified over an ObjectOutputStream.  Once as [0] and other as [1].  But when I read it, I get [0] twice.  I think this is caused by the fact that I am sending over the same object and ObjectOutputStream must be caching them somehow.  Is this work as it should, or should I file a bug?   import java.io.*; import java.net.*; import java.util.*;  public class OOS {      public static void main(String[] args) throws Exception {         Thread t1 = new Thread(new Runnable() {             public void run() {                 try {                     ServerSocket ss = new ServerSocket(12344);                     Socket s= ss.accept();                      ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream());                     List same = new ArrayList();                     same.add(0);                     oos.writeObject(same);                     same.clear();                     same.add(1);                     oos.writeObject(same);                  } catch(Exception e) {                     e.printStackTrace();                 }             }         });         t1.start();          Socket s = new Socket("localhost", 12344);         ObjectInputStream ois = new ObjectInputStream(s.getInputStream());          // outputs [0] as expected         System.out.println(ois.readObject());          // outputs [0], but expected [1]         System.out.println(ois.readObject());         System.exit(0);     } } LM317 getting hot Should an LM317 (specifically a ) rated for 500ma output current really be getting hot to touch when only pulling 170ma at 5V?  Package is SOT-223, input is 9V.  Is this normal? Are employments in universities affiliated (or named) with a specific religion restricted to people with the same religion? I just saw an ad in mathjobs.org about an opening in a Catholic university, see . I am not christian. So I was wondering to be eligible for employment in a university or college affiliated with a specific religion, should the applicant  have the same religion, or other people from other religions (or even non-religious people) are eligible to apply as well? Why are Perl 5's function prototypes bad? Determine wether the differential equation is stable or not for the following conditions:  $x'''(0) = x''(0) = x'(0) = x(0) =0$  $\frac{d^3x(t)}{dt^3}+\frac{d^2x(t)}{dt^2}+4\frac{dx(t)}{dt}+4x(t) = e^t(H(t)-H(t-3))$  Now, I got that the solution to this differential equation reduces x(t) by use of Laplace Transforms, however, how do I determine whether or not it is stable?  $x(t) = 0.1e^{-t} + 0.1e^t - 0.1\sin(2t) + 0.1e^3 (\sin(2(t-3)) + e^{-t+3}-e^{t-3})*H(t-3)$  Now I first thought I would look at it graphically and I used Matlab software to get a plot as shown below:    And from the plot above it clearly appears to diverge (though this is not a proof).  Anyone have an idea as to an elegant proof to show the solution is unstable?  Anyone help would be greatly appreciated! When updating I got this error message:  W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs W:Failed to fetch http://ppa.launchpad.net/synce/ubuntu/dists/your_ubuntu_version/main/source/Sources  404  Not Found   What to do? Where can I ask an open discussion question? Render Glass like materials with Alpha Channel to composite in external app Hope you can help me with some issues I've been dealing these days.  As I'm rendering products, most of the time I need to render some transparent materials in order to do a post-pro in Photoshop, change the backgrounds, superpose images, etc.  I've been looking for an answer but yet I've couldn't get a solution for this problem.  I need to render materials with transparency and no background in Cycles.  I've found that there are two ways to do this:   Render with transparency in the materials.  Render and get two renders, the original and another one only with the alpha channel to edit in Photoshop.   For the first option, I've achieved to render a glass-like material, as PET plastic using this node tree:    For the second option, I haven't found a way to get the alpha channel in cycles that includes the object with transparency and, if possible, the shadows in the background| but without the background. Direction of $d\mathbf{l}$ A solid sphere has charge $q$ and radius $R$. Find the potential at a point a distance $r$ from the center of the sphere where $r&gt;R$, using infinity as the reference point.  My attempt:  From Gauss' theorem we may deduce that $\displaystyle\mathbf{E}=\frac{1}{4\pi\epsilon_0}\frac{q}{r'^2}\hat{\mathbf{r}}$ where $r'$ is the distance of an arbitrary point from the center of the sphere provided $r'&gt;R$.  $V=-\int_\infty^\mathbf{r}\mathbf{E}\cdot d\mathbf{l}$  My question: What is $d\mathbf{l}$? Since we are traversing in the direction opposite to $\hat{\mathbf{r}}$, I think it should be $-dr'\hat{\mathbf{r}}$. But when I use it to find $V$, I get a sign error. Please help! Consider the following piece of Markdown code:  This is some regular text.      &gt;&gt;&gt; def factorial(n):     ...     return 1 if n &lt; 2 else n * factorial(n - 1)     ...   * This is a list item.      &gt;&gt;&gt; def factorial(n):     ...     return 1 if n &lt; 2 else n * factorial(n - 1)     ...    Notice that the second code block is preceded by a list item.   Why is the factorial code not properly formatted under these circumstances? To demonstrate the problem, I'll insert the Markdown code show above:    This is some regular text.  &gt;&gt;&gt; def factorial(n): ...     return 1 if n &lt; 2 else n * factorial(n - 1) ...     This is a list item                 def factorial(n):       ...     return 1 if n &lt; 2 else n * factorial(n - 1)       ...               This applies to numbered as well as unnumbered lists. Optional argument after splat argument Are there any infinite series about which we don't know whether it converges or not? Or are the convergence tests exhaustive, so that in the hands of a competent mathematician any series will eventually be shown to converge or diverge? EDIT: People were kind enough to point out that without imposing restrictions on the terms it's trivial to find such &quot;open problem&quot; sequences. So, to clarify, what I had in mind were sequences whose terms are composed of &quot;simple&quot; functions, the kind you would find in an introductory calculus text: exponential, factorial, etc. Let $a=p_1^{x_1}p_2^{x_2}\cdots\cdot p_q^{x_q}$ and $b=p_1^{y_1}p_2^{y_2}\cdots p_r^{x_r}$ ,   say — Since gcd(a,b) is the largest common divisor of a and b and is divisible by any other common divisor of the two,   GCD$(a,b)=p_1^{\min(x_1,y_1)}p_2^{\min (x_2,y_2)} \cdots p_q^{\min (x_q,y_q)}$  LCM$(a,b)= p_1^{\max(x_1,y_1)}p_2^{\max(x_2,y_2)}\cdots p_r^{\max (x_r,y_r)}$  I understand GCD(a,b) has to divide both $a,b$. Therefore the exponent of any prime factor $p_i$ in GCD has to be in both $a,b$  — therefore $p_i^{\min(x_i, y_i)}$. But I'm muddled and anxious. Why does $\min$ appear in GREATEST common divisor? Why does $\max$ appear in LOWEST common multiple?