Page 9 of 22 FirstFirst ... 678910111219 ... LastLast
Results 81 to 90 of 211

Thread: Whats ur ctrl V right now

  1. #81
    Snee's Avatar Error xɐʇuʎs BT Rep: +1
    Join Date
    Sep 2003
    Location
    on something.
    Age
    45
    Posts
    17,971
    Mine went something like:

    function kollaNummer(losen) //kontrollerar om något tecken i en sträng är en siffra
    //om så är fallet ökas variabeln rakna med 1
    {
    for (i = 0; i < losen.length; i++)
    {
    var tecken = losen.charAt(i);
    if (((tecken > "0") && (tecken < "9")))
    {rakna = rakna + 1;}
    }
    return rakna;
    }

    That one just counts them, tho'.

  2. Lounge   -   #82
    Barbarossa's Avatar mostly harmless
    Join Date
    Jun 2002
    Location
    Over here!
    Posts
    15,172
    :earl:

    Javascript is hard enough as it is, without having to do it in non-English

  3. Lounge   -   #83
    Snee's Avatar Error xɐʇuʎs BT Rep: +1
    Join Date
    Sep 2003
    Location
    on something.
    Age
    45
    Posts
    17,971
    kollaNummer = checkNumber
    lösen ~ password
    tecken ~char/sign
    räkna = count


    I used that one to validate a password, I think. As I recall, the password had to contain a certain number of digits.
    Might not be working as it is tho', I just grabbed it off some notes I had.

  4. Lounge   -   #84
    Mr. Mulder's Avatar pepper your angus BT Rep: +10BT Rep +10
    Join Date
    Aug 2003
    Location
    Vault 111
    Age
    39
    Posts
    16,598
    Quote Originally Posted by Snee View Post
    Mine went something like:

    function kollaNummer(losen) //kontrollerar om något tecken i en sträng är en siffra
    //om så är fallet ökas variabeln rakna med 1
    {
    for (i = 0; i < losen.length; i++)
    {
    var tecken = losen.charAt(i);
    if (((tecken > "0") && (tecken < "9")))
    {rakna = rakna + 1;}
    }
    return rakna;
    }

    That one just counts them, tho'.
    zomfg i can speak japanese, understood every word of that last sentence!

  5. Lounge   -   #85
    Snee's Avatar Error xɐʇuʎs BT Rep: +1
    Join Date
    Sep 2003
    Location
    on something.
    Age
    45
    Posts
    17,971
    function checkNumber(pass) //Checks whether any sign in a string is a digit
    //if that is the case, the variable count is increased by 1.
    {
    for (i = 0; i < pass.length; i++)
    {
    var sign = pass.charAt(i);
    if (((sign > "0") && (sign < "9")))
    {count = count + 1;}
    }
    return count;
    }


  6. Lounge   -   #86
    Barbarossa's Avatar mostly harmless
    Join Date
    Jun 2002
    Location
    Over here!
    Posts
    15,172
    Quote Originally Posted by Snee View Post
    kollaNummer = checkNumber
    lösen ~ password
    tecken ~char/sign
    räkna = count


    I used that one to validate a password, I think. As I recall, the password had to contain a certain number of digits.
    Might not be working as it is tho', I just grabbed it off some notes I had.
    I reckon that'd work.

  7. Lounge   -   #87
    Snee's Avatar Error xɐʇuʎs BT Rep: +1
    Join Date
    Sep 2003
    Location
    on something.
    Age
    45
    Posts
    17,971
    Not really, I think it just works for 1-8 as it is, now that I looked at it again

    needs a couple of ='s.

    I could prolly skip a set of parentheses as well, I think I used them 'cos I had another set of conditions at one point.
    Last edited by Snee; 03-29-2007 at 02:04 PM.

  8. Lounge   -   #88
    thewizeard's Avatar re-member BT Rep: +1
    Join Date
    Jun 2003
    Location
    The Netherlands
    Posts
    6,354
    erm,..where did that come from now..?


    http://www.mensap2p.com//Rafi/FreeLans/drugsdontwork[1].mp3

  9. Lounge   -   #89
    Snee's Avatar Error xɐʇuʎs BT Rep: +1
    Join Date
    Sep 2003
    Location
    on something.
    Age
    45
    Posts
    17,971
    I copy-pasted it from some old notes

  10. Lounge   -   #90
    thewizeard's Avatar re-member BT Rep: +1
    Join Date
    Jun 2003
    Location
    The Netherlands
    Posts
    6,354
    i was wondering, I have some Java that I would like imbedded in my website.....erm Snee

Page 9 of 22 FirstFirst ... 678910111219 ... LastLast

Bookmarks

Posting Permissions

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