User Profile

Collapse

Profile Sidebar

Collapse
Laharl
Laharl
Last Activity: Feb 9 '09, 04:15 PM
Joined: Sep 22 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Laharl
    replied to Executable File
    in Java
    Assuming JGrasp is an IDE, go find the actual executable on your hard drive and look at what it says by 'Open With'. You want it to be java.exe, it looks like. Or just run it from the command line directly.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to How to use Perl on Vista?
    in Perl
    If you mean to run a Perl script from the prompt, type 'perl scriptname' where scriptname is the name of the script and you're in the folder where the script is located. To change file names from the prompt...I think that it's rename oldname newname, but I'm not sure.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to find processes
    Look at the documentation for ps (you'll definitely need -e, probably others as well).
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Help with a heartbeat program
    When using string formatting, the syntax is
    Code:
     "string with % signs" % (values to replace the format specifiers)
    You're missing the % in between.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Porting from Linux to windows
    in C
    It is possible to have an X implementation with cygwin, but, frankly, it's a buggy mess. You can get gcov because there are gcc ports to windows (install it in a cygwin environment, for example).
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to chdir HELP
    in C
    Have you read the man page for chdir? As for an environment variable, I believe that one such variable is the current working directory of your program. You may need to save it if temporary changes are required.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Get XML tag values with Python
    Look at the xml.dom.minidom .Element's getAttribute method...(Node is a subclass of Element, don't worry).
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Solving Python guessing number game
    Please wrap your code in CODE tags so that the indentation doesn't get stripped out.

    It looks like you only update tries when it's greater than three. Your idea would work, but you also can't have

    Code:
    if: 
        code
    code
    else:
        code
    because Python won't know to associate the else with the if (can't tell since the parser here rips indentation out). Put the tries update...
    See more | Go to post

    Leave a comment:


  • If he doesn't, we'll all pitch in.

    Is there a wired port you can connect to? You'd mentioned you were on a laptop, so you may be able to find wired internet someplace (run an ethernet cord into your wireless router or if you're at college, perhaps your computer lab has wired ports available?). You can also find many packages available online for direct download (Google, you'll likely get the Debian sites, but there shouldn't be any...
    See more | Go to post

    Leave a comment:


  • Is the file path in each case correct? Remember, Windows uses \ as its separator (don't forget to escape it!) and Linux/Unix use /.
    See more | Go to post

    Leave a comment:


  • Honestly, what I use Python for the most is the interactive shell, generally as a calculator.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to basic C++ conversion program help
    in C
    The problem is in line 41. When C++ does integer division, it returns an integer. Thus, when you do 100/180, you get 0. To fix this, declare Celsius as a double or float and make one (or both) of the constants .0 so that the compiler knows you mean a decimal value.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Need help
    It will not work, no. If he's using Windows, look at py2exe (Google) and try that.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Array Length with Integer Help?
    in C
    I'm fairly familiar with C99 (and C++0x), but VS does not support C99, nor is there (AFAIK) a way to enable C99 compliance in VS the way -std=c99 does in gcc....
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to c program
    in C
    If you want to see what it outputs, I recommend compiling and running this code. For the code itself, I recommend printing the address in hexadecimal and add some whitespace in between the two numbers so you can tell them apart.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Array Length with Integer Help?
    in C
    Because the compiler doesn't know how much memory to allocate when you don't use a constant expression, it throws an error. To rectify this, use 'new', like this:

    Code:
    int *arr = new int[10];
    //...
    delete arr;
    This allows you to allocate memory in variable sizes. Any pointer/memory you allocate with new MUST be deallocated with delete when you're done with it. Read a good tutorial at http://...
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Fedora : System call and fork call
    We won't do your homework for you. We will, however, help you with questions you have about code you've written yourself.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to date generation
    in Java
    You just asked this about C over on C/C++ and I'll give you the same response here I did there: We won't do your work for you, but we will answer specific questions about code you've written yourself.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to date generation
    in C
    We won't do your work for you. We will, however, help with specific questions you have about code you've written yourself.
    See more | Go to post

    Leave a comment:


  • Laharl
    replied to Writing a .equals method to compare fractions
    in Java
    It looks like you're storing the fractions in lowest terms. This is good. Then, two fractions F1 and F2 are equal if and only if the numerators of F1 and F2 are equal and the denominators of F1 and F2 are equal. Do you know how to implement this in code?

    (For a quick hint, the signature of the equals() method is public boolean equals(Object). You will need to cast the Object to an object of your class.)
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...