300x250 AD TOP

Text Widget

Total Pageviews

Subscribe us

Contact Us

Name

Email *

Message *

Powered by Blogger.

You can also receive Free Email Updates:

Popular Posts

Followers

Wednesday, 25 January 2012

Tagged under: , , ,

...straight from the heart of an INDIAN



“With the dawn of a new day, came a new stage,
With determined agitation, we broke a white cage,
India rose to freedom, when the world was asleep,
The jailor had to back off, before our leap.”
At the dawn of history, India started on her quest, and trackless centuries are filled with her striving, and the grandeur of her success and her failures. Through good and ill fortune alike, she has never lost her sight of that quest, or forgotten the ideals, which gave her the strength. The achievement which we celebrate today is but a step, an opening of opportunity, to the greater triumphs and achievements that await us. Are we brave enough and wise enough to grasp this opportunity and accept the challenge of the future? What exactly does ‘Freedom’ mean to us?
Freedom does not merely mean breaking the bondage of the oppressor by the oppressed. But it has a rather significant appeal to break off the internal bondages, of thought, knowledge, customs and traditions. The greatest freedom, is the freedom from all prejudices, preconceived notions, conditioning, ideologies, conflicting desires, hatred & anger- until you have achieved awareness of pure consciousness- you cannot call yourself free, you are not independent. Once you have that awareness, you realize what freedom is…what Independence means The road to freedom is not strewn with roses. It is a path covered with thorns, but at the end of it, there is the full blown rose of liberty, awaiting the tired pilgrim. We have gained freedom when we had paid the full price for our right to live. Freedom is to live one’s life, with the window of the soul open to new thoughts, new ideas, new aspirations. In 1947, Winston Churchill laughed at the idea of India as a Democracy. Today, it is the world’s largest

“As we celebrate our success, we must know

That it has not reached its zenith, our story must grow.
We have come a long way but there are fears
Though my lips have smiles, still it appears,
Many eyes are moist…many filled with tears.”
Even as we complete the 63rd year of India becoming a republic, we still talk about our rights, but refrain from uttering a word about our duties. Instead of asking what the nation has done for you, you must first question yourself- What have I done for my nation? For thousands of years, India has produced a remarkable number of great leaders. We have a billion people to follow their footsteps. Now, we need one to step into their shoes. The health of democratic society may be measured by the quality of functions performed by the private citizens. And also, we must speak out of our duties first, and then demand for our rights. Too little freedom brings stagnation, and too much brings chaos. Hence to lead an ideal life, duties must be coined together with our rights. Our nation can continue its march only if we all offer our hands and uplift the country. I can disapprove of what you say, but I will defend to death, your right to say it. This is the essence of freedom. One must be more aware and vigilant about his duties, than his rights.
So, let us redeem our pledge that we would rather die on our feet, than live on our knees.
“Who dwells in our memory with his spinning wheel?
Who reminds us constantly and makes his appeal?
To redeem our pledge, on this day let us ensure,
That our caravan not falter on any score
Oh travelers, we must yet, travel some more‼”
Jaya Hey…Jaya Hey…Jaya Hey!!     


-Ajinkya Mandhare.

Sunday, 22 January 2012

Tagged under: ,

Computer Engineering SEM VIII Question Papers

You can download the question papers from the download box present on my blog. Optionally, you can download it from the link COMP_ENGG_SEM_VIII

You can for further assistance.

Saturday, 21 January 2012

Tagged under: , , ,

C# code for connecting to a Web Page & Obtaining its Source Code/ Web Crawler Algorithm in C#

HTTP is the primary mechanism for communicating with resources over the Web. It is a Stateless protocol, used for simple Request-Response communication.  A developer may often want to obtain web pages & their source codes, for different reasons like: building a spider, obtaining info on a particular page, etc. For this purpose, the .NET Framework includes classes that aid in this respect.


Requesting & Obtaining an HTTP page:



To obtain the HTTP page, we first need to establish a connection to it, & then obtain the page.
For this purpose, C# provides two functions viz. HttpWebRequest HttpWebResponse.
This involves specifying a web page to get, with a HTTPWebRequest object, which performs the actual request, and then using a HTTPWebResponse object to receive the page.

After this, the normal String methods can be used to obtain the source code of the web page and then, a number of manipulations can be made, as necessary!

The C# code snippet for connecting to a web page & obtaining its source code is:

      HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
                       
       HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
                       
       Stream istrm = resp.GetResponseStream();
                       
       StreamReader rdr = new StreamReader(istrm);
                        
       str = rdr.ReadToEnd();
                        
The entire source code of the Web page under consideration is now stored in 'str'. 
Once we have the source code, we can define a number of functions, to manipulate the source code, in order to obtain the necessary information like: url in case of a crawler or spider!!
This process of obtaining the urls from the source code, once we have 'str' is child's play, & hence it is left to you!! Still, if you have problem, here is the algo:

Step 1: Find Index Of ("href=\"http") from the start location & store it in 'i' (temp variable) 
Step 2: Find index ' " ' from 'i' & add 1 to it & store it in 's' (temp variable)
Step 3: Find index of ' " ' from 's' & store it in 'e' (temp variable)
Step 4: Now obtain the substring from 's' to 'e-s' & store i in url(string variable)

Now you can easily use this code & build your own simple crawler in C#!!

You can for further assistance.

Thursday, 12 January 2012

Tagged under: , , , , ,

Live Search / AutoComplete Using XML & PHP

Many a times, we need to build a search engine for our website, which can serve various purposes like searching through your site! In such cases, live search option is the most sought after, for the ease of searching!!
The code for live search can be broken down in three parts viz:
  1. HTML file
  2. PHP file
  3. XML file

Stage 1:(HTML file)

Create an html file and paste the following code in it:


Stage 2:(PHP file)


Create a php file 'livesearch.php' and paste the following code in it:




Stage 3:(XML file)

Here you have two options:
  1. Export the data from the database like MySQL in XML form.
  2. Create an XML file yourself.
However, the 1st alternative turns out to be a good one, as you don't have to write the complex XML code...the job is done by MySQL!!
In our example, the exported XML code looks like this (links.xml):



If you want to write the xml code by yourself, then I have uploaded the modified PHP & XML files in the download box present alongside.


Or, you can download it from the link https://www.box.net/shared/x0mbpldeyar2ra2ksvjf




Now, load the html file in browser in localhost, & see the magic happen!!!

Look out for my next post on "Live search using PHP only" (It is better for a huge database, and is relatively smaller than the one we have written here!!)

You can for further assistance.