VIVEK SHAH

011011010010000001100001011001000110010001101001011000110111010001100101011001000010000001110100011011110010000001101010011000010111011001100001 Click Here

Custom Search


A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and increased storage space. Indexes can be created using one or more columns of a database table, providing the basis for both rapid random lookups and efficient access of ordered records. 

Put simply, database indexes help speed up retrieval of data. The other great benefit of indexes is that your server doesn’t have to work as hard to get the data. They are much the same as book indexes, providing the database with quick jump points on where to find the full reference (or to find the database row).
There are both advantages and disadvantages to using indexes,however.
One disadvantage is they can take up quite a bit of space – check a textbook or reference guide and you’ll see it takes quite a few pages to include those page references.
Another disadvantage is using too many indexes can actually slow your database down. Thinking of a book again, imagine if every “the”, “and” or “at” was included in the index. That would stop the index being useful – the index becomes as big as the text! On top of that, each time a page or database row is updated or removed, the reference or index also has to be updated.
So indexes speed up finding data, but slow down inserting, updating or deleting data.
Some fields are automatically indexed. A primary key or a field marked as ‘unique’ – for example an email address, a userid or a social security number – are automatically indexed so the database can quickly check to make sure that you’re not going to introduce bad data.

So when should a database field be indexed?
The general rule is anything that is used to limit the number of results you’re trying to find.
It’s hard to generalise so we’ll look at some specific but common examples.
Note – the database tables shown below are used as an example only and will not necessarily be the best setup for your particular needs.
In a database table that looks like this:
Note: The SQL code shown below works with both MySQL and PostgreSQL databases.
CREATE TABLE subscribers (
  subscriberid INT PRIMARY KEY,
  emailaddress VARCHAR(255),
  firstname VARCHAR(255),
  lastname VARCHAR(255)
);

if we want to quickly find an email address, we create an index on the emailaddress field:
CREATE INDEX subscriber_email ON subscribers(emailaddress);
… and any time we want to find an email address:
SELECT firstname, lastname FROM subscribers WHERE emailaddress=’email@domain.com’;
… it will be quite quick to find!
Another reason for creating indexes is for tables that reference other tables. For example, in a CMS you might have a news table that looks something like this:
CREATE TABLE newsitem (
  newsid INT PRIMARY KEY,
  newstitle VARCHAR(255),
  newscontent TEXT,
  authorid INT,
  newsdate TIMESTAMP
);

and another table for authors:
CREATE TABLE authors (
  authorid INT PRIMARY KEY,
  username VARCHAR(255),
  firstname VARCHAR(255),
  lastname VARCHAR(255)
);

A query like this:
SELECT newstitle, firstname, lastname FROM newsitem n, authors a WHERE n.authorid=a.authorid;
… will be take advantage of an index on the newsitem authorid:
CREATE INDEX newsitem_authorid ON newsitem(authorid);
This allows the database to very quickly match the records from the ‘newsitem’ table to the ‘authors’ table. In database terminology this is called a table join – you should index any fields involved in a table join like this.
Since the ‘authorid’ in the authors table is a primary key, it is already indexed. The same goes for the ‘newsid’ in the news table, so we don’t need to look at those cases.
On a side note, table aliases make things a lot easier to see what’s happening. Using ‘newsitem n’ and ‘authors a’ means we don’t have to write:
SELECT newstitle, firstname, lastname FROM newsitem, authors WHERE newsitem.authorid=authors.authorid;
for more complicated queries where more tables are referenced this can be extremely helpful and make things really easy to follow.
In a more complicated example, a news item could exist in multiple categories, so in a design like this:
CREATE TABLE newsitem (
  newsid INT PRIMARY KEY,
  newstitle VARCHAR(255),
  newscontent TEXT,
  authorid INT,
  newsdate TIMESTAMP
);

CREATE TABLE newsitem_categories (
  newsid INT,
  categoryid INT
);

CREATE TABLE categories (
  categoryid INT PRIMARY KEY,
  categoryname VARCHAR(255)
);

This query:
SELECT n.newstitle, c.categoryname FROM categories c, newsitem_categories nc, newsitem n WHERE c.categoryid=nc.categoryid AND nc.newsid=n.newsid;
… will show all category names and newstitles for each category.
To make this particular query fast we need to check we have an index on:
newsitem newsid
newsitem_categories newsid
newsitem_categories categoryid
categories categoryid
Note: Because the newsitem newsid and the categories categoryid fields are primary keys, they already have indexes.
We need to check there are indexes on the “join” table – newsitem_categories
This will do it:
CREATE INDEX newscat_news ON newsitem_categories(newsid);
CREATE INDEX newscat_cats ON newsitem_categories(categoryid);

We could create an index like this:
CREATE INDEX news_cats ON newsitem_categories(newsid, categoryid);
However, doing this limits some ways the index can be used. A query against the table that uses both ‘newsid’ and ‘categoryid’ will be able to use this index. A query against the table that only gets the ‘newsid’ will be able to use the index.
A query against that table that only gets the ‘categoryid’ will not be able to use the index.
For a table like this:
CREATE TABLE example (
  a int,
  b int,
  c int
);

With this index:
CREATE INDEX example_index ON example(a,b,c);
  1. It will be used when you check against ‘a’.
  2. It will be used when you check against ‘a’ and ‘b’.
  3. It will be used when you check against ‘a’, ‘b’ and ‘c’.
  4. It will not be used if you check against ‘b’ and ‘c’, or if you only check ‘b’ or you only check ‘c’.
  5. It will be used when you check against ‘a’ and ‘c’ but only for the ‘a’ column – it won’t be used to check the ‘c’ column as well.

