Import CSV in MySql Workbench

This is a quick tip on how to import a csv with data into one of your tables.

1º Open MySql Workbench

2º run the following query

On linux:

load data local infile ‘/path/to/your/file.csv’ into table dbName.tableName fields terminated by ‘,’ enclosed by ‘”‘ lines terminated by ‘\n’;

On Windows

load data local infile ‘c:\\path\\to\\your\\file.csv’ into table dbName.tableName fields terminated by ‘,’ enclosed by ‘”‘ lines terminated by ‘\n’;


Download all Build 2014 videos

As you probably should know by now Build 2014 it’s over and it’s time to download the videos.

In this demo I will use MP4 high quality rss feed but it’s the same for other formats.

    class Program
        public static XmlDocument getXMLDocumentFromXMLTemplate(string inURL)
            HttpWebRequest myHttpWebRequest = null;     //Declare an HTTP-specific implementation of the WebRequest class.
            HttpWebResponse myHttpWebResponse = null;   //Declare an HTTP-specific implementation of the WebResponse class
            XmlDocument myXMLDocument = null;           //Declare XMLResponse document
            XmlTextReader myXMLReader = null;           //Declare XMLReader

                //Create Request
                myHttpWebRequest = (HttpWebRequest)HttpWebRequest.Create(inURL);
                myHttpWebRequest.Method = "GET";
                myHttpWebRequest.ContentType = "text/xml; encoding='utf-8'";

                //Get Response
                myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();

                //Now load the XML Document
                myXMLDocument = new XmlDocument();

                //Load response stream into XMLReader
                myXMLReader = new XmlTextReader(myHttpWebResponse.GetResponseStream());
            catch (Exception myException)
                throw new Exception("Error Occurred in AuditAdapter.getXMLDocumentFromXMLTemplate()", myException);
                myHttpWebRequest = null;
                myHttpWebResponse = null;
                myXMLReader = null;
            return myXMLDocument;

        static void Main(string[] args)
            XmlDocument doc = getXMLDocumentFromXMLTemplate("");

            XmlNodeList list = doc.GetElementsByTagName("enclosure");
            StringBuilder sb = new StringBuilder();

            foreach(XmlNode node in list)
                sb.AppendLine("wget " + node.Attributes["url"].Value);

            string str = sb.ToString();
            //save the string to a file

The result will be a string like this:




just save that string to a cmd file and you are ready to download all the videos.


Load Jquery in Chrome developer console

If you for some reason need to load chrome in the developer console and that page doesn’t include Jquery this is what you will need to do:

For http page:

var scriptElem = document.createElement(‘script’);
scriptElem.src = “”;


For https page:

var scriptElem = document.createElement(‘script’);
scriptElem.src = “”;


Now you can start Jquery.



Errors running builder ‘Android Pre Compiler’ on project

If you have this error

Errors running builder ‘Android Pre Compiler’ on project ‘XXX’

Than you might be running ADT 21
This is one possible workaround until the fix
  • Open properties of project in Eclipse
  • Then Resources -> Resource filters. Click the “Add…” button -> Check “Exclude all”, “Files and folders”, “All children”.
  • In the text entry box input “.svn” (without quotes).
  • Restart Eclipse.

Eclipse fix black toolip in Ubuntu 12.04+

After Install Ubuntu 12.04 I’ve realize that in Eclipse tooltips were with a black background. After a little googling I’ve found the solution.

Edit file /usr/share/themes/Ambiance/gtk-2.0/gtkrc
This file is used by theme Ambiance in ubuntu. If you use another theme you will have a diferent file path. Note themes are instaled here /usr/share/themes
After edit this file locate in the first lines:
These are the foreground and background colors of tooltips. Change the color to the values that you like. After a restart you will have the eclipse black tooltip fixed.