Search:

Type: Posts; User: Shurik

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    2,102

    Try change if(!isdigit(choice) && choiceint...

    Try change


    if(!isdigit(choice) && choiceint > 3) {

    to


    if(!isdigit(choice) || choiceint > 3) {
  2. Replies
    5
    Views
    1,032

    If you have, for example int padSize; call...

    If you have, for example

    int padSize;
    call function as:

    logGabor(filter,imftt2,r_o,theta_o,
    sigma_theta,radius,theta,
    cols,rows,sigma_r, &padSize)
  3. Replies
    11
    Views
    2,085

    key[1] = 02229721; Good constant :)

    key[1] = 02229721;
    Good constant :)
  4. Replies
    8
    Views
    6,039

    @tilman Why you didn't write struct...

    @tilman

    Why you didn't write


    struct _server_command_table_t
    {
    char* command_string;
    unsigned char (*callback_func)(unsigned int* if_desc, int* result_code);
    };
  5. Replies
    5
    Views
    6,406

    Because arrays double_digit (line 4) and...

    Because arrays double_digit (line 4) and double_digit (line 34) are different.
  6. Replies
    11
    Views
    1,149

    @ZAMBROTTA...

    @ZAMBROTTA
    Try
    chmod +x main
  7. Replies
    7
    Views
    34,103

    Is '\e' GNU extension?

    Is '\e' GNU extension?
  8. Value of n is increased twice: for (n=0;...

    Value of n is increased twice:


    for (n=0; n<nmax; n++)
    {

    t = (mypow(-1,n))*(x)*(mypow(x,n))*(mypow(x,n))*(1/(dfactorial(2*n+1))); /* t is the nth tern in the sine...
  9. Replies
    10
    Views
    3,777

    Memory leak is at line 113 of your last listing,...

    Memory leak is at line 113 of your last listing, because old int[3] arrays isn't freed.
    Insert rewired_edges cleaning as at lines 43-44 before this line.
  10. Maybe you mean if (0x1 == (3dmaze[i][j][k] &...

    Maybe you mean

    if (0x1 == (3dmaze[i][j][k] & 0x1))
    ...
    if (0x2 == (3dmaze[i][j][k] & 0x2))
    ...
    if (0x4 == (3dmaze[i][j][k] & 0x4))
    and so on for bits checking?
    Read about operator...
  11. Replies
    12
    Views
    7,844

    Did you try cmd /U ? You can enter help cmd...

    Did you try
    cmd /U
    ?
    You can enter
    help cmd
    in command line for getting help.
  12. Replies
    12
    Views
    2,672

    and write '\0' after each word over separator...

    and write '\0' after each word over separator symbol
  13. Thread: MPI c problem

    by Shurik
    Replies
    17
    Views
    1,973

    For i == 0 and mypid == 15 destination in...

    For i == 0 and mypid == 15 destination in MPI_Send is out of the ranks' range:

    for( i=0; i < (log(nprocs)/log(2)); i++ )
    {
    if( mypid % (int)pow(2, i) == 0 )
    {
    ...
  14. Replies
    13
    Views
    1,018

    Because each line ended with '\n' and program...

    Because each line ended with '\n' and program must pass it.
    If user inputs 12345, then program will get 6 symbols: 1 2 3 4 5 '\n'
  15. Replies
    13
    Views
    1,018

    How about ...... id=getchar(); ...

    How about


    ......
    id=getchar();
    if (id == '\n')
    continue;
    ......

    or maybe using fgets() instead of getchar()?
  16. Replies
    2
    Views
    1,705

    Maybe: int i; int task1done = 0; int...

    Maybe:


    int i;
    int task1done = 0;
    int task2done = 0;

    while(1) {
    i = getivalue(); // getting the i value over serial interface
  17. Replies
    10
    Views
    11,691

    Yes, it's wrong code. It's must be: for...

    Yes, it's wrong code.
    It's must be:


    for (i = 0; i < N; ++i)
    {
    if (A[i] <= (double)INT_MIN-1 || A[i] >= (double)INT_MAX+1)
    {
    fprintf(stderr, "Value...
  18. Replies
    10
    Views
    11,691

    You can add #include and write: ...

    You can add #include <limits.h> and write:


    for (i = 0; i < YOUR_DEFINED_CONSTANT; ++i)
    {
    if (A[i] < (double)INT_MIN-1 || A[i] > (double)INT_MAX+1)
    {
    ...
  19. if((strstr(line, *argv) != NULL) != except) ...

    if((strstr(line, *argv) != NULL) != except)


    It's my favorite program's line from K&R :)
    Let's suppose that except is 1:


    if((strstr(line, *argv) != NULL) != 1)
  20. Replies
    8
    Views
    1,534

    OK, I understand. But what about non-contiguous...

    OK, I understand.
    But what about non-contiguous alphabets like EBCDIC - Wikipedia, the free encyclopedia ?
  21. Replies
    8
    Views
    1,534

    OK. Super-puper fast version: for(int i=0;...

    OK. Super-puper fast version:



    for(int i=0; i < n;i++) //n is the length of the string
    for(int j=0; j < LIMIT;j++) //Limit is the number of characters in the alphabet.
    ...
  22. Replies
    8
    Views
    1,534

    For ASCII only?

    For ASCII only?
  23. Replies
    8
    Views
    1,534

    If it as I understand is Caesar cipher...

    If it as I understand is Caesar cipher and letters in Alphabet are in alphabet order, then:


    for(int i=0; i<n;i++) //n is the length of the string

    {
    for(int j=0;j<LIMIT;j++) //Limit is...
  24. Replies
    10
    Views
    1,931

    Wow! I didn't know that. Thanks

    Wow! I didn't know that.
    Thanks
  25. Replies
    10
    Views
    1,931

    In C you can't use same name for function and...

    In C you can't use same name for function and variable in this function.
    Just write:


    double powerArgs(double *a, double *b) { return pow (*a, *b); }
Results 1 to 25 of 32
Page 1 of 2 1 2