26 May

Men in Black-3 (MiB-3) – Xtreme Movie Review

man in black-3

“I just learned that Agent K has been assassinated by Boris from future, an alien criminal in 1969. I must travel through a time and stop him and save young Agent K. And I have only 24 hours to do the stuff and return home safely!! ”

O Yeah!! Will Smith Just told me the base line script of MIB-3 and that’s what the movie is all about. But that’s not the end, for MIB lovers the movie has got much more to offer.

men in black-3

It took 10 years for Men In Black to get along for MIB-3 but finally Will Smith AKA Agent J is back with good touch of comedy, well written sci-fi story and action movie. What the movie doesn’t yet show in demo videos is the creepy and “yuk” moments that girls and kids may not enjoy. I enjoyed it though 🙂

If you’re looking for a quick notes to “Go for MIB-3 or not”, here are the points:
– You’re a fan of Will and/or MIB, you ought to watch this.
– You’re a fan of sci-fi type movies, this one is right for you.
– You haven’t seen MIB-1 and MIB-2, you can still go for MIB-3. Just read the following 2 points and go for it.
1. Neurolyzer: A device that erases your memory to the preset time on it.
2. Agent J is Will Smith and Agent K is his partner to tackle the aliens and protect earth.

Now, When there is a Will, there is Smith.
🙂 What I took from the movie is Jokes, a lot of funny and comedy dialogue sequences that keep your lips in a “smiled” position.

Jokes apart; The movie starts with Boris (played nicely by Jemaine Clement), an alien escaping from the prison of moon. Boris aims to time travel to 1969 to assassinate Agent K, the time when Agent K had captured him and chopped his hand off.

I got surprised to see Nicole, the PCD girl, taking a small but creepy and funny role being lover of Boris and helping him escape from the Moon-Jail, with no more than 2 dialogues! Anyways the story continues…

During the regular life Agent J notices that everything has changed suddenly and he couldn’t find his partner Agent K. Agent J learns that Agent K has been already dead in a complex story sequence and decides to go to past 1969 to stop the Future Boris to kill Past Agent K and stop changing the history. Yep that’s MIB-3 🙂

The way Will (Agent J) travels through time is a great animation and movie sequence when he jumps from Chrysler building. In past times Agent K has to put some security gadget on Apollo 11 to secure earth from the attack of Boris-kind-of-aliens while Boris from Future and Boris from Past try to stop Past Agent K.

Bike lovers ‘d like the bike of Boris from future.

The past involves Griffin, another alien who has a gift of seeing future, who actually provides the security gadget to Agent K. Another important character is a security-officer who helps Agent J & K to pass through security for the Apollo 11 and helps him in installing the gadget. That’s where Will (Agent J) learns about his past.
Anyways, Agent J and K successfully install the security gadget and kill both Boris from Future and Past – the happy sci-fi ending.

Alice Eve plays the young Agent O and looks beautiful, a good reason for Agent K to fall in love 🙂
I saw it in Hindi and here are a few really catchy dialogues from MIB-3:

Agent K to Agent J: Tumhari salary itni nahi hai ki tum ye kaam kar sako.

Agent K to Agent J: Ye ek raaz hai jo kum salary walon ko nahi bataya jata.

Agent K to Agent J: Uski biwi ne muze jala hua khana khilaya tha fir bhi wo mera dost hai.

A few I found from script which are better fun in English:
Agent J: You gotta send me back to 1969…
Alien: First, we gotta get high.
Agent J: My man, for real!
Alien: No, I mean really high.

The movie runs for approx 1.30 hour and never bores you even for a minute. The script is well written with constant witty dialogues and comedy sequences and well directed with good animation.
I saw it in 2D and watching it in 3D’d have made it creepier and nicer 🙂
It’s full of fun and time-pass entertainment. Go watch it, you won’t be disappointed.
Let me know what do you think about the movie too 🙂

Here is an official trailer for you:

03 May

Load columnar text file into MySQL table

Ever come accoss a situation where you have to load a flat text file into MySQL with data provided in single column!
Say, your data to be loaded in table looks something like this:

Street Name
City, MyState 8582
Another Street 2
New City, NWSTATE 8582

So how’d you go about loading a text file into MySQL where field values are given in a single column!!
In the above sample, data has fields like company-name, address-1, address-2 and phone given in a text file line by line.
Ofcourse you can write a piece of code in your choice of language: perl, shell, python…
But can you do this by sheer power of MySQL by using some commands or functions only?

Well, normally you will have to have a script for such data to be inserted into database. We always prefer the raw data / text file in the csv / tab separated (columns) file(s), which you can directly load to MySQL table as explained in my previous article: http://kedar.nitty-witty.com/blog/load-delimited-data-csv-excel-into-mysql-server

But that’s not the case here. And hence I have a workaround to share. With little more efforts you can also automate / scriptize this. [ I’m feeling bit lazy now. 😉 ]

Follow these steps:
– Save above data in a file [say c:/main.txt considering windows]
– Connect to MySQL through commad prompt

– Create a main table to load all data to process later.

drop table if exists main; create table main ( id integer not null auto_increment primary key,alldata varchar(100), type int );

– Load data to MySQL table:

load data local infile 'C:/mainfile.txt' into table main lines terminated by '\r\n' (alldata) set id=null;
set @var=0;update main set type=if(id mod 4 = 1,@var:=@var+1,@var);

– Create table as per your requirement:

create table company_details (
company varchar(100),
street varchar(100),
citystatezip varchar(100),
phone varchar(100) );

– Generate insert statement:

select concat("insert into company_details (company,street,citystatezip,phone) values (", my_values, ");") from (select group_concat('"',alldata,'"') my_values from main group by type) X;

you may alternatively redirect this data to a txt file and load it back to mysql!

put above query in sql :
mysql -uroot -ppassword database < generate_insert_query.sql > inserts.sql

Finally load thus generated inserts to MySQL database table.
mysql -uroot -ppassword database < inserts.sql

I hope this helps many.

-- Kedar Vaijanapurkar --