Given an enum parameter list as PHP string, eg $list = "'A', 'B'" how to verify this is  1) valid and  2) safe?  What kind of characters are allowed in an enum? Can I verify this with a regex?
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?
Solve a system of equations with Euclid's Algorithm I want to install 13.04 (or higher) using wubi, is that possible? Can graduated Stack Exchange sites get closed too? Can I set background image and opacity in the same property? How to re-link missing blender files I have multiple characters linked to a blender file, but i moved the original character files and now blender is sating they're missing.  Is it possible to get blender to find the missing blender files like it finds missing image files so that i can preserve the previously made animation?  On a side note is there a way to also view a list of all the missing files? I installed Ubuntu today and since the first start up I have a problem with the mouse cursor.  It starts randomly disappearing and flickering a lot.  I have searched for a solution on Google and here but didn't find anything. Excel macro to highlight all cells that match value in current cell Lattices are congruence-distributive VHDL Transition Function When did Tom Riddle get his new face? Recently I asked about the  pertaining to Voldemorts new face. However I was corrected by ...     Well, I think the confusion comes with mixing movie canon with book canon. In Philosopher's Stone, here's what Harry sees when Quirrell unwraps his turban:           Harry would have screamed, but he couldn’t make a sound. Where there should have been a back to Quirrell’s head, there was a face, the most terrible face Harry had ever seen. It was chalk white with glaring red eyes and slits for nostrils, like a snake.          Philosopher's Stone - page 212 - UK - chapter 17, The Man With Two Faces      So it seems at some point between leaving school, and sticking his face to the back of Quirrel's head possessing Quirrel he got a new face some how.   How did he manage that? Is it some dark magic he applies? Is it from possessing snakes in Albania? Intuitive proof of $\sum_{k=1}^{n} \binom{n}{k} k^{k-1} (n-k)^{n-k} = n^n$ Is there an intuitive way, though I am not sure how to find a conceptual proof either, to establish the following identity: $$\sum_{k=1}^{n} \binom{n}{k} k^{k-1} (n-k)^{n-k} = n^n$$ for all natural numbers.  I am thinking about binomial formula $$\sum_{k=0}^n\binom nk x^{n-k}y^k=(x+y)^n$$ but I'm not sure how to use it.  I find this problem tantalizing because it looks as if there should be some sort of intuitive way so that is why I share it here. I am looking for an answer like  if possible. Can you find one? For all infinite cardinals $\kappa, \ (\kappa \times \kappa, <_{cw}) \cong (\kappa, \in).$ I don't understand the proof to the a/m claim. How we know that $\eta &lt; \kappa$ and $(\alpha,\beta)&lt;_{cw} (0, \eta) $ and hence $h: \mu \to \eta \times \eta$ is injective? Appreciate if anyone could advise.  Here is an excerpt of the proof:  For an infinite ordinal $\kappa,$ the canonical well-ordering of $\kappa \times \kappa,$ denoted by $&lt;_{cw}$ is defined as follows: $(\alpha_1, \beta_1)&lt;_{cw} &lt; (\alpha_2, \beta_2)$ iff either one of the following holds.  $(1): \max\{\alpha_1,\beta_1\} &lt; \max\{\alpha_2,\beta_2\}$  $(2): \max\{\alpha_1,\beta_1\} =\max\{\alpha_2,\beta_2\}$ and $\alpha_1&lt;\alpha_2$   $(3): \max\{\alpha_1,\beta_1\} =\max\{\alpha_2,\beta_2\}$ and $\alpha_1 = \alpha_2$ and $\beta_1 &lt; \beta_2.$  Claim: For all infinite cardinals $\kappa, (\kappa \times \kappa, &lt;_{cw}) \cong (\kappa, \in).$  Proof: (It has been show that it is true for $\kappa = \omega$) Assume there is a counterexample  $\kappa.$ Let $A= \{\lambda \in \kappa + 1| \lambda\geq \omega \ is \ a \ cardinal \ and \ (\lambda \times \lambda, &lt;_{cw}) \not\cong (\lambda, \in)\}.$ Then, $\kappa \in A.$ Let $\mu$ be least element of $A.$ Thus, $\mu &gt; \omega$ and for all $\lambda,$ if $\omega \leq \lambda &lt; \mu$ and $\lambda$ is a cardinal, then $(\lambda \times \lambda, &lt;_{cw}) \cong (\lambda, \in).$  By Comparability theorem, $(\mu, \in)$ is isomorphic to initial segment of $(\mu \times \mu, &lt;_{cw})$ since $|\mu \times \mu| \geq \mu$ and $\mu$ is cardinal. Let $(\alpha, \beta) \in \mu \times \mu$ such that $(\mu, \in)$ is isomorphic to initial segment of $(\mu \times \mu, &lt;_{cw})$ given by $(\alpha, \beta).$ Let $h$ be the isomorphism. Let $\eta= \max\{\alpha, \beta\}+ \omega.$ Then $\eta &lt; \kappa$ and $(\alpha,\beta)&lt;_{cw} (0, \eta).$ HENCE, $h: \mu \to \eta \times \eta$ is injective. How can I identify duplicate image files? Over the years, I've accumulated a lot of pictures, across a bunch of different machines.  I think I've mostly kept them in a yyyy/mm/ directory structure, but especially with some of the older pictures, there seem to be a lot of duplicates.  What's the best way to identify the duplicates?  Are there good tools to do this, or am I going to have to write something on my own? Why there is no operator for time in QM? Does Gollum know that others call him Gollum? Series Summation,Convergence I am stuck on the 4 th one.I have done the rest.I have found out the value of a_n.But not getting how to proceed for the 4 th one. Creating image with specific latitude/longitude positions using GDAL? I have an ASCII file with latitude, longitude, and data_val in the following format.  35-13.643782N, 080-57.190157W, 118.6 ...   I have a GeoTiff image file, and I can easily view it.  I want to place a "pin" (can be a dot/flag/star or whatever is easiest) on the image at the specific latitude/longitude position found in the ASCII file.  Here is what I've managed to do so far:  My source image looks like this:  Driver: GTiff/GeoTIFF Files: /tmp/Charlotte SEC 100.tif Size is 16867, 12358 Coordinate System is: PROJCS["Lambert Conformal Conic",     GEOGCS["NAD83",         DATUM["North_American_Datum_1983",             SPHEROID["GRS 1980",6378137,298.2572221010042,                 AUTHORITY["EPSG","7019"]],             AUTHORITY["EPSG","6269"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4269"]],     PROJECTION["Lambert_Conformal_Conic_2SP"],     PARAMETER["standard_parallel_1",38.66666666666666],     PARAMETER["standard_parallel_2",33.33333333333334],     PARAMETER["latitude_of_origin",34.11666666666667],     PARAMETER["central_meridian",-78.75],     PARAMETER["false_easting",0],     PARAMETER["false_northing",0],     UNIT["metre",1,         AUTHORITY["EPSG","9001"]]] Origin = (-365041.822331817995291,240536.419747152860509) Pixel Size = (42.334586069440391,-42.334898968590878) Metadata:   AREA_OR_POINT=Area   TIFFTAG_DATETIME=2016:06:24 12:46:45   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)   TIFFTAG_SOFTWARE=Adobe Photoshop CS5 Windows   TIFFTAG_XRESOLUTION=300   TIFFTAG_YRESOLUTION=300 Image Structure Metadata:   COMPRESSION=LZW   INTERLEAVE=BAND Corner Coordinates: Upper Left  ( -365041.822,  240536.420) ( 82d48'55.43"W, 36d13' 4.92"N) Lower Left  ( -365041.822, -282638.262) ( 82d35'10.11"W, 31d30'17.00"N) Upper Right (  349015.641,  240536.420) ( 74d51'46.40"W, 36d13'26.16"N) Lower Right (  349015.641, -282638.262) ( 75d 4'55.60"W, 31d30'36.99"N) Center      (   -8013.091,  -21050.921) ( 78d50'12.11"W, 33d55'36.35"N) Band 1 Block=16867x1 Type=Byte, ColorInterp=Palette   Color Table (RGB with 256 entries)     0: 255,255,255,255 ...   Here is what I've managed to cobble together in Python:  from osgeo import gdal, osr  src_filename = '/tmp/Charlotte SEC 100.tif' dst_filename = '/tmp/foo.tiff'  # Opens source dataset src_ds = gdal.Open(src_filename) format = "GTiff" driver = gdal.GetDriverByName(format)  # Open destination dataset dst_ds = driver.CreateCopy(dst_filename, src_ds, 0)  # Specify raster location through geotransform array # (upperleftx, scalex, skewx, upperlefty, skewy, scaley) # Scale = size of one pixel in units of raster projection # this example below assumes 100x100 gt = [-365041.822, 100, 0, 240536.420, 0, -100]  # Set location dst_ds.SetGeoTransform(gt)  # Get raster projection epsg = 4269            # http://spatialreference.org/ref/sr-org/lambert_conformal_conic_2sp/ srs = osr.SpatialReference() srs.ImportFromEPSG(epsg) dest_wkt = srs.ExportToWkt()  # Set projection dst_ds.SetProjection(dest_wkt)  # Close files dst_ds = None src_ds = None   But, I can't quite figure out how to place a "red dot" at 35-13.643782N, 080-57.190157W  I'm having to learn some new details here (nomenclature about GIS). Why does Venus spin in the opposite direction? Given: Law of Conservation of Angular Momentum.   Reverse spinning with dense atmosphere (92 times > Earth &amp; CO2 dominant sulphur based). Surface same degree of aging all over. Hypothetical large impact is not a sufficient answer.   Assuming any object large enough to alter a planets rotation or even orbit would likely destroy most of its shape, yet Venus has retained a spherical property with a seemingly flat, even terrain indicating no volcanoes,and few if any visible meteor impacts. It would be fragmented and dispersed for billions of years.  Even the question of what meteor, comet, asteroid composition could survive traveling that close to the sun's temperature, radiation, electromagnetic energy, solar flares, or gravity to equal a mass reactionary change as to alter it's spin. Are Stack Overflow people *still* nice? The title is a reference to . We had the good fortune, to start this experiment with a really positive culture and have managed to hang onto it through vast growth and several fairly bitter internal arguments. But that does not guarantee we'll keep it forever. Lately I've had a unscientific feeling that Stack Overflow has been a bit rougher on newbie mistakes. The actual composition of this question was triggered by the comment thread on  (now with pending delete votes, so it is in danger of being 10k only). The  currently has 3 reputation points and has been a member for all of two days. The question bear the obvious (to me, at least) hallmarks of being written by a non-native English speaker with a shaky grasp of the tongue, and it is a rather simplistic question that could be answered fairly easily by Google. Question body:  Sir, I am mc student, I have knowledge in c,c++,J2EE. I want to ask you should I command in Linux with J2EE. Is it worth?  Instead of trying to improve the question, to discern exactly what the OP meant, or explaining how the question should be improved we get this comment thread instead (without wanting to call out these posters in particular, this was just the thread that got be off my duff):  2 Can you elaborate? – Dave McClelland 21 hours ago 1 Absolutely yes! If it can run on your Blu-Ray player, imagine the possibilities it can do on Linux. – The Elite Gentleman 21 hours ago 1 Basically, it's as worth as running Java on any other platform. – Alexander Gessler 21 hours ago 1 @The Elite Gentleman, You can try run it on your sim-card too) – Stas Kurilin 21 hours ago 1 @STas Kurilin, really? What heapspace size must I give? sarcastic laugh – The Elite Gentleman 21 hours ago 1 @The Elite Gentleman I don't know. But there are some) See for details oracle.com/technetwork/java/javacard/overview/… – Stas Kurilin 21 hours ago @The Elite Gentleman, you're absolutely right given a full fledged desktop machine with Linux, Java would run so fast his program could go back in time and rescue whales from extinction. – Quaternion 21 hours ago @Stas Kurlin, if you have a program that runs on a sim-card isn't it hard to get output? I've always found processorless environments problematic. – Quaternion 21 hours ago @Quaternion - It was a joke) I've newer wrote such programs. But, I think there should be some processor. – Stas Kurilin 20 hours ago @Stas Kurlin, I was joking too, but I have to apologize after reading that page you liked to. You can run Java off a smart card... that's crazy and cool. +1 on account of good learning for the day. – Quaternion 20 hours ago @Quaternion Thanks. I heard about this stuff several weeks ago. Java at a sim card is a really cool argument) – Stas Kurilin 20 hours ago @Quaternion, lol, without having to worry about Segmentation Faults along the way. – The Elite Gentleman 19 hours ago  I've been leaving comments on threads like this from time to time, asking them to be a little more forgiving, but that is a drop in the bucket. Nothing flag-worthy here, but not a &quot;nice&quot; as things once were. There is very little effort to understand what the question may really be, nor why to explain why the question has been closed, what other resources exist, or how that decision could be reversed. With a brand new user who probably has a hard time with English. Ouch. Do we need an official re-iteration of &quot;Be nice.&quot;? Is there something else we can do to encourage our big city to keep the small-town feel we grew up with? Is there a way for non-root processes to bind to "privileged" ports on Linux? It's very annoying to have this limitation on my development box, when there won't ever be any users other than me.  I'm aware of , but none of them do exactly what I want:    (The version in Debian testing, 1.0, only supports IPv4)  (the "nat" table is not yet implemented for ip6tables, the IPv6 version of iptables) sudo (Running as root is what I'm trying to avoid) SELinux (or similar). (This is just my dev box, I don't want to introduce a lot of extra complexity.)   Is there some simple sysctl variable to allow non-root processes to bind to "privileged" ports (ports less than 1024) on Linux, or am I just out of luck?  EDIT: In some cases, you can  to do this.