A query against ‘a’ OR ‘b’ like this:
SELECT a,b,c FROM example where a=1 OR b=2;
6         Will only be able to use the index to check the ‘a’ column as well – it won’t be able to use it to check the ‘b’ column.

Multi-column indexes have quite specific uses, so check their use carefully.
Now that we’ve seen when we should use indexes, let’s look at when we shouldn’t use them. They can actually slow down your database (some databases may actually choose to ignore the index if there’s no reason to use it).
A table like this:
CREATE TABLE news (
  newsid INT PRIMARY KEY,
  newstitle VARCHAR(255),
  newscontent TEXT,
  active CHAR(1),
  featured CHAR(1),
  newsdate TIMESTAMP
);

… looks pretty standard. The ‘active’ field tells us whether the news item is active and ready to be viewed on the site.
So… should we should create an index on this field for a query like this?
SELECT newsid, newstitle FROM news WHERE active=’1′;
No, we shouldn’t.
If most of your content is live, this index will take up extra space and slow the query down because almost all of the fields match this criteria. Imagine 500 news items in the database with 495 being active. It’s quicker to eliminate the ones that aren’t active than it is to list all of the active ones (if you do have an index on the ‘active’ field, some databases will choose to ignore it anyway because it will slow the query down).
The featured field tells us whether the news item should feature on the front page. S
hould we index this field? Yes. Most of our content is not featured, so an index on the ‘featured’ column will be quite useful.


Other examples of when to index a field include if you’re going to order by it in a query. To get the most recent news items, we do a query like this:
SELECT newtitle, newscontent FROM news ORDER BY newsdate DESC;
Creating an index on ‘newsdate’ will allow the database to quickly sort the results so it can fetch the items in the right order. Indexing can be a bit tricky to get right, however there are tools available for each database to help you work out if it’s working as it should.
Well there you have it — my introduction to database indexes. Hopefully you’ve learned something from this article and can apply what you’ve learned to your own databases.


મારી આત્મકથા


હું એક નોટ છું મારો જન્મ અમદાવાદનાં "લઘરવઘર નોટ ભંડાર" નામ નાં કારખાના માં થયો હતો, ત્યાંથી તૈયાર કરીને મને "લૈજાવ સ્ટેશનરી" માં મોકલવામાં આવી. પણ મારી "લઘરવઘર" બનાવટને લીધે કોઇ એ મને લીધી નહિ, એટલે થોડા સમય પછી મને પસ્તી માં કાઢી નાંખવામાં આવી. "નવાનક્કોર પસ્તી સેન્ટર"નાં પસ્તી વાળા એ મને સાવ કોરી જોઇને રફકામનાં ચોપડા વિભાગમાં રાખી, ત્યાંથી ૪-૫ મહિના પછી રતન નામના ગરીબ છોકરાએ મને ૫૦ પૈસામા ખરીદી. એ મને રોજ શાળાએ લઇ જતો, મને યાદ છે મારો પહેલો દિવસ એણે મને ગુજરાતી ના તાસ માં દફ્તરમાં થી કાઢી અને મને થયું કે હાશ આજે મારો જન્મ સાર્થક થશે, હું ગુજરાતી ભાષાનું સંગ્રહસ્થાન થઇશ, પણ એવું કાંઇ થયું નહિ, અને મારામાં શિક્ષકનું ચિત્ર દોરવામાં આવ્યું. પછી તો દરેક તાસમાં મારો આવી જ રીતે ઉપયોગ થતો હતો. અને રીસેસ પડી ત્યારે મને થયું કે હવે થોડો આરામ મળશે, પણ એવું ન થયું મારો ઉપયોગ રતન નાં બેટ તરીકે ક્રિકેટ રમવામાં કરવામાં આવ્યો. પછી રતન છૂટ્યો શાળાએ થી અને મને થોડી હાશ થઇ, પણ ત્યાં તો ઘરે જઇ ને મારા પાના ફાડીને એમાં થી હોડીઓ બનાવવામાં આવી, આવી રીતે ૧ વર્ષ મારો ઉપયોગ થયા બાદ પાછી મને પસ્તી માં મોકલવામાં આવી અને આજે હું "અન્યોપયોગી પસ્તી સેન્ટર" નાં રિસાઇકલ વિભાગમાં પડી છું અને એ ટ્રકની રાહ જોઉં છુ જે મને અહીં થી રિસાઇકલમાં લઇ જશે ને મારો નાશ થશે.

નમસ્તે હા હુ જ છુ એ લખવાની નોટ જે પસ્તી ભંડાર માં પડી છે.હજી પણ હુ કોરી જ છુ મને લઈ જનાર સાવ નીરક્શર નીકર્યો મને એમ કે એ સાકશર હશે પરંતુ તેણે તો મારા માં હાસીયો પણ નથી પાડયો પરંતુ હવે હુ રાહ જોઈ રહી છુ મારી અંતીમ શ્ણો ની કારણ્કે મને જાણવા મળ્યુ કે હુ રીસાયકલ બીન મા જઈશ

પરતુ તમારે મારા આ મૂત્યુ પર રડવાની કોઈ જરૂર નથી કેમકે હુ આવતા જનમ માં
કોમ્યુટર કે લેપટોપ બની ને અવતરીશ અને મને કોરી રાખનાર ના ટોપીક મા રીપલાય આપીશ

=========================================================================


મિત્રો આવો મારી પાસે હું તો મારા જીવનની કથની કહેવા આપ સૌ ને આતુર છું. હું છું નોટ્બુક. હા તમને િવશવાસ નથી થતો ને મારી આ હાલત જોઇને ? અને કદાચ મનમાં હસ્વું પણ આવતું હશે. પણ આ જ મારા જીવનની વાસ્તિવકતા છે. વેલ મારો જનમ આશરે બે વર્શ પહેલા થયો હતો તે સમયે મારા રુપરંગ જોઇને તો હું પોતે ફુલી ન સમાતી હતી.ત્યારબાદ હું મારી અન્ય સખીઓ સાથે એક સ્ટેશનરી ની દુકાનમાં આવી ત્યાં લગભગ થોડા િદવસ રહ્યાં બાદ એક સ્ત્રી એના બાળક માટે મને ખરીદી લીધી ત્યારબાદ મારા જીવનનો Golden Period ચાલુ થયો એ બાળકે મારા પહેલા પાના પર ખુબ જ કાળજી પુર્વક સુંદર અક્ષરો માં એનું નામ લખ્યું ત્યરબાદ રોજ મને એ બાળક એની સાથે સ્કુલે લઇ જતો મારા પાના પર પેન્સિલથી લખવામાં આવ્તું મને એ જીવની જેમ સાચવતો પણ એક વર્શ બાદ એના દફતરમાં મારી જગ્યા અન્ય નોટબુકએ લઇ લીધી અને મને પસ્તીની દુકાનમાં વેચી દેવામાં આવી. ત્યાં લગ્ભગ થોડા સમય રહ્યા બાદ મને એક બોર વેચવા વાળો લઇ ગયો અને હું રોજ જ એક એક પાનાના ટુકડાઓ માં જુદા જુદા લોકોમાં વહેંચાતી રહી અને હવે જ્યારે મારામાં કંઇ રહ્યું નથી ત્યારે મને ફેંકી દેવામાં આવી છે. મેં મારી જીંદગીમાં બે વર્શ જોયા છે પણ એ બંને વર્શમાં મેં તદ્ન જુદા જ અનુભવ કર્યા છે મને મારા જીવનથી કોઇ ફરીયાદ નથી બ્સ હવે તો અિહં કચરાના ઢગલામાં મારા જીવનની અંિતમ ક્ષણો ગણું છું.


=========================================================================

હુ નિશાનો નિરાશ ચોપડો. અહિ નોટની આત્મકથા લોકો લખી રહયા છે પણ મારી વ્હાલી નોટ એ લખવા માટે આ દુનિયામા હયાત નથી માટે અમારી દુખ ભરી દાસ્તાન હુ લખુ છુ.આ કથામા એકશન છે,ડ્રામા છે અને રોમાન્સ પણ હોત જો અનુજ અનાડી ના હોત. મને હજુ પણ યાદ છે એ દિવસ જ્યારે અનુજ પેહલી વાર એને લઈને ક્લાસમા અવ્યો હતો.એને જોતાજ મને એની જોડે પ્રિતડિ બન્ધાય ગઈતિ. એના રુપના વર્ણ્રન કરવા માટે હુ લાયાક્જ નથી. લઘર વઘર,સાક્ષર અને રાજનની નોટ જોઇને મને તો આશાજ ન હતી કે ક્લાસમા આવી પણ કોઇ નોટ આવેશે. પણ કદાચ બનાવા વાડાએ કદાચ એને મારે માટેજ સરજી હશે. અમારા પ્રેમ વચ્ચે ઘણા અવરોધ હતા. હુ નવનીતનો ચોપડો અને એ રજતની નોટ. પણ પેલુ કોઇ માનવિએ કિધુ છે એમ ન ઉમ્ર કિ શીમા હો ના જાતિ કો હો બન્ધન એમ હુતો એના પ્રેમ મા પાગલ થઈ ગયો તો અને ધિરે ધિરે હુ પણ એને ગમવા લાગ્યો તો પણ અમારો પ્રેમ અગડ વધે એ પેહલાજ એક ભયાનક હાદસો બન્યો.વેલેન્ટાઇન ડેયનો દિવસ હતો. આજે હુ તેને માર દિલની વાત કેહવાનોજ હતો પણ આ અનુજ એ પણ રન્ગીન મીજાજનો માણસ. એ નિશાને મારી નોટમા ચાલુ ક્લાસે પ્રેમ પત્ર લખતો તો. એવામા પેલો સડુ માસ્તર એ જોઇ ગયો અને એણે મારિ વ્હાલિ નોટ ને લઈને.................................. નોટને લઈને હવામા ઉછાડી અને એ પન્ખામા અથડાઇને હવામા ફન્ગોડાઇને ક્લાસની બહાર પડી. એના નાજુક શરિરનુ એકે એક અન્ગ જુદુ થઈ ગયુ અને મારા પ્રેમ પ્રકરણનો ત્યાજ અન્ત આવી ગયો.
હવે તો હુ મારા અન્તિમ સ્વાશ ની રાહ જોઇ રહ્યો છુ અને તમને એકજ સવાલ પુછવા માગુ છુ કે અનુજના પાગલપનમા બીચારી મારી નોટ નો સો વાન્ક હતો???????????

