亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ulkjson.pas

?? json delphi component
?? PAS
?? 第 1 頁 / 共 4 頁
字號:
    TlkJSONbase): Boolean;
  var
    js: TlkJSONlist;
  begin
    result := false;
    try
      js := TlkJSONlist.Create;
      skip_spc(idx);
      result := xe(idx);
      if not result then exit;
      result := txt[idx] = '[';
      if not result then exit;
      inc(idx);
      while js_base(idx, idx, TlkJSONbase(js)) do
        begin
          skip_spc(idx);
          if (xe(idx)) and (txt[idx] = ',') then inc(idx);
        end;
      result := (xe(idx)) and (txt[idx] = ']');
      if not result then exit;
      inc(idx);
    finally
      if not result then
        begin
          js.Free;
        end
      else
        begin
          add_child(o, TlkJSONbase(js));
          ridx := idx;
        end;
    end;
  end;

  function js_method(idx: Integer; var ridx: Integer; var o:
    TlkJSONbase): Boolean;
  var
    mth: TlkJSONobjectmethod;
    ws: TlkJSONstring;
  begin
    result := false;
    try
      ws := nil;
      mth := TlkJSONobjectmethod.Create;
      skip_spc(idx);
      result := xe(idx);
      if not result then exit;
      result := js_string(idx, idx, TlkJSONbase(ws));
      if not result then exit;
      skip_spc(idx);
      result := xe(idx) and (txt[idx] = ':');
      if not result then exit;
      inc(idx);
      mth.FName := ws.FValue;
      result := js_base(idx, idx, TlkJSONbase(mth));
    finally
      if ws <> nil then ws.Free;
      if result then
        begin
          add_child(o, TlkJSONbase(mth));
          ridx := idx;
        end
      else
        begin
          mth.Free;
        end;
    end;
  end;

  function js_object(idx: Integer; var ridx: Integer; var o:
    TlkJSONbase): Boolean;
  var
    js: TlkJSONobject;
  begin
    result := false;
    try
      js := TlkJSONobject.Create;
      skip_spc(idx);
      result := xe(idx);
      if not result then exit;
      result := txt[idx] = '{';
      if not result then exit;
      inc(idx);
      while js_method(idx, idx, TlkJSONbase(js)) do
        begin
          skip_spc(idx);
          if (xe(idx)) and (txt[idx] = ',') then inc(idx);
        end;
      result := (xe(idx)) and (txt[idx] = '}');
      if not result then exit;
      inc(idx);
    finally
      if not result then
        begin
          js.Free;
        end
      else
        begin
          add_child(o, TlkJSONbase(js));
          ridx := idx;
        end;
    end;
  end;

  function js_base(idx: Integer; var ridx: Integer; var o:
    TlkJSONbase): Boolean;
  begin
    skip_spc(idx);
    result := js_boolean(idx, idx, o);
    if not result then result := js_null(idx, idx, o);
    if not result then result := js_number(idx, idx, o);
    if not result then result := js_string(idx, idx, o);
    if not result then result := js_list(idx, idx, o);
    if not result then result := js_object(idx, idx, o);
    if result then ridx := idx;
  end;

var
  idx: Integer;
begin
{$ifdef HAVE_FORMATSETTING}
  GetLocaleFormatSettings(GetThreadLocale, fs);
  fs.DecimalSeparator := '.';
{$endif}

  result := nil;
  if txt = '' then exit;
  try
    idx := 1;
    if not js_base(idx, idx, result) then FreeAndNil(result);
  except
    if assigned(result) then FreeAndNil(result);
  end;
end;

{ ElkIntException }

constructor ElkIntException.Create(idx: Integer; msg: string);
begin
  self.idx := idx;
  inherited Create(msg);
end;

{ TlkHashTable }

procedure TlkHashTable.AddPair(const ws: WideString; idx: Integer);
var
  i, j, k: cardinal;
  p,p2: PlkHashItem;
begin
  if InTable(ws, i, j, k) then
    begin
// if string is already in table, changing index
//      a_h[j, k].index := idx;
      PlkHashItem(a_x[j].Items[k])^.index := idx;
    end
  else
    begin
//      k := length(a_h[j]);
//      SetLength(a_h[j], k + 1);
//      a_h[j, k].hash := i;
//      a_h[j, k].index := idx;
//// sorting array of hashes
//      while (k > 0) and (a_h[j, k].hash < a_h[j, k - 1].hash) do
//        begin
//          hswap(j, k, k - 1);
//          dec(k);
//        end;
//--- new version
      GetMem(p,sizeof(TlkHashItem));
      k := a_x[j].Add(p);
      p^.hash := i;
      p^.index := idx;
      while (k>0) and (PlkHashItem(a_x[j].Items[k])^.hash <
        PlkHashItem(a_x[j].Items[k-1])^.hash) do
        begin
          a_x[j].Exchange(k,k-1);
          dec(k);
        end;
    end;
end;

function TlkHashTable.counters: string;
var
  i, j: Integer;
  ws: string;
begin
  ws := '';
  for i := 0 to 15 do
    begin
      for j := 0 to 15 do
//        ws := ws + format('%.3d ', [length(a_h[i * 16 + j])]);
        ws := ws + format('%.3d ', [a_x[i * 16 + j].Count]);
      ws := ws + #13#10;
    end;
  result := ws;
end;

procedure TlkHashTable.Delete(const ws: WideString);
var
  i, j, k: cardinal;
begin
  if InTable(ws, i, j, k) then
    begin
//      while k < high(a_h[j]) do
//        begin
//          hswap(j, k, k + 1);
//          inc(k);
//        end;
//      SetLength(a_h[j], k);
      FreeMem(a_x[j].Items[k]);
      a_x[j].Delete(k);
    end;
end;

{$IFDEF THREADSAFE}
const
  rnd_table: array[0..255] of byte =
(216,191,234,201,12,163,190,205,128,199,210,17,52,43,38,149,40,207,186,89,92,179,142,93,208,215,162,
161,132,59,246,37,120,223,138,233,172,195,94,237,32,231,114,49,212,75,198,181,200,239,90,121,252,211,
46,125,112,247,66,193,36,91,150,69,24,255,42,9,76,227,254,13,192,7,18,81,116,107,102,213,104,15,250,
153,156,243,206,157,16,23,226,225,196,123,54,101,184,31,202,41,236,3,158,45,96,39,178,113,20,139,6,
245,8,47,154,185,60,19,110,189,176,55,130,1,100,155,214,133,88,63,106,73,140,35,62,77,0,71,82,145,180,
171,166,21,168,79,58,217,220,51,14,221,80,87,34,33,4,187,118,165,248,95,10,105,44,67,222,109,160,103,
242,177,84,203,70,53,72,111,218,249,124,83,174,253,240,119,194,65,164,219,22,197,152,127,170,137,204,
99,126,141,64,135,146,209,244,235,230,85,232,143,122,25,28,115,78,29,144,151,98,97,68,251,182,229,56,
159,74,169,108,131,30,173,224,167,50,241,148,11,134,117,136,175,26,57,188,147,238,61,48,183,2,129,
228,27,86,5);
{$ELSE}
var
  rnd_table: array[0..255] of byte;
{$ENDIF}

function TlkHashTable.DefaultHashOf(const ws: WideString): cardinal;
{$IFDEF DOTNET}
var
  i, j: Integer;
  x1, x2, x3, x4: byte;
begin
  result := 0;
//  result := 0;
  x1 := 0;
  x2 := 1;
  for i := 1 to length(ws) do
    begin
      j := ord(ws[i]);
// first version of hashing
      x1 := (x1 + j) {and $FF};
      x2 := (x2 + 1 + (j shr 8)) {and $FF};
      x3 := rnd_table[x1];
      x4 := rnd_table[x3];
      result := ((x1 * x4) + (x2 * x3)) xor result;
    end;
end;
{$ELSE}
var
  x1, x2, x3, x4: byte;
  p: PWideChar;
begin
  result := 0;
  x1 := 0;
  x2 := 1;
  p := PWideChar(ws);
  while p^ <> #0 do
  begin
    inc(x1, ord(p^)) {and $FF};
    inc(x2, 1 + (ord(p^) shr 8)) {and $FF};
    x3 := rnd_table[x1];
    x4 := rnd_table[x3];
    result := ((x1 * x4) + (x2 * x3)) xor result;
    inc(p);
  end;
end;
{$ENDIF}

procedure TlkHashTable.hswap(j, k, l: Integer);
var
  h: TlkHashItem;
begin
//  h := a_h[j, k];
//  a_h[j, k] := a_h[j, l];
//  a_h[j, l] := h;
  a_x[j].Exchange(k,l);
end;

function TlkHashTable.IndexOf(const ws: WideString): Integer;
var
  i, j, k: Cardinal;
begin
  if not InTable(ws, i, j, k) then
    begin
      result := -1;
    end
  else
    begin
//      result := a_h[j, k].index;
      result := PlkHashItem(a_x[j].Items[k])^.index;
    end;
end;

function TlkHashTable.InTable(const ws: WideString; var i, j, k: cardinal):
  Boolean;
var
  l, wu, wl: Integer;
  x: Cardinal;
  fin: Boolean;
begin
  i := HashOf(ws);
  j := i and $FF;
  result := false;
//  if length(a_h[j]) < 25 then
  if a_x[j].Count < 25 then
    begin
//// for small array use linear search
//      for l := 0 to high(a_h[j]) do
//        if a_h[j, l].hash = i then
//          begin
//            k := l;
//            result := true;
//            break;
//          end;
      for l := 0 to a_x[j].Count-1 do
        if PlkHashItem(a_x[j].Items[l])^.hash = i then
          begin
            k := l;
            result := true;
            break;
          end;
    end
  else
    begin
// for larger array use "binary" search, becouse array is sorted
//      wl := low(a_h[j]);
//      wu := high(a_h[j]);
      wl := 0;
      wu := a_x[j].Count-1;
      repeat
        fin := true;
        if PlkHashItem(a_x[j].Items[wl])^.hash = i then
          begin
            k := wl;
            result := true;
          end
        else if PlkHashItem(a_x[j].Items[wu])^.hash = i then
          begin
            k := wu;
            result := true;
          end
        else if (wu - wl) > 1 then
          begin
            fin := false;
            x := (wl + wu) shr 1;
            if PlkHashItem(a_x[j].Items[x])^.hash > i then
              begin
                wu := x;
              end
            else
              begin
                wl := x;
              end;
          end;
      until fin;
    end;
end;

{$ifndef THREADSAFE}
procedure init_rnd;
var
  x0: Integer;
  i: Integer;
begin
  x0 := 5;
  for i := 0 to 255 do
    begin
      x0 := (x0 * 29 + 71) and $FF;
      rnd_table[i] := x0;
    end;
end;
{$endif}

procedure TlkHashTable.SetHashFunction(const AValue: TlkHashFunction);
begin
  FHashFunction := AValue;
end;

constructor TlkHashTable.Create;
var
  i: Integer;
begin
  inherited;
//  for i := 0 to 255 do SetLength(a_h[i], 0);
  for i := 0 to 255 do a_x[i] := TList.Create;
  HashOf := {$IFDEF FPC}@{$ENDIF}DefaultHashOf;
end;

destructor TlkHashTable.Destroy;
var
  i,j: Integer;
begin
//  for i := 0 to 255 do SetLength(a_h[i], 0);
  for i := 0 to 255 do
    begin
      for j := 0 to a_x[i].Count-1 do Freemem(a_x[i].Items[j]);
      a_x[i].Free;
    end;
  inherited;
end;

function TlkHashTable.SimpleHashOf(const ws: WideString): cardinal;
var
  i: Integer;
begin
  result := length(ws);
  for i := 1 to length(ws) do result := result + ord(ws[i]);
end;

{ TlkJSONstreamed }
{$IFNDEF KOL}

class function TlkJSONstreamed.LoadFromFile(srcname: string):
  TlkJSONbase;
var
  fs: TFileStream;
begin
  result := nil;
  if not FileExists(srcname) then exit;
  try
    fs := TFileStream.Create(srcname, fmOpenRead);
    result := LoadFromStream(fs);
  finally
    if Assigned(fs) then FreeAndNil(fs);
  end;
end;

class function TlkJSONstreamed.LoadFromStream(src: TStream):
  TlkJSONbase;
var
  ws: string;
  len: int64;
begin
  result := nil;
  if not assigned(src) then exit;
  len := src.Size - src.Position;
  SetLength(ws, len);
  src.Read(pchar(ws)^, len);
  result := ParseText(ws);
end;

class procedure TlkJSONstreamed.SaveToFile(obj: TlkJSONbase;
  dstname: string);
var
  fs: TFileStream;
begin
  if not assigned(obj) then exit;
  try
    fs := TFileStream.Create(dstname, fmCreate);
    SaveToStream(obj, fs);
  finally
    if Assigned(fs) then FreeAndNil(fs);
  end;
end;

class procedure TlkJSONstreamed.SaveToStream(obj: TlkJSONbase;
  dst: TStream);
var
  ws: string;
begin
  if not assigned(obj) then exit;
  if not assigned(dst) then exit;
  ws := GenerateText(obj);
  dst.Write(pchar(ws)^, length(ws));
end;

{$ENDIF}

{ TlkJSONdotnetclass }

{$IFDEF DOTNET}

procedure TlkJSONdotnetclass.AfterConstruction;
begin

end;

procedure TlkJSONdotnetclass.BeforeDestruction;
begin

end;

constructor TlkJSONdotnetclass.Create;
begin
  inherited;
  AfterConstruction;
end;

destructor TlkJSONdotnetclass.Destroy;
begin
  BeforeDestruction;
  inherited;
end;

{$ENDIF DOTNET}

