Given a nonnegative polynomial $p(x)$ on $\mathbb{R}$, does there exist some $k$ such that for some polynomials $f_1,\ldots ,f_k$ we have $p(x)=\sum_{i=1}^k(f_i)^2$?   I think yes, because of the nonnegative nature of $p(x)$, but am unable to prove. Any hints. Thanks beforehand.
Let $P\in\mathbb{R}[X]$ be a positive polynomial.  I want to show that there exists $A,B\in\mathbb{R}[X]$ so that $P=A^2+B^2$    $\displaystyle P=a\prod_{k=0}^q(x-a_k)\prod_{k=0}^{2p}(x-b_k)=a\prod_{k=0}^q(x-a_k)\prod_{k=0}^p(x^2-2\Re(b_k)+|b_k|^2)$ where $a$ is the leading coefficient, $a_k$ are the real rooks, $b_k$ are the complex roots.  What can i do now ? I know that the identity $(a^2+b^2)(c^2+d^2)=(ac-bd)^2+(ad+bc)^2$ should come in handy, but I can't figure out :  1) How to show that the product real roots is a square  2) How to use the above identity for the complex roots.  If I can solve those two points, then I can solve the problem.
Dashed line and Wireframe Single word describing something "outside of oneself" Uninstall apps locked by phone vendor I'm using a Samsung I9000 and I have some annoying apps that came pre installed by the phone vendor, like a music store, a custom web browser and other memory leaking apps.  Those crappy apps can't be uninstalled neither by Manage applications tool, nor by editing the apps tiles in the front menu.  I guess I have to be a root user or something to get rid of those apps, but I don't know how. Calculationg base-resistor between microcontroller and transistor I'm curious, when connecting my 2N2222 transistor's base to a PWM output pin on my Arduino, I know the Arduino can deliver a maximum of 40mA current. The 2N2222 only requires around 5 to 10 mA on it's base to switch the collector and emitter. Now, when calculating the base-resistor under "normal" conditions where I'm merely switching it directly from Vcc, the following applies:   However, when putting in a 500 ohm or 1K resistor in (1K for 5mA) directly it works great. But putting it in between the Arduino and the transistor, the transistor doesn't switch.  I suspect thus, that the resistance is too high of the base-resistor. Therefore, we may very well not need a base-resistor.  But, according to spec, the Arduino can deliver 40mA. So, am I correct in assuming the folling: 1) I should calculate the perceived resistance that the Arduino is giving, if it goes high to 5Volt and only gives 40mA, and then 2) Subtract that from the 500ohm resistor needed to make the transistor operate optimally.  Example:    So, I'm theorising that I have to then put in a 375 ohm resistor in to make the total resistance between the Arduino and the base resistor 500 ohm.  Somehow this doesn't feel right. Keep in mind, I'm not an electronic engineer, so I might have the cat by the tail here :P Let $\alpha(t)$ be a regular curve. Suppose there is a point $a$ in $R^3$ such that $\alpha(t)-a$ is orthogonal to $T(t)$ for all t. Prove that $\alpha(t)$ lies on a sphere.  So, I let $\alpha(t)=(x(t), y(t),z(t))$ and $a=(a,b,c)$.  Since, $\alpha(t)-a$ is orthogonal to $T(t)$,  $&lt;\alpha(t)-a,T(t)&gt;=0$.  But I don't know how to solve this.. GAP: how to work with elements of the group ring of the symmetric group $\mathbb{C}[S_k]$? i know that|$S_n$|=$n!$ and |$A_n$|= $\frac{n!}{2}$ but i'm not sure where to go from there. Thanks. How do I create a villager with custom trade offers? I'm trying to set up a shop system in a vanilla minecraft realm and villagers seem like the most streamlined method of doing so, however I'd also like to make it so that other players on the server can program their own villager, or have me program it for them as an operator so that other players can trade with each other through the villager. I figure that since villagers now have a secret inventory, they can collect items, but I was wondering if there's any way to access the items traded to them or if they just disappear.  Currently my thoughts are that a player would initiate a trade, the villagers sells would be linked to individual slots in a chest and the villager buys could be linked to another chest, allowing the player to fill a chest and thus 'program' their villager, and that finally a third chest would be filled with the item the villager receives, while the chest containing the trades would decrement the specific number of the item in the relevant slot. I was looking for some shell commands, and I took a look in "users" command.  I was hoping to get only 1 name, but I got 2:  nori@nori-hidamari:~$ users nori nori   And when I run the command "who"  nori@nori-hidamari:~$ who nori     :0           2015-04-09 09:31 (:0) nori     pts/0        2015-04-09 09:48 (:0)   Is this behaviour normal? Or it's bad?  Thank you guys for helping me. Drupal unexpected "Fatal error: Class name must be a valid object or a string [...] common.inc" on every page "Fatal error: Class name must be a valid object or a string in C:\xampp\htdocs\uc\includes\common.inc on line 7506"  The error above showed up unexpectedly. I was adding a "Long text" field to a content-type, but when I expected to be brought to a saved field configuration page, I instead got a Fatal error on every page.  I had a look at includes\common.inc:  /**  * Get the entity controller class for an entity type.  */ function entity_get_controller($entity_type) {   $controllers = &amp;drupal_static(__FUNCTION__, array());   if (!isset($controllers[$entity_type])) {     $type_info = entity_get_info($entity_type);     $class = $type_info['controller class'];     $controllers[$entity_type] = new $class($entity_type); // Line 7506   }   return $controllers[$entity_type]; }   However, I just don't understand Drupal at a low enough level to understand the relationships between these variables and functions.  I also searched Drupal for people with a similar problem:  (1)  who claims that I have to install the submodule "Relation Endpoints Field", but searching Drupal, .  (2) :  DELETE FROM cache; DELETE FROM cache_filter; DELETE FROM cache_menu; DELETE FROM cache_page; DELETE FROM watchdog;   (via , misleading name, I know.)  Clearing those tables from the cache did not help.  (3) And another user . Because I can't find a module specifically pertaining to old search facets, I went into MySQL system table, and marked the Search module's line with a 0 status, indicating to stop loading the module altogether.  On that same link as (3), one user suggested enabling the , so I dropped all the tables, imported the latest stable .sql, and installed the module, but after recreating the problem (trying to add a field to a content-type), that as well concluded fruitless.  Still, the problem remains  The Fatal error shows up on every page, making the site completely non-functional. Any help or direction would be immensely appreciated. Thank you for looking. Projecting sp objects in R I have a number of shapefiles in different CRSs (mostly WGS84 lat/lon) that I'd like to transform into a common projection (likely Albers Equal Area Conic, but I may ask for help on choosing in another question once my problem gets better-defined).  I spent a few months doing spatial stats stuff in R, but it was 5 years ago.  For the life of me, I cannot remember how to transform an sp object (e.g. SpatialPolygonsDataFrame) from one projection to another.  Example code:  P4S.latlon &lt;- CRS("+proj=longlat +datum=WGS84") hrr.shp &lt;- readShapePoly("HRR_Bdry"), verbose=TRUE, proj4string=P4S.latlon)  # Shapefile available at  #   http://www.dartmouthatlas.org/downloads/geography/hrr_bdry.zip  #   but you must rename all the filenames to have the same  #   capitalization for it to work in R   Now I have a SpatialPolygonsDataFrame with appropriate projection information, but I'd like to transform it to the desired projection.  I recall there being a somewhat unintuitively-named function for this, but I can't remember what it is.  Note that I do not want just to change the CRS but to change the coordinates to match ("reproject", "transform", etc.).  Edit  Excluding AK/HI which are annoyingly placed in Mexico for this shapefile:  library(taRifx.geo) hrr.shp &lt;-    subset(hrr.shp, !(grepl( "AK-" , hrr.shp@data$HRRCITY ) |                                      grepl( "HI-" , hrr.shp@data$HRRCITY )) ) proj4string(hrr.shp) &lt;- P4S.latlon I often end up issuing complex commands over ssh; these commands involve piping to awk or perl one-lines, and as a result contain single quotes and $'s.  I have neither been able to figure out a hard and fast rule to do the quoting properly, nor found a good reference for it.  For instance, consider the following:  # what I'd run locally: CMD='pgrep -fl java | grep -i datanode | awk '{print $1}' # this works with ssh $host "$CMD": CMD='pgrep -fl java | grep -i datanode | awk '"'"'{print $1}'"'"   (Note the extra quotes in the awk statement.)  But how do I get this to work with, e.g. ssh $host "sudo su user -c '$CMD'"?  Is there a general recipe for managing quotes in such scenarios?.. Why MonadPlus and not Monad + Monoid? Did Snape ever commit murder? It's well known that Severus Snape was, in one way or another, a Death Eater since he was at Hogwarts. He hung out with the likes of Avery and Mulciber who became well known Death Eaters, he joined Voldemort right after he left Hogwarts, and he basically became Voldemort's right hand man until the very end.   However, in his time as a Death Eater did he ever kill anyone? We know that he was a Death Eater for around 3 years before Voldemort fell; Lily and James died at 21 and they were the same age as Snape, so it would have been 3 years since they left Hogwarts. Then after Voldemort came back in book 4, Snape would have been a Death Eater again for around 3 years. That's a total of around 6 years of Death Eaterhood with Voldemort.  So, in either of these periods, did Snape commit murder as part of his job as Death Eater? I'm not counting a certain death at the end of book 6 for reasons which are obvious if you've read book 7.   Clearly it's much more likely he killed before Voldemort fell since that roughly correlated with the period when he pledged allegiance only to Voldemort, before he became a teacher at Hogwarts. But did he ever do it? How can I manually install a package on MiKTeX (Windows) Dynamic trigger creation from managed package I have a requirement to create triggers dynamically after a managed package is installed. I have read that the tooling API can be used to create triggers dynamically however it cannot be used in production. Is it possible to create triggers from a managed package in an org? I want to be able to create the trigger based on some user inputs. Reprojecting LiDAR data with libLAS, error: "latitude or longitude exceeded limits"? In the special relativistic action for a massive point particle, $$S=\int_{t_i}^{t_f}\mathcal {L}dt,$$ why is the Lagrangian $$\mathcal {L}=-E_o\gamma^{-1}$$ a negative number? What is the value of lim$_{n\to \infty} a_n$ if $\lim_{n \to \infty}\left|a_n+ 3\left(\frac{n-2}{n}\right)^n \right|^{\frac{1}{n}}=\frac{3}{5}$? Let $\{a_n\}$ be a sequence of real numbers such that $$\lim_{n \to \infty}\left|a_n+ 3\left(\frac{n-2}{n}\right)^n \right|^{\frac{1}{n}}=\frac{3}{5}.$$  What is the value of $\lim_{n\to \infty} a_n$? I see stuff like command 1&gt; out or with 2&gt;&amp;1 to redirect stderr, but sometimes I also see &amp;&gt; by itself, etc.  What is the best way to understand &amp; and what it means exactly?