=========================================================================

હુ છુ એક રખડતુ કુતરુ શેરી એ શેરી એ રખડુ છુ મને મારી કોમ્યુનીટી ના સદસ્યો એ પણ કાઢીમુક્યો છે હુ અહી અત્યારે એક ગાડી નીચે બેઠુ છુ રાતરે વરસાદ બહુ પડ્યો મારુ આખુ શરીર ભીજાઈ ગયુ મને ખ્યાલ નથી આવતો કે આ કવી ઓ અને લેખકો વરસાદ ના આટલા વખાણ શુ કામ કરે છે. વરસાદ થી બચવા હુ જયા જવુ છુ ત્યાથી લોકો મને કાઢી મુકે છે જેને પોતાના સાથીદારો એ કાઢી મુક્યો હોય એને આ માનવજાત થોડી અપનાવવાની છે આમે મારા મત મુજબ તો અત્યાર ના માણસો કુતરા થી પણ જાય એવા હોય છે. વરસાદ મા ભીજાવવાના કારણે મને આખા શરીરે ખરજવુ થઈ ગયુ છે. માખી ઓ બેઠી છે મારા ઉપર પણ કોઈ દીવસ મારી આ દયનીય દશા પર કોઇ કાઈ લખતુ નથી. કાલે એક નાનુ બાળક મારી સાથે રમવા આવેલુ એ મને રોટલી ખવડાવવા જતુ હતુ પણ અંત સમયે તેની મા એ એને મારાથી દુર રહેવા કહયુ અને એ બાળક જતો રહ્યો મને યાદ છે કે જ્યારે હુ નાનુ ગલૂડીયુ હતુ ત્યારે બધા મારી જોડે રમતા હત પરંતુ હવે મારી જોડે આવો ભેદભાવ કેમ મને નથી સમજાતુ હુ આવો વીચાર કરતો હતો ત્યા જ હુ જે ગાડી નીચે બેઠો છુ એ ગાડી ચાલૂ થઈ અને મને કચડી નાખ્યુ હુ ભગવાન ને તો પણ પ્રાથના કરીશ કે આવતા જન્મ મા પણ મને કુતરુ બનાવે કેમકે માનવ જન્મ કરતા શ્વાન જન્મ સારો એવો મારો આજે પણ વીચાર છે......

=========================================================================

મારો જન્મ ક્યાં થ્યો એતો મને ખબર નથી પણ જ્યાર્નો હુ સમજણો થયો ત્યારથી એવી ખબર છે કે અમદાવાદ નગરમાં લગર વગર અમદાવાદી સાહેબના ઘરની સામે રહુ છું. સાહેબ જતા આવતા મારી સામે તિરસ્કારે અને ભગાવે કારણ કે હુ ત્યાં બેહી રહુ તો તેમના બંગલાની શોભામાં ઘટાડો થઇ જાય એવુ એમને લાગતુ. સાહેબની સામે હુ ભુખ્યુ તરસ્યુ નજર માંડુ પન સાહેબને તો આપણી હાજરીનો જે વાંધો.
એમણે મહાનગરપાલિકાના પશુ વિભાગ અને આરોગ્ય વિભાગમાં અરજી કરી કે મારા ઘરની સામે એક દેશી કૂતરુ હડકાયેલુ છે જેનો જલદી થી નિકાલ કરવો. સરકારી ખાતુ એટલે જલદી થી સાંભળે નહી એટલે મારા માટે બહુ ચિંતાનુ કારણ નહી. પણ આ અમદાવાદી સાહેબ પણ જબરા. એક અનુજ નામના પટાવાળાને પકડ્યોને ચા-પાણીના પૈસા અને એના સાહેબને એક ગીફ્ટ બોક્ષ આપી આવ્યા. સાહેબ પાછા નામે સાક્ષર. પેલા તો લેવાની આનાકાની કરી પણ પછી ધીરે રહીને ટેબલમાં ખોખુ સરકાવી દીધુ.
બીજે દાહડે આખી ગેંગ આવી આપણને પકડવા. આપણે ભાગ્યા પણ પેલી ગીફ્ટે એટલુ બધુ જોર કરેલુ કે મને થકવી નાક્યો પણ આપણે કુતરાની જાત. માણસ કરતા ભાગવામાં ચપળ એટ્લે પેલો અનુજ અને સાક્ષર ફાવ્યા નહી.
તેમણે પશુ વિભાગના ડોક્ટરનો સંપર્ક કરયો કે રખડતા કુતરાને બેભાન કરવા માટેની સીરીંજ વાળી ગન આપો. એનુ ટેકનીકલ નામ આપણે કૂતરાની જાતને ખબર ની મલે. ત્યાં ડોક્ટરની સીટ પર મલેશિયામાં ભણેલો પેલો માલધારી ભાઇ કરી ને કોક. એને પોતાના નવા નાવા ગ્યાન નો ઉપયોગ કરવાની ચળ. હારો જાતે આયવો.
આપણને આવો કોઇ દાડો અનુભવની. માલધારી એ બંદૂકમાંથી ઇંજેકશન છોડ્યુ. સીધુ જ પેટ્માં વાગ્યુ. સારો માલધારી ભાણેલો વધારે પણ અનુભવ ઓછો તે ઇંજેક્શન માં દવા વધારે ભરી દીધી તે આપણા રામ રમી ગ્યા.
જો કે આપણે કૂતરા તરીકે માણસ જાતની સેવા કરેલી અને બદલામાં આ લગર વગર સાહેબ જેવાના દંડા ખાધેલા અને કેટલાયના પથરા વાગેલા એટલે ભગવાને સીધા જ સ્વર્ગમાં આશરો આપી દીધો. ત્યાંથી આ ઓર્કુટમાં આત્મકથા લખવાની તક મલી એટલે લયખુ.