{$ifndef THREADSAFE}
initialization
  init_rnd;
{$ENDIF}
end.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠狠色丁香婷婷综合久久五月| 亚洲第一狼人社区| 日韩欧美一级二级| 欧美亚洲尤物久久| 在线观看欧美精品| 色狠狠综合天天综合综合| 97精品久久久午夜一区二区三区 | 国产在线一区观看| 蜜桃精品视频在线观看| 日韩电影在线观看一区| 蜜臀精品一区二区三区在线观看| 日本在线不卡视频| 奇米四色…亚洲| 九九视频精品免费| 国产精品一区二区三区乱码| 国产一区二区伦理片| 国产呦精品一区二区三区网站| 国产精品欧美精品| 国产精品午夜在线观看| 日韩伦理av电影| 亚洲午夜在线观看视频在线| 首页国产丝袜综合| 开心九九激情九九欧美日韩精美视频电影| 青青国产91久久久久久| 另类小说一区二区三区| 国产成人综合在线观看| 波多野结衣欧美| 在线观看三级视频欧美| 欧美一区午夜视频在线观看 | 国产夜色精品一区二区av| 国产午夜精品福利| 亚洲女同女同女同女同女同69| 亚洲一区二区欧美| 另类小说一区二区三区| 成人国产视频在线观看| 欧美性受极品xxxx喷水| 精品三级在线观看| 国产精品美女久久久久久久久久久 | 欧美性大战久久久久久久| 欧美色男人天堂| 精品国产一区二区三区忘忧草| 国产日韩欧美精品在线| 亚洲精品午夜久久久| 免播放器亚洲一区| 成人av在线电影| 制服丝袜国产精品| 欧美韩国日本不卡| 午夜在线成人av| 国产久卡久卡久卡久卡视频精品| 色综合久久综合网97色综合| 在线电影一区二区三区| 国产亚洲制服色| 亚洲高清中文字幕| 国产精品亚洲人在线观看| 欧美一卡二卡三卡四卡| 不卡的av在线| 91精品国产入口| 欧美国产精品一区| 日本人妖一区二区| 99视频一区二区三区| 欧美一卡二卡三卡四卡| 亚洲欧美日韩久久| 国内精品伊人久久久久影院对白| 91免费版在线| 亚洲精品一区二区三区福利 | 国产一区二区毛片| 欧美日韩国产电影| 中文字幕一区二区三中文字幕| 日韩av电影天堂| 一本色道久久综合亚洲精品按摩| 精品少妇一区二区三区免费观看| 亚洲夂夂婷婷色拍ww47| 风间由美性色一区二区三区| 在线播放91灌醉迷j高跟美女| 国产精品久久久一区麻豆最新章节| 青娱乐精品视频在线| 在线亚洲+欧美+日本专区| 国产亚洲欧美在线| 男人的天堂久久精品| 日本韩国精品在线| 国产精品久久久久久久久免费樱桃 | 久久精品99国产精品日本| 日本国产一区二区| 国产精品全国免费观看高清 | 奇米精品一区二区三区在线观看一| 99久久久国产精品| 国产欧美视频在线观看| 久久不见久久见中文字幕免费| 欧美性大战xxxxx久久久| 亚洲三级在线免费| 成人高清在线视频| 国产性天天综合网| 国内精品久久久久影院薰衣草| 这里只有精品视频在线观看| 一区二区欧美视频| 一本一本大道香蕉久在线精品| 国产精品久久久久久久久果冻传媒| 国产一区二区三区蝌蚪| 欧美成人福利视频| 久久99久久99| 欧美电影免费观看高清完整版| 五月激情六月综合| 欧美精品xxxxbbbb| 青草国产精品久久久久久| 国产精品三级视频| 国产欧美精品一区二区三区四区| 在线观看国产一区二区| 国产曰批免费观看久久久| 日韩欧美黄色影院| 免费在线观看视频一区| 5566中文字幕一区二区电影 | 美女久久久精品| 88在线观看91蜜桃国自产| 天天影视网天天综合色在线播放| 欧美视频在线播放| 久久奇米777| 大陆成人av片| 成人免费在线观看入口| 色综合久久88色综合天天6| 樱桃国产成人精品视频| 欧美在线视频你懂得| 午夜精品久久久久久久久| 91麻豆精品国产91久久久久久| 蜜臀va亚洲va欧美va天堂 | 精品福利一二区| 国产一区二区三区最好精华液| 久久久久久久久99精品| 成人国产亚洲欧美成人综合网| 亚洲人成影院在线观看| 欧美日韩在线精品一区二区三区激情| 亚洲二区视频在线| 日韩美女视频在线| 国产成a人亚洲| 亚洲男人电影天堂| 欧美高清视频不卡网| 激情综合五月婷婷| 中文字幕日本乱码精品影院| 欧洲精品中文字幕| 麻豆精品久久精品色综合| 国产婷婷一区二区| 色哟哟一区二区在线观看| 亚洲成av人综合在线观看| 欧美tickle裸体挠脚心vk| 岛国精品一区二区| 午夜不卡在线视频| 久久久国产精品午夜一区ai换脸| 成人h精品动漫一区二区三区| 樱桃视频在线观看一区| 亚洲精品一区在线观看| 91伊人久久大香线蕉| 三级影片在线观看欧美日韩一区二区| 日韩欧美在线网站| 91原创在线视频| 麻豆成人av在线| ㊣最新国产の精品bt伙计久久| 欧美丰满少妇xxxxx高潮对白| 国产午夜亚洲精品午夜鲁丝片| 亚洲最大色网站| 丝袜脚交一区二区| av电影天堂一区二区在线| 欧美午夜精品一区二区三区| 亚洲国产精品二十页| 国产精品不卡视频| 在线观看www91| 国产一区二区三区久久悠悠色av | 国产精品视频九色porn| 欧美人伦禁忌dvd放荡欲情| 国产成人精品影院| 日韩电影在线一区二区三区| 国产精品初高中害羞小美女文| 91精品在线观看入口| 9i看片成人免费高清| 蜜臀精品一区二区三区在线观看| 亚洲精品日韩专区silk| 久久免费国产精品| 欧美肥妇bbw| 91浏览器入口在线观看| 国产九色sp调教91| 日韩精品乱码免费| 亚洲激情自拍偷拍| 日本一区二区高清| 精品久久人人做人人爱| 欧美日韩高清一区二区三区| 99精品视频在线观看免费| 国产精品中文有码| 欧美日韩精品福利| 亚洲电影激情视频网站| 欧美精品精品一区| 色琪琪一区二区三区亚洲区| 国产成人自拍高清视频在线免费播放| 午夜av电影一区| 一区二区高清免费观看影视大全| 国产欧美日韩另类一区| 欧美mv和日韩mv的网站| 欧美美女直播网站| 欧美性感一类影片在线播放| 91国在线观看| 99精品国产热久久91蜜凸| 成人黄色在线看| 国产精品资源站在线|