Sunday, November 28, 2010

Good Movies on Artificial Intelligence II

In previous post I mentioned some movies on AI. Today I'm adding some more AI movies.


A.I. Artificial Intelligence (2001)

This movie (A.I) is directly related with Artificial Intelligence. An artificially intelligent robot is manufactured which looks exactly like the boy a couple recently lost. However intelligent or alike the robotic agent looks is it is difficult to replace a human child. Consequences follow.

When the notorious real child is found back tragedy starts. Time comes to give this robot back to the manufacturer company for disposal. With uncontrolled emotion of love for this human-looking robot the mother cannot leave the boy for disposal. She leaves the robot boy in a forest. This leads to other interesting stories. But the boy only dreams to get back to her human mother for who his love is never defeated.

To download wallpaper of this movie follow here. View more info on imdb about this movie: http://www.imdb.com/title/tt0212720/


2001: A Space Odyssey (1968)


I’m adding this movie because of its reputation (it is ranked as one of the top 10 movies). The movie is not enjoyable if you don’t understand the central story. But it contains a good theme which is a juxtaposure of human evolution, technology and artificial intelligence. Human evolution part is related with a monolith. Artificial intelligent part is related with HAL computers.

You can find good info about this movie and its plot here. View more info on imdb: http://www.imdb.com/title/tt0062622/

The Matrix (1999)


This is an awesome mind-blowing science fiction movie. A Hacker learns the new definition of reality and when he possesses the control of it, it means he has matrix. With matrix human beings can be programmed according to necessities and can be useful in fighting in the world where they are also real!

Among Matrix trilogy most enjoyable is this one. Matrix has good base story which is very scientific and detailed. View more info on imdb: http://www.imdb.com/title/tt0133093/

The Matrix Reloaded (2003)


It all about saving trinity and destroying Zion. Too dramatic but you will enjoy some special effects! View more info on imdb: http://www.imdb.com/title/tt0234215/


The Matrix Revolutions (2003)




Endhiran (2010)


It is a very good hindi movie that is worth watching. A scientist named Dr. Vasi builds an intelligent robot which resembles his image. The scientific body does not approve the robot. Hence emotion is also integrated into the robot. Then with awesome emotions it falls in love with its creator’s fiancĂ©e Aishwariya Rai! Let’s see how to fix this. :)

View more info on imdb: http://www.imdb.com/title/tt1305797/

Inception (2010)


The movie does not deal with artificially intelligent agents. Rather it deals with scientific theories of subconscious mind. The information can be stolen from a subconscious state of brain when it is at its most vulnerable. It is called extraction. Also ideas can be planted. With subconscious minds it always comes to dreaming. In dreams human agents are more powerful, they work as better agents. That’s the artificial part.

Cobb is the best thief of information extraction. But he has a strong rival in his subconscious world a woman named Mal. Mal will always mess up the plan and cause Cobb to be defeated though once Mal was his love and everything. With all these hard obstacles of subconscious world Cobb has to win in his impossible plan called inception. They have to win fights on minds in a combined shared illusive, beautiful, adventurous subconscious environment.

View info on imdb: http://www.imdb.com/title/tt1375666/


Transformers (2007)



There is a clash between two extra-terrestrial clans which affects existence of earth and beings. A young held teenager possesses all the power and clue who can save the world? Too dramatic! Huh? This one is better than the next of the sequel! View info on imdb: http://www.imdb.com/title/tt0418279/

Transformers: Revenge of the Fallen


View info on imdb about this movie: http://www.imdb.com/title/tt1055369/

I’ve got some more movies. Before adding them I’ll watch them first to make sure if they relate with Artificial Intelligence. Relevant movies will be added on next post. Thanks for visiting.

Thursday, November 11, 2010

How to Disable Deprecation Warning on Visual Studio

Deprecation warnings can really be headache sometimes. But there are ways to disable it. Here I describe one.

To deprecation warnings you have to define _CRT_SECURE_NO_DEPRECATE as true before including any header file. An example code is attached below:

 1 /*******************************************************
 2 *  Problem Name:   Money in the bag
 3 *  Problem ID:    1002
 4 *  Occassion:    Offline Contest CSEDU Easy Volume
 5 *
 6 *  Algorithm:    
 7 *  Special Case:   
 8 *  Judge Status:   Accepted
 9 *  Author:     Saint Atique
10 *  Notes:     
11 *        
12 *******************************************************/
13 
14 #define _CRT_SECURE_NO_DEPRECATE 1
15 //#define _CRT_NONSTDC_NO_DEPRECATE 
16 
17 #include <iostream>
18 #include <cmath>
19 #include <cstring>
20 //#include <new>
21 #include <vector>
22 #include <queue>
23 #include <map>
24 #include <algorithm>
25 #include <iomanip>//for cout formatting
26 #define INF 2147483648
27 #define EPS 1e-8
28 using namespace std;
29 
30 int main() {
31  //freopen("..\\1002_in.txt", "r", stdin);
32  //freopen("..\\1002_out.txt", "w", stdout);
33 
34  double tk_amount[10] = {1000, 500, 100, 50, 20, 10, 5, 2, 1, 0.50};
35  double sum = 0;
36  int i, n;
37 
38  for (i=0; i<10; i++) {
39   cin>>n;
40   sum += n * tk_amount[i];
41  }
42 
43  cout.setf (ios::fixed, ios::floatfield);
44  cout.setf(ios::showpoint);
45  cout<<setprecision(2)<<sum<<" taka"<<endl;
46 
47  //fclose(stdin);
48  //fclose(stdout);
49  return 0;
50 }

How to Set Precision in C++

Programmers who use C++ for problem solving may need to set precision before printing floating numbers in standard output.

To display a floating number value of variable result with precision 2 (equivalent to .%2lf in scanf) use following code:
 1  cout.setf (ios::fixed, ios::floatfield);
 2  cout.setf(ios::showpoint);
 3  cout<<setprecision(2)<<result<<endl;

Here’s an example code used to solve a problem in easy volume section.

 1 /*******************************************************
 2 *  Problem Name:   Money in the bag
 3 *  Problem ID:    1002
 4 *  Occassion:    Offline Contest CSEDU Easy Volume
 5 *
 6 *  Algorithm:    
 7 *  Special Case:   
 8 *  Judge Status:   Accepted
 9 *  Author:     Saint Atique
10 *  Notes:     
11 *        
12 *******************************************************/
13 
14 #define _CRT_SECURE_NO_DEPRECATE 1
15 //#define _CRT_NONSTDC_NO_DEPRECATE 
16 
17 #include <iostream>
18 #include <cmath>
19 #include <cstring>
20 //#include <new>
21 #include <vector>
22 #include <queue>
23 #include <map>
24 #include <algorithm>
25 #include <iomanip>//for cout formatting
26 #define INF 2147483648
27 #define EPS 1e-8
28 using namespace std;
29 
30 int main() {
31  //freopen("..\\1002_in.txt", "r", stdin);
32  //freopen("..\\1002_out.txt", "w", stdout);
33 
34  double tk_amount[10] = {1000, 500, 100, 50, 20, 10, 5, 2, 1, 0.50};
35  double sum = 0;
36  int i, n;
37 
38  for (i=0; i<10; i++) {
39   cin>>n;
40   sum += n * tk_amount[i];
41  }
42 
43  cout.setf (ios::fixed, ios::floatfield);
44  cout.setf(ios::showpoint);
45  cout<<setprecision(2)<<sum<<" taka"<<endl;
46 
47  //fclose(stdin);
48  //fclose(stdout);
49  return 0;
50 }

Wednesday, November 10, 2010

How to change Document Root on WAMP

In this post we discuss how to change the www folder in apache based software wamp, which stands for Windows Apache, MySQL, PHP.

By default wamp’s www folder is C: \wamp\www. It means if you put a file on that folder for example test.html and enter address like this,
     http://localhost/test.html

on the browser it will fetch your test.html page.

To change the default www folder we need to change the configuration file of apache which is httpd.conf (httpd stands for http daemon). Follow the steps given below:

  • Browse to the directory C:\Program Files\wamp\bin\apache\Apache2.2.11\conf




  • Open the file using a text editor i.e. notepad or notepad++ etc.
  • Search for the text ‘DocumentRoot’. You will see a line like this in the search result:
              DocumentRoot "C:/wamp/www"

  • Edit this line to your preferred directory where your web page files are stored. For example, D:\web
              DocumentRoot "D:/web/"

  • Again search for text ‘<Directory’
    On the second result you will see a line like this one:
              <Directory "C:/wamp/www/">

    You will have to change this one too.
              <Directory "D:/web/">

  • Now clicking wamp icon on the system tray restart all services.

Changes will take into effect soon after you refresh localhost pages.