I am getting this error: Argument 2 passed to db_query() must be an array, string given. In db_query in below function.   function uc_guest_checkout_uc_checkout_complete($order, $account) {   if (!empty($_SESSION['uc_guest_checkout'])  &amp;&amp; !user_is_logged_in()) {     switch ($order-&gt;data['complete_sale']) {       case 'new_user':         // For guest checkout, we replace the ubercart generated username and email         // for a new user with one that is more anonymous.         $name = uniqid('anon-', TRUE);         $mail = $name . '.' . uc_store_email();                 db_query('UPDATE {users} SET name = "%s", mail = "%s" WHERE uid = %d', $name, $mail, $account-&gt;uid);       break;   case 'logged_in':     // If the order is marked logged in but anonymous, this means that      // we must have set the uid to the default account, but still treat     // this as a new user.     $order-&gt;data['complete_sale'] = 'new_user';     break;     }   }   _uc_guest_checkout_end(); }   I tried this queries but none were creating account with valid names and emails as per db_query which is throwing error but successfully creating user accounts.where as these below queries creating names with random names.  db_update('users')         -&gt;fields(array(             'name' =&gt; $name,             'mail' =&gt; $mail         ))         -&gt;condition('uid', $account-&gt;uid)                -&gt;execute();  db_query('UPDATE {users} SET name = :name, mail = :mail WHERE uid = :uid',                 array(':name' =&gt; $name, ':mail' =&gt; $mail, ':uid' =&gt; $account-&gt;uid));   How do I resolve this?
I am using ubercart guest checkout module. I am able to submit  the order as guest etc works fine.   After Reviewing the order and submitting it throws me this error   Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in /var/www/html/dev.demo.net/sites/all/modules/ubercart_guest_checkout/uc_guest_checkout.module on line 263 and defined in db_query() (line 2342 of /var/www/html/dev.demo.net/includes/database/database.inc).   This is the query which is causing that issue    db_query('UPDATE {users} SET name = "%s", mail = "%s" WHERE uid = %d', $name, $mail, $account-&gt;uid);   I tried to change this query like this  db_update('users') -&gt;fields(array(     'name' =&gt; $name,     'mail' =&gt; $mail )) -&gt;condition('uid',$account-&gt;uid,'=')        -&gt;execute();   still no luck, it throws me same above specified error.    How can i resolve the query of above one in order to avoid the error. Any suggestions w.r.t query will be nice.Thanks in advance.
Skyrim crashes as soon as I boot up into the menu. How do I fix this? Whenever I boot up Skyrim, it crashes as soon as it reaches the main menu with no dialog or anything. I thought this was related to my using dual monitors somehow, but I disconnected the other monitor and the game still crashed. I tried running the game in different resolutions, both full-screen and windowed, at various quality settings; no dice. My computer does meet the minimum requirements to play Skyrim.  How do I fix this problem? Let $f:R\rightarrow R$ be a function such that all its successive derivatives exist in all $R$ and also $f(x)f''(x)\leq 0$ everywhere.  If $\alpha$ and $\beta$ be two successive roots of $f(x)=0$.   Then prove that $f'''(x)=0$ for atleast one $\gamma \in(\alpha,\beta)$.  My Attempt:  I began by taking an example $f(x)=(x-1)(2-x)$ and let $x=1$ and $x=2$ be its two successive roots.The statement is trivially true.  Then I took the function $f(x)=e^{-x}(x-1)(2-x)$.The statement is true here also so on and so forth.  But what would be the exact proof I wonder. It appears to be a question of Rolle's Theorem. My mother is given a UK tourist visa for 2 years with a duration of stay as 180 days. It is a c type multiple entry visa. Is this 180 days is the total stay she can take or is it duration of stay per visit.  Thanks in advance for your reply. Can I do it with reflection or something like that? Some of the Puella Magi seem to have magical powers related to the wishes that they made. Sayaka has regeneration abilities, and she wished to heal someone. Homura has time manipulation abilities, and she wished to go back in time.  But other magical girls, like Mami and Kyouko, don't appear to have powers related to their respective wishes.  So, is there a connection, or is it only a coincidence for Sayaka and Homura? If it's the former, how do Mami and Kouko's wishes relate to their powers? The Unix environment has some excellent tools for parsing text in various forms. However, of late, the data is not in the traditional (historical) formats (CSV, TSV, record-based or some other delimiter-based) it used to be before. Data these days is exchanged in structured formats like XML/JSON.  I know there are some good tools like sed, awk and Perl which can chew down nearly any form of data out there. However, to work with this sort of structured data, often one has to write a complete program, and, given the little time available to extract information, one has to sit down and figure out the whole logic of what one wants to query and put it down programmatically. Sometimes this is not OK – basically because the information extracted from those files acts as inputs for further work; also because of the time it takes to search for the appropriate solution and code it up. A command line tool is needed with sufficient switches to find, query and dump data.  I'm looking for tools that take a XML/JSON or other forms of structured data and dump it into other formats like csv, etc., so that from there one could use other commands to get any information out of it.  Are there any command line utilities you know of which do this kind of a job? Are there already awk/Perl scripts available to this? How can I search in another language? Why does a helium filled balloon move forward in a car when the car is accelerating? Trouble enabling Cube surfer addon Every time I have tried to enable the Cube Surfer addon but this error message comes up. FYI I have the correct versions of everything.  I have had this problem with some other add ons as well. Sometimes it's when I have tried to click a button in an addon (after 'successfully' installing) If a company is bought by another company, does my stock rollover to the new company when it is combined with the new parent company? How Do I insert a image in LaTex from my computer How do I create a file in windows from where LaTex can extract the pdf or Jpg file I want to insert in my document? In other words I need an example of inserting either images or pdf files in my document Here's the image I want to insert    The Image will be placed center to the page just beneath this codes  \[ \overline \rho = \overline P + 0.645 \Big (\frac { \overline P}{K}\Big) ^{\frac {3}{4}} \tag { Tazkera} \] How does long to int cast work in Java? How can I get a shapefile from a postgis query? My data is in a PostGIS database. I would like to generate a shapefile from a query. How can I do that? GNU find and masking the {} for some shells - which? The man page for GNU find states:    -exec command ;     [...] The  string `{}'  is  replaced  by the current      file name being processed everywhere it occurs in the      arguments to the command, not just in arguments where      it is alone, as in some  versions  of  find.     Both  of  these  constructions might need to be escaped      (with a `\') or quoted to protect them from expansion      by the shell.     That's from the man to find (GNU findutils) 4.4.2.   Now I tested this with bash and dash, and both don't need to have the {} being masked. Here is a simple test:  find /etc -name "hosts" -exec md5sum {} \;    Is there a shell, for which I really need to mask the braces? Note, that it doesn't depend upon whether the file found contains a blank (invoked from bash):   find ~ -maxdepth 1 -type d -name "U*" -exec ls -d {} \;  /home/stefan/Ubuntu One   This changes if the found file is passed to a subshell:  find ~ -maxdepth 3 -type d -name "U*" -exec bash -c 'ls -d {}' \;  ls: cannot access /home/stefan/Ubuntu: No such file or directory ls: cannot access One: No such file or directory   which can be solved by:  find ~ -maxdepth 3 -type d -name "U*" -exec bash -c 'ls -d "$0"' {} \;   in contrast to:   find ~ -maxdepth 3 -type d -name "U*" -exec bash -c 'ls -d "{}"' \;  /home/stefan/Ubuntu One   but that's not what the man page is talking about, is it? So which shell treats {} in a different way? No feedback when comment fails to post on Android 2.3.5 In the mobile theme on Android 2.3.5, comments that do not meet the minimum length will fail to post but no feedback message is displayed to the user.  The submit button changes to its active state, but nothing else happens. A better serial voting trap Relationship between (algebraic) vector bundle and (topological) vector bundle on $\mathbb{RP}^{1}$($\mathbb{P}^{1}$) Hamiltonian Monte Carlo for dummies Could you provide a step-by-step for dummies explanation of how Hamiltonian Monte Carlo work?  PS: I've already read the answers here, , and here, , and here,  and they do not address it in a step-by-step way. How do I install Ubuntu to a USB key? (without using Startup Disk Creator) The locus of the intersection point of two perpendicular tangents to a given ellipse