Monday, August 22, 2011

Android Emulator is not starting showing " invalid command-line parameter"

I was updating my Android/Google Eclipse environment because I wanted to try the new GPE beta which comes with lots of cool new things. I also took the opportunity to update my Eclipse to Indigo. In summary I updated everything, I like to be up to date on these things :)

Anyways, after installing a configuring everything I was ready to launch the emulator but it wouldn't start at all. It was giving me always the same error:


As it turns out Android SDK R12 has this bug that if the path has spaces, it won't locate it. As I have to work in Windows I placed my SDK inside C:/Program Files/Android . So that was causing my emulator to fail every time I was trying.



They are fixing this issue but you can work around it by using C:/PROGRA~1/Android. If you are using 64 bit, you can use C:/PROGRA~2/Android . Or you can just simple install the SDK in a location without spaces.



These are some tricks you get to learn when you work and try new things. Most of the times we think it is a miss-configuration or something wrong with the installation and we spend a lot of time installing and configuring everything again, but sometimes you just need to do some research. I like to find and document these kind of issues because that way you help others and also yourself since the next time you need to upgrade your development environment you just can look at your notes.

Hope it helps someone, happy coding :)

Sunday, August 14, 2011

How to Configure VLC Remote

I quit cable almost 2 years ago and to be honest I have not regretted it at all but that is another history. Today I am going to talk about how to install and configure VLC remote so you can control VLC from your Android device like a remote control.

I use VLC a lot to watch series and I mean it a lot!!!! and I like to do it from the comfort of my sofa, desktop chair or bed.

So, the first thing you need to do is to install VLC remote in your android device. It woks on cellphones and tablets just the same, I use it in my tablet though  :)

In your computer you need to  install VLC and  do the next steps to configure to work with your device:

1.- Open the preferences window.


2.- Select the show all radio button.

3.- The go to Interface->Main Interfaces and check the enable the built in web server.


If you want to configure more options like port, ssl, etc, you can select HTTP node under Main Interfaces.


4.- Edit the host files and add your IP address to the file. One advice, configure your router to assign the IP to your computer otherwise you will need to edit this file every time your computer changes IP.



5.- You can test the configuration by opening a web browser and write http://server_ip_address:8080/ and you should see something like this


Finally, start the VLC Remote in your device and you should see your server running, connect to it and you are ready to do control your VLC as if you were in your computer. You can add videos to your queue, remove, clear playlist, access computer folders, pretty much everything.

One bug I found and I also reported is that if the you are trying to play has a ' , the player won't play it. It seems it is a character encoding issue but the developer was really fast to answer to it and the only workaround now is to edit the file and remove the ' . The project is hosted in googlecode and you can find more information about this configuration in its wiki.. It also shows how to start VLC server from command line.

You can find a lot more VLC configurations here. I did not know it was so powerful.

Now to time to watch some The Big Bang Theory and That 70's Show episodes :)

Tuesday, August 9, 2011

Importing length fixed data in Oracle

These days I have been working a lot with Oracle, usually I have to deal with MS SQL Server, Oracle, MySQL and PostgreSQL so sometimes I get confused and sometimes I missed functionality from other DB engines. Anyways, this time I want to show how to import huge amount of data using sqlldr.

Explain sqlldr in one post is impossible so I will just focus in one part. When you import data usually you get a nice formatted csv file, you know, coma separated or something like that, but what do you do when you just get a huge amount of text?, no comma, tab, quotes separated, nothing! well, if you have the table structure information (the size of each column), you can use sqlldr and specify the size of each column in the control file and sqlldr will load each column based on that.

This is how you need to write in your control file:
LOAD DATA
  INFILE filename.dat
  APPEND
  INTO TABLE coredata
  (
Column1    POSITION(1:12) CHAR,
Column2    POSITION(13:204) CHAR
)

