My First Program =))

Results 1 to 9 of 9
  1. #1
    Member tr0j4n is offline
    MemberRank
    Oct 2005 Join Date
    EuropeLocation
    84Posts

    My First Program =))

    Hello all, i want to share with you with my very first program and it's called "Text Mover". =)) i build it in "Borland Developer Studio 2006" (Delphi). And right now i am studying from a book. I want to create something like text replacer from Normal to l33t (Trojan -->> 7r0j4n). Can someone help me with that, what "replace" functions i should use ?


    So what's your rating to my first program ? :rotflmao:
    Attached Files Attached Files


  2. #2
    :drools: GriffinHeart is offline
    Grand MasterRank
    Sep 2003 Join Date
    With u :)Location
    1,451Posts
    oO build your own replace functions, if u are reading from a file or whatever it is as simples as having a string with a text go char by char and build a new string with the "replaced" form of your original string and then u return that string.

    a tip then if u are starting, allways abstract your self from what language you are working it's not the language that should determine your needs, it's your needs that should determine the language so before u even think about what language u should use, or how you will code it in a given language, allways first think about how is your problem solved

  3. #3
    Learning. lordvladek is offline
    Grand MasterRank
    Mar 2006 Join Date
    872Posts
    Uhmm yeah cool one ^^ i like 8/10 maybe?

  4. #4
    Grand Master username1 is offline
    Grand MasterRank
    Jul 2004 Join Date
    5,867Posts
    Umm...ok...

    422 thousand bytes just to write some text to two editcontrols and do some basic operations on them? Shouldn't take more than a few Kb for that...

    "leet" converter attached (if you want the source too, just ask) - only 3.5Kbs
    Attached Files Attached Files
    Last edited by username1; 14-12-06 at 01:09 AM.

  5. #5
    Member tr0j4n is offline
    MemberRank
    Oct 2005 Join Date
    EuropeLocation
    84Posts
    OK, put the source or just tell how to convert from Memo1 to Memo2 the text in l33t. I just need to know that function because i don't know it. I will try to build some conventers and then i will finish my notepad. I'm learning from some "Nick Hidges" book about delphi. Now i am planing to buy new one and study the next book. i think that delphi is very interesting programming languige and easy too. By the way, can someone tell m show to correctly write the word "languige" ? I just not so strong in english... Only 15 years old and English is not my native languige. =)


    Ok g2g to school! :( Will check this thread when i will be back... ;)

  6. #6
    Grand Master username1 is offline
    Grand MasterRank
    Jul 2004 Join Date
    5,867Posts
    Use a lookup table of 256 bytes, one for each character.

    For example the 'e' and 'E' entries could be '3'.

  7. #7
    Member tr0j4n is offline
    MemberRank
    Oct 2005 Join Date
    EuropeLocation
    84Posts
    Don't understand... Maybe you post your source ?

  8. #8
    Grand Master username1 is offline
    Grand MasterRank
    Jul 2004 Join Date
    5,867Posts
    This is the main encoding part
    Code:
     int i,j;
     char enctab[256] = { 0,1,2,3,4,5,
     /* omitted several lines of identity here */
     "@48CD3FGH1JKLMN0PQ257UVWXYZ" \ /* @ABCDEFGHIJKLMNOPQRSTUVWXYZ -> @48CD3FGH1JKLMN0PQ257UVWXYZ */
     91,92,93,94,95,96, \
     /* abcdefghijklmnopqrstuvwxyz -> 48cd3fgh1jk1mn0pq257uvwxyz */
     "48cd3fgh1jk1mn0pq257uvwxyz"
     /* more identity coding follows */
     /* ... */
     250,251,252,253,254,255 };
     
     j=strlen(str);
     for(i=0;i<j;i++) str[i] = enctab[str[i]]; /* this single line does the encoding */
     ...
    The rest of the code just manages the window and the two editcontrols, which I assume you know how to do...

  9. #9
    Member tr0j4n is offline
    MemberRank
    Oct 2005 Join Date
    EuropeLocation
    84Posts
    OK, thanks! I will work on that tomorrow. Need to sleep ;[



Advertisement