### Define an example
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use the example element to provide a titled example, often containing code.
```xml
Contents of the file
blather.cfg
CATS = -c/usr/local/prod/sgml/CATALOG
DSLCAT = -c/usr/local/sp/dsssl/catalog
DECL = /usr/local/sp/pubtext/xml.dcl
SRCHURL = xsrch.htm
STYLE = dbwrap.dsl
VALOPTS = -sv -wxml
```
--------------------------------
### Example Directory Listing for O'Reilly Book
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
This is an example of a typical directory listing for an O'Reilly book's XML source files. It shows the naming conventions for different types of book components.
```bash
$> ls /work/java/java.qref/xml
appa.xml ch01.xml ch06.xml part1.xml
appb.xml ch02.xml ch07.xml part2.xml
appc.xml ch03.xml ch08.xml
book.xml ch04.xml colo.xml
ch00.xml ch05.xml copy.xml
```
--------------------------------
### Use a word as an example
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use to present a word used as an example, distinct from its common meaning.
```xml
snake
```
--------------------------------
### Define a DBI::do database operation refentry
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Demonstrates documenting a Perl DBI method with synopsis and code examples.
```xml
DBI::do
DBI::do
$rows\_affected = $db->do($statement);
$rows\_affected = $db->do($statement, \%unused);
$rows\_affected =
$db->do($statement, \%unused, @bind\_values);
DBI::do directly performs a
non-SELECT SQL statement and
returns the number of rows affected by the statement. This is
faster than a DBI::prepare/DBI::execute
pair which requires two function calls. The
first argument is the SQL statement itself. The
second argument is unused in DBD::mSQL and DBD::mysql,
but can hold a reference to a hash of attributes for other
DBD modules. The final argument is an array of values used
to replace `placeholders,' which are indicated with a
`?' in the statement. The values of the array are
substituted for the placeholders from left to right. As an
additional bonus, DBI::do will
automatically quote string values before substitution.
Example
use DBI;
my $db = DBI->connect('DBI:mSQL:mydata',undef,undef);
my $rows\_affected =
$db->do("UPDATE mytable SET name='Joe' WHERE name='Bob'");
print "$rows\_affected Joe's were changed to Bob's\n";
my $rows\_affected2 =
$db->do("INSERT INTO mytable (name) VALUES (?)",
{}, ("Sheldon's Cycle"));
# After quoting and substitution, the statement:
# INSERT INTO mytable (name) VALUES ('Sheldon's Cycle')
# was sent to the database server.
```
--------------------------------
### Execute original ls command
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
This example shows how to bypass an alias and execute the original 'ls' command. Precede the command with a backslash.
```shell
\ls
```
--------------------------------
### Example: Tidy Code Snippet
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/src/TortoiseGitSetup/include/snippet.txt
Use this snippet to indicate that the commit involves tidying up source code. Uncomment the line to enable it.
```text
#tidy=Tidy up source code
```
--------------------------------
### Example: Drop Code Snippet
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/src/TortoiseGitSetup/include/snippet.txt
Use this snippet to signify that the commit involves dropping unused code. Uncomment the line to enable it.
```text
#drop=Drop unused code
```
--------------------------------
### DocBook Lite Variable List Example
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Demonstrates the correct markup for a term-definition list using DocBook Lite's \'variablelist\' element. This structure preserves semantic meaning for production tools.
```xml
monkey
A cute, furry mammal that climbs in trees.
koala
A cute, furry mammal that climbs in trees.
```
--------------------------------
### Example: Regression Snippet
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/src/TortoiseGitSetup/include/snippet.txt
Use this snippet to mark a commit as a regression related to a specific previous commit. Uncomment the line to enable it.
```text
#regression=Regression of commit
```
--------------------------------
### Define CATID_BugTraqProvider GUID
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/contrib/issue-tracker-plugins/issue-tracker-plugins.txt
The component category GUID used to register the plugin so it can be discovered by the settings dialog.
```cpp
// {3494FA92-B139-4730-9591-01135D5E7831}
DEFINE_GUID(CATID_BugTraqProvider,
0x3494fa92, 0xb139, 0x4730, 0x95, 0x91, 0x1, 0x13, 0x5d, 0x5e, 0x78, 0x31);
```
--------------------------------
### Incorrect List Markup Example
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Shows an alternative, less semantic way to represent a list using \'itemizedlist\' which might be easier to type but loses information about term-definition mapping.
```xml
Monkey - A cute, furry mammal that climbs in trees.
Koala - A cute, furry mammal that climbs in trees.
```
--------------------------------
### Example: Fixed Issue Snippet
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/src/TortoiseGitSetup/include/snippet.txt
Use this snippet to quickly add a 'Fixed issue' prefix to your commit messages. Uncomment the line to enable it.
```text
#fixed=Fixed issue #:
```
--------------------------------
### Add Implemented Categories to .REG File
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/contrib/issue-tracker-plugins/issue-tracker-plugins.txt
Manually edit the generated .REG file to add the 'Implemented Categories' entry. Replace 'PUT-GUID-HERE' with the actual GUID for your plugin.
```ini
[HKEY_CLASSES_ROOT\CLSID\{PUT-GUID-HERE}\Implemented Categories\{3494FA92-B139-4730-9591-01135D5E7831}]
```
--------------------------------
### XML Chapter ID Attribute Example
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Illustrates how to assign a unique and readable ID attribute to a chapter element for cross-referencing.
```xml
```
--------------------------------
### Register C# DLL with RegAsm
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/contrib/issue-tracker-plugins/issue-tracker-plugins.txt
Use RegAsm from the command line to register your C# DLL. Ensure the path to the DLL is correct and specify the desired output for the registry file.
```bash
RegAsm bin\Debug\MyCsPlugin.dll /codebase /regfile:MyCsPlugin.reg
```
--------------------------------
### Configure Aspell Build Properties
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/Aspell/Readme.txt
Set these properties in doc/doc.build.user to enable spellchecking and define the executable path.
```xml
```
```xml
```
--------------------------------
### Define a Samba configuration refentry
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Uses refmeta and refnamediv to define an obsolete configuration option in DocBook Lite.
```xml
YES, NO
NO
alternate permissions = boolean
Obsolete. Has no effect in Samba 2. Files will be shown as
read-only if the owner can't write them. In Samba 1.9 and
earlier, setting this option would set the DOS filesystem read-only
attribute on any file the user couldn't read. This in turn
required the delete readonly
option.
```
--------------------------------
### Define a program listing
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use the programlisting element to display code while preserving whitespace.
```xml
public void init(ServletConfig config)
throws ServletException {
super.init(config);
String greeting = getInitParameter("greeting");
}
```
--------------------------------
### Create a simple titled table
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Defines a basic table with a title, column headers, and data rows using DocBook Lite elements.
```xml
States and Their Capitals
State
Capital
New York
Albany
Massachusetts
Boston
Hawaii
Honalulu
```
--------------------------------
### Build TortoiseGit with MSBuild (x64)
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/build.txt
Compile the TortoiseGit project for the x64 platform using MSBuild in the Developer Command Prompt for VS20XX. Ensure a Release configuration.
```batch
MSBuild TortoiseGit.sln /p:Configuration=Release;Platform=x64
```
--------------------------------
### Download External Source Code with Git Submodules
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/build.txt
Use this command to download all linked repositories (submodules) required for building TortoiseGit.
```bash
git submodule update --init
```
--------------------------------
### Define an Apache ap_pstrndup refentry
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Documents a C function signature within a DocBook Lite refentry structure.
```xml
ap\_pstrndup
ap\_pstrndup
duplicate a string in a pool with
limited length
char \*ap\_pstrndup(pool \*p, const char \*s, int n)
Allocates n+1 bytes
of memory and copies up to n
characters from s,
NULL- terminating the result.
The memory is destroyed when the pool is destroyed. Returns
a pointer to the new block of memory, or
NULL if s
is NULL.
```
--------------------------------
### Build TortoiseGit with MSBuild (Win32)
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/build.txt
Compile the TortoiseGit project for the Win32 platform using MSBuild in the Developer Command Prompt for VS20XX. Ensure a Release configuration.
```batch
MSBuild TortoiseGit.sln /p:Configuration=Release;Platform=Win32
```
--------------------------------
### Correct Semantic XML Markup for URL
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use semantic markup like to mark up URLs. This ensures proper interpretation and repurposing of content, such as creating hyperlinks in HTML.
```xml
For more information, you really
ought to check out the W3C's website at http://www.w3.org/.
```
--------------------------------
### DataOutputStream Instance Methods
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
This section details the public instance methods available in the DataOutputStream class.
```APIDOC
## DataOutputStream Instance Methods
### Description
Provides methods for writing primitive data types to the output stream.
### Method
GET
### Endpoint
N/A
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
None
### Request Example
None
### Response
#### Success Response (200)
- **size** (int) - Returns the number of bytes written to the data output stream so far.
#### Response Example
None
```
--------------------------------
### Implement MyIssuesForm Event Handlers
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/contrib/issue-tracker-plugins/issue-tracker-plugins.txt
Event handlers for loading the ListView and processing user selections on OK click.
```csharp
private void MyIssuesForm_Load(object sender, EventArgs e)
{
listView1.Columns.Add("");
listView1.Columns.Add("#");
listView1.Columns.Add("Summary");
foreach(TicketItem ticketItem in _tickets)
{
ListViewItem lvi = new ListViewItem();
lvi.Text = "";
lvi.SubItems.Add(ticketItem.Number.ToString());
lvi.SubItems.Add(ticketItem.Summary);
lvi.Tag = ticketItem;
listView1.Items.Add(lvi);
}
listView1.Columns[0].Width = -1;
listView1.Columns[1].Width = -1;
listView1.Columns[2].Width = -1;
}
private void okButton_Click(object sender, EventArgs e)
{
foreach (ListViewItem lvi in listView1.Items)
{
TicketItem ticketItem = lvi.Tag as TicketItem;
if (ticketItem != null && lvi.Checked)
_ticketsAffected.Add(ticketItem);
}
}
```
--------------------------------
### Create a table with a column span
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Demonstrates how to span a column across multiple cells using the 'colspan' attribute within an element.
```xml
A
B
C
D
E
F
G
```
--------------------------------
### Methods Implementing DataOutput Interface
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
This section covers the methods that implement the DataOutput interface for writing various primitive types.
```APIDOC
## Methods Implementing DataOutput Interface
### Description
These methods are part of the DataOutput interface and are used to write primitive data types in a portable binary format.
### Method
POST
### Endpoint
N/A
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
- **b** (int) - Required - The byte value to write.
- **b** (byte[]) - Required - The array of bytes to write.
- **off** (int) - Required - The starting offset in the data.
- **len** (int) - Required - The number of bytes to write.
- **v** (boolean) - Required - The boolean value to write.
- **v** (int) - Required - The integer value to write.
### Request Example
```json
{
"b": 10,
"off": 0,
"len": 5
}
```
```json
{
"v": true
}
```
```json
{
"v": 123
}
```
### Response
#### Success Response (200)
None
#### Response Example
None
```
--------------------------------
### Implement ValidateParameters and GetLinkText
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/contrib/issue-tracker-plugins/issue-tracker-plugins.txt
Basic implementation of the required interface methods for parameter validation and link text retrieval.
```csharp
public bool ValidateParameters(IntPtr hParentWnd, string parameters)
{
return true;
}
```
```csharp
public string GetLinkText(IntPtr hParentWnd, string parameters)
{
return "Choose Issue";
}
```
--------------------------------
### DataOutputStream Constructor
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
This section describes the constructor for the DataOutputStream class.
```APIDOC
## DataOutputStream Constructor
### Description
Initializes a new DataOutputStream with the specified OutputStream to be filtered.
### Method
CONSTRUCTOR
### Endpoint
N/A
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
None
### Request Example
None
### Response
#### Success Response (200)
None
#### Response Example
None
```
--------------------------------
### Clone TortoiseGit Repository with Submodules
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/build.txt
Clone the main TortoiseGit repository and automatically download all submodules in a single command.
```bash
git clone --recursive https://gitlab.com/tortoisegit/tortoisegit.git
```
--------------------------------
### Alias for copying a file with backup
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Defines an alias to copy a file to a new file with a '.old' extension. Useful for creating quick backups before modification.
```shell
alias back 'cp \!^ \!^.old'
```
--------------------------------
### Alias for nroff on all arguments
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Creates an alias to run 'nroff -ms' on all command-line arguments passed to it. Use for batch processing of documents with nroff.
```shell
alias ms 'nroff -ms \!*'
```
--------------------------------
### Apply Translations to Resource DLLs with ResText
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/Languages/README.txt
Use the ResText utility to apply translations from a PO file to TortoiseGit resource DLLs. Replace NNNN with the four-digit country code and CC with the two-letter country code.
```bash
restext apply TortoiseProcLang.dll TortoiseProcNNNN.dll Tortoise_CC.po
```
```bash
restext apply TortoiseMergeLang.dll TortoiseMergeNNNN.dll Tortoise_CC.po
```
```bash
restext apply TortoiseIDiffLang.dll TortoiseIDiffNNNN.dll Tortoise_CC.po
```
```bash
restext apply TortoiseGitUDiffLang.dll TortoiseGitUDiffNNNN.dll Tortoise_CC.po
```
```bash
restext apply TortoiseGitBlameLang.dll TortoiseGitBlameNNNN.dll Tortoise_CC.po
```
--------------------------------
### Apply TortoiseGit Patches to libgit2
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/build.txt
Navigate to the libgit2 directory and apply TortoiseGit specific patches using git am. This ensures compatibility with TortoiseGit's requirements.
```batch
cd ext/libgit2
for %%G in (..\libgit2-*.patch) do (
type %%G | git am --3way
)
```
--------------------------------
### Define a screen representation
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use the screen element to represent terminal or console output.
```xml
> ls -l
total 6860
-r--r--r-- 1 eray ora 2570 Mar 27 19:38 BOOKFILES
-rw-rw-r-- 1 eray ora 13283 Mar 27 19:38 BOOKIDS
-rw-rw-r-- 1 sierra ora 2692 Mar 28 14:43 Makefile
drwxrwxr-x 2 jwizda ora 512 Aug 10 14:22 RCS/
-rw-rw-r-- 1 jwizda ora 39 Jul 26 17:39 README
```
--------------------------------
### Configure WinDbg Symbol Path
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/src/Debug-Hints.txt
Set the symbol path in WinDbg to resolve symbols using the TortoiseGit symbol server or the Microsoft symbol server.
```text
.sympath+ srv*c:\tmp*http://drdump.com:8080/public/TortoiseGit/7fbde3fc-94e9-408b-b5c8-62bd4e203570/symsrv/
```
```text
srv*c:\tmp*http://msdl.microsoft.com/download/symbols
```
--------------------------------
### Implement GetCommitMessage
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/contrib/issue-tracker-plugins/issue-tracker-plugins.txt
Logic to display the issue selection form and append selected ticket information to the commit message.
```csharp
public string GetCommitMessage(IntPtr hParentWnd, string parameters, string commonRoot, string[] pathList, string originalMessage)
{
List tickets = new List();
tickets.Add(new TicketItem(12, "Service doesn't start on Windows Vista"));
tickets.Add(new TicketItem(19, "About box doesn't render correctly in large fonts mode"));
MyIssuesForm form = new MyIssuesForm(tickets);
if (form.ShowDialog() != DialogResult.OK)
return originalMessage;
StringBuilder result = new StringBuilder(originalMessage);
if (originalMessage.Length != 0 && !originalMessage.EndsWith("\n"))
result.AppendLine();
foreach (TicketItem ticket in form.TicketsFixed)
{
result.AppendFormat("Fixed #{0}: {1}", ticket.Number, ticket.Summary);
result.AppendLine();
}
return result.ToString();
}
```
--------------------------------
### Define a title
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use the title element to provide a heading for a section or object.
```xml
The Benefits of Laughter
```
--------------------------------
### Define Provider Class Attributes
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/contrib/issue-tracker-plugins/issue-tracker-plugins.txt
Required COM attributes for the Provider class implementation.
```csharp
[ComVisible(true),
Guid("PUT-GUID-HERE"),
ClassInterface(ClassInterfaceType.None)]
public class Provider : IBugTraqProvider
{
// etc.
```
--------------------------------
### Specify a data type
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use to indicate a variable or constant data type.
```xml
boolean
```
--------------------------------
### Encode a URL as a special system item
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use to designate a URL as a special computer or network-related item.
```xml
http://www.oreilly.com
```
--------------------------------
### Create a cross-reference
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use with a linkend attribute to create a cross-reference to another element in the document.
```xml
```
--------------------------------
### Master Book File (_book.xml_) Structure
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Defines the structure of the master book file, including XML declaration, DTD directive, entity declarations for external files and text, and the book's content.
```xml
ASCII">
HTML">
SGML">
XML">
]>
Learning &xml;
&ch00;
©
&part1;
&part2;
&colo;
```
--------------------------------
### Incorrect Presentational XML Markup for URL
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Avoid using presentational markup like for elements that are not semantically emphasized. This can lead to incorrect rendering and prevent content repurposing, such as failing to create hyperlinks.
```xml
For more information, you really
ought to check out the W3C's website at
http://www.w3.org/.
```
--------------------------------
### Define MyIssuesForm Class
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/contrib/issue-tracker-plugins/issue-tracker-plugins.txt
Partial class definition for the issue selection dialog.
```csharp
partial class MyIssuesForm : Form
{
private readonly IEnumerable _tickets;
private readonly List _ticketsAffected = new List();
public MyIssuesForm(IEnumerable tickets)
{
InitializeComponent();
_tickets = tickets;
}
public IEnumerable TicketsFixed
{
get { return _ticketsAffected; }
}
// etc.
```
--------------------------------
### Render text in subscript
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use to render text in a smaller font size below the baseline, commonly used for chemical formulas.
```xml
H2O
```
--------------------------------
### Render text in superscript
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use to render text in a smaller font size above the midline, often used in scientific equations.
```xml
E=MC2
```
--------------------------------
### Define a variable list
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use the variablelist element to define terms and their corresponding definitions.
```xml
Snickers
Peanuts in nougat
covered in chocolate.
Payday
A peanut cluster cemented with caramel and
delicious sticky stuff.
```
--------------------------------
### Indicate user input
Source: https://gitlab.com/tortoisegit/tortoisegit/-/blob/master/doc/source/dtd/readme-dblite.html
Use to denote text entered by a human into a computer terminal.
```xml
telnet bubba.beerguzzlin.org
```