Archive for April, 2010

affiliates from ShareIt

Sunday, April 25th, 2010

In last few days I got a lot of requests to approve the new affiliates via ShareIt control panel. I added only the BetaNews, DownloadPipe and Lockergnome. All others are not added and not declined.

Do not know why they want to add my products because the affiliates do not work for me. Seems like ShareIt sent the mails to own large affiliates with list of products and I’m there.

formating number

Wednesday, April 21st, 2010
function GetFormattedNumber(Value: Double): string; 
  function GetLastPos(const s: string): Integer; 
    Result := Pos(DecimalSeparator, s)-1; 
    if (Result < 1) then 
      Result := Length(s) 
  i: Integer; 
  Result := FloatToStr(Value); 
  i := 3; 
  while (i < GetLastPos(Result)) do 
    Insert(' ', Result, GetLastPos(Result)-i+1); 
    Inc(i, 4) 

Sample to use:

  lblTotal.Caption := GetFormattedNumber(123456.789);

Why I wrote this function? In Delphi I could use the FormatFloat(‘,###’, dbl) but FormatFloat uses the thousand separator which is defined in MS Windows (#160 by default). I need the space char always