Daily Archives

Articles indexed Saturday April 17 2010

Page 7/81 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • python os.execvp() trying to display mysql tables gives 1049 error - Unknown database error.

    - by Hemanth Murthy
    I have a question related to mysql and python. This command works on the shell, but not when I use os.execvp() $./mysql -D test -e "show tables" +----------------+ | Tables_in_test | +----------------+ | sample | +----------------+ The corresponding piece of code in python would be def execute(): args = [] args.extend(sys.argv[1:]) args.extend([MYSQL, '-D test -e "show tables"']) print args os.execvp(args[0], args) child_pid = os.fork() if child_pid == 0: os.execvp(args[0], args) else: os.wait() The output of this is: [./mysql', '-D test -e "show tables"'] ERROR 1049 (42000): Unknown database ' test -e "show tables"' I am not sure if this is a problem with the python syntax or not. Also, the same command works with os.system() call. os.system(MYSQL + ' -D test -e "show tables"') Please let me know how to get this working. Thanks, Hemanth

    Read the article

  • PHP Zend Debugger configuration

    - by newbie123
    Hi i am new to php, I currently learning php using eclipse. I know i have to install the zend debugger my php.ini store at c:windows i had added in these line: [Zend] zend_extension=c:/php/ext/ZendDebugger.dll zend_debugger.allow_hosts=127.0.0.1 zend_debugger.expose_remotely=always zend_debugger.connector_port=10013 but on command prompt i tried php -m it shown that i never install zend debugger. I not sure where goes wrong I check phpinfo also never show any zend information.

    Read the article

  • trouble accessing localhost from ie7 running on parallels (win xp) on mac os x

    - by Karl R
    I'm running the app engine devserver on localhost:8080, and want to access it from ie7 running on parallels. I've tried all of the tips here: http://stackoverflow.com/questions/61449/how-do-i-access-the-host-from-vmware-fusion And they seem like they should work, particularly accessing via the gateway ip address. I've also sudo ipfw add allow tcp from 8080 to 8089 for good measure. Still no dice. I can access the external internet from ie7. The connection settings on parallels are set to 'Shared networking'. I'm out of ideas.

    Read the article

  • Proper use of HTTP status codes in a "validation" server

    - by Romulo A. Ceccon
    Among the data my application sends to a third-party SOA server are complex XMLs. The server owner does provide the XML schemas (.xsd) and, since the server rejects invalid XMLs with a meaningless message, I need to validate them locally before sending. I could use a stand-alone XML schema validator but they are slow, mainly because of the time required to parse the schema files. So I wrote my own schema validator (in Java, if that matters) in the form of an HTTP Server which caches the already parsed schemas. The problem is: many things can go wrong in the course of the validation process. Other than unexpected exceptions and successful validation: the server may not find the schema file specified the file specified may not be a valid schema file the XML is invalid against the schema file Since it's an HTTP Server I'd like to provide the client with meaningful status codes. Should the server answer with a 400 error (Bad request) for all the above cases? Or they have nothing to do with HTTP and it should answer 200 with a message in the body? Any other suggestion? Update: the main application is written in Ruby, which doesn't have a good xml schema validation library, so a separate validation server is not over-engineering.

    Read the article

  • How to connect externally to local network from local network?

    - by ventrilobug
    I have this weird problem with a Ventrilo server software running in my linux machine. If I connect the server inside my local network, messages keep lagging etc. But users joining the server outside my network do not experience any problems. So the question is, how can I trick the software inside the local network to make me appear as joining from external network. Do I need some proxy running in some external network machine? Does someone offer this kind of service? All the problems started when I changed my router so I guess it has something to do with the new router, but I haven't found a solution by changing settings in my router so I try to fix this in some other way.

    Read the article

  • F3-F5 keys incorrectly behaving as audio keys

    - by obvio171
    I don't know if this is a configuration issue or a hardware issue, but I have a Kinesis Advantage USB keyboard and for some reason the F3-F5 keys aren't responding as they used to. They don't respond to anything and, when I tried using F5 on Emacs, it said <XF86AudioNext> is undefined, so I guess it's a weird mapping problem. Any idea how I could remap them to the original meaning?

    Read the article

  • E71 update my music files keep getting disconnected via USB

    - by keisimone
    Previously, i can update my music files using Oviplayer to my E71 Nokia. Now whenever i plug in my E71 i choose PC suite. i go to Oviplayer in my laptop. and i select the mobile phone section and i press the connect button, automatically my phone is disconnected via USB. the alternative is to choose media transfer or media player. The same thing happens. And the connecting screen at Ovi player is like hanged. I have previously transferred songs, but only twice. first time this has happened to me. I do not know why. Please aDVISE.Thank you.

    Read the article

  • How to discern video details from Linux Live CD

    - by Chris Lieb
    I was having trouble getting X.Org to work with the video card in a recently aquired laptop, so I decided to try to probe around the configuration of a Linux Live CD to figure out how to set up my kernel. I chose the Sabayon 5.0 Live DVD because it was the only one that I could find that was the same or newer than the 2.6.32 kernel I have installed on the laptop right now. Of course, the DVD booted right into GNOME without issue, unlike the hangs and crashes that I had been getting. So, I want to figure out what kernel driver this Live DVD is currently using, but I don't know how to. hwinfo doesn't shed any light on the matter, and lspci -vnn doesn't list a driver for my video device, though both methods correctly identify that I have an Intel 855GM video processor. How can I find out this information?

    Read the article

  • 2D Platformer Collision Problems With Both Axes

    - by AusGat
    I'm working on a little 2D platformer/fighting game with C++ and SDL, and I'm having quite a bit of trouble with the collision detection. The levels are made up of an array of tiles, and I use a for loop to go through each one (I know it may not be the best way to do it, and I may need help with that too). For each side of the character, I move it one pixel in that direction and check for a collision (I also check to see if the character is moving in that direction). If there is a collision, I set the velocity to 0 and move the player to the edge of the tile. My problem is that if I check for horizontal collisions first, and the player moves vertically at more than one pixel per frame, it handles the horizontal collision and moves the character to the side of the tile even if the tile is below (or above) the character. If I handle vertical collision first, it does the same, except it does it for the horizontal axis. How can I handle collisions on both axes without having those problems? Is there any better way to handle collision than how I'm doing it?

    Read the article

  • php file_get_content and &amp;

    - by Patrick
    Hello all, I'm trying to use php's file_get_content('a url'); The thing is if the url has '&' in it, for example file_get_content('http://wwww.google.com/?var1=1&var2=2') it automatically make a requests to wwww.google.com/?var1=1&amp;var2=2 How do I prevent that from happening?

    Read the article

  • RoR - Paperclip - How to set minimal width of an attachement

    - by sNiCKY
    Hi, my layout's requirement is to keep all thumbnails at 80px height, not higher, not smaller. In my model I set the style to :thumb= "500x80", so basically almost every picture which is not too wide gets its perfect miniature with 80px height. Sometimes, however, my pictures are narrow and high, so the thumb can have unclickable dimensions of like 5x80. So I dont want to crop pictures as long as thumbnails are not getting crazy narrow, but I think I can make a little sacrifice and crop them if thumb's width is getting smaller than 25px. So my questions is - is it possible in paperclip to set minimal proportions of a picture by which the style will be "500x80" and beyond that it will turn to sth like "25x80#"?

    Read the article

  • What's the point of Mono on Windows

    - by Adam Haile
    This may be a dumb question...but I was just looking into the Mono project and they have a section about installing Mono on Windows. But, since Windows obviously already has the .NET runtime can anyone tell me what exactly is the point of having Mono for Windows? Does it help with cross platform development or something?

    Read the article

  • Decoding bitmaps in Android with the right size

    - by hgpc
    I decode bitmaps from the SD card using BitmapFactory.decodeFile. Sometimes the bitmaps are bigger than what the application needs or that the heap allows, so I use BitmapFactory.Options.inSampleSize to request a subsampled (smaller) bitmap. The problem is that the platform does not enforce the exact value of inSampleSize, and I sometimes end up with a bitmap either too small, or still too big for the available memory. From http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html#inSampleSize: Note: the decoder will try to fulfill this request, but the resulting bitmap may have different dimensions that precisely what has been requested. Also, powers of 2 are often faster/easier for the decoder to honor. How should I decode bitmaps from the SD card to get a bitmap of the exact size I need while consuming as little memory as possible to decode it?

    Read the article

  • html tags to css tool

    - by silverbandit91
    I'm doing some web-dev and the designers slice and export from photoshop. The generated code is horrendous. The first thing i'm doing is taking everything out of the tags and putting them in css files. So i was wondering if there was a tool that can automate this?

    Read the article

  • CD-ROM Cant Be Accessed After Installing VMware Tools on VMware Server 2.0.2

    - by Optimal Solutions
    Using VMware Server 2.02, I set up a new VM (Windows XP Pro) applied all of the updates, added Windows addons from the install CD, etc... I got it to a stable point and up through that point I was able to access the CD-ROM drive (E: on my host). What I never did before was install "VMware Tools" and since it claims to give better mouse and video support, I gave it a shot. What it does is it places the install package in a virtual CD-ROM drive. I ran the install, no errors and it wants a reboot. I log back in after reboot and pop in the install CD for Microsoft Office 2003 and I receive the message "Please Insert A Disc Into Drive D:". Drive D: would be the next logical drive after the C: drive where I chose to install the OS. The message box sits there and if I click "Cancel", to return to Windows Explorer, the status bar seems to blink ever 1/2 second - as if its polling for a CD-ROM drive or something. No bangs or exclamations in the Device Manager for any hardware. I had taken a snapshot prior to the VMware Tools install and upon restoring it, the CD-ROM is back. I made copies of two other VMs, installed the VMware Tools on those VMs and both experienced the same issues: Windows 2003 Server and Windows 7 (32-bit). Has anyone seen this issue and know of a fix for this? It would be nice to have the better graphics and better mouse control AND use my CD-ROM drive as well! Thank you.

    Read the article

  • What are the strengths of OpenSolaris compared to Linux?

    - by netvope
    Please try to answer in these areas: For what kind of usage is OpenSolaris more suited than Linux? What are the useful OpenSolaris features that Linux lacks? Personal experiences are welcomed, but please don't start a flame war. Strengths of Linux over OpenSolaris are beyond this topic. (For Linux, I'm thinking of something like Ubuntu or Fedora, but not RHEL, if that matters.) (I have used Linux servers for a long time but have never used Solaris, if that matters.)

    Read the article

  • C++ deleting a pointer

    - by eSKay
    On this page, its written that One reason is that the operand of delete need not be an lvalue. Consider: delete p+1; delete f(x); Here, the implementation of delete does not have a pointer to which it can assign zero. Adding a number to a pointer shifts it forward in memory by those many number of sizeof(*p) units. So, what is the difference between delete p and delete p+1, and why would making the pointer 0 only be a problem with delete p+1?

    Read the article

  • OOP Design for an Economy

    - by waiwai933
    Not sure where to start, so I'm just going to plow in. Let's say I'm trying to represent an economy in OOP. A basic design I've come up with is: class Person{ int $money; // Money someone has in wallet/purse int $bank_account_id; function getAmountOfMoney() function addMoney($amountToAdd) function subtractMoney($amountToSubtract) } class BankAccount{ int $money; // Money in Bank Account int $interest_per_year; function giveInterest() function depositMoney() // Calls $person->subtractMoney() function withdrawMoney() // Calls $person->addMoney() } Are there any design flaws here?

    Read the article

  • Can I turn off context menu scrolling in VS2010?

    - by Jane McDowell
    When I right-click in the middle of a code editor window in Visual Studio 2010 RTM, a context menu appears. This takes up about a fourth the height of the screen but doesn't show all options. Instead it scrolls up and down when you move the pointer to the top or bottom of the menu. If I click near the top or bottom of the screen, the menu is normal and doesn't scroll. Can I turn this behavior off? It's stupid. You can't even scroll using the mouse wheel. EDIT I reckon this might just be a bug - I've found a few.

    Read the article

  • jquery cycle plugin using RSS feed images?

    - by Chris
    This could well be a terribly ignorant question, if so please forgive me: I'm using jquery cycle plugin to create an image rotator of recently posted images. Im using drupal 6.x and created an RSS feed of the recent images using the views module. I have no idea how to connect the two. Any suggestions? I have a feeling an RSS feed might not be the best way to go about this, but it's all I could come up with. Thanks for the help.

    Read the article

  • Execution output to text file

    - by Radhika
    Hi all, I am writing a C program using Visual Studio 2008. I use F7 to compile and F5 to execute the program.When I press F5 an execution window contains the output. But I want the output to get saved to a text file. How to do this in visual studio. Please help me someone.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >