topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • October 19, 2019, 07:52 PM
  • Proudly celebrating 13 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - chesterw [ switch to compact view ]

Pages: [1]
1
N.A.N.Y. 2019 / Re: NANY 2019 Entry - Huge Text/Log file reader
« on: March 07, 2019, 09:26 AM »
Corrections, and added (Search) Again feature.
-----------------------------------
This program reads text files and log files of almost unlimited size.

It does this by reading the file in 1,000 line chunks.

If Reader.exe is called with a parameter, it tries to load that file.
If no parameter is given, or you just double-click on it from Explorer,
then the program starts without an initial file.

When the program first starts, click on the "Load File" button, navigate to
the folder where your file is located, and select the file to read.  Repeat
the process to read a different file.  Exit by clicking the X at the top right.

The program first counts lines in the file.  If the file is huge, you may
see a "Counting lines in file..." message.  Most often this happens too
quickly to see the message for small to medium sized files.

The first 1,000 lines are displayed, with the line number and then the contents
of the line.  The line count is shown in the Edit Box at the bottom.  Use the
scrollbars to scroll up, down, left, and right in that 1,000 line chunk of the
file.  You can edit the text, but not save the file.  You can use your mouse to
select text, and press <CTRL-C> to copy the text to the Windows Clipboard.

Click on "Next 1000" to see the next 1,000 lines of the file, if there are
that many lines.

Click on "Prev 1000" to see the previous 1,000 lines of the file, if past
line 1,000, or maybe the first 1,000 lines.  If the file is large, you may
see a "Moving to previous page..." message.

Click on "Top" to see the first 1,000 lines of the file.

Click on "Bottom" to see the last 1,000 lines of the file.  If the file is
large, you may see a "Moving to bottom of file..." message.

Click on "Search" to try to find lines that exactly match the text in the
Edit Box at the bottom.  You are taken to the first line that matches.  A
fresh chunk is loaded with the matching line on the top of the screen.  If
NOT found, a message is displayed, and you see the first 1,000 lines of the
file.  For a large file, you may see a "Searching..." message.

Click on "Again" to search again, starting at the next block (1,000 lines
after the top of the current block).  The top line of the new block (assuming
a match) becomes the top of the new block.  For example, suppose the first match
after line 1,000 of the file is on line 1,500: the block you are viewing becomes
line 1,500 through line 2,499.

Whenever a line contains the exact text in the Edit Box at the bottom, that
line shows up in blue.  Even without doing a search: "Next 1000", "Prev 1000",
"Top", and "Bottom" will all show blue lines for exact matches.

Click on "Goto Line" to go to the line number in the Edit Box at the bottom
if the content in the Edit Box at the bottom is a valid integer and the
integer given is less than or equal to the line count.  That line number
becomes the top of the screen.  If the file is very large, you may see a
"Moving to the line..." message displayed while the correct chunk is located.

This program very powerful.  It should be able to handle files up to
18,446,744,073,709,551,615 lines: that's 18 sextillion lines!  Not sure how
to make a text file that big for testing purposes.  Of course, working with
such a file would be slow.  The initial line count would take many minutes,
as well as pressing the "Bottom" and "Prev 1000" buttons.  Sticking with the
"Top" and "Next 1000" buttons on very large files should be the fastest.

2
N.A.N.Y. 2019 / Re: NANY 2019 Entry - Huge Text/Log file reader
« on: January 07, 2019, 06:40 AM »
Here is a screenshot, and a slightly enhanced version.

Still cannot figure out how to test the maximum 18 sextillion lines limit...

3
N.A.N.Y. 2019 / NANY 2019 Entry - Huge Text/Log file reader
« on: July 28, 2018, 10:51 AM »
This program reads text files and log files of almost unlimited size.

It does this by reading the file in 1,000 line chunks.

If Reader.exe is called with a parameter, it tries to load that file.
If no parameter is given, or you just double-click on it from Explorer,
then the program starts without an initial file.

When the program first starts, click on the "Load File" button, navigate to
the folder where your file is located, and select the file to read.  Repeat
the process to read a different file.  Exit by clicking the X at the top right.

The program first counts lines in the file.  If the file is huge, you may
see a "Counting lines in file..." message.  Most often this happens too
quickly to see the message for small to medium sized files.

The first 1,000 lines are displayed, with the line number and then the contents
of the line.  The line count is shown in the Edit Box at the bottom.  Use the
scrollbars to scroll up, down, left, and right in that 1,000 line chunk of the
file.  You can edit the text, but not save the file.  You can use your mouse to
select text, and press <CTRL-C> to copy the text to the Windows Clipboard.

Click on "Next 1000" to see the next 1,000 lines of the file, if there are
that many lines.

Click on "Prev 1000" to see the previous 1,000 lines of the file, if past
line 1,000, or maybe the first 1,000 lines.  If the file is large, you may
see a "Moving to previous page..." message.

Click on "Top" to see the first 1,000 lines of the file.

Click on "Bottom" to see the last 1,000 lines of the file.  If the file is
large, you may see a "Moving to bottom of file..." message.

Click on "Search" to try to find lines that exactly match the text in the
Edit Box at the bottom.  You are taken to the first line that matches.  A
fresh chunk is loaded with the matching line on the top of the screen.  If
NOT found, a message is displayed, and you see the first 1,000 lines of the
file.  For a large file, you may see a "Searching..." message.

Whenever a line contains the exact text in the Edit Box at the bottom, that
line shows up in blue.  Even without doing a search: "Next 1000", "Prev 1000",
"Top", and "Bottom" will all show blue lines for exact matches.

Click on "Goto Line" to go to the line number in the Edit Box at the bottom
if the content in the Edit Box at the bottom is a valid integer and the
integer given is less than or equal to the line count.  That line number
becomes the top of the screen.  If the file is very large, you may see a
"Moving to the line..." message displayed while the correct chunk is located.

This program very powerful.  It should be able to handle files up to
18,446,744,073,709,551,615 lines: that's 18 sextillion lines!  Not sure how
to make a text file that big for testing purposes.  Of course, working with
such a file would be slow.  The initial line count would take many minutes,
as well as pressing the "Bottom" and "Prev 1000" buttons.  Sticking with the
"Top" and "Next 1000" buttons on very large files should be the fastest.

4
07/02/2018 - In the 3 QueryToCSV files:
  Corrected a bug that added a blank column to the output file.
  Enhanced error messages.
  Added an N parameter: Output file has a header unless there is this parameter.

5
N.A.N.Y. 2018 / Re: NANY 2018 - 6 Command line Database utilities
« on: October 24, 2017, 07:18 AM »
Because Delphi is such a popular tool throughout the world, those who write viruses often use Delphi.  Normal library routines in Delphi produce strings of characters in most Delphi programs.  In error, some antivirus heuristics look for those strings of characters and automatically label (falsely) a program as a virus.  So if I submit a program in Delphi, it pretty much is guaranteed to be falsely labeled as a virus by some antivirus program.  Packers like UPX compress the final EXE significantly, which speeds up file transfers, and has the added benefit of avoiding the false positives of some antivirus software.  But then, as pointed out above, they complain that you used UPX to pack the EXE.  I can't win...

Delphi is quite versatile in its database capabilities.  The 6 programs here are really just 2 programs, with slight changes for 3 different databases.  The trick used in the 3 "dump out a table" programs was to discover 3 different ways to get the list of columns.  Every database does it differently.  Once I had the list of column names, and put them at the top of the CSV file, I did a "SELECT * FROM tablename" and wrapped each field with double-quotes and commas, to make a "safe" CSV file, as a field can contain commas.

The other 3 programs for getting the result of a query have the user give me the column names, and a (hopefully pre-tested) query that matches those column names.  Using a similar process as above, I create the CSV file.

The real versatility is using the batch/CMD files to do the routine stuff like passwords, and allow the flexibility of dumping different tables or running a set of custom SQL files.  Enjoy!

6
N.A.N.Y. 2018 / NANY 2018 - 6 Command line Database utilities
« on: September 20, 2017, 07:12 AM »
I have noticed that there often is a need to dump database information into a CSV file.  Users then can use
Excel or a similar program to manipulate the data.  These utilities are easy to use, flexible, and fast.
There are 2 utilities for Oracle, 2 for Microsoft SQL, and 2 for SQLite.  They convert a table or SQL into a CSV file.

Oracle:
  OracleTableToCSV.exe       Converts an entire table into a CSV file.
  OracleQueryToCSV.exe       Converts an SQL query result into a CSV file.

Microsoft:
  MSTableToCSV.exe           Converts an entire table into a CSV file.
  MSQueryToCSV.exe           Converts an SQL query result into a CSV file.

SQLite:
  SqliteTableToCSV.exe       Converts an entire table into a CSV file.
  SqliteQueryToCSV.exe       Converts an SQL query result into a CSV file.

7
N.A.N.Y. 2017 / Re: DIA5
« on: December 09, 2016, 07:35 AM »
I've been coding for a few decades.  My favorite language is Delphi.  DIA5 is written in Delphi, which is probably why the false positive on the antivirus software, but DIA5 is clean.  DIA versions 1, 2, and 3 were 16 bit character based apps.  DIA4 is a 32 bit character based app that handles long file names, etc.  DIA5 is a 32 bit GUI app, a little more powerful than DIA4, and easier to use for some people.

Over the years, I noticed that I repeatedly did lots of "Explorer" kinds of things, but kept starting and stopping a collection of programs in order to "get the job done".  As a programmer, I needed power and flexibility and speed.  I developed DIA, Does-It-All, long before Explorer, and long before object oriented programming.  The concept is that you view the files in a folder and you can take actions on a file in that folder.  DIA5 is a GUI application: you need the mouse more than the keyboard.  It's more powerful than Explorer, and often faster.  It can call your favorite text editor.  The text file utilities are powerful and can handle huge files.  As I personally needed a new feature, I added it.  Friends have had copies for years, so it's been fairly well tested.

I've attached screenshots of the program and the Help screen.

8
N.A.N.Y. 2017 / Re: DIA4
« on: December 09, 2016, 07:24 AM »
I've been coding for a few decades.  My favorite language is Delphi.  DIA4 is written in Delphi, which is probably why the false positive on the antivirus software, but DIA4 is clean.  DIA versions 1, 2, and 3 were 16 bit character based apps.  DIA4 is 32 bit, handles long file names, etc.

Over the years, I noticed that I repeatedly did lots of "Explorer" kinds of things, but kept starting and stopping a collection of programs in order to "get the job done".  As a programmer, I needed power and flexibility and speed.  I developed DIA, Does-It-All, long before Explorer, and long before object oriented programming.  The concept is that you view the files in a folder and you can take actions on a file in that folder.  DIA4 is a "keyboard friendly" application: you leave the mouse alone and keep your fingers on the keyboard.  It's faster than explorer once you get used to it.  It can call your favorite text editor.  The text file utilities are powerful and can handle huge files.

I've attached screenshots of the program and the (built-in) Help screen.

9
N.A.N.Y. 2017 / DIA5
« on: December 08, 2016, 05:40 PM »
This is a GUI based file manager on steroids.  Roam hard drives.  Open programs.  Search for text within files.  Find files.
Press F1 for help.
Also includes a number of built-in utilities that operate on text files (even many MBs in size).
Once you get the hang of it, it's faster than Windows Explorer.

10
N.A.N.Y. 2017 / DIA4
« on: December 08, 2016, 05:30 PM »
This is a character based file manager on steroids.  Roam hard drives.  Open programs.  Search for text within files.  Find files.
Press F1 for help.
Also includes a number of built-in utilities that operate on text files (even many MBs in size).
Once you get the hang of it, it's faster than Windows Explorer.

Pages: [1]