This seems so stupid.  This works:  $db = "nameone"; $coll = "utf8_bin"; $sth = $this-&gt;dbh-&gt;prepare("CREATE DATABASE $db COLLATE $coll"); $sth-&gt;execute();   But this gives the following errors: $sth->errorInfo[0] => 42000. $sth->errorInfo[2] => You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''nametwo' COLLATE 'utf8_bin'' at line 1.  $db = "nametwo"; $coll = "utf8_bin"; $sth = $this-&gt;dbh-&gt;prepare('CREATE DATABASE :db COLLATE :coll'); // Changing to double quotes does not matter. Get same error. $sth-&gt;bindParam(':db', $db); $sth-&gt;bindParam(':coll', $coll); $sth-&gt;execute();   What am I missing that would cause the second code with the named parameters and bindParam to error like that. Please note that I'm using database name and collation type, not table name and column name, and that the errors are syntax related. Is there a module that needs to be enabled in php.ini?  Thanks,  Steve
Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh-&gt;prepare('SELECT * FROM :table WHERE 1'); if ($stmt-&gt;execute(array(':table' =&gt; 'users'))) {     var_dump($stmt-&gt;fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"
How do I bake multiple texture maps into 1 UV, In Blender Cycles? Using:  Blender V2.79 Cycles Render Engine  After creating a complex interior scene consisting of 3 different texture types, each having 3 associated maps (Diffuse, Gloss, Normal) I noticed the texture and baking options will not successfully combine to create a texture for the exported mesh once I bring it into Unity 3D. The mesh is a single object with the different textures assigned to specified faces.  I've played around with a default cube mesh for testing purposes, using the same 3 textures split among the 6 sides, but have only been able to successfully pull over the color info by baking a diffuse map to my UV and saving the image. When using the other baking options, Blender does not successfully create a map for either my Glossy textures, nor my normal map. Even using the "Combined" baking option, I am provided a flat dull diffuse image for my mesh, no gloss or normal info is saved.  My Node process for textures is displayed here  Here is the result of baking my textures as a Normal  The result of adding other textures made from Blender's baking, results in flat gloss at best.  What can I do differently in Blender, to have my assigned UV Diffuse, Normal, and Gloss maps all appear in a single object in Unity? After removing any part the rest can be split evenly. Consequences? Let $S$ be a finite collection of real numbers (not necessarily distinct). If any element of $S$ is removed then the remaining real numbers can be divided into two collections with same size and same sum ; then is it true that all elements of $S$ are equal ?  (I know the result is true if the &quot;reals&quot; are replaced by &quot;integers&quot;.) Most modern texts spend some time deriving the  that connects S matrix elements to time ordered field correlation functions. It seems essential, and really helps clear up what you are calculating. Yet some earlier texts and even some modern texts (e.g.  by R. Klauber) seem to skip right past this, working everything out in the "interaction" picture. It seems there must be something going wrong with this latter procedure, but I am not quite able to put it together. I would like to know how to make this effect of merged circle selection. Here are images to illustrate:     Basically I'm looking for this effect:    How the merge effect of the circles can be achieved ? I didn't found any explanation concerning this effect. I know that to project those texture I can develop a decal system but I don't know how to create the merging effect.  If possible, I'm looking for purely shaders solution. How to get the newest file in a directory in php What does "Ubuntu" mean, and why did they choose that particular name? Not getting email alerts on answers on Stack Overflow Not getting email alerts on answers on my questions on stackoverflow.com   Used to get it earlier (>1 month back), but not getting alerts in recent times Email field in profile is filled  In prefs, "I'd like email notifications of activity on questions I've asked" is ticked.   What is missing?  Is it possible that signing up on another Stack Exchange community (say, Server Fault), on which by default, "I'd like email notifications of activity on questions I've asked" is unchecked affects same preference on stackoverflow.com? If so, it is a bug. What does it mean that a package is "set to manually installed?" When packages are already installed and I run an apt-get install &lt;package-name&gt;, sometimes it will print a line &lt;package-name&gt; is set to manually installed.  What does that mean? Helping someone climb I know this is kinda stupid but what is the word for "helping someone climb by allowing him to stand on your hands" (to allow him/her see above some wall or climb something)? Suppose a cleric casts Zone of Truth on a captured enemy. Unbeknownst to them, the enemy is a rakshasa. Zone of Truth says (PHB, p. 289):     You know whether each creature succeeds or fails on its saving throw.   But (MM, p. 257):     The rakshasa is immune to spells of 6th level or lower unless it wishes to be affected.   Assuming the rakshasa doesn't wish to be affected by the Zone of Truth spell, does the caster know this?  More generally, does a caster know when targets are unaffected by a spell they have cast, either because they have made saving throws, or because they are outright immune to the spell or its effects (e.g., casting Ray of Sickness on a shadow demon, which is immune to poison damage and the poisoned condition)? Use the triangle inequality to show that $|a|+|b| \leq |a+b|+|a-b|$ How would I go about proving that  $$|a|+|b| \leq |a+b|+|a-b|$$  Using the triangle inequality?  I tried squaring both sides, yielding:  $$|a|^2 +|b|^2 +2|a||b| \leq 2|a|^2+2|b|^2+2||a|^2-|b|^2|$$  Is it correct to move the terms to the other side? I tried $$2|a||b| \leq |a|^2+|b|^2+2||a|^2-|b|^2|$$ Then it is obvious that  $$0\leq |a|^2+|b|^2-2|a||b| +2||a|^2-|b|^2|$$ $$0\leq (|a|-|b|)^2 +2||a|^2-|b|^2|$$ $$0\leq ||a|-|b||^2 +2||a|^2-|b|^2|$$  But I have neither used the triangle inequality, nor it looks mathematically rigorous for my real analysis class. Any tips and tricks for solving these problems? Moving all files to a new computer, my concern is links I'm moving all files to a new computer, via an external hard drive. I am certain that broken links will be a concern. What can I do to fix this? Is there a 'Best Practices' kind of way to prevent this problem beforehand? I have many hundreds of .blend files, and of course, I fear losing them. Selecting all files in directory for merging in QGIS Processing? I'm writing a generic script which involves writing shapefiles to a directory which are then merged together. After writing the files out to the Output folder, I'm trying to get the saga:mergeshapeslayers algorithm to merge all the files in the Output folder. I have used the Model Builder and although it is helpful to an extent, I find that it is used for specific purposes whereas I am attempting to make a script for generic purposes.   Code:  ##Test=name ##Select_folder=folder ##Result=output vector  import os import glob  path_1 = Select_folder path = path_1 os.chdir(path)  def function():      output = glob.glob(path_1 + './*.shp')     x = 0      while output[x]:         for fname in glob.glob("*.shp"):             outputs_1 = processing.runandload("qgis:fieldcalculator", output[x], 'Number', 1, 10, 0, True, 1 , "C:\Users\Me\Desktop\Output\\"  + fname)             multiple_0 = glob.glob("*.shp")             x = x + 1          if x + 1 &gt; len(output):             processing.runalg("saga:mergeshapeslayers", output[0], ";".join(multiple_0) , Result)             break         else:             continue  if path_1:     function() else:    pass Asked again to review a paper, when the authors don't wish to modify it I have received a manuscript to review for a journal. The interesting thing is, I had already reviewed this article (exact same title, abstract and author list, almost exact same content) for another journal a few weeks ago where I recommended that it be published, but only after major revisions of both form and content. When I first reviewed it, I wrote a two-page review, listing some questions and several “actionable” comments, ranging from some concerns about exactness of the text (some conclusions didn't seem fully backed by the results) all the way down to trivial stuff (grammar, a few typos, graphic issues with the figures, etc.).  Now, the manuscript has come to me for review again, but it is almost unchanged from the first version. None of the serious stuff has been addressed, and even most of the trivial stuff was not fixed (there's at least one remaining typo, and the figures still aren't fully legible). However, I think this behavior from the authors is clearly a bad signal, which should be somehow conveyed to the editor: they're not willing to amend their work, and would rather do some journal-shopping.  What would you suggest me to do? Should I just re-send my earlier review? Add a note to the editor about my knowledge of the “history” of the paper? Or maybe even include it in my review, so the authors are aware that people know of their behavior, and maybe feel bad enough to change their ways?    PS: I wrote it in the present tense, but it's actually a story from my past. I'm not sure I did the right thing at the time, and I think it's better to actually formulate it as an open question… How do I pass a variable by reference? How to know if Google Sheets IMPORTDATA, IMPORTFEED, IMPORTHTML or IMPORTXML functions are able to get data from a resource hosted on a website? Google Sheets has several import functions   IMPORTDATA IMPORTFEED IMPORTHTML IMPORTXML   Sometimes the above functions returns errors like #N/A Imported content is empty and would like to be sure that there isn't a problem with the resource content to be imported.  How do I know if these functions are able to get the content that I looking to import?  I know that there also exist IMPORTRANGE but that function only is able to import content from Google Sheets spreadsheets How do I check if a given string is a legal/valid file name under Windows? I want to include a batch file rename functionality in my application. A user can type a destination filename pattern and (after replacing some wildcards in the pattern) I need to check if it's going to be a legal filename under Windows. I've tried to use regular expression like [a-zA-Z0-9_]+ but it doesn't include many national-specific characters from various languages (e.g. umlauts and so on). What is the best way to do such a check? How do I make a bootable USB from Windows? Usage in sentence:  Person A: Ooh - look at that crow!  Person B: Well, actually, as someone who is a scientist who studies crows, I am telling you, specifically, in science, no one calls jackdaws crows. They're not the same thing. If you're saying "crow family" you're referring to the taxonomic grouping of Corvidae, which includes things from nutcrackers to blue jays to ravens. It's not one or the other, that's not how taxonomy works.  Person A: Are you always such an XXX?   "Pedant" is close, but not quite.  It would be a mix of "know-it-all", "condescending" and "arrogant". Why don't we pluralize "foot" in measurements?