=========================================================================

હા હુ છુ એ જુનુ પગલૂછણીયુ જે આજે ફાટી ગયુ છે જેણે લોકો ને પોતાના જીવન ના અમુલ્ય ૧ વરસ સેવા આપી એ લોકો ને હવે મારી કદર નથી. મારા વીષે હુ શુ કહુ મારો જન્મ ૧ વરસ પહેલા લકશમી ગુહ ઊધોગ માં થયો હતો મને એક નાની કોમળ છોકરી ના હાથ થી મસ્ત કાથી વડે ગુથવામાં આવેલૂ હુ ખુબ જ ખુશ હતુ પરંતુ એક દીવસ મને ૨૦ રુપીયા જેવી નજીવી કીમત મા વેચી દેવામા આવ્યુ હતુ હુ આજે મારા નવા ઘરે આવ્યુ છુ અહી મને મોટા રુમ મા વચચો વચ મુકવામાં આવ્યુ છે આ લોકો દીવાળી નો તહેવાર ઊજવી રહયા છે. તેઓ ખુબ ખુશ છે પણ હુ આ નવા ઘર થી ખુશ નથી અહી આવનાર જનાર મારા પર પોતાના પગ લૂછી ને જાય છે અને મારા કાથી ના તાતણા છુટા પડતા જાય છે.અરે ઘણી વાર તો વંદા ભગાડવા પણ આ લોકો મને ઊચકી ને વંદા પર નાખે છે અને પછી મને અને વંદા બન્ને ને પગથી છૂદી નાખે છે. હવે હુ જુનુ થઈ ગયુ છુ આ લોકો ના ને લાગે છે કે હુ તેમના મોટા રુમ ની શોભા બગાડુ છુ તેમણે મને આજે કચરા ટોપલી મા નાખી દીધુ છે જેણે તેમને એક વરસ સેવા આપી તેમના ગંધાતા પગ લુછી આપ્યા તેની આવી દશા છે.કાલે સવારે કચરા વાળો આવશે અને મને લઈ જશે પરંતુ આવતા જન્મે હુ કોઈ કોમ્પ્યુટર કે લેપટોપ નુ વોલપેપર બનીશ જેથી મારે આટલુ લાબુ તો સહન ના કરવુ પડે .....

=========================================================================

ક્યારેક જીવનનો અર્થ શોધવામાં ઘણું મોડું થઇ જાય છે, મારે પણ એવું જ થયું. મારો જન્મ એક કારખાનામાં થયો, જન્મબાદ મને મારો આકાર અને માપ જોઇને લાગ્યુ કે મારો ઉપયોગ કોઇ નાના બાળકને ઠંડીથી બચાવવા માટે થશે, નાના ચોરસા તરીકે. અને એ જ હોશમાં હું ગયો એક "સસ્તાં પ્રોવિઝન સ્ટોર" માં. એક દિવસ મને ત્યાંથી બે સ્ત્રીઓ આવી ને ખરીદી ગઇ. હું એકદમ ખુશ હતો, મને થયું કે મારુ જીવન સાર્થક થઇ ગયું, મારો જન્મ કોઇ બાળક ને ઠંડીથી બચાવવા થયો છે ને તે હવે હું કરી શકીશ. મને એમના ઘરે લઇ જવામાં આવ્યો અને બહારનાં કક્ષની બહાર નાંખવામાં આવ્યો, પહેલા તો મને એમ થયું કે એ લોકોથી ભુલથી હું પડી ગયો હોઇશ, પણ જયારે મારી પર પગ લૂછવામાં આવ્યા ત્યારે મને મારા જીવનનો સાચો અર્થ સમજાયો. અને હું દુઃખી થઇ ગયો.પણ પછી મને થયું આમ દુઃખી થવાથી થોડું ચાલે. ગમે તેમ તોય હું ગંદકી સાફ કરું છું, ભલે મને એટલું માન ના મળે. દિવસે દિવસે મારો ઉપયોગ જેમ જેમ થવા માંડ્યો મારી પર ગંદકીના થર જામવા માંડ્યા. જો કે એક દિવસ એક સ્ત્રી ઘર સાફ કરતી કરતી મારી પાસે આવી અને મને થયુ કે હાઇશ હવે મને પણ સાફ કરવામાં આવશે અને થયું પણ એવું જ. પણ સાફ કરવાની જે રીત હતી તે મને અનુકુળ ન આવી. એણે મને ઉંચકીને દિવાલ સાથે(એ પણ ઘરની બહારની, જ્યાં સિમેન્ટ ઉપસેલો હોય તે) પછાડવામાં આવ્યો. અને જે મારા શરીરનાં હાલ થયા. ત્યારપછી, જ્યારે જ્યારે પણ મને સાફ કરવામાં આવતો, મને ઘણો જ દર્દ થતો. આ જ મારા જીવનની કરુણતા હતી, જ્યારે સાફ થતો ત્યારે મારવામાં આવતો અને બાકી નો ટાઇમ ગંદો કરવામાં આવતો. અને એક દિવસ મારી માલકણ, ઘરમાં આવી અને એની થેલી માંથી બીજા મારા જેવા જ પગલૂંછણીયાને નાખવામાં આવ્યો. અને મને ઉઠાવીને કચરાટોપલીમાં. મંગુભંગી મને બીજા કચરા સાથે લઇ જતો હતો અને એને એક વિચાર આવ્યો મને જોઇને, એણે મને પાણી થી અને સાબુથી સરસ સાફ કર્યો, અને એના બાળક પર ઓઢાળી દીધો. ત્યારે મને થયું કે ગરીબો જે સુખ આપી શકે છે એ અમીરો નહિ આપી શકે, અને મારું જીવન સાર્થક થયું.



