Thursday, January 9, 2014

Install a high speed USB host controller

When connecting a USB 2.0 device, Windows displays the following message:

The thing is
I DO HAVE A USB 2.0 HOST CONTROLLER
and I used to enjoy high speed using my USB ports, until I did some hard disk resizing, which I believe have nothing to do with USB ports.

Anyway, to solve this:
  • Open the device manager. In Windows 7, right click on My computer -> Manage.
  • In the Device Manager, double-click on the "USB Root Hub", then uncheck "Allow the computer to turn off this device to save power" 
It gave me a better speed, but not quite as the one I used to have.

If I find a better solution, I will to update this.

Friday, January 3, 2014

error "No module named jinja2"

Building a google app on eclipse in python, I got this error.

First jinga2 comes bundled with Google App Engine for Python, so there's no need to go through the painful process of installing it on your machine.

To reference it from your project, add the following under the libraries section in your .yaml file

- name: jinja2
  version: latest


and import jinja2 in your code

Thursday, January 2, 2014

IOError: [Errno 13] file not accessible:

Trying to build a google app on eclipse using python, I got this error while trying to render an html file.

To solve it, put the folder that contains the html in the same folder that contains the yaml file.


Tuesday, December 31, 2013

Google App Engine Launcher - NameError: global name 'execfile' is not defined (Python)

When trying to run the helloworld example, it shows this error:

NameError: global name 'execfile' is not defined

This happens when you have multiple versions of python on your system. The App Engine sets its default to python 3 although it already searched and found python 2.7 on the system before installation!!

Anyway, to solve it, go to Edit -> Preferences and change Python Path to refer to Python 2.7

Sunday, December 22, 2013

Unable to execute dex: java.nio.BufferOverflowException.

When trying to run an android application from eclipse, I got this error

[2013-12-23 07:23:38 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
[2013-12-23 07:23:38 - Spinner] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

To solve it, right click on your project folder -> Android tools -> Add Support Library, and follow through the steps.

Edit: For some projects even this doesn't work and you have to set the target sdk to 19 (the latest as of the time of this post) in both the androidmanifest.xml and project.properties files.

Monday, December 9, 2013

Eclipse - Failed to create the java virtual machine

Running eclipse for the first time, I encountered the problem
"Failed to create the java virtual machine"
and the program didn't run.

There are two place in eclipse.ini that includes
--launcher.XXMaxPermSize
512m
make it
--launcher.XXMaxPermSize
256m

You may need to make the numbers smaller than 256 though, 128 or something and it should work


Saturday, November 9, 2013

Adding Git to Windows Path

This is under Windows 7, but it should work in a similar way for other versions.
  • Right-click on My Computer.
  • Click Advanced System Settings.
  • Click Environment Variables.
  • Under System Variables (or User Variables for ....), select PATH and click edit.
  • Add the following to the end of the line
      ;C:\Program Files\Git\bin;C:\Program Files\Git\cmd
 
This depends of course on where you have installed Git.
Then restart your command-line window.