Wednesday, August 2, 2017

1017 Public Sector Road Transport Corporations in India can sell Advance Bulk Coupon Books of Tickets to increase their Occupancy Ratio


We have seen how Private Airlines in INdia, like KingFisher (More are to follow in getting broken), have not only junked themselves, but have also caused rot in the Indian Public Sector Carriers Air India and Indian Airlines. Similar junking is going to take place in Telecom Sector, and Public Sector BSNL too is going to fall prey to the poaching by Private Sector wallahs like AirTel and Reliance (both blame one another). When it comes to Public Sector State Road Transport Corporations, we have seen how a Private Travel by name Kesineni Travels, and another named Divakar Travels (These are only two. There are numerous other Private Sector Travel Fellows) have through their unhealthy cut-throat-competitive practices have caused incalculable losses to Andhra Pradesh State Road Transport Corporation. This type of State of Affairs of Private Travels making Public Sector Road Transport Corporations is not limited only to Andhra Pradesh and Telangana, and not only to States in India. It is a Universal Practice. It should be for the people of the respective countries and States to oppose such unhealthy practices and save their Roadway Corporations, Railways, Airlines from further bankruptcies and frenzies of Privatisations by the respective Governments.

Our Readers may know that the United Andhra Pradesh State Road Transport Corporation, Hyderabad, used to be for sometime the largest in the World, in terms of Fleet of Buses. The number of Bus Stations it owned and operated at its expense sans any additional charge to passengers, with good facilities to passengers, though may not be upto European or North American Standards, also used to be very large in the world, probably the largest number.

A.P.S.R.T.C has reduced its basic minimum ticket price from Rs. 7 to Rs.5/-


The reduction in price, the Corporation has attributed to the problem of getting small change. Well, we need not find fault with RTC for their decision. They have their own set of field level operational problems. It will also help the APSRTC to improve its Occupancy Ratios, and overcome competition from Autos, Private Buses and Minibuses,

APSRTC and other State RTCs should introduce sale of bulk advance coupon ticket books with counterfoils


While travelling in APSRTC Buses, I have come across many times, passengers giving Rs. 500/- or Rs. 2,000/- notes to Conductors, for buying tickets. The Passengers too have their own set of problems. In India, in Andhra Pradesh digital transactions have not yet picked up. Besides, for low value transactions like purchase of short distance bus tickets, digital transactions are neither convenient nor economical. One suggestion which I can give, is sale of advance ticket coupon books containing 30 / 60 / 100 tickets.

In India, usually, salaries and wages are paid on monthly basis, except in case of agricultural laborers. Whether monthly wages are paid, or daily/weekly wages are paid, people commute to their work places daily. That means every month they will be buying (after deducting 4 Sundays, and some holidays), 25 days x 2 (to and fro) = 50 tickets every month. Many such commuters may not hesitate to purchase bulk ticket books of 30, 50, 60, 100 numbers.

I have given above a simple model of ticket books which can be sold with counterfoils. These tickets may be sold with some discount of say from 3 to 10% as an incentive.

How advance ticket book method will be better than the Cat Cards which APSRTC is issuing at present


Ans: Cat CArds have not solved the problem of the card holders buying their journey tickets in buses. Cat Cards only dealt with the Incentive Problem. Cat card holders also have to give sufficient cash and change to conductors towards fare.

Advance Tickets must be printed on quality security paper with water marks, bar codes, embossed marks etc. etc. to prevent counterfeiting.

How they can be used: Before or immediately boarding the bus, the passenger should write on the ticket in his bulk ticket book, the place where he boarded the bus. Where the passenger is illiterate, he-she can take help from co-passengers. He-she should keep the ticket ready for handing over to conductor, instead of cash.

When a conductor approaches a passenger for ticket, the passenger will give the ticketand retain the counterfoil in the book with him/herself. Conductor will with his ball pen initial on the counterfoil. The Counterfoil book will serve as proof for the passenger. (This procedure of conductor's initialling can be discontinued, if there are no disputes about delivery of tickets.

In case any Traffic Inspectors / Ticket checking flying squads board the bus and carryout a surprise check on passengers, the passengers can show their counterfoil books.

Till bulk advance ticket book sales system becomes popular, existing system of Cash sales of that day's tickets in buses may be continued.

Conductors at the end of the day, submit all the advance tickets collected from passengers, as equivalent of cash, to the Depot Cash Office. They can check the genuineness of tickets on random basis, using some bar code machines, Ultra Violet Ray Machines, and other specially made machines for the purpose. Adhar Numbers on the tickets can also help in tracing out the Passenger's name and address, where needed.

If any counterfeit tickets are encountered, conductors can be given precautions for nabbing the culprits. Where counterfeiting is found to be rampant, conductors can also be given hand-instruments to carry out random checks of tickets, in case of doubts.

The tickets need not be route-specific. But they can be Depot Specific, Region Specific, Zone Specific. In long distance routes, people do not normally travel daily or frequently. Hence advance ticket books will not be popular in long distance routes. The books will be useful only for short distance routes, that means the ticket book issue, and the ticket book usage will often be in the same Depot Area or in the same Region or Zone. That means, verification of genuineness of tickets will be easy at local area levels. If necessary, APSRTC can have a Computer Network (its own dedicated network, or a network linked through Internet), for verifying the genuineness of the Advance Ticket Books, by typing ticket number or book number.

Validity period of the Advance Ticket Books


Normal validity can be: Left over period of current calender year + Forthcoming one calender year. Example: A ticket sold on 1st Dec. 2017 will be valid upto 31st Dec. 2018. A ticket sold on 2nd Jan 2017 will also be valid upto 31st Dec. 2018.

To come back and continue adding / deleting / modifying.

Tuesday, August 1, 2017

1016 PHP Script to work as front end for using Gladius db for flat database files


First, I apologise to my Readers for the interregnum (time gap which has taken place, since the last post No. 1015 here). Reason: I was designing and experimenting with a php script, to use as a front end for Gladius database, which is written in pure PHP. It is based on flat-database files. They are portable in the sense that each database is stored in the form of a folder, and tables are stored in the form of files in the respective database folders. This, we can see, is in contrast to traditional database packages like sqlite, mysql, postgresql, the databases and tables relating to which, we cannot see as separate files. Besides, all the three principal traditional databases sqlite, mysql, postgresql, need installation. They, themselves, do not provide gui-s (graphic user interfaces) for carrying out data entry operations. We have to use third party tools for data entry, or alternatively use command-line. Of course, mysql and postgresql facilitate multi-user environment, admin, user creation, user rights, passwords, 'connect' using the user names and passwords. From the security point of view both mysql and postgresql score high. Though, not using usernames, passwords, etc. may pose security risks, certain type of databases and tables do not require much of security. The information they contain may be of innocuous public opensource type, where secrecy and security are not important. Gladius DB will be of good utility in such situations, because the hastles of getting connected through usernames and passwords can be avoided.

First, I present below a PHP script for creating and using Gladius Databases and tables. After that, I shall list out some precautions and pre-requsites for effective of use of Gladius, and this PHP script.

Most PHP Scripts are portable and platform independent.


That means, they can be used on all the OSes including Windows, Linux all flavours, Mac., etc. They can also be stored on USB pen drives, and transferred from one machine to another machine. But, there is one word of caution: .PHP files can be tested and worked with, off-line only when there are properly configured Apache2 Server (or some other equivalent server), and PHP (in case of Gladius php5 version or later). At present, I use Ubuntu 15.04 and 16.04 versions. In the earlier versions such as Ubuntu 10.04, 10.10, 11.04, 12.04 etc. there was greater freedom in the sense that any folder can be designated as 'DocumntRoot' or public_html or 127.0.0.1 or localhost. In Ubuntu 15.04 and 16.04 more security restrictions have come. Consequently, we cab designate only a particular folder such as 'Public' as DocumentRoot and local host for the Apache2 Server and the PHP files. Significant number of threads are available on the internet for troubleshooting problems in designating localhost (127.0.0.1), in the place of folders like var/www which require use of Admin/Root Passwords. Once Apache and PHP are appropriately configured, working with PHP becomes very easy, flexible and rewarding.

Creating databases and tables by PHP and Gladius DB

Creating databases and tables in Gladius folder requires user permissions and accesses for 'Create and Delete iles', 'Read and Write' for files. In respect of files created by PHP and Gladius, the owner of the files will be 'www-data', and not the user of the machine.

Link to Gladius DB


Click here to go https://sourceforge.net/projects/gladius/- for a download.

The Gladius is available as a zip file. After downloading, we have to unzip it in a folder which has been designated as folder for DocumentRoot / localhost / 127.0.0.1. Then only, php will work. We have to make sure that all access create, delete, read, write rights are given to the folders and files. It may also be necessary to read about the Disclaimers of the Gladius Creators, and licensing restrictions. Though it is free and open-source, we cannot use for commercial purposes. Those Readers who are interested in reading the source files can also read them, by opening the php files in a text editor.

Apparently, there is no GUI in the above downloaded zip file, for creating Gladius db databases, and tables.

I am also unable to trace any sample databases and tables. The database name 'myshop' I seen in the above screenshot, I got from one website. Link: . Whatever be the name, we have to create the databases, and tables. I believe our php script presented here below, can serve the purpose.


Very important


Because of conflict with blogger 'textarea' in the above script, I have used '&lessthan ;' before '<' and '&greaterthan ;' before '>' before and after the word textarea in the above script. Pl. correct all the '&lessthan ;' as '<' and all '&greaterthan ;' as '>' after you paste the above script in a text editor, and saving as a .php file. This problem is a blogger-editor problem, which I tried to overcome in a roundabout way.

Some deficiencies in the above php script designed by me


1. I have not followed standard naming conventions.
2. Creation of the first table in a new database is not working properly. First table may have to be created using a simpler php file, which I shall present in another future port shortly. Creation of 'second table' onwards I did not observe any problem.

More suggestions in the next blog post.

To come back, and continue adding / deleting / modifying. सशेष. ఇంకా ఉంది.

Wednesday, July 19, 2017

1015 Atheism cannot be imposed. People have to learn it on their own.


Trigger for this particular blog post: Chinese Communist Party has warned its members not to embrace Religion. Relative news link: Click here to go to : http://www.hindustantimes.com/world-news/lose-religion-or-face-censure-top-china-official-tells-communist-party-members/story-qm7FlsQ3h1f2omIQKra7nK.html. We know that China is a tyrannical Nation, with Totalitarianism. We also know that Religions tend to be dogmatic and imposing. Atheism is supposed to be an antidote for Rligions. That means, Atheism should not suffer from the same weaknesses, which the Religions have been suffering since Centuries.

Some quotes from the above news link for analyses:

"...We must resolutely guard against overseas infiltrations via religious means and prevent ideological infringement by extremists. ..."

Some foreign forces have used religion to infiltrate China, and extremism and illegal religious activities are spreading in some places, which have threatened national security and social stability.

Religions should be sinicised…We should guide religious groups and individuals with socialist core values and excellent traditional Chinese culture and support religious groups to dig into their doctrines to find parts that are beneficial to social harmony and development.

"...Under China’s Constitution, citizens have the liberty to follow a religion of choice but in reality, the freedom of religion is severely curtailed. ..."

"...China is officially an atheist country but the CPC-run government recognises five religions: Buddhism, Islam, Taoism, Protestantism and Catholicism. ..."

"...Officials who have religious faith should be persuaded to give it up, and those who resist would be punished by the Party organisation. ..."

"... Party members should not have religious beliefs, which is a red line for all members…Party members should be firm Marxist atheists, obey Party rules and stick to the Party's faith…they are not allowed to seek value and belief in religion. ..."




ybrao-a-donkey's views, not intended to be imposed on others

China's hyocrisy, we can easily identify. It has no ideologies. It had no ideologies, even during Mao Je Dong's rein.

This review is incomplete. I shall discuss it in depth, shortly, of course, if I live.