તમારો પોતાનો સસ્તો લેખક્
-----------------------
લઘર વઘર અમદાવાદી
(અમારી બીજી કોઇ શાખા નથી )

૧૪ ટીમો ને શું લેવા બોલાવી ?

-> ૬ ટીમો ને તો હારવા માટે બોલાવી છે :) બાકી ની 8 ઉપર હું સેજ પ્રકાશ પાડવો પસંદ કરીશ ... તો એ હશે .... ઇંગ્લેન્ડ ... સાઉથ આફ્રિકા... ન્યુઝીલેન્ડ ... લંકા .... બાંગ્લા ... પાક .... વેસ્ટ ઇન્ડીઝ .... અને ટીમ ઇન્ડી...યા....
 
સૌ પ્રથમ તો .... વેસ્ટ ઇન્ડીઝ.... એક જામાનાનો સિંહ આજે દાંત અને નખ વગરનો છે.... કેરોઈન પોલાર્ડ એ હાલ વર્લ્ડ નો બેસ્ટ ફિનીશર ભલે હોય... પણ ક્રિકેટ ૧૧ જણાથી રમાય છે .... કિંગ કેપ્સીલો (ગાયલ) નું બેટ ભારત માં બહુ ગાજતું નથી... એક માત્ર છુપા રુશ્તમ એવા સરવન ને નાં ભૂલવો જોઈ એ... બ્રેવો માં પણ દમ છે ... જો આ ચાંડાલ ચોકડી કામ કરે તો વેસ્ટ ઇન્ડીઝ .... બહુ બહુ તો સેમી ફાઈનલ સુધી પહોચી શકાશે
 
બંગલા .... ૨૦૦૩ માં કેન્યા એ જે કર્યું એવી કે એથી વધુ આશા બંગલા પાસેથી આ વખતે sevI શકાય... સાકીબ નાં નેતૃત્વ માં ટીમે ઘણું સારું પ્રદર્શન કર્યું છે ... તમીમ નું બેટ પણ સારું ચાલે છે ... મોર્તઝા ૨૦૧૦ માં આઈ પી એલ માં ઉંચી બોલી માં ગયેલો .. (વ્યર્થ) કાયસ અને સિદ્દીક્કી પાસે બેટિંગ ટેકનીક છે ... અને અશરફુલ... એટલે બાંગ્લા નો ગાવસ્કર ... (એ લોકો નો એવો જ હોય) રહીમ નું વિકેટ કીપિંગ નબળું છે સેજ ... ઠીક છે ... સાકીબ અને તમીમ ચાલી ગયા તો .. સેમી ફાઈનલ ... ફાઈનલ ... (કપ ને વાર લાગશે બેટા બાંગલા)
 
લંકા... ઘર આંગણે અપસેટ સર્જવાના કિંગ ... આ સિંહાલી ઓ માં મને દમ લાગે છે ... સાંગાકારા અને જયાવાર્દાને મેઈન બેટ્સ મેં છે ... બહુ જ સીનીયર ખેલાડી ઓ છે .... જયાવાર્દાને નો આ અંતિમ વર્દ્કાપ હોવાની પુરતી સંભાવના છે ... એ સિવાય તોફાની દિલશાન ને ર...ોકવો એ લોધાના ચાના ચાવવા જેવું કામ છે .. થારંગા બહુ ટેલેન્ટેડ બાતસ મેંન છે .. ફાસ્ટ બોલિંગ ની કમાન ફર્નારડો તથા મલિંગા નાં હાથ માં રહેશે ... રન્દીવ ને ટીમ માં નાં લીધો એ નાં ગમ્યું .... બાકી સ્પીન દીપ્પર્ત્મેન્દ માં ધારણ, મેન્ડીસ અને હેરાથ ની તીકડી જોર દાર છે ... હાલ આઉટ ઓફ ફોર્મ હોવા છતાં હું આ ટીમ ને વરદકપ નાં ૪ પ્રબળ દાવેદારો માં ગણું છું
 
પોરકીસ્તાન ... હંમેશા વિવાદિત ટીમ રહી છે ... આફ્રીદી .... નામ જ કાફી છે ... એ સિવાય મિસ્બાહ , યુનીસ , અને કામરાન પર બેટિંગ નો દારોમદાર રહેશે ... અખ્તર અને ગુલ ની બોલિંગ માં હવે પહેલા જેટલો દમ નથી રહ્યો ... ક્યારેક રઝ્ઝાક પણ બહુ ખતરનાક પ્લેયર કહેવાતો હતો ... પણ રૈના ભાવ રાતે જતા રહ્યા છે ... સઈદ અજમલ ... આ નાંમ થી મને સેજ આશા છે ... આ ઓફ સ્પિનર ની બોલિંગ મસ્ત પડે છે ... (ખાલી વિકેટ કીપ્પાર કેચ છોડી દે છે ) આ ટીમ એક થઇ ને રમશે કે કેમ એ જોવાનું રહ્યું.... બાકી ... સેમી ફાઈનલ સુધી પહોચે તો સારું ... બાકી ... રામ રામ ... ભલું કરે ભગવાન
 
