Im trying to build an image upload for my site, I have the following only nothing is output at all, yet my page renders okay? Can anybody see where I may be going wrong?\      //if they DID upload a file... if($_FILES['profile_image']['name']) {     //if no errors...     if(!$_FILES['profile_image']['error'])     {         //now is the time to modify the future file name and validate the file         $new_file_name = strtolower($_FILES['profile_image']['tmp_name']); //rename file         if($_FILES['profile_image']['size'] &gt; (1024000)) //can't be larger than 1 MB         {             $valid_file = false;             $message = 'Oops!  Your file\'s size is to large.';         }          //if the file has passed the test         if($valid_file)         {             //move it to where we want it to be             move_uploaded_file($_FILES['profile_image']['tmp_name'], 'uploads/'.$new_file_name);             $message = 'Congratulations!  Your file was accepted.';         }     }     //if there is an error...     else     {         //set that to be the returned message         $message = 'Ooops!  Your upload triggered the following error:  '.$_FILES['profile_image']['error'];     } }  else { echo    'success';     }     &lt;form method="post" action="./process-signup.php" enctype="multipart/form-data" &gt;       &lt;input type="file" class="profile_image text-input" name="profile_image" placeholder="Upload a picture"/&gt;&lt;br /&gt;     &lt;input type="submit" id="signup-com-btn" value="Complete Signup" /&gt;  &lt;/form&gt;
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?
The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by The number of (non-equal) forests on the vertex set V = {1, 2, ...,n} that contains exactly 2 connected components is given by $\sum_{k=1}^{n-1} {n-1 \choose k-1} k^{k-2} (n-k)^{n-k-2}$.  I am unsure how to approach this question. Could someone guide me through the proof? If G is a spanning tree and it is disconnected then I know it is a spanning forest. Also, I know by Cayley's thm that there are $n^{n-2}$ nonequal tree on a vertex set V = {1, 2, ...,n} which is where i'm assuming the $k^{k-2}$ comes from but I do not understand where the rest of it is coming from. Why does C/C++ differentiates in case of array index out of bound #include &lt;stdio.h&gt; int main() {     int a[10];     a[3]=4;     a[11]=3;//does not give segmentation fault     a[25]=4;//does not give segmentation fault     a[20000]=3; //gives segmentation fault     return 0; }  I understand that it's trying to access memory allocated to process or thread in case of a[11] or a[25] and it's going out of stack bounds in case of a[20000]. Why doesn't compiler or linker give an error, aren't they aware of the array size? If not then how does sizeof(a) work correctly? The staircase paradox, or why $\pi\ne4$ What is wrong with this proof?    Is $\pi=4?$ There's an election going on. What's happening and how does it work? Why don't Muggle-born wizards use Muggle technology to fight Death Eaters? Catch multiple exceptions at once? How do you reset timers? There are three ways I know to pronounce the -ed at the end of an adjective:   /t/ as in cracked. /d/ as in lined. /ɪd/ as in naked   I realise naked is a special case because, as , it comes for Old English nacod, so the suffix isn't added.   shows the pattern of pronunciation of -ed in all other cases. However it doesn't explain why  ends with /ɪd/ (or /id/ or /əd/ depending on the dialect).   that wicked comes from OE wicca, so the d wasn't already there.  Why do we pronounce wicked as /ˈwɪkɪd/ and not /ˈwɪkt/? How to disable Mac OS X's autocorrect but still show spelling suggestions? I welcome popup spelling suggestions, but I dislike the OS replacing text as I type without any real confirmation from me.   I'm aware both behaviors can be enabled/disabled together as one option in System Prefs &gt; Keyboard &gt; Text, but would anyone know a way to disable the autocorrect while leaving the tooltip-style suggestions intact…perhaps via the Terminal? Thank you.   Mac OS X 9.4 (Mavericks) I know to secure safety it is now not allowed anymore to open apps that were not downloaded from the mac app store.  But surely there is a workaround for this to open an app that you know is 'good' but just isn't in the app store. Preferably allowing only that app and not allowing all downloaded apps to be opened.    How do I open an app that is not downloaded from the app store in mountain lion? Editing capabilities document in GeoServer I've got several layers in GeoServer, one of which I'm trying to use as a WMS in desktop programs (Manifold 8). I've set it up correctly, but whenever I bring it into Manifold, it projects the layer into EPSG:4326, which unfortunately can't work with my map - I need it in EPSG:3857. The layer in question is wrapped inside a more overarching layer definition, which contains all the layers - and coordinate systems that allow them all to be used flexibly. However, I want to put this layer on its own in the capabilities document, and only allow it to use EPSG:3857. How, in GeoServer, would I edit, or override, a capabilities document? We sometimes buy trout from a local breeder who'll get them fresh out of the water for us, and then cook them a few hours later. They taste great, but the flesh tends to fall apart in a way that doesn't happen with fish from the super market. It's often barely even possible to get them out of the pot without them completely coming apart. We tried leaving them in the fridge for a day so they wouldn't be quite as just-killed-an-hour-ago-fresh, but that didn't help.   We usually prepare them by cooking them in simmering (not boiling) water.  Is there some way to prevent this? I'm trying to understand how it's possible to always reduce the degrees of freedom of a system represented by $n$ coordinates $q_{i}$ for which holds $f(q_{1},...,q_{n})=0.$  For example, let's consider the system represented by $x+\cos y=5$. How can i show that this system has only 1 degree of freedom? how to add a custom lock for the recovery and/or bootloader? Unlocking the bootloader and/or the recovery is very popular discussion across many devices. But doing so exposes a very obvious and inevitable issue with security!  An unlocked recovery means that no matter how secure you make your android lock screen, someone can easily reset phone to restore the phone to a fully functional (and lockless/insecure) state and the worst part, they don't have to erase your data(meaning they can access all your personal files and folders)!  It is almost hilarious! In fact if the phone supports insertion of external SD cards, you can even flash your own software into the phone and maybe bypass the lock screen without wiping any data.  For example: One possible loophole is using the 'Tasker' app which has a feature that can temporarily disable the keyguard. And the best part is that Tasker can be flashed using the recovery!  So is there any method by which I could add a security measure that prevents complete access to my recovery and/or boot loader that will make my phone less insecure?!  Expected answer: Method by which a custom pin/password must be entered before entering the bootloader/recovery. So that my bootloader/recovery is still technically unlocked but simply requires authentication to use (this also ensures that conventional unlocking methods won't work as the phone is not really locked!). This also means that one does not have to lose root access to ensure security! Adding popup message box before tool execution with ArcPy and ArcMap I want to add a box message to pop up before execution of a button tool. When I click a button which will do geoprocessing, I want a box to appear on view before processing with message that I am about to do xxx processing. How do I do it? Ring of $\mathbb{Z}_2$-valued functions Let $R =\{f:\{1,2,3,4,\cdots ,10\}\to \mathbb{Z}_2 \}$ be the set of  all $\mathbb{Z}_2$ -valued functions on the set $\{1,2,3......10\}$  of the first ten positive integer. Then $R$ is a commutative ring with point-wise addition and multiplication of functions. Which of the following is true?     1) $R$ has a unique maximal ideal.      2) Every prime ideal of $R$ is also maximal.      3 ) The number of proper ideals of $R$ is $511$.      4 ) Every element of $R$ is idempotent.   R is finite commutative ring so  every prime ideal  is maximlal ideal ,so I think option  2 is true   .But for the other options   I am  helpless  . 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? How to parse hex values into a uint? uint color;  bool parsedhex = uint.TryParse(TextBox1.Text, out color);  //where Text is of the form 0xFF0000 if(parsedhex)    //...   doesn't work. What am i doing wrong? How to remove duplicate values from an array in PHP Let $\ln X \sim \operatorname{Exp}(1)$ and $X,Y$ i.i.d.  What is the distribution of $Z=XY$?  My attempt: $$P(Z\le z)=P(XY\le z)=P(\ln(XY)\le \ln(z))=P(\ln(X)+\ln(Y)\le \ln(z))$$  We need the convolution, since $\ln X $ and $\ln Y$ are independent we get, $$\int_0^{\ln(z)} f_{\ln(X)}\circledast f_{\ln(Y)}=\int_0^{\ln(z)}e^{-y}e^{-x+y}\,dy=e^{-x}ln(z),$$ i.e. $e^{-x}\ln(z)$ is the density of $XY$