topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 1:21 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: Line-Numbered textfile  (Read 7994 times)

RedPillow

  • Member
  • Joined in 2008
  • **
  • Posts: 141
  • Pillows.
    • View Profile
    • Read more about this member.
    • Donate to Member
DONE: Line-Numbered textfile
« on: March 10, 2010, 10:05 AM »
I have decided to start this little youtube-game bymyself, where I seek for videos from 1 viewers to 100 000 000 viewers.
And for that, I need a checklist from 1 to 100 000 000.

So, i need someone to make me a program, which creates textfile with lines "from" "to" and user can choose where to start and where to quit, and the max number should be 100 000 000.
And if possible + bonus for you, make it so that in every line there is space after number.

edbro

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 426
    • View Profile
    • Donate to Member
Re: IDEA: Line-Numbered textfile
« Reply #1 on: March 10, 2010, 10:39 AM »
Can't you do this in Word using Autofill or a macro? I'm not really sure what you are trying to do as I don't know what you mean by "user can choose where to start". Start what?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: IDEA: Line-Numbered textfile
« Reply #2 on: March 10, 2010, 10:56 AM »
This is trivial to write...but you do realise that a text file with 100,000,000 lines will be over 1 gigabyte in size, right?  Trying to manipulate that in most text editors will be an exercise in futility.
« Last Edit: March 10, 2010, 10:58 AM by skwire »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: IDEA: Line-Numbered textfile
« Reply #3 on: March 10, 2010, 11:35 AM »
Here you go (source/binary included):  TextLiner.zip

2010-03-10_113401.png

RedPillow

  • Member
  • Joined in 2008
  • **
  • Posts: 141
  • Pillows.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: Line-Numbered textfile
« Reply #4 on: March 10, 2010, 12:00 PM »
Here you go (source/binary included):  TextLiner.zip
 (see attachment in previous post)

Exactly what I needed!
This is simple and powerful, thanks a ton!

Also, it makes my processor to roll!  ;D

P.S You`re really good @ making nice and clean interfaces.


EDIT: Total filesize for 1 to 100 000 000 file is: 1 063 369.

AND

My notepad started complaining that its too big for her - I have to use something else :P

ALSO

Wordpad opens it nicely in aprox. 1 minute.
« Last Edit: March 10, 2010, 12:11 PM by RedPillow »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: IDEA: Line-Numbered textfile
« Reply #5 on: March 10, 2010, 03:13 PM »
You may be able to find a text editor that only opens a "window" into the file, instead of opening the entire file in memory.  I don't know of any off-hand.  But back in the old Dos days you only had 640KB so you couldn't just load a MB file in ram.  The editor would seek through the file on disk and load a portion of it.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: IDEA: Line-Numbered textfile
« Reply #6 on: March 11, 2010, 03:48 AM »
Exactly what I needed!

Great to hear.  I'll move this to the finished section.