Wednesday, April 19, 2006

A better World in my view

America rubs salt in our wounds!


Earlier they were after Iraq for WMD (which they didn’t find a single trace), now they are after Iran for the same reason. The consequences are mass amount of human deaths and higher fuel prices and many more. They are a problem, if not a nuisance for the world society. The consequences of a probable war wouldn’t affect them, but would affect the other nations in a big way, particularly the poor nations.

They said they will bring peace, but has bought the opposite. They said they will rebuild, but how can they repay the lost lives? Every effort they took was in vain. So far how many lives have lost, how many children have been orphaned? Everyday I hear that at least 10 people die in Iraq and Afghanistan. I guess America’s policy is some what like Dictatorship and Invasion of other countries. I think the era of colonialism is going to be back, we may see countries invading other countries. The same as we learned in our History books. They are teaching a very bad example for the world. This is the worst side of it.

Fuel Prices up means that Cost of living is going up. Yesterday the SL Government announced a Rs. 8 hike on fuel prices. This means public transport fares are likely to go up in due course. Further, Gas Prices, and fast food items may see a hike as well. We are getting a low income, and with that there haven’t been a single savings. Now this turn will further worsen our lives.


Sanctions: Do we see a positive result out of it?

The UN and particularly the Americans are always on the sanctions. If any countries doesn’t either obey or follow the UN order, then tighten your seat belts coz sanctions are nearby. They don’t see what’s coming out of it and who suffers the most of it? It won’t affect a political leader of that country nor its government, but those who will be suffering would be the people themselves. No medicines! No Food! Professionals migrate to other countries to seek asylum leaving hardly anyone to look up after their country.


Voting for the same government consequently: the worse side

In my point of view most of politician is not a good guy. Most of them (very few) are culprits! Always money hunger and self- concerned people rather than their own country. What’s my suggestions to all of you is don’t elect a party that have won earlier, instead vote for another party. By this, the culprits won’t get a long period to do the culprit works. Always insist on a change. At least their culprit’s works is limited.

Saturday, April 08, 2006

"If I have seen further, it is by standing upon the shoulders of giants"

I sense that this quote has something very special, something transparent that we could not see nor judge the outcome.

If I have seen further, it is by standing upon the shoulders of giants


Sir Isaac Newton was an English physicist, mathematician, astronomer, alchemist, inventor and natural philosopher who is generally regarded as one of the most influential scientists in history.

This quote is from a letter written to fellow scientist, Robert Hooke in February 1675. The phrase is understood to mean that if Newton had been able to discover more about the universe than others, then it was because he was working in the light of discoveries made by fellow scientists, either in his own time or earlier. There is some suggestion that the phrase may also have had a sarcastic undertone - some historians report that Robert Hooke began to disagree with a number of Newton's theories, and Hooke himself was reportedly quite short in height.

About Sir Issac Newton:
The son of a farming family, Sir Isaac Newton was born in Lincolnshire in England in 1643. He is best known as the scientist who first identified the effects of gravity. A popular story claims that Newton was inspired to formulate his theory of universal gravitation by the fall of an apple from a tree. Cartoons have gone further to suggest the apple actually hit Newton's head, and that its impact somehow made him aware of the force of gravity. However, there is no basis to that interpretation.

Unique for time, Newton is also famous for his revolutionary discoveries in mathematics, optics, physics and astronomy. His book Principia, published in 1687, is regarded as the greatest scientific book ever written, and his discoveries have been the basis for much scientific research.

To Check other good quotes, go to: BBC's Moving Words

Tuesday, April 04, 2006

Exporting to Text File

I was in dire need to find out a function which exports table to text file. While googling around, i found out some interesting codes which I would like to share with you all.


Jeremy Collin's Code:
const
  InvalidFieldTypes = [ftMemo, ftBlob, ftGraphic, ftFmtMemo,
ftParadoxOle,
    ftDBaseOle, ftTypedBinary];

function TableToText(const tbl : TDataset; FileName : string;
  Delimiter : Char; FieldNames : boolean): boolean;
var
  f             : TextFile;
  i             : integer;
  bmk   : TBookmark;
begin
  if not(tbl.Active) then
    tbl.Open;
  bmk := tbl.GetBookMark;

  AssignFile(f, Filename);
  ReWrite(f);
  try
    with tbl do begin
      if FieldNames then begin  //write field names to top of file
        for i := 0 to FieldDefs.Count - 1 do
          if not(FieldDefs[i].DataType  in InvalidFieldTypes) then begin
            Write(f, UpperCase(FieldDefs[i].Name));

            if i < FieldDefs.Count - 1 then
              Write(f, Delimiter);
          end;
        WriteLn(f);
      end;

      //write field data
      First;
      while not Eof do begin
        for i := 0 to FieldDefs.Count - 1 do begin
          if not(FieldDefs[i].DataType in InvalidFieldTypes) then begin
            Write(f, '"' + Fields[i].AsString + '"');
            if i < FieldDefs.Count - 1 then
              Write(f, Delimiter);
          end;
        end;
        WriteLn(f);
        Next;
      end;
      Result := True;
    end;
  finally
    tbl.GotoBookmark(bmk);
    tbl.FreeBookmark(bmk);
    CloseFile(f);
  end;
end;
--


URL