Search:

Type: Posts; User: |HBO|

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    869

    Thanks for the anwers. But i think applying edit...

    Thanks for the anwers. But i think applying edit distance to this func would be a little bit overkill.. All i am seeking for is if the 3 same chars are near to each other, return 1.. I am kind of a...
  2. Replies
    6
    Views
    869

    Catching occurrences in a string..

    Hello guys..

    I have this code which is for getting rid of every other character that is non-letters.




    char *r(char *str)
    {
    char *src;
  3. Replies
    6
    Views
    5,403

    Thank you. (using the string 'string2' twice was...

    Thank you. (using the string 'string2' twice was my mistake.)

    I changed the codes as



    #include "string.h"
    #include "stdio.h"
    #define BAD(x) (!(x) || (*(x) == '\0'))
  4. Replies
    6
    Views
    5,403

    Sorry for being such a douche and double post....

    Sorry for being such a douche and double post. Since i wrote something new, i wanted to show you.




    #include "string.h"
    #include "stdio.h"
    #define BAD(x) (!(x) || (*(x) == '\0'))

    static...
  5. Replies
    6
    Views
    5,403

    How to extract url from strings

    Hi,
    With the below function i can extract urls from strings. But it works with only "http://". So how can i change it to extract urls which begins with "www" also.

    Thanks in advance.

    Code...
  6. Replies
    2
    Views
    1,196

    Thank you.

    Thank you.
  7. Replies
    2
    Views
    1,196

    Weird strcat output

    Hi guys, i hope you're fine.

    I am having a strange issue with the strcat. Let me explain:



    name = getenv("LOGNAME");
    strcat(output, name);
    strcat(output, "..");
    strcat(output,...
  8. Thread: sscanf _ problem

    by |HBO|
    Replies
    12
    Views
    1,765

    Oh thank you again.

    Oh thank you again.
  9. Thread: sscanf _ problem

    by |HBO|
    Replies
    12
    Views
    1,765

    input: 'john IBM has some secrets' get: 'john...

    input: 'john IBM has some secrets'
    get: 'john IBM'

    This is ok.

    But i don't want to sscanf parse when the string goes like:
    input: 'john IBM has some secrets'

    sscanf still...
  10. Thread: sscanf _ problem

    by |HBO|
    Replies
    12
    Views
    1,765

    To sum it up you're saying it's not possible with...

    To sum it up you're saying it's not possible with sscanf? Right?
  11. Thread: sscanf _ problem

    by |HBO|
    Replies
    12
    Views
    1,765

    Sorry mates but i am in a dilemma now. So didn't...

    Sorry mates but i am in a dilemma now. So didn't want to create a new thread. Here i go:

    What about space char? I mean

    sscanf(s, "%s %s", name, company) parses a string like 'john nashville'...
  12. Replies
    5
    Views
    1,143

    Returning count of spaces in a text

    Hi.
    I am using:


    int retcount (char * text)
    {
    char *tmp = text;
    int count = 0
    while (strtok(tmp, " "))
    count++;
  13. Thread: sscanf _ problem

    by |HBO|
    Replies
    12
    Views
    1,765

    Thank you guys. Much appreciated.

    Thank you guys. Much appreciated.
  14. Thread: sscanf _ problem

    by |HBO|
    Replies
    12
    Views
    1,765

    Oh thank you for the quick reply. It works. But i...

    Oh thank you for the quick reply. It works. But i should ask this. Is this normal if sscanf returns 1 when string like "#z-dot" or something?
  15. Thread: sscanf _ problem

    by |HBO|
    Replies
    12
    Views
    1,765

    sscanf _ problem

    hey mates.

    i want to get two variables from a string that changes occasionally.




    if (sscanf(s, "%s_%s", name, id) >= 1)
  16. Replies
    9
    Views
    9,489

    Long time no see. I am stuck with sth. How can i...

    Long time no see. I am stuck with sth. How can i return a variable (char) from this function?



    char c2h(const unsigned char *digest, int len)
    {
    static char dest[64];
    char *ptr = dest;...
  17. Replies
    9
    Views
    9,489

    Thank you very much. i appreciate your help. I...

    Thank you very much. i appreciate your help. I owe you one :)
    Yes, i'm aware of that. I was gonna do that, though :) Thanks again for pointing that out.
    Btw, it's my bad.
  18. Replies
    9
    Views
    9,489

    I just want to convert a md5 digest (such as...

    I just want to convert a md5 digest (such as Ëâغ%úB¶]) to hex value (such as cbe2d8ba9c25fa42b65d9d133e8c4c32)

    it's OK with


    for(i = 0; i < len; i++){
    printf("%02x", digest[i]);
    }...
  19. Replies
    9
    Views
    9,489

    Converting to hex with strcat?

    Hi,



    static char *tohex (const unsigned char *digest, int len) {
    int i;
    static char dest[64];
    for(i = 0; i < len; i++){
    strcat (dest, &digest[i]);
    //printf("%02x", digest[i]);
  20. Replies
    1
    Views
    1,660

    Httpd forms with?

    Hi,
    Is there a way to use forms with c? I have wrote a httpd server app but when i trying to pass a variable between pages (actually funcs) i am failing..
    On the other hand, what do you think of...
  21. Replies
    4
    Views
    1,828

    Yep, i am using it with macros anyway....

    Yep, i am using it with macros anyway.
    Accidentally i found the problem. I have forgot using the socket pointer in the parsing function.Anyway, thanks to who helped and will help..
  22. Replies
    4
    Views
    1,828

    Nope my bad.I updated the code.Please take a look...

    Nope my bad.I updated the code.Please take a look again.
  23. Replies
    4
    Views
    1,828

    Socket programming (IRC)

    I have wrote a simple program for connecting irc servers. It's Ok but the parsing is the thing that i am confused about.
    During the main loop ( while (1) thing) when i try the parse the lines, the...
  24. Replies
    15
    Views
    5,145

    Thank you very much. But this is the thing i...

    Thank you very much.

    But this is the thing i am dealing with.I don't wanna it contains punctuation mark.(i meant the output must be isalnum char.)
    Regards.
  25. Replies
    15
    Views
    5,145

    Thank you but it is not working. for encryption:...

    Thank you but it is not working.
    for encryption:


    char buf2[128];
    char *buf1 = "hbo";
    encrypt(buf1, buf2);
    printf("Encrypted: %s\n", buf2);
Results 1 to 25 of 32
Page 1 of 2 1 2