Thread: A program thread...

  1. #16
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    ygfperson: I just downloaded and ran the program but I think I am using it wrong - what is the usage again? You can PM me if you get the urge...

    well here's a program only a coder could love: one that removes comments from source files! Y'know - you downloaded some sourcecode - only to find that not only did the author throw in syntax errors and other obstacles, but he also mined it with about a hundred multiline comments - which, of course make adding your own multiline comments around his impossible...

    Description: Removes single-line and multiline comments from sourcecode by creating de-commented copies of the original (preserves the original though)

    Usage: Utilizes the drag and drop feature of Windows to process as many files as desired. Can also be run from the command-line in full DOS mode.

    Features:

    - Windows (PC) compatible

    - User can opt to create the copies in the programs running directory or in the home directory of the originating file(s).

    - Resolves filename conflicts at run-time with an incremental naming system.

    - The de-commented copies are named as the original but with a leading "_".

    - Easy to use.

    - Thoroughly tested and totally accurate.

    Drawbacks:

    - Compiled for Windows-based machines only at the time.

    - Does not process folders and subfolders just yet

    - Single-purpose utility


    Believe it or not, I use it quite frequently. One useful application is to go to the Windows Start Menu, Select "Find Files...", and type in the 'named' box: " *.c", "*.cpp", or "*.h"
    After it has found all of the files of that type in the hard drive, simply drag them ALL onto the program, selecting the "create in the home directory" option at the prompt. That way, the copies appear in each of the original's directory, making it easy to find the copies you've made.



    Check it out!
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #17
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    a little update:
    this version allows compression of binary files fairly accurately, give or take a byte at the end. minor bugs with text files also fixed.

    be warned, though, it's still slow as hell compared to winzip, bzip2, gzip, etc...

  3. #18
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Hmmm...ok, I think I found the problem: me! I don't know how to run from the command line! I am so used to the Windows drag and drop feature that I am totally useless in DOS! But I will work on that and let you know....
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  4. #19
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    C'mon now, I know you got something out there! Hundreds of members and only 2 entries??
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 03:30 PM
  3. API Thread HEADACHE
    By WaterNut in forum Windows Programming
    Replies: 11
    Last Post: 01-16-2007, 10:10 AM
  4. Simple thread object model (my first post)
    By Codeplug in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2004, 11:34 PM
  5. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM