Tuesday, July 11, 2006
dot language to draw graphs.
http://home.so-net.net.tw/oodtsen/wingraphviz/index.htm
very interesting.
the site does have a free COM object to draw graphs for dot language specification.
very interesting.
the site does have a free COM object to draw graphs for dot language specification.
redirection symbol in bat file
So what would happen if our MAIN.BAT had the following line in it?
echo %%"%% chkdsk | find "65535" > nul %%"%% > temp.bat
DOS would replace the first %% with a single %, then it would see the quote. Seeing the quote, it would remember to ignore all piping and redirection symbols up to the next quote. This means our quote protection ends at the quoted 65535, but it picks up again at the end of the number and continues to the last quote (far enough to protect all but the last redirection symbol which we want to act as a redirection anyway). DOS then continues to process the line, replacing the rest of the %% with %. After processing the line, it executes it, echoing our desired line
%"% chkdsk | find "65535" > nul %"%
into TEMP.BAT. All the piping and redirection is delivered intact, and we can ignore the %"%, since DOS will ignore it.
more at: eric
echo %%"%% chkdsk | find "65535" > nul %%"%% > temp.bat
DOS would replace the first %% with a single %, then it would see the quote. Seeing the quote, it would remember to ignore all piping and redirection symbols up to the next quote. This means our quote protection ends at the quoted 65535, but it picks up again at the end of the number and continues to the last quote (far enough to protect all but the last redirection symbol which we want to act as a redirection anyway). DOS then continues to process the line, replacing the rest of the %% with %. After processing the line, it executes it, echoing our desired line
%"% chkdsk | find "65535" > nul %"%
into TEMP.BAT. All the piping and redirection is delivered intact, and we can ignore the %"%, since DOS will ignore it.
more at: eric
Monday, July 10, 2006
Using Consistent References - MS WORD
link There are many times when you are putting together a document that you need to make sure that certain references are consistent. For instance, you may need to refer to a particular tolerance on a piece of machinery, and it is imperative that the references be precise and accurate throughout the document.
There are several ways you can handle this situation using Word. The first is to use the mail merge feature, another is to use bookmarks, the third is to use search and replace, the fourth is to use AutoText, and the fifth is to use document properties. If your document only has a couple of references that you need to update whenever you print, you can set up the document as a mail merge document and use merge codes to insert the proper value. In that way you only need to change the information in the merge data file to have the references throughout the finished document be accurate.
The second way is to use bookmarks. In this method you would perform the following steps:
At the first instance of the reference, define the value or text as a bookmark. (Defining bookmarks was discussed fully in a previous WordTips.)
At the next point where you need the same value or text, insert a field by pressing CTRL+F9.
Within the field, type REF [bookmark], where [bookmark] is the name of the bookmark you defined in step 1.
Repeat steps 2 and 3 for each occurrence of the value or text.
You will want to make sure that you update your fields before printing if you use the bookmark method just described. The third method you can use is to contrive some sort of shorthand notation for the values or text you want to be consistent. For instance, you might devise n45 as shorthand for 45,000. Then, when you are done with your document, you can search for all instances of n45 and replace it with 45,000.
The fourth method involves using AutoText entries. When you first use your value or text, assign it to an AutoText entry. (AutoText entries were discussed in a previous issue of WordTips.) For instance, you might assign 45,000 to the AutoText name n45. Then, whenever you type n45, you can press F3 and the name is expanded to the full number. To provide greater flexibility, you can bypass the F3 method and follow these steps:
At the first instance of the reference, define the AutoText value as you normally would.
At the next point where you need the same value or text, insert a field by pressing CTRL+F9.
Within the field, type AUTOTEXT [name], where [name] is the name of the AutoText entry you defined in step 1.
Repeat steps 2 and 3 for each occurrence of the value or text.
You may notice that this series of steps is very similar to the bookmark method. The advantage of using AutoText in this way is that it can be easily updated. Simply change the AutoText entry, update your fields, and all instances are automatically changed throughout the document. If you use the F3 approach, your AutoText entry cannot be automatically updated.
The fifth (and final) method entails using document properties. Most Word users know that Word maintains a series of properties for your documents. These properties include things like the size of the document, the last time it was updated, and the like. You can also define custom properties that act like variables for your document. To define a custom property, follow these steps:
Choose the Properties option from the File menu. This displays the Properties dialog box.
Click on the Custom tab. The Properties dialog box now appears. (Click here to see a related figure.)
In the Name field, specify the name you want associated with this property. This is the name you will later use to reference the property in your document.
In the Type field, pick the type of property you are creating.
In the Value field, specify the value of the property.
Click on the Add button. The new property appears in the list of properties in the dialog box.
Click OK to close the Properties dialog box.
Now you are ready to use the new document property within your document. You do this in much the same way as you use bookmarks and AutoText entries for this same purpose.
Position the cursor at the point where you want the reference to appear.
Insert a field by pressing CTRL+F9.
Within the field, type DOCPROPERTY [name], where [name] is the name of the document property you previously defined.
Repeat steps 1 through 3 for each occurrence of the value or text.
There are several ways you can handle this situation using Word. The first is to use the mail merge feature, another is to use bookmarks, the third is to use search and replace, the fourth is to use AutoText, and the fifth is to use document properties. If your document only has a couple of references that you need to update whenever you print, you can set up the document as a mail merge document and use merge codes to insert the proper value. In that way you only need to change the information in the merge data file to have the references throughout the finished document be accurate.
The second way is to use bookmarks. In this method you would perform the following steps:
At the first instance of the reference, define the value or text as a bookmark. (Defining bookmarks was discussed fully in a previous WordTips.)
At the next point where you need the same value or text, insert a field by pressing CTRL+F9.
Within the field, type REF [bookmark], where [bookmark] is the name of the bookmark you defined in step 1.
Repeat steps 2 and 3 for each occurrence of the value or text.
You will want to make sure that you update your fields before printing if you use the bookmark method just described. The third method you can use is to contrive some sort of shorthand notation for the values or text you want to be consistent. For instance, you might devise n45 as shorthand for 45,000. Then, when you are done with your document, you can search for all instances of n45 and replace it with 45,000.
The fourth method involves using AutoText entries. When you first use your value or text, assign it to an AutoText entry. (AutoText entries were discussed in a previous issue of WordTips.) For instance, you might assign 45,000 to the AutoText name n45. Then, whenever you type n45, you can press F3 and the name is expanded to the full number. To provide greater flexibility, you can bypass the F3 method and follow these steps:
At the first instance of the reference, define the AutoText value as you normally would.
At the next point where you need the same value or text, insert a field by pressing CTRL+F9.
Within the field, type AUTOTEXT [name], where [name] is the name of the AutoText entry you defined in step 1.
Repeat steps 2 and 3 for each occurrence of the value or text.
You may notice that this series of steps is very similar to the bookmark method. The advantage of using AutoText in this way is that it can be easily updated. Simply change the AutoText entry, update your fields, and all instances are automatically changed throughout the document. If you use the F3 approach, your AutoText entry cannot be automatically updated.
The fifth (and final) method entails using document properties. Most Word users know that Word maintains a series of properties for your documents. These properties include things like the size of the document, the last time it was updated, and the like. You can also define custom properties that act like variables for your document. To define a custom property, follow these steps:
Choose the Properties option from the File menu. This displays the Properties dialog box.
Click on the Custom tab. The Properties dialog box now appears. (Click here to see a related figure.)
In the Name field, specify the name you want associated with this property. This is the name you will later use to reference the property in your document.
In the Type field, pick the type of property you are creating.
In the Value field, specify the value of the property.
Click on the Add button. The new property appears in the list of properties in the dialog box.
Click OK to close the Properties dialog box.
Now you are ready to use the new document property within your document. You do this in much the same way as you use bookmarks and AutoText entries for this same purpose.
Position the cursor at the point where you want the reference to appear.
Insert a field by pressing CTRL+F9.
Within the field, type DOCPROPERTY [name], where [name] is the name of the document property you previously defined.
Repeat steps 1 through 3 for each occurrence of the value or text.