ઈંગલેન્ડ ... પીટરસન ... કોલીન્ગ્વુંદ .. બેલ ...સ્ત્રૌસ બધા એક એક થી ચડીયાતા બેટ્સ મેં છે ... જીમ્મી ની બોલિંગ સારી છે ...બ્રોડ ની પણ ... જો ગ્રીમ સ્વન અને લ્યુક રાઈટ બરાબર કામ કરશે તો સેમી ફાઈનલ અને નસીબ હોય તો ફાઈનલ ની ટીકીટ પણ ફાડી શકાય .. (પણ આ બિચારી ટીમ ૩ વાર ફાઈનલ હારેલી છે ) હહાહાહાહાહાહહા (બુરી બાત ... કિસીકી કમી ઓ પર હસના ની ચાઇયે )
 
પંટર ની સેના ... પંટર , ક્લાર્ક, અને વોટસન નહિ ચાલે તો panTarnI સેના ગ્રુપ રાઉન્ડ પણ પાર નહિ કરી શકે ... બાત સોરી ... ત્રણ માંથી એક પણ ચાલશે તો પાર karI જશે કેમ કે આપણે ૩ ટીમ ને હારવા બોલાવી છે દરેક ગ્રુપ માં ... આ સ્મિથ અને પેઈન વાંદરા જેવ...ા નથી લાગતા?? જોન્સન અને લી ની બોલિંગ મસ્ત છે ... કરેઝ્ઝા ને ૨૮ વર્ષે મોકો મળ્યો ... અલાવ ... આના કરતા કોઈ ૧૬-૧૭ વર્ષ નાં બાબલા ને મોકલ્યો હોત તો ૨૦૨૩ નાં વર્લ્ડ કપ માં કામ લાગત ... મને panTarnI સેના પ્રત્યે અંગત નફરત છે હો મિત્રો... એવું ઈચ્છું કે .... કે ... કાલે જ પાછા જતા રહે... પણ મને એમનો પણ સેમીફાઈનલ સુધી નો ચાન્સ લાગે છે ..
 
સાઉથ આફ્રિકા.... આ વર્ષના વર્લ્ડ કપ જીતવાનું સૌથી પ્રબળ દાવેદાર... સ્મિથ, કાલીસ અને ડીવિલિયર્સ ની ટીકડી જોરદાર છે ... પ્લસ કે આઈ.પી.એલ નાં કારણે સબ કોન્તીનેતાલ પચીસ થી સારા એવા પરિચિત છે ... દ્યુંમીની જેવા પ્રતિભાશાળી ખેલાડી ઓ છે ... બોથા એક જ ભરોસા પત્ર સ્પિનર હોવો એ કમી ગણી શકાય સ્ટીન ... પરનેલ .. અને મોર્કલ ની ફાસ્ટ ટીકડી ટીકડી ટીક છે ... અંતિમ પણ ભારત જેવી લાંબી બેટિંગ લાઈન અપ ધરાવે છે ... આમલા અનફીટ છે શરૂઆતની ૧,૨ મેચ માં પણ એથી કોઈ ફરક નહિ પડે ... જોરદાર ટીમ છે ... કપ જીતવા પૂર્ણ પાને સક્ષમ
 
ટીમ ઇન્ડીયા.... હુહ... વર ને કોણ વખાણે ?... :)) સાઉથ આફ્રિકા કે પાસ ક્યા હૈ હાય ??? સ્મિથ હૈ... આમલા હૈ ... કાલીસ હૈ.. બોથા હૈ... સ્ટીન હૈ... મોર્કલ,પરનેલ.ડીવિલિયર્સ હૈ.... હમારે પાસ સાચીન હૈ ... :)) બાય ચ્ધ્વે સચિને પડતો મુકીએ તો ફૂટવર્ક વ...ગર નો ભૂસું ભરેલો સહેવાગ જો ઇટવા વાળી કરશે ને તો દડો પ્રેક્ષકો માં જ જોવા મળશે ... દિલશાન કરતા ૧૦૦% વધુ ખાતર નાક છે ... અને પઠાણ જો ઇત્શે ને તો દડો હાથ માં ની આવે ... પોલાર્ડ ની જેમ જ. એ સિવાય રીના નું ફૂત્વાર મસ્ત છે .. ગંભીર વિરાટ ફોર્મ માં છે ... આવી સ્થિતિ માં યુવી ને રમાડવો કે nahI એ પ્રશ્ન છે ... ચાવલા એતેકીંગ છે .. પણ શરુ આત માં જુદાઈ ગયો તો ભારે પડશે ... એ સિવાય ભજ્જી તો છે જ સંકટ મોચક હનુમાન ... ફાસ્ટ માં ઝાહિર નહેરા.. પ્રવીણ ની ખોટ સાલશે ... મુનાફ ની આ બદલાયેલી બોલિંગ મને બહુ ગમી ... જોઈએ શું થાય છે


In real time how the abstraction and interface uses when we go for those concept in real time.



Both abstract classes and interfaces are used when there is a difference in behaviour among the sub-types extending the abstract class or implementing the interface.

When the sub-types behaviour is totally different then you use an interface, when the sub-types behaviour is partially common and different with respect to the supertype an abstract class is used. In an abstract class the partially common behaviour is given a concrete implementation. Since there is no common behaviour between an interface and a sub-type an interface does not have an implementation for any of its behaviour.

Let’s assume you are developing a framework for a 'killer' competition where the people who participate have to demonstrate their killing skills. Members participating in the competition have their own ways of killing. It could be as different as 'using a gun to kill', 'throwing the victim up in the air and kicking his balls when he victim comes down, ’slitting his throat or behaeding the victim'

The expected behaviour here is to 'KILL', though all the members do have that behaviour 'KILL" each member manifests the behaviour in a different way. Since the behaviour manifestation varies from member to member this scenario calls for an interface.

Interface KilingCompetition{ 
  Corpse kill(); 
}



Each member will implement this interface and give an implementation in his/her own way.

Now, lets consider a karate competition(is it called sparring?). Here each member has to follow certain things as laid out by the organizers or the karate protocol. It may include things like bowing to the opponent before and after the fight starts, taking a stand etc. Now these behaviours are common and has to manifested in the same way by every paticipating member. But the behaviour 'fight' will differ from member to member. So now we have a set of common behaviour and also a behaviour which manifests differently from member to member. this calls for an abstract class where you give implementation to the common behaviour and make the differeing behaviour abstract and hence the class abstract.

public abstract class KarateFight{ 
      public void bowOpponent(){ 
         //implementation for bowing which is common 
         // for every participant 
      }
      public void takeStand(){ 
         //implementation which is common 
         // for every participant 
      }
      public abstract boolean fight(Opponent op); 
      //this is abstract because it differs from 
      // person to person 
}


What is the difference between interface and abstract class?


§         interface contains methods that must be abstract; abstract class may contain concrete methods. 
§         interface contains variables that must be static and final; abstract class may contain non-final and final variables. 
§         members in an interface are public by default, abstract class may contain non-public members. 
§         interface is used to "implements"; whereas abstract class is used to "extends". 
interface can be used to achieve multiple inheritance; abstract class can be used as a single inheritance. 
§         interface can "extends" another interface, abstract class can "extends" another class and "implements" multiple interfaces. 
§         interface is absolutely abstract; abstract class can be invoked if a main() exists. 
interface is more flexible than abstract class because one class can only "extends" one super class, but "implements" multiple interfaces. 
§         If given a choice, use interface instead of abstract class.











Here are 6 of the new features that have been completed:
  • Language support for collections
  • Automatic Resource Management
  • Underscores in numeric literals
  • Strings in switch
  • Binary literals
  • Simplified Varargs Method Invocation
An update was given on the new language changes that will be in Java 7. The JDK currently has a release date of September 2010.
There is a lot more to Java 7 then just these language changes. I’ll be exploring the rest of the release in future posts. One of the big debates is currently around Closures, which are a separate JSR.

Language support for collections

Java will be getting first class language support for creating collections. The style change means that collections can be created like they are in Ruby, Perl etc.
Instead of:
List list = new ArrayList<String>();
list.add("item");
String item = list.get(0);

Set set = new HashSet<String>();
set.add("item");

Map map = new HashMap<String, Integer>();
map.put("key", 1);
int value = map.get("key");
You will be able to use:
List list = ["item"];
String item = list[0];

Set set = {"item"};

Map map = {"key" : 1};
int value = map["key"];
These collections are immutable.

Automatic Resource Management

Some resources in Java need to be closed manually like InputStream, Writers, Sockets, Sql classes. This language feature allows the try statement itself to declare one of more resources. These resources are scoped to the try block and are closed automatically.
This:
BufferedReader br = new BufferedReader(new FileReader(path));
try {
   return br.readLine();
} finally {
   br.close();
}
becomes:
try (BufferedReader br = new BufferedReader(new FileReader(path)) {
   return br.readLine();
}
You can declare more than one resource to close:
try (
   InputStream in = new FileInputStream(src);
   OutputStream out = new FileOutputStream(dest))
{
 // code
}
To support this behaviour all closable classes will be retro-fitted to implement a Closableinterface.

Underscores in numeric literals

Long numbers are hard to read. You can now split them up using an underscore in ints and longs:
int one_million = 1_000_000;

Strings in switch

Currently you can only use numbers or enums in switch statements. String has been added as a candidate:
String s = ...
switch(s) {
 case "quux":
    processQuux(s);
    // fall-through

  case "foo":
  case "bar":
    processFooOrBar(s);
    break;

  case "baz":
     processBaz(s);
    // fall-through

  default:
    processDefault(s);
    break;
}

Binary literals

Java code, due to its C heritage, has traditionally forced programmers to represent numbers in only decimal, octal, or hexadecimal.
As quite a few domains are bit orientated, this restriction can introduce errors. You can now create binary numbers using an 0b prefix.
int binary = 0b1001_1001;

Simplified Varargs Method Invocation

When a programmer tries to invoke a *varargs* (variable arity) method with a non-reifiable varargs type, the compiler currently generates an “unsafe operation” warning. JDK 7 moves the warning from the call site to the method declaration. This will enable API designers to use varargs due to the reduction of warnings reported.
This one is slightly more involved so you are better off looking at the proposal.
Thanks to John Wright