Couple of things to remark:
position[start pont:end point]
I made the mistake to think that the second value was the length of the column, which is wrong is the end of the column which I do not like since it woukd be better to just give the start point and the length. You need to calculate that for each column. I know it is just adding all the time but still I would rather put the length instead of the end point.

infile:[filename.dat]
You can add multiple lines like this to import multiple files in one execution instead of changing the name for every file and execution.

For example, if you add:
OPTIONS (SKIP=1, LOAD=10, ERRORS=5)
at the beginning it will skip 1 row, load just 10 rows and limit to 5 errors.

Once you have that you only need to execute it using sqlldr like this:
sqlldr username/password loader=loader.ctl
Sqlldr is an amazing tool if you need to import huge amounts of data. I really recommend it. It has the best performance comparing other options and it supports tons of configurations like, importing multiple files at once, or import to a different tables, you can manipulate the data while it inserts, parallel processing, append or replace data, skip rows, limit the rows inserted. It is a huge list so you should really look into it.

Hope it helps someone, happy coding :)

Wednesday, August 3, 2011

I am back!!

More than 2 months!!! but I have a really good excuse. My son was born last June 9th and that changed my life incredible :) I am so happy that is difficult to describe this feeling, it is amazing. I can't believe I am a daddy :)

My kid replaced my programming nights and computer addiction, but I will try to make time to keep writing here and also in my personal blog which is not as geek as this one ;) although it is in Spanish :)

Meanwhile, I left this cute video which gave a great idea which I am doing it with my little baby :)

Enjoy it! :)

Wednesday, June 1, 2011

Be the First to get a ChromeBook

It seems this morning some of the CR-48 pilot members got an email from the Chrome Team announcing the Samsung Chromebook and offering us one of them before the official launch day which is going to be June 15th.

This limited offer comes with a limited edition custom fit Chrome sleeve designed by Rickshaw. They partnered with Gilt to sell these Chromebooks before they go to the market. This is an invite only offer and I am willing to share with whoever wants a Chromebook :) I already have a CR-48 and I can't afford another gadget, at least for now ;)

Samsung Chromebook invite :)


So who wants these new Samsung Chromebook :)

Saturday, May 28, 2011

How to run Chrome OS in a Virtul Machine

I was one of the few ones who got chosen by Google to test their Chrome Notebook a.k.a CR-48 since then I have been using it everyday to read news, checking my email, writing posts and almost everything I can sometimes I even use ssh to connect to my Ubuntu server and write some code.
my CR-48 :)
Also, since I got it a lot of friends keep asking me how is the experience and if there is a way to install it on a PC or running it on a Virtual Machine. Unfortunately the only way to installing is by compiling the source code and building it by yourself. All the instructions are in the Chromium OS developer page which is the open source project for Chrome. Even worse you will need a 64 bit Linux system better if it is Ubuntu 10.04 flavor in order to do it .

Searching around I found this page which provides  Chrome OS images for VMWare, Virtual Box and USB. According to author, every day around 6 pm GTM it automatically downloads the code and compiles it into images so everyone can try them. These are Canary images so for sure they are going to be very unstable and with a lot of bugs and crashes but if you wan to play around with Chrome OS, this is will fit your needs just fine.
Starting the VM :)
The performance is not the same as the real Chrome OS and mainly it is because of 2 things:
First, Chrome OS is optimized for Solid State Drives (SSD).
Second, You won't be able to have graphical acceleration since you are running on a virtual machine.

Signing into my account
Besides these 2 points the experience is pretty much the same. I am running my CR-48 on dev mode and it is also unstable and it crashes depending on the update, some are pretty stable while others are really really buggy and with a lot of crashes and sometimes applications and extensions won't work properly but that is the price if you want to test and use the latest version.
Running Chrome OS :)
Either way, Chrome OS powered notebooks are coming this June so if you have some extra bucks yo can get a brand new one pretty soon :)
Chrome OS powered NoteBooks
So as a weekend project you can download the image you like the best and play around with Chrome OS :)