Results 1 to 10 of 10

Thread:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    1+1=11 svr's Avatar
    Join Date: Sep:2006
    Location: Inferno, Act 1
    Posts: 790

    ! java, , , , - , .
    X. Y . ( , 26 ):

    x=0 -> Y="A"
    x=1 -> Y="B"
    ...
    x=25 -> Y="Z"
    x=26 -> Y="AA"
    x=27 -> Y="AB"
    ...
    x=702 -> Y="ZZ" (702 = 26x26 + 26)
    x=703 -> Y="AAA" (703 = 26x26 + 27)
    ...

    .

    ---------- 19:25 ---------- 18:45 ----------

    ..
    , . .
    Last edited by svr; 15th May 2010 at 19:19.
    MSI B450 Gaming Pro Carbon AC | Ryzen 9 5900x | HyperX Predator 3200 | Asus Strix 3090 | Kingston KC3000 2TB | WD Red 4TB | Dell G3223Q + LG 27UK650-W | Arctic Freezer 360 | Seasonic Focus GX-1000 | Lian Li O11 Dynamic

  2. #2
    Registered abUser ike's Avatar
    Join Date: Jul:2004
    Location: sofi
    Posts: 4,965
    26 .
    Have no fear ike iz here.
    CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color

  3. #3
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    Quote Originally Posted by ike View Post
    26 .
    26-, . -.
    . .

  4. #4
    gibona's Avatar
    Join Date: Feb:2005
    Location: Sofia
    Posts: 3,074
    , . 64.

    Code:
    function toInts(s:string):longint;
    var chars:array[#0..#255] of longint;
    i:char;
    sum,i1:longint;
    begin
    for i:=#0 to #255 do chars[i]:=0;
    for i:='0' to '9' do chars[i]:=(ord(i)-ord('0'));
    for i:='a' to 'z' do chars[i]:=(ord(i)-ord('a'))+10;
    for i:='A' to 'Z' do chars[i]:=(ord(i)-ord('A'))+36;
    chars['!']:=62;
    chars['?']:=63;
    sum:=0;
    for i1:=1 to length(s) do sum:=sum*64+chars[s[i1]];
    result:=sum;
    end;
    /Hidden:

    Code:
    function toChars(int:longint):string;
    var chars:array[0..63] of char;
    i:longint;
    begin
    for i:=0 to 9 do chars[i]:=chr(ord('0')+i);
    for i:=10 to 35 do chars[i]:=chr(ord('a')+i-10);
    for i:=36 to 61 do chars[i]:=chr(ord('A')+i-36);
    chars[62]:='!';
    chars[63]:='?';
    result:='';
    if int=0 then result:=chars[0];
    while (int<>0) do
      begin
      result:=chars[int mod 64]+result;
      int:=int div 64;
      end;
    end;
    /Hidden:

  5. #5
    1+1=11 svr's Avatar
    Join Date: Sep:2006
    Location: Inferno, Act 1
    Posts: 790
    , 26- , -, "" , . 26. 26- , 0, Z 25. 26 BA. 26->AA. , - . Java :

    Code:
    public static String convertIdToLetterCode(int id) throws IllegalArgumentException
      {
        if (id < 0 || id > 701)
        {
          throw new IllegalArgumentException("Id out of range. Valid id's are between [0-701].");
        }
        else if (id < 26)
        {
          return String.valueOf((char)(id + 'A'));
        }
        else
        {
          id -= 26;
          return String.valueOf((char)(id / 26 + 'A')) + String.valueOf((char)(id % 26 + 'A'));
        }
      }
    /Hidden:
    MSI B450 Gaming Pro Carbon AC | Ryzen 9 5900x | HyperX Predator 3200 | Asus Strix 3090 | Kingston KC3000 2TB | WD Red 4TB | Dell G3223Q + LG 27UK650-W | Arctic Freezer 360 | Seasonic Focus GX-1000 | Lian Li O11 Dynamic

  6. #6
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    - , 26 AB, , 26- .

  7. #7

    Join Date: Feb:2002
    Location:
    Posts: 724
    26- . 26 , . Big-endian Little-endian ( ) .

    :
    8- (0-7)
    0,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17, 20,21 ...
    16- (0-9,-F)
    0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,10,11,12 ,13 ... 1F,20,21,22 ...
    26- (A-Z)
    A,B,C ... X,Y,Z,AA,AB,AC ...
    36- (0-9,A-Z)
    0,1,2 ... X,Y,Z,10,11,12,13 ... 1X,1Y,1Z,20,21,22 ...
    , ... adblock-

    hardwarebg.com##DIV[id^="helpfulanswers_box"]

  8. #8
    Registered User tedych's Avatar
    Join Date: Nov:2003
    Location:
    Posts: 17,654
    Fx_Expo,
    26

    16 00 ( 16-) .
    , 0- 10- .

  9. #9

    Join Date: Feb:2002
    Location:
    Posts: 724
    , . . "bijective base-26 system". wikipedia:

    The bijective base-26 system is also known as base 26 without a zero. It is a base twenty-six positional numeral system which does not use a digit to represent zero; it uses digits "A" to "Z" to represent one to twenty-six.

    The number sequence goes A, B, C, ..., X, Y, Z, AA, AB, AC, ..., AX, AY, AZ, BA, BB, BC, ... This is what Microsoft Excel uses to identify columns in spreadsheets.

    Each digit position represents a power of twenty-six, so for example ABC is "one 26^2, plus two 26^1, plus three units (26^0)" since "A" is worth one, "B" is worth two, "C" is worth three.

    In this representation the number WIKIPEDIA is:

    23 * 26^8 + 9 * 26^7 + 11 * 26^6 + 9 * 26^5 + 16 * 26^4 + 5 * 26^3 + 4 * 26^2 + 9 * 26^1 + 1 * 26^0
    Last edited by Fx_Expo; 26th May 2010 at 14:36.
    , ... adblock-

    hardwarebg.com##DIV[id^="helpfulanswers_box"]

  10. #10

    Join Date: Sep:2005
    Location: Sofia
    Posts: 18,517
    1, 26, 26 . .



    0
    0+1 = 1. 26^0 - 1-1=0. .

    26.
    26+1=27. 26^0 26. 26^1 -> - .

    702.
    702+1=703. 703-26^0-26^1-26^2=0 - ().
    Excel A ZZ 702 . A , ZZ 701.

    701.
    701+1-26^0-26^1 = 675 () = 25*26+25 = ZZ

    1377
    1377+1-26^0-26^1-26^2 = 675 () = AZZ
    Last edited by vvvlado; 27th May 2010 at 22:38.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |