Search:

Type: Posts; User: ziekfiguur; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: Help With C Socket Programming Chat Program

    the problem is with this code at line 81 in your client:

    if ((numbytes = recv(sockfd, buf, MAXDATASIZE-1, 0)) == -1) {
    perror("recv");
    exit(1);
    }
    when you connect to...
  2. Replies
    8
    Views
    2,055

    Re: Python IRC bot question

    Please post your code between CODE tags, that way the indentation stays right.

    I don't see anything that checks for '!urban' in your code, you could do that the same way you check for '!hello',...
  3. Replies
    3
    Views
    1,221

    Re: Auto mount SSHFS with Expect HELP NEED :(

    My guess would be that you should remove the last yes from this line

    expect "Are you sure you want to continue connecting (yes/no)? yes"
    But it would probably be a better idea to fix your keys so...
  4. Replies
    3
    Views
    314

    [ubuntu] Re: No internet after crash

    I am able to ping or ssh to other devices on my home network. I thought I was unable to ping outside that, but apparently I used a wrong IP adress as I can get a response from 173.194.66.103...
  5. Replies
    3
    Views
    314

    [ubuntu] No internet after crash

    Hallo everyone.

    This morning my laptop suffered a gpu crash while I was logged in to a vpn. It didn't respond to anything anymore so I turned off the laptop by holding the power button. Now, since...
  6. Replies
    14
    Views
    829

    [SOLVED] Re: Who else is using 61h

    The beep program uses the ioctl function, so it's a little less direct than what you're trying to do.
    Here is a little program i made that's based on the beep program. It reads tekst and converts it...
  7. Replies
    25
    Views
    1,515

    Re: C++ program crashes

    How are you creating that variable?
    If you are allocating it on the stack, your program is going to fail. IIRC swap memory is never used for extra stack space.
    If you did this, you could try...
  8. Re: Shellscript to remove spaces from filenames

    Thank you.
    Here is the latest version of the script, including crdlb's solution for special characters and now also removing trailing underscores at the end of the filename, before the extension.
    ...
  9. Replies
    3
    Views
    307

    [SOLVED] Re: how to pass command in python?

    According to the documentation using the subsystem module is the preferred way.
    See here for information and examples of how to use it.
  10. Replies
    5
    Views
    5,587

    Re: Calling C from Java using JNI - Ubuntu

    I've never done anything like this, but you could try compiling with -m32 to make a 32bits version of the library.
  11. Re: Where can I get some help with a roguelike I'm developing

    I think the best thing you can do is look at the code of existing roguelikes for examples you can use.
    there are plenty of open-source roguelikes with souces freely available.
    Dungeon Crawl: Stone...
  12. Replies
    6
    Views
    4,404

    Re: Run terminal commands in Python

    Like nvteighen said, os.system opens a shell for you, so any line you can put in a shell script would work when passed to os.system. The only difference would be that you can't get the output back...
  13. Replies
    1
    Views
    354

    Re: Kill fork without killing program

    Why are you using an hard kill, why don't you try SIGTERM first?

    I can't be sure about the answer to your question, but do you open the socket before you fork the program? if so, do you close it...
  14. Replies
    11
    Views
    581

    Re: Catching Exceptions

    Don't use stdlib.h, stdio.h or any kind of jump in C++, in C++ use cstdlib, iostream for I/O and exceptions for error catching.
    The code you have is C, you should remove the line with `using...
  15. Re: Shellscript to remove spaces from filenames

    The problem with special characters is that there are a LOT of them, and i couldn't (and still can't) be bothered to make all of them work.

    But, as per your request, here is a slightly improved...
  16. Replies
    23
    Views
    3,728

    [SOLVED] Re: Prime number C program

    For every other external library yes. But not for most things in the C standard library.
    Actually I'm not really sure why the math functions are in a separate library in C, with C++ you wouldn't...
  17. Replies
    23
    Views
    3,728

    [SOLVED] Re: Prime number C program

    try to compile with -lm that will include the math library
  18. Replies
    50
    Views
    50,301

    Re: What is your favorite 'BEEP' song?

    Lol, I hadn't even thought of that way :P Maybe I should start coding less and thinking more.
  19. Replies
    34
    Views
    1,275

    Re: Small Light Programs Better

    He said mtpaint, not mspaint.
  20. Replies
    4
    Views
    302

    Re: Changing a value on terminal screen

    The sleep is just there to make it go slow enough for you to see the effect, you don't have to use it in your own program.
    Here is some code I used a while ago to do somethign similar, it creates a...
  21. Replies
    5
    Views
    1,646

    Re: Help with python file transfer

    EDIT: nevermind, didn't read the last post good enough
  22. Replies
    33
    Views
    3,916

    Re: Beginners Programming Challenge 22

    First of all, sorry for the delay.

    As the winner of this challence i have chosen red_Marvin for his gforth variant
    which i found to be surprisingly easy to read (even though I don't really know...
  23. Replies
    33
    Views
    3,916

    Re: Beginners Programming Challenge 22

    Well, it seems like there aren't going to be a lot more entries. I'm going to give it one more week, and then i'll judge the solutions.
  24. Re: Using speech synthesis software with C sharp and Linux.

    I think you have to use separate arguments for command-line parameters you want to pass to the command. the first one should just be the filename of the program, nothing more.

    Edit, a quick google...
  25. Re: Using speech synthesis software with C sharp and Linux.

    i'm not familiar with C# but i think process.start doesn't create a subshell, but executes the file directly. So shell syntax like | to pipe cannot be used, you just have to give it one filename and...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4