Friday, September 29, 2006

Knowing whether you have QuickTime ActiveX installed or not

There are some Websites which has Quick-Time Oriented content, where you'll be the unfortunate one who could not view it. The problem is that your machine has not installed the Quicktime ActiveX which is required. So in order to know whether your computer has already installed or not or if your having problems viewing certain websites, pls. refer the following link which will indicate whether your machine has installed the necessary QuickTime Activex or not:
 
http://www.apple.com/quicktime/download/qtcheck/
 
 

Wednesday, July 05, 2006

Thoughts...

Why is it so hard to tell the truth ...yet so easy to tell a lie,
why do we sleep in the church..but when the sermon is over we suddenly wake up?
why is it so hard to talk about God...but so easy to talk about sex?
why are we so bored to look at a Christmas magazine..but so easy to read a vibe magazine ?
why is it so easy to delete a godly offline messages ...yet we forward the nasty ones?
why are the churches getting smaller..but yet the bars and clubs are growing ??
think about it..
Just remember God is watching you in his list.
..

Wednesday, June 28, 2006

Use Transaction in MIDAS

This is a article I found from Mr. Chen Jiangyong on Use of Transaction with MIDAS:
 
Transaction is very popular used in database programming. It's very easier used in Two-Tier application. How do it in Three-Tier? I have try to use cache-update in remote data modules and use transaction, I test it successfully in Delphi 4. But to do it cost many code and low performance. When Delphi 5 coming, I try to use the same method, but failed. Maybe this is the bug of Delphi 5. I think that many person have the same situation with me. How can use transaction in MIDAS? I try another method, just do it at BeforeUpdateRecord event. For example, when I edit table A, I want to insert a log to another table B. To do this, first:

1) create a remote data module , drop a query to select records from table A, drop a TUpdateSQL for the query, specify the SQL statement of Table A. Drop a TDatasetprovider hook to the query. Drop another query, then in its SQL property write the insert SQL statement to table B.

2) In the BeforeUpdateRecord event, I write this code:

  SetParams(UpdateSQL1, DeltaDS, UpdateKind);   

  UpdateSQL1. ExecSQL(UpdateKind);
  if UpdateKind = ukUpdate then begin
    { Insert a log to Table B}
    // set the params ­
    Query2.ExecSQL;
  end;
  Applied := True;

3) In the client, you should also make some change. When you try to save the changes, use ApplyUpdates(0) instead of ApplyUpdates(-1). For example:

  ClientDataSet1.ApplyUpdates(0)

  This is OK. Delphi does it well. If a error occur when you try to insert a log to Table B, the transaction will rollback, then you can find that Table A's record is not changed at all.
  I have tested it at Delphi 4, It also works very well.

Good Luck.

Monday, June 26, 2006

Creating GUIDs In Delphi

GUID values are unique and can be used to various tasks while programming. Therefore, it's appropriate that you know how to create one. Here Bill Todd of Team B shows to create it via Delphi:
 
 
FROM: Bill Todd \(TeamB\) 
DATE : Thurs, Nov 25 1999 12:00 am
 
You can generate a GUID in code by calling CoCreateGuid as shown below. You
must add the ActiveX unit to your uses clause.


<Code>

procedure
TForm1.Button2Click(Sender: TObject);
var
  G: TGuid;
begin
  CoCreateGuid(G);
end;


<\Code>

--
Bill

Bill Todd (TeamB)
(TeamB cannot respond to questions received via email)

Source:

Click here

Friday, June 23, 2006

Da Predator

ENTER THE PREDATOR:

This is one of the coolest pics I found in the internet:



What inspired me about the "Predator" is his armoury, gadgets and his body kit. Wish I had those! The movie "Predator-1" and "Predator-2" does highlight him as the bad guy who brutually kills all bad guys. However in the movie: "AVP" his role remains more similar to the earlier movies, but later companions a human to demolish the rising alien dominancy.

Wednesday, June 21, 2006

Delphi Ruined him

This is a gr8 quite funny and stressed post from Warren Postma I found while browsing:
 
Periodically I get a notion to explore the wide world of other
development tools out there.   Every time I try, I get frustrated, and I
give up.  Partly I think it's because my brain has locked into Delphi
mode so tightly that I can't think of anything else.  Partly it's
because Delphi has spoiled me rotten, and I'm absolutely floored by the
stuff that I have to deal with when I try to use any other tool.  Now
the reason I'm looking around for a new development tool to learn, is so
I can have a tool for writing cross-platform code, hopefully that will
work on Windows, Mac, and Linux.

Has anyone else been in this spot, and had a look around? What did you
do?  Did you plan to have an affair with another language, and then come
home happily to Delphi, knowing it would still have you back again?

- I tried Java again recently. I was really impressed by NetBeans and
the new "matisse" GUI builder.  I am not at all impressed by Eclipse,
although I like the SWT framework the gui-builders for Eclipse that are
any good are quite expensive, and I don't feel like paying $$$ just to
play around and learn the new tool.

- I tried a few Smalltalks, because as we all know, Smalltalk should
have been a really important and powerful programming languages, but for
some reason, it never achieved success. There's Dolphin, for which a
free version exists, and there's Squeak, which is entirely free. Both
are really interesting to play with, but I must admit my brain is so
wired for the procedural style of coding that I can't bear to write a
for-loop in Smalltalk, or send messages between integers. It just seems
weird and wrong to me.  And closures and stuff.  And I think that at
this point, learning Smalltalk is about as pointless as learning COBOL.

- I'd try a LISP, but I have no idea whether a LISP gui builder RAD tool
even exists. Perhaps LISP programmers can't be bothered to look up from
their latest EMACS macros-that-generate-macros-that-generate-LISP-code,
in order to consider the needs of the GUI-building population.

- I downloaded MS Visual C# express, but I don't like DotNet, and I'd
rather not learn another Windows-only tool. Delphi does fine for
Windows. I'd really like to learn something that gets me free from
Windows completely.  Maybe DotNet is the way to go, and I should learn
to love C#, and hope that MONO achieves maturity.

- I really like Python, but every single python gui framework seems too
full of accidental complexity, or too ugly, or both. Tcl/Tk is ugly. 
wxWindows is really hard to learn.  QT is licensed in a way that makes
using it on Windows cost a lot of money.  BOA constructor is a neat toy,
but I haven't been able to do anything useful with it yet.

- For confirmed delphi bigots, such as myself, perhaps Lazarus is the
right way to cross-platform myself, but as much progress as Lazarus has
made, it's still not ready for prime time; it lacks packages, and the
LCL/FCL components/code-libraries are rather klunky and limited in
features when compared with the VCL.

So what did YOU do last time you felt like trying another developer
tool? Can you find it in your heart to say anything good about any other
development tool? Or are you a crabby old Delphi guy like me, dyed in
the wool, and unlikely ever to repent?

Warren

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~End of Post~~~~~~~~~~~~~~~~~~~~~~~~~~`
For further reading the entire post, go to:
http://delphi.newswhat.com/geoxml/forumgetthread?groupname=borland.public.delphi.non-technical&messageid=4484a839$1@newsgroups.borland.com&displaymode=all
 
 

Monday, June 12, 2006

Beginning of the end

We Sri Lankan suffer the most when it comes to cost of living. Last Sunday, the Government of Sri Lanka (GOSL)  increased the petrol products. This is a big blow for the consumers, particularly the average middle man who uses kerosene for cookery and other purposes. We had seen price hike of essential commodities, and in some cases with out aware of the public. Further more, the ongoing Lanka IOC and GOSL have been settled for some degree by allowing the Lanka IOC company to determine the fuel prices from July 1st. Think what might happen if Lanka IOC, a private company is given the right to determine the fuel price of Sri Lanka, the circumstances
 
Think of an average man's point of view. He has the burden to settle his Electricity, Water and Telephone bills, plus taxes and have to feed his family and have to look after other expenses as child's education, Travel...etc. How can a man handle with a small income. It's evident that there is hardly no saving for an individual these days, however if Cost of living soars like this, there is nothing but to suicide himself. Suicide is beginning to be a common thing, and in couple of months ago we saw two farmers suicide themselves due to can not sell their paddy for reasonable price.
 
The present government is playing the fiddle with the public. They acknowledged the public who voted them in the presidential election held on January by increasing the Gas price (We felt that this is not the end, but the beginning of the end), then increased essential commodities, yet again increased the fuel and more often which resulted in hike in the private bus transportation, and on last Sunday people didn't expect another fuel hike, but it happened.
 
As I said earlier this is the beginning and not the end of the so called "chintanaya". Tight your seat belts cos there more to come.
 

Thursday, June 01, 2006

Being a Geek!

This is a great description I got from Patti's Blog about "GEEK":

Now, don't stress just yet. I know that the term "GEEK" has been used in the past as an insult or a stereo-type for losers. However, the term "GEEK" has taken on new meaning over the past few years.

A GEEK is anyone who takes pride in what they do... and is actually good at it. GEEK is not to be confused with the term "NERD". Nerds are the people who got wedgies in high school and then would run home crying. A GEEK is someone who got a wedgie in high school, then went home and crashed the "Wedgor's" computer... or would mix a concoction in chemistry class that would give the assailant severe diarrhea for a week.

A GEEK is someone you call when your computer breaks. GEEKS are the people you contact to help you build a web site or save a database. GEEKS run the computer network at your place of work. A GEEK can be found hosting a mass LAN party. GEEKS write programs that balance your checkbook, organize your files and store/retrieve information... and restarts your computer more often so that you don't have to. A GEEK is someone you call when you have any kind of technological question. GEEKS are respected by others and are in high demand. GEEKS know what they are doing. Nerds are clueless little imps that can't tell the difference between Barney the purple dinosaur and Tux the (LINUX) penguin.

GEEK is a rockin' term, and to be a GEEK is a far greater compliment than any other. Because being a GEEK  does not only mean you are good looking... but it also means that you are good at what you do.

All GEEKS should respect one another. These days, the geeks are having their revenge. Rich and successful geeks are everywhere, or at least they appear to be. There is even a Geek Pride Festival, a celebration of all things GEEK. That is why I'm rounding up all of the GEEK .. we need to stand up and shout it…

Source: http://www.geekgirldigest.com/

 
 

Wednesday, May 24, 2006

UNP remains the power house in Colombo

Last Saturday saw the completion of Local government election and the results were out by Monday. I was really happy to see that UNP powered Independent Group 3 coming front again. Never ever in the history that the Colombo District have gone out of the hands of UNP as far as I'm concerened. People still have faith on UNP, hope it will remain unchanged.

To see the results pls follow this URL : http://www.news.lk/lg_election_2006/01A.html

Graham Thrope

Memories of Graham Thrope:
England Tour of Sri Lanka 2001/02.

On last Sunday, I had the opportunity to watch Sanjay Manjerkar’s Modern Masters show, where they featured two great cricket players of England. Among them was Graham Thorpe. He was one of my favorites. The programme showed some highlights of the England Tour to the Caribbean and South Africa. This reminded me about the innings he played in Sri Lanka on the Tour in 2001. He was at his peak in this series. This series sparkled some controversy over the umpires decision made.



To give a brief summary, England was completely outplayed in the 1st Test played at Galle. The main reason behind this was the inability to cope the turning ball of Muralitharan and swing of Vaas. There feet weren’t moving well and more often you can see them stuck in the crease and was waiting for the ball to come to them. Non of the Englishmen fared well but one stood up and it was non other than the “New Kid on the Block”: Marcus Trescothick with a 119 in the First Test.

Then came the 2nd Test in Kandy. It was bright and sunny day and thankfully there weren’t any interruption from Mother Nature. The environment looked some what ideal to the Englishmen. This match saw the emergence of Graham Thorpe’s form as he scored 54 & 46. Overall, the Englishmen’s feet were moving well and they did cope the spin and swing quite well which resulted in a much wanted win and squared the series, in fact they did it with some difficulty.



Finally it was upto the 3rd Test decide the winner of the series. Sri Lanka batted first, and made 241 with Mahela Jayawardena scoring a worth wile 71. England batted in their 1st innings and were in trouble from the word “GO”. They ended up scoring 249 with Graham Thrope leading the way with an unbeaten 113 out of it and almost scoring half of team’s runs. It was great to see him in total control and handled the spin and swing very well. He cutted, reverse sweept, and the most best of all his pull which was memorable to watch. He was in control and for the first time Murali and Vaas went out of ideas. Sri Lanka’s misery continued in their 2nd innings as they went down with out a fight for a mere 81 runs. It was a disappointing effort from the Sri Lankans, Which gave the Englishmen to score a mere 74 of 25 Overs runs to wrap-up the series. England Startted yet again with trouble loosing quick wickets at regular intervals and this time it was Sanath Jayasuriya with his part time left arm spin which gave a horrible time to the englishment. It was upto Graham Thrope again and he did it with scoring an unbeten 32.

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

Wednesday, March 29, 2006

Crickets' best in 2005

Sorry it took a while to publish this as I was continuously involved with a hectic schedule and hardly got a time to write freely.

2005 remarked a great era for cricket. Many milestones were achieved and many extraordinary things happened. Overall it’s been good for cricket and we are happy to see some good cricket matches. I take this opportunity to rate top 5 best things happened in 2005 in my perspective.

Rise from the Ashes:

This is simply best cricket series I ever had seen. It got all from excitement to thrill to anticipation to disappointment. England had to wait for 18 years to achieve this feat again, and boy the way they did it is awesome. Freddie Flintoff, Kevin Petersen, Simon Jones was at their peak. This is the same time when England found out their new revelation of reverse swing. You can’t take Shane Warne off the screen in any circumstances, I still remember the way he bowled Andrew Strauss by pitching the ball far from the off side and turned and hit the leg stump in that series, and boy it's amazing. Looking forward for Operation "Demolition in Australia", hope England could repeat their heroics in the next ashes in Australia.

Thrilling Tie in the Final:
Once again it’s an Australia Vs. England show. This time it’s the Shorter version of the game and the finals played for Natwest Series at Lords. The game went to the wire and it was never the end until the last ball has been bowled. Australia was bowled with a highly packed batting line out only managing for mere 196 and England were at one stage were 33 runs with 5 wickets down. It was upto Paul Collingwood and Geraint Jones who had a 116 runs partnership for the 5th wicket, though they weren’t the heros of the particular day was Ashley Giles who snicked a 2 run leg bye off the last ball of the last over.

New Kid on the Block: Michael Hussey:
Frankly, had to wait until the VB Series is on to see this guy. I heard him when Australia toured England, and was starting to make loud echoes of him. What impressed me about him was his never say die attitude. Though he might be a Michael Bevan sought of a guy, he has more than him. His ability to have the big hits on time is quite impressing and he can’t simply stay in a place always in the run. I still remember the way hit that big hit in Telstra dome, and eventually it wasn't decided as six! That was disappointing.

Bangladesh's win over Australia:
Don’t ever think that your day dreaming. This happened, and every one was shocked to hear this news. It’s like a ant pulling off an elephant. Anyway, Bangladeshi put up a good show, hats off to them, but it’s very disappointing to see good performances by more often. Ashrafull scored an unbeaten century to pull off a shocker.

Return of Brian Charles Lara:
He is my favorite and he will be. I'll be glued to the TV when he is on song. I like to see every shot he plays. He went on a poor form in 2005, particularly in the Super Series, but he came back strongly with 231 Vs. Australia in Adelaide despite Australia trouncing the West Indies to win the series 3-nil. It’s very sad that even big score scored by a batsmen still ends up in the loosing side. Further, he announced that this would be his final tour to Australia. He still is the best.


Your comments and suggestions are most welcomed.

Regards,


Hifni Shahzard Nazeer, M.