Search:

Type: Posts; User: raimo

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    2,026

    The traditional way to write Python code would...

    The traditional way to write Python code would with Emacs. ;)
    Emacs's Python mode is really great. By saying C-C C-C(C- means Ctrl) you get the buffer interpreted immediately. You get also syntax...
  2. Thread: big *LINUX* Q

    by raimo
    Replies
    3
    Views
    1,522

    It is possible to use Linux under FAT partitions....

    It is possible to use Linux under FAT partitions. For example, Red Hat provides this kind of installation option. But don't come later and say: "Linux sux!! Windows's better blah blah!!!" because it...
  3. Replies
    56
    Views
    8,320

    Poll: Yes, Python (http://www.python.org) would have...

    Yes, Python would have been my choice too. I often try to write the working code with Python before making the faster and ugly version with C/C++.
    Python interpreter is a really good for testing...
  4. Thread: random()?

    by raimo
    Replies
    14
    Views
    1,451

    Your compiler can return 10 when taking mod 10?...

    Your compiler can return 10 when taking mod 10? Would you tell me that for which x does this return 10: x%10 ? I don't think that Dev-C++ developers where so dummy that they created compiler which...
  5. Replies
    19
    Views
    3,914

    If your GUI is slower than Windows, then you are...

    If your GUI is slower than Windows, then you are running the wrong GUI.

    top is a command which shows the processes using much processor speed. ps -aux is also useful or ps -ax

    see man top; man...
  6. Replies
    13
    Views
    65,705

    GNU wget does this for you....

    GNU wget does this for you.
    http://www.gnu.org/software/wget/wget.html
  7. Thread: xine problem

    by raimo
    Replies
    1
    Views
    1,165

    Usually rpmfind works. It could be that it was...

    Usually rpmfind works. It could be that it was temporarily down.
    http://rpmfind.net/linux/rpm2html/search.php?query=xine&submit=Search+...
    Sources can be found also from SourceForge:...
  8. Thread: random()?

    by raimo
    Replies
    14
    Views
    1,451

    You should not use modulus operator before you...

    You should not use modulus operator before you know what it is.

    p / q = s + r/q

    p,q,r,s are integers. r < q

    Then also: p % q = r

    % 10 means that you take the last number of an integer.
  9. Replies
    16
    Views
    1,609

    Data that is more than one line? All strings can...

    Data that is more than one line? All strings can be variables. And so can this:
    char something[34]="First line\nSecond line\nThird line";
  10. Replies
    2
    Views
    3,228

    Type on Linux command prompt: man 2 socket man...

    Type on Linux command prompt:
    man 2 socket
    man 7 socket
    or type man socket -a and 'q' as many times as needed to get an interesting page. sys/socket.h is the header needed.
    There are also...
  11. Replies
    3
    Views
    1,717

    I assume that those headers are only headers and...

    I assume that those headers are only headers and they are already #included in the files?

    gcc -c source1.c
    gcc -c source2.c

    Now you have source1.o and source2.o

    gcc -o program source1.o...
  12. Replies
    5
    Views
    1,402

    Did you want to check every argument and bash or...

    Did you want to check every argument and bash or tcsh?

    #!/usr/bin/env tcsh
    foreach arg ($argv)
    if ($arg == "something") then
    echo "something entered as an argument"
    break
    endif...
  13. Thread: Code comments

    by raimo
    Replies
    13
    Views
    2,993

    You mean something like this? a++; /*...

    You mean something like this?


    a++; /* Increment a by one. */

    :D

    I think only the actual idea should be commented. Some strange things like /*Divide a by 2 and check if it's zero*/ is...
  14. Replies
    3
    Views
    8,696

    Sure the compiler could use the same name for...

    Sure the compiler could use the same name for another variable. But that doesn't make the code any better if your variables have different meanings in different places. The maintainability would not...
  15. Replies
    51
    Views
    8,532

    Microsoft has some power. Microsoft is a clever...

    Microsoft has some power. Microsoft is a clever company while it has sold so much software to people at development state. I don't know any other company which has made so much money by selling that...
  16. Why do you think that the first solution "drains"...

    Why do you think that the first solution "drains" memory? Your second code is more than O(n^3) and the first one is O(n). The memory consuming is the same. The second code you posted does useless...
  17. Replies
    4
    Views
    1,813

    If this is the only problem, then you only need...

    If this is the only problem, then you only need to check if the filename is longer that the length of the tab and remove tabs according to that.
    ...
    But what if the filenames are too long? ;)
  18. Thread: Gnu C++

    by raimo
    Replies
    2
    Views
    2,154

    Yes. Using DJGPP (http://www.delorie.com/djgpp/)...

    Yes. Using DJGPP or that MinGW/Cygwin.

    No, it doesn't. RHIDE is for DJGPP but it's a DOS program. XEmacs is quite good from Linux/Unix world.

    The programs are compiled at command prompt(but...
  19. Thread: c++ socket class

    by raimo
    Replies
    1
    Views
    1,830

    There is a library called Common C++ - A GNU...

    There is a library called Common C++ - A GNU Portable Application Framework.This works both for Win32 and Unix and uses C++ classes.
    http://www.voxilla.org/projects/projape.html
  20. Thread: Destructors

    by raimo
    Replies
    5
    Views
    1,031

    If you use only auto variables(default) then...

    If you use only auto variables(default) then destructor is not needed. Default constructor is created anyway. But dynamically allocated data should be destroyed.
  21. Replies
    3
    Views
    3,877

    This does nothing: 2>&1 because the &1 references...

    This does nothing: 2>&1 because the &1 references to itself.

    cat x junk 1> junk2
    This will print "cat: x: No such file or directory" and prints junk to junk2(because stderr is not redirected)
  22. Replies
    5
    Views
    1,402

    Bash has not foreach. This lists all directories...

    Bash has not foreach.
    This lists all directories in current directory:


    for arg in *; do
    if [ -d $arg ]; then
    echo $arg;
    fi;
    done
  23. Replies
    14
    Views
    1,872

    Do you mean: char foo[80]; cin>> foo;...

    Do you mean:
    char foo[80];
    cin>> foo;
    if(!strcmp(foo,"a") {
    strcpy(foo, "0110011"); // Whatever.
    }
  24. Replies
    11
    Views
    1,203

    Ha, you don't need 2.0/5.0: 2/5. is enough(that's...

    Ha, you don't need 2.0/5.0: 2/5. is enough(that's what I use when calculating with Python) :D

    But, we all know that integers rule. You can always write your own routine to floating point numbers...
  25. Replies
    14
    Views
    1,872

    cin >> textChange; // >>

    cin >> textChange; // >> <- << //from stdin to var...

    textChange = 01100001
    Note that 01100001 is an octal number.

    ' ' are used with single characters and " " are used with strings.
Results 1 to 25 of 104
Page 1 of 5 1 2 3 4