All posts by Ruturaj Vartak

Gwalior Sur

Woh Nayi sadak ka sama, woh Brijwasi ki chaat,
Woh monica ki ice cream, Wah usme thi kuch baat.
Woh pandit sweet ki mithai, woh ICH ka dosa,
Woh srinath ki pav bhaji aur Jain ka samosa.

Woh tempu ka saffer, woh phool bag ki hawa,
Woh Maheshwari Park ki raunak aur Laxmi bai colony ka sama.
Woh January ki kadake ki sardi, woh baarishon ke mahiney,
Woh garmi ki chuttiyan, jab chute te they paseeney.

Woh holi ki masti, woh doston ki toli,
Woh diwali ke patakhe aur janmashtmi ki roli
Woh Kila gate ki patange aur woh Cricket ka khel,
Woh ghar ki chat pe Cricket aur colony ke ladkon ka chaurahe pe mail.

Woh padav ka mahol, Woh chambal ghati se ati thandi leheren
Woh Sarafa ka nazara, Wah uske kya kehene.
Woh Loha mandi ki galiyan , woh KRG ki ladkiyan.
Woh Roxy ki balcony aur woh Agarwal ki pooriyan

Woh school ki life aur woh College ki Zindagi,
Woh MITS ka rasta aur woh Canteen ki patties
Woh College ki kudiyan aur GH ke saamne mel
Humne bhi bas dekhe hi thei wo saare khel.

Woh Nazar bagh ki market, wo highway ke dhabe
Woh poorane Gwalior ki raaste ,jahan humne safar hain kaate.
Wo chauraha , wo Railway station………

Itna sab keh diya par dil kehta hai aur bhi kuch kahoon
Wo shehar hain mera apna, jiska naam hai Gwalior

From Madhur’s College Group box

History of Gwalior I

Gwalior under the Sindhia

In 1760 it was garrisoned by the Maratha leader Sindhia, from whom it was wrested in 1780 by the forces of the British East India Company, and to whom it was finally restored by the British in 1886.

Under the British Raj, the Sindhia ruled a large princely state with its capital at Gwalior. The state consisted of two well-defined parts, which may roughly be called the northern and the southern. The former was a compact mass of territory, bounded north and northwest by the Chambal River, which separated it from the British districts of Agra and Etawah, and the princely states of Dholpur, Karauli and Jaipur of Rajputana; on the east by the British districts of Jalaun, Jhansi, Lalitpur and Saugor; on the south by the princely states of Bhopal, Tonk, Khilchipur and Rajgarh; and on the west those of Jhalawar, Tonk and Kota of Rajputana. The southern, or Malwa, portion was made up of detached or semi-detached districts, between which are interposed parts of other princely states, which again were mixed up with each other in bewildering intricacy. The two portions together had a total area of 25,041 sq. mi. and a population of 2,933,001 in 1901.

The chief products were wheat, millets, pulses of various kinds, maize, rice, linseed and other oil-seeds; poppy, yielding the Malwa opium; sugar-cane, cotton, tobacco, indigo, garlic, turmeric and ginger. In the first decade of the twentieth century about 60% of the population of Gwalior state were employed in agricultural and only 15% in industrial occupations, the great majority of the latter being home workers. There was a leather factory at Morar; cotton-presses at Morena, Baghana and Ujjain; ginning factories at Agar, Nalkhera, Shajapur and Sonkach; and a cotton-mill at Ujjain. 55,000 persons were engaged in the cotton industry at the time of the 1901 census.

The population was composed of many elements, among which Brahmins and Rajputs were specially numerous. The prevailing religion was Hinduism, 84% of the people being Hindus and only 6% Muslims. The revenue of the state was about one million sterling; and large reserves had been accumulated, from which two millions were lent to the government of India in 1889, and later on another million for the construction of the Gwalior-Agra and Indore-Neemuch railways. Gwalior state built its own railways, including a branch from Bina on the Indian Midland to Guna; an extension of this line to Baran, which opened in 1899; from Bhopal to Ujjain; and two light railways, from Gwalior to Shivpuri and Gwalior to Bhind, which were opened by the viceroy in November 1899. On the same occasion the viceroy opened the Victoria College, founded to commemorate the Diamond Jubilee; and the Memorial Hospital, built in memory of the Maharaja’s father. British currency had been introduced. The state maintained three regiments of Imperial Service cavalry, two battalions of infantry and a transport corps.

[edit]
– Neelesh Karkare

After Indian independence
Upon India’s independence in 1947, the Sindhia Maharaja of Gwalior acceded to India, and Gwalior, together with the 24 other princely states in the western half of the Central India Agency, formed the new state of Madhya Bharat. Gwalior was the winter capital of the new state, and Indore was the summer capital. In 1956, Madhya Bharat and the neighboring states of Vindhya Pradesh and Bhopal were merged into Madhya Pradesh state, with the new capital at Bhopal. The Scindia family has been active in national politics.

Neelesh Karkare,
Gwalior
M.P.
INDIA

Papa Kehte Hain

This entry is part 7 of 41 in the series Guitar

This is the famous hindi song, It has a standard and a wonderful strumming pattern that one must know.

Key Signature: C Major Scale
Time Signature: 4/4

| C | Am | F | G | x2
| C | % | Am | % | F | % | G | % |

The “x2” play the whole line twice
The “%” symbol means that play the chord twice.

Rhythm (Strumming Pattern)

1&  2&  3&  4&
?   ?V rest V?V

So it goes like
Down, Down-Up, Rest, Up-Down-Up…Down, Down-Up, Rest, Up-Down-Up…and on…

Happy Birthday

This entry is part 6 of 41 in the series Guitar

The first song that you’ll ever learn in your life is Happy Birthday. So we too will start with it.

Key Signature: C Major Scale
Time Signature: 3/4
Count: 3 counts in a bar | 1& 2& 3& |

Melody (Tabs)

E||-----------------|-----------------|-----------------|
B||-----------------|-------1----0----|-----------------|
G||--0----0----2----|--0--------------|--0----0----2----|
D||-----------------|-----------------|-----------------|
A||-----------------|-----------------|-----------------|
E||-----------------|-----------------|-----------------|

-----------------|------------3----|--0--------------|
-------3----1----|-----------------|-------1----0----|
--0--------------|--0----0---------|-----------------|
-----------------|-----------------|-----------------|
-----------------|-----------------|-----------------|
-----------------|-----------------|-----------------|

-------1----1----|--0--------------|-------||
-----------------|-------1----3----|--1----||
--2--------------|-----------------|-------||
-----------------|-----------------|-------||
-----------------|-----------------|-------||
-----------------|-----------------|-------||

Play all the strokes downwards, when you are doing it for the first time, Get the feel of the song. Once you are OK with it you can do that with alternate strokes.

Chords

| C  | G7 |
| G7 | C  |
| C  | F  |
| C C G7 | C |

Rhythm

1& 2& 3&
?  ?v ?

The “?” indicates a downstroke (strum) and the “V” indicates an upward strum.
So it goes Down, Down-Up, Down…Down, Down-Up, Down… and so on…
The last sequence is
Down(C chord), Down(C) – Up(G7), Down(C)

Songs

This entry is part 4 of 41 in the series Guitar

Over here I’ll be putting all the songs that I learned during my course.
The songs range from easy to difficult level (at least for me)

  • Happy Birthday
  • Wonderful Tonight
  • Nothing Else Matters
  • and more…


The songs are also the part of the diary, I’ll be hyperlinking all the course, to the particular song that I learnt after a particular lesson

Updating statistics table

We have our array of keywords, with its hit count.
Now is the time to update our Statistics table, keyword_search_stats and search_engine_stats

<?php
echo '<pre>';
//print_r($query_term);
//print_r($query_term_cnt);
//print_r($final);

Run a loop, searching through keyword_search_stats, if the keyword is present.
If it is present, update the hit counter by 1.
If no record is found, then insert the new keyword

for ($i=0; $i<count($final); $i++)
{
    $sql_chk = "select * from keyword_search_stats where keyword = '{$final[$i][0]}'";
    $res_chk = mysql_query($sql_chk);
    if (mysql_num_rows($res_chk) > 0) {
        // row found .... update stats...
        $row_chk = mysql_fetch_object($res_chk);
        $new_count = $row_chk->keyword_count + 1;

        $sql_update = "update keyword_search_stats set keyword_count = $new_count, `update` = '".date("Y-m-d H:i:s")."' where keyword = '{$row_chk->keyword}'";
        mysql_query($sql_update);
    } else {
        // no row found... insert...
        echo ($final[$i][0] .' - ' . $final[$i][1]);
        $sql_ins = "insert into keyword_search_stats(keyword, keyword_count, `update`) values ('{$final[$i][0]}', {$final[$i][1]}, '".date("Y-m-d H:i:s")."')";
        mysql_query($sql_ins);
        echo ('<br/>');
    }
}

print_r($se_cnt);

Update the Search Engine’s statistics

foreach ($se_cnt as $key => $value) {
    $sql_chk = "select * from search_engine_stats where search_engine = '$key'";
    $res_chk = mysql_query($sql_chk);
    if (mysql_num_rows($res_chk) > 0) {
        // row found .... update stats...
        $row_chk = mysql_fetch_object($res_chk);
        $new_count = $row_chk->search_engine_count + 1;

        $sql_update = "update search_engine_stats set search_engine_count = $new_count, `update` = '".date("Y-m-d H:i:s")."' where search_engine = '$key'";
        mysql_query($sql_update);
    } else {
        // no row found... insert...
        echo ($key .' - ' . $value);
        $sql_ins = "insert into search_engine_stats(search_engine, search_engine_count, `update`) values ('{$key}', {$value}, '".date("Y-m-d H:i:s")."')";
        mysql_query($sql_ins);
    }
}

Since’ we’ve updated all the tables, so lets truncate the table.

echo '</pre>';
echo ('<br/> Truncating table view_log <br/>');
mysql_query("truncate table view_log");
?>

Script to make entries

We have our tables in place.
Its time to get with the code.

Lets get all the search engines and their attributes first.

$res_se = mysql_query('select * from search_engines', $conn);
$se = array();
while ($row_se = mysql_fetch_object($res_se)) {
    $se['id'][] = $row_se->se_id;
    $se['name'][] = $row_se->se_name;
    $se['regex'][] = $row_se->se_regex;
}


Lets collect our referers

$sql = 'select view_ref from view_log';
$res = mysql_query($sql, $conn);
$refs = array();
while ($row = mysql_fetch_object($res)) {
    $refs[] = $row->view_ref;
}
mysql_free_result($res);

Before we find out the keywords from the Referers, Let me explain how do you form a regular expression to grab out the keyword.
Let us consider someone searches a keyword “ruturaj” on google.com.
So the url where google shows the listing of my page will be
http://www.google.co.in/search?hl=en&q=ruturaj&btnG=Google+Search&meta=
This will also be the referer.

The most important part of this URL is the string “q=ruturaj”, and then the keyword “ruturaj” from that string.
let us start…

/ Pattern starts..
.*google.* Allow any charecters around string “google”
?q= These will be charecters prefixing the keyword
([^&]*) Start a class, which will allow all characters. But it should not contain any &, which means any other GET query.
.* Allow any trailing characters
/i End the pattern, specifying that is case-insensitive

So the final pattern would be…
/.*google.*?q=([^&]*).*/i

We have the Search Engine Attributes, and the referers, now is the time to apply the regular expression of the search engines to referers and grab out the keyword term.

$keywords = array();
$keyword = '';
$keyword_count = 0;
$se_cnt = array();

for ($i=0; $i<count($refs); $i++) {
   for ($j=0; $j<count($se['id']); $j++) {
       if(preg_match($se['regex'][$j], $refs[$i], $matches))
       {
           $k = strtolower($matches[1]);
           if ( !isset($keywords[$k]) ) { //exists....
               $keywords[$k] = 1;
           } else {
               $keywords[$k] += 1;
           }
           if ( !isset( $se_cnt[$se['name'][$j]] ) ) { //exists....
               $se_cnt[$se['name'][$j]] = 1;
           } else {
               $se_cnt[$se['name'][$j]] += 1;
           }
           //echo "<p>$refs[$i]<br/><b>{$se['name'][$j]}</b> - " . urldecode($matches[1]) . '</p>';
           //echo "<b>{$se['name'][$j]}</b> - " . urldecode($matches[1]) . '<br/>';
           break;
       }
   }
}

Get the array sorted in descending order maintaining their indexes

arsort($keywords);
arsort($se_cnt);

Grab the indexes and the values in arrays…

$query_term = array_keys($keywords);
$query_term_cnt = array_values($keywords);

Finally strip out the url encoding out of the keyword.

$final = array();
for ($i=0; $i<count($query_term); $i++) {
    $final[] = array(urldecode($query_term[$i]), $query_term_cnt[$i]);
}