Tag Archive
Browsers C/C++ formatting Java Programming Utilities
Capturing the screen in Windows
For the longest time, I thought the “Print Screen” or “PrtScr” Key on my keyboard was a throw back to much older computers with sheet fed dot matrix printers and would just print out the current Dos command shell.
Once I figured out how to use it in windows, it has become an invaluable tool.
I used to create presentations of source code issues. It was a great help to be able to grab a copy of the screen and place it in a Powerpoint slide or Word Doc.
If you need a complete screen capture or even just the current window, here is what you can do.
If you need to capture the complete screen, press the “Print Screen” button located near the top of the keyboard with the scroll lock or Pause key. It may seem like nothing has happened, but the complete image of your current desktop has been saved into the clipboard in windows.
If you want to just capture the current window, make sure the window you want is active and press the Alt and “Print Screen” keys together.
Now open Paint, MS Word or any other program capable of handling images, and type Ctrl-V. This will take the image that has been captured into memory and place it in the program. Now you can manipulate the image to crop it or use it in your document.
This is a built in function of the MS Windows Operating system.
If you need more control there are other applications that can let you capture portions of the screen at any time and create a file with a simple keystroke, such as SnagIt!
How to split large files for emailing
I had to send a large file (about 100MB) to a client for analysis. They did not have an anonymous ftp server so I had to figure a way to e-mail the file to them and then have a way to put it back together.
I found the split command very useful. I use Linux when I can but have installed Cygwin on my Windows PC to get the same functionality.
Here is a way to break the file into 5 megabyte chunks:
# split -b 8m veryLargeInputFile
This instance splits veryLargeInputFile 8MB segments named xaa xab xac…xap.
Now put the file back together at the distant end:
# cat xaa xab xac xad xae xaf xag xah xai xaj > veryLargeInputFile
or
# cat * >veryLargeInputFile
Note: ensure xa* are the only files in the directory when using the wildcard
For ASCII files: Split lines — This example splits a document into 1000 line segments.
# split -l 1000 veryLargeTextFile
Use the same process to put the file back together again.
Note: For larger files, find a ftp server or make your filesize increments bigger.
Split options
-b ## — replace ## with the number of bytes you want in a file
-C ## — replace ## with the number of SIZE bytes of lines per output file
-l ## — replace ## with the number of lines per file.
-d — use numeric suffixes for output files instead of alphabetic