"Watch TV serial Tamas Online"

Thanks to the indefatigable Arvind Gupta, the TV serial Tamas broadcast by Doordarshan in the late 1980s is now available online. (including some  commercial ads from those days!) Based on a novel by Bhisham Sahni on the partition of India, it hit the TV screens in the backdrop of Babri Masjid- Ramjanmabhoomi imbroglio and brings back memories of some very fine TV serials made at time- Shyam Benegal’s The Discovery of India, Gulzar’s Mirza Ghalib and Arvind N Das’s documentary India Invented based on DD Kosambi’s works. Happily all these are now available at youtube and/or google videos.

Even twenty years after it was broadcast, Tamas still touches a raw nerve and, sad to say, retains the relevance of its core message- the human cost of violence in general and of sectarian violence in particular. The last two decades seem to have been a re- enactment of the partition, this time in slow motion.

The more things change, the more they remain the same.

View part 1 of 5 of the serial at google videos

Link to part 2
Link to Part 3
Link to part 4
Link to part 5

Advertisements
"Watch TV serial Tamas Online"

"Rails 3, mysql and UTF-8"

So, have you started to work with rails 3? Did you realize that your UTF-8 databases doesn’t work nice with mysql? This is because the mysql gem works with ASCII-8BIT encoding, but ruby 1.9 and rails 3 works with UTF-8 encoding, so when you create a model into the database, everything works fine, but when you work with those models, it doesn’t works so nice and you don’t get what you stored.

What’s the solution? Well, there are actually three solutions, the most recommended, use mysql2, in order to do this, edit your Gemfile and include:

gem "mysql2"

and then, edit your databases.yml file, and change the adapter to mysql2

development:
  adapter: mysql2
  database: fun_development
  user: root
  password:
  encoding: utf8

Another solution, is just instead of using the “mysql” gem, use the “ruby-mysql” gem, but it’s pretty slow because it’s a 100% ruby gem.
view plaincopy to clipboardprint?

gem "ruby-mysql"

The last solution is a monkey patch, but its also slow to use it, so I really recommend using the mysql 2 gem view plaincopy to clipboardprint?

require 'mysql'
class Mysql::Result
  def encode(value, encoding = "utf-8")
    String === value ? value.force_encoding(encoding) : value
  end

  def each_utf8(&block)
    each_orig do |row|
      yield row.map {|col| encode(col) }
    end
  end
  alias each_orig each
  alias each each_utf8

  def each_hash_utf8(&block)
    each_hash_orig do |row|
      row.each {|k, v| row[k] = encode(v) }
      yield(row)
    end
  end
  alias each_hash_orig each_hash
  alias each_hash each_hash_utf8
end
"Rails 3, mysql and UTF-8"

"PHP5 – Scripting Language"

PHP is a general-purpose scripting language suited for Web development. The PHP script can be embedded into HTML. This section explains how to install and configure PHP5 in Ubuntu System with Apache2 and MySQL.

This section assumes you have installed and configured Apache 2 Web Server and MySQL Database Server. You can refer to Apache 2 section and MySQL sections in this document to install and configure Apache 2 and MySQL respectively.

Installation

The PHP5 is available in Ubuntu Linux.

  • To install PHP5 you can enter the following command in the terminal prompt:

    sudo apt-get install php5 libapache2-mod-php5
    

    You can run PHP5 scripts from command line. To run PHP5 scripts from command line you should install php5-cli package. To install php5-cli you can enter the following command in the terminal prompt:

    sudo apt-get install php5-cli
    

    You can also execute PHP5 scripts without installing PHP5 Apache module. To accomplish this, you should install php5-cgi package. You can run the following command in a terminal prompt to install php5-cgi package:

    sudo apt-get install php5-cgi
    

    To use MySQL with PHP5 you should install php5-mysql package. To install php5-mysqlyou can enter the following command in the terminal prompt:

    sudo apt-get install php5-mysql
    

    Similarly, to use PostgreSQL with PHP5 you should install php5-pgsql package. To installphp5-pgsql you can enter the following command in the terminal prompt:

    sudo apt-get install php5-pgsql
    

  • Configuration

Once you install PHP5, you can run PHP5 scripts from your web browser. If you have installed php5-cli package, you can run PHP5 scripts from your command prompt.

By default, the Apache 2 Web server is configured to run PHP5 scripts. In other words, the PHP5 module is enabled in Apache2 Web server automatically when you install the module. Please verify if the files /etc/apache2/mods-enabled/php5.conf and /etc/apache2/mods-enabled/php5.load exist. If they do not exists, you can enable the module using a2enmodcommand.

Once you install PHP5 related packages and enabled PHP5 Apache 2 module, you should restart Apache2 Web server to run PHP5 scripts. You can run the following command at a terminal prompt to restart your web server:

sudo /etc/init.d/apache2 restart

Testing

To verify your installation, you can run following PHP5 phpinfo script:

<?php

print_r (phpinfo());
?>

You can save the content in a file phpinfo.php and place it under DocumentRoot directory of Apache2 Web server. When point your browser to http://hostname/phpinfo.php, it would display values of various PHP5 configuration parameters.

"PHP5 – Scripting Language"