Error coming up while running query on empty fields
mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc... expects parameter 1 to be resource
MicroSD card is set to Read-only state. How can I write data on it? I have a MicroSD card reader in my notebook. When I insert a MicroSD memory card into it, I can't write any data on it - it's read-only. The same thing happens when I try to do it under root. And I can't change the permission policy for it. This problem happens for all microSD cards (I've tested 2 cards). I've encountered it on Ubuntu 12.04 LTS, now I'm on Ubuntu 12.10, the problem is still on it's place. When I try to insert such a "read-only" card in my mobile phone, everything's OK and I can write data on it. So, can anybody tell me, how can I write a data onto the card?  UPD: here's fdisk -l output:  Disk /dev/sdc1: 2013 MB, 2013135360 bytes 62 heads, 62 sectors/track, 1022 cylinders, total 3931905 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000   Device Boot      Start         End      Blocks   Id  System   The file system of the card is msdos. As to me it's weird.   UPD2: I've found a small "lock" switch on my card adapter, and it turns out, that when I insert it in my notebook, it switches on. Perhaps, I have to find some glue or something to get that switch stuck...  UPD3: There was no glue near me, so I've decided to buy another card-reader. Rasterio + QGIS - rasterio.drivers() -> TypeError: 'module' object is not callable I have been trying to get rasterio working with my QGIS setup so that I can take advantage of the fast raster manipulations.  After a day of installing / uninstalling and then piece by piece searching and getting components installed one by one where needed (From upgrading GDAL, numpy, and a whole slew of other modules which were fighting each other) I manged to get to the point where I could import rasterio without any errors.  However now when I run, the first call in the example causes a Traceback:  with rasterio.drivers(CPL_DEBUG=True):     creates error =>  TypeError: 'module' object is not callable   I have noticed that other rasterio objects seem fine, but all functions that are in .pyc files have this same issue.  Any help?  - I will continue in the morning, but I was hoping some elves would appear and help solve this one tonight! :-) Can generated OpenVPN keys be used on multiple clients? We are experimenting with running an OpenVPN server for our business. One question I can't seem to find the answer to is this:  When we generate keys for one of our users for them to use at home, can their use the same keys on their home laptop as well as their home desktop? Or do we need to generate separate keys for each user's client machine? Let $L,M$ two subspaces of the vector space, $V$ such that both $L,M \ne V$.   Prove: $L\cup M \ne V$.     I think this is a case of a proof by contradiction. Lets assume $L \cup M = V$.   Hence, $$\dim(V) = \dim(L) + \dim(M) - \dim(L\cap M)$$  How to proceed? Well structured URLs vs. URLs optimized for SEO How to copy some, but not all files? So, you can use the * as a wild card for all files when using cp within context of a directory.  Is there a way to copy all files except x file? $k[x]/(x^n)$ module with finite free resolution is free Is Mana Weaving ok if it's followed by a thorough shuffle? My friends and I are relatively new to MtG. At some point, one of them introduced us to the idea of mana weaving, and we'd do this to declump our decks prior to a very thorough shuffling. However, at the Theros pre-release, one of us was asked not to do this, and we learned it was frowned upon and ceased to do it.  I just now came across , and it sounds like mana weaving's only bad if you use it to leave your deck in an even distribution, and it's OK if your deck is then thoroughly shuffled. In hindsight, the judge may have simply thought my friend wouldn't have shuffled afterwards, but at the time I came under the impression it was frowned upon even if you did shuffle afterwards.  So: is mana weaving my deck OK, if I shuffle it very thoroughly afterwards? ArcGIS ModelBuilder iterator reports only last input shapefile? Using Arc 10.3.1, if I manually enter the names of multiple shapefiles (all from the same folder) into the Check Geometry tool, the (single) output table lists the errors that exist in all of the shapefiles.    That is, only one output table is created, even if multiple input shapefiles have errors.  For example, if two shapefiles have errors, both will be listed in the single output table. Here's a screen print of the input:    However, if I iterate those same shapefiles (using the Feature Classes option), the output table only lists the last shapefile that went through the iteration.  Here's a screenshot of the model:     I suspect that the iterator is running Check Geometry not once, but three times, with a single input shapefile going through each iteration, overwriting the previous output.    How do I get the iterator to list all of the shapefiles with errors, either in separate output tables or aggregated in a single output table? 10 servers to administer and I'm a history major Through reasons that don't warrant exhaustive discussion, I find myself in charge of 10 servers:   A domain controller-~500 hosts/~350 users IIS web server-This is where we make our money SQL server-The crown jewels Exchange server Linux box for data entry AV server Backup server A few others tossed around   The company where I work believes everybody is replaceable and therefore believes they can pay a minimum wage for any position. The IT manager and Sysadmin quit recently and I think I was the only person who did not take a big step backward when the call went out for volunteers. This also explains why someone with my background is in this position. That is the reality, as much as I wish it otherwise.  What are the things I should be doing to keep those systems running? There is no written procedure left behind and I crammed the A+ and Network+ certs in the last two months but that leaves me with some theory and no practical experience.  I am in the process of teaching myself powershell but from here to there is a long way. I have no scripting or programming experience.  What tasks should I be performing? What practices should I implement?  I understand I am probably hosed but a lifeline to get me through would be helpful. How to get RGB values from UIColor? I'm creating a color object using the following code.  curView.backgroundColor = [[UIColor alloc] initWithHue:229 saturation:40 brightness:75 alpha:1];   How can I retrieve RGB values from the created color object? This story had a researcher landing on an uncharted planet to see if it was any good for mining some type of mineral/metal.  Whilst there he encounters this type of ball that chases him all over the planet. He ends up finding this ball’s collection of other things it has caught including animals all the way back to the dinosaurs.  On the ball it has the writing '+/-7.  In the end it chases him for so long that he weighs too little for the balls 'collection'.  Any ideas greatly appreciated. Trouble with batch conversion of .png to .pdf using convert $$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$   by directly substituting $x=0$ i got $\infty$ by using L-H's rule, i got $-1/8$   the given options are  $a)\frac{24e}{11}$    $b)\frac{11e}{24}$    $c)\frac{e}{11}$    $d)\frac{e}{24}$    may be the question would be  $$\lim_{x\rightarrow 0}\frac{(1+x)^{1/x}-e+\frac{ex}{2}}{x^2}=\,?$$ Better explanation of the common general relativity illustration (stretched sheet of fabric) SELECT GETDATE()   Returns: 2008-09-22 15:24:13.790  I want that date part without the time part: 2008-09-22 00:00:00.000  How can I get that? Prove $\lim_{x\to0}\sqrt{4-x}=2$ using the precise definition of limits. (Epsilon-Delta) Prove $$\lim_{x\to0}\sqrt{4-x}=2$$ using the precise definition of limits. (Epsilon-Delta)  I am not sure how to link $0&lt;\left |x  \right |&lt;\delta$ with $\left |\sqrt{4-x}-2\right |&lt;\epsilon$ .  EDIT (Trying it out now)  I worked till here, then I basically got stuck. 13.04 - more than four workspace shortcuts in GNOME Flashback (No effects) I'm using GNOME Flashback (No effects) on Ubuntu 13.04 and I've got six workspaces however when entering System Settings -> Keyboard -> Shortcuts -> Navigation I only see options to address the initial four.  It used to be options up to 12 workspaces there and as I certainly don't need that much, I want to have at least enough for the amount currently active.  How can I restore or add more shotcuts specifically to navigate and move windows to workspace 5 and 6? "Like" versus "as" Please bring back the oldest sort order for answers, I think we can deal with four different types of sort order.  It's helpful if you don't want to have to tool-tip every post to see which got posted first, so that you can upvote the oldest answer when answers duplicate each other.  Edit:  Also, trying to read newest backwards doesn't work well for questions with multiple pages of answers.