OpenLLM-France/wikimedia huggingface dataset:
# Trainz/Backing Up Downloaded And Self-Created Assets

Back to the Top
* Fundamentals for Trainz Trainees Trainz Asset Maintenance and Creation
* TOC | Beginnings | Fun | AM&C | Creation | InBook Refs | ORP Refs:  • Index • Containers • Kinds • Tags | Appendixes  • Vers
Glossary :
HKeys-CM :
HKeys-DVR :
HKeys-SUR :
HKeys-WIN :
Mouse use :
Notations :

## General Principles

As with all data that you value and which is held on a computer, it is highly advisable to regularly backup your downloaded and self-created Trainz assets. There are many ways in which data can be accidentally or deliberately deleted, corrupted or otherwise lost.
Making an additional copy on the same physical hard disk only guards against a very limited range of risks. Therefore making backups onto removable media such as writable CD's or DVD's is a wise precaution. If re-writable disks are used then it is best to use at least three sets of disks in rotation.
In addition to backing up their installed files, you may also wish to archive or backup the distribution files for downloaded assets. In most cases these will be CDP, EXE, RAR or ZIP files.
Suggestion: Make a ZIP copy of the folder tree you wish to backup and burn that to CD or DVD. This will require less disks, take less time to burn, and the burning process may be more reliable than writing the numerous original files.

## TS09-SP4—TS12
### Note

    The tried and true folder system used in the extensive family of TRS2006 spin off releases was first changed in TS2010's first released versions, then adapted when the SP3 version of TS2009's was brought up to the same trainz-build tag tech-level, v3.3 as seen in config.txt files, on the DLS, and in the Content Manager main display.

## TRS2006—TS09-SP4

Downloaded assets and assets that you have created are both held in the subfolders of C:\Program Files\Auran\TRS2006\local
Any assets that have been left open for editing can be found in C:\Program Files\Auran\TRS2006\editing

## Trainz 1.3—TRS2004

Downloaded assets are held in the subfolders of C:\Program Files\Auran\TRS2004\World\Dispatcher\Downloads
Assets that you have created are held in the subfolders of C:\Program Files\Auran\TRS2004\World\custom ∅
# Trainz/Adding a background image to GMAX

* Select the view you want the drawing to appear.
* Left Click the VIEWS button
* Select VIEWPORT BACKGROUND
* Check Display Background and Lock Pan Zoom
* Navigate to the file folder that contains the drawing you want to use and Check OPEN and then OK
* The drawing will then show up in the view port.
* You can then go the Helpers and use the TAPE MEASURE button to setup the scale.
# Trainz/Asset modification

Back to the Top
* Fundamentals for Trainz Trainees
* TOC | Beginnings | Fun | AM&C | Creation | InBook Refs | ORP Refs:  • Index • Containers • Kinds • Tags | Appendixes  • Vers
Glossary :
HKeys-CM :
HKeys-DVR :
HKeys-SUR :
HKeys-WIN :
Mouse use :
Notations :

## Retrograding content

There is a myth that newer Trainz Simulator 12 (TS12) content cannot be modified to run in an earlier Trainz version. While literally true for Routes and sessions (at least until some 3rd party software engineer tackles the difference between the data models used internally in TS12 and writes a program that translates them), it is not true in the least for unscripted scenery assets and most trackside elements or rolling stock—even most which contain scripts. A critical examination of the difference between the data elements (tags and containers which are mandatory) a v2.0 (TRS2004-SP0) asset and v3.7 (TS12) asset have very few differences. Most of those which do occur happen in Texture.txt files using extended graphical function capabilities not present in older Trainz releases.

## Notes and footnotes

* All technical and many HowTo references are normally sourced
* from the TrainzOnline wiki,
* it's template forms an external link to an N3V Wiki HELP namespace page given only the page title.
   * It add NS and HowTo parameters to link to Help namespace like:
http://online.ts2009.com/mediaWiki/index.php/Help:Surveyor_Tools

### internal coding
## Usage

A close read of the shows the linking string given as {{{1}}} or URL= or url= is the subpage address after the TrainzWiki Help TOC-page listing N3V help articles.
* Like most every Trainz template it may be given the pretty-text parameter '|p= some string which forms a priority output, otherwise, the template is designed to replace underscores in a url with spaces and display the page title, just as if it were a local page link on any Wikimedia based Wiki project.
* It is also designed for placeholder parameter {{{2}}} to support the more convenient pipe-separated call normally seen in wikimarkup language:
       {{HT|some_underscored_url_pagename |Some pretty name'}}'''
For this template, since the subpage names AND the Trainz Wiki divisions are named for topic clarity, the shorter form using the page name is likely to be what is desired:
       {{HT|some_underscored_url_pagename}}
HowTo pages
* or the various Content Creator's Guides (online or in Trainz releases of yore).
# Visual Basic .NET/Introduction
## Introduction

Visual Basic .NET is one of the two flagship languages (with C#) for the .NET framework from Microsoft. Despite being called Visual Basic, it is actually not backwards-compatible with VB6, and any code written in the old version will not compile under VB.NET.
As a language, Visual Basic.NET has the following traits:
Object-Oriented
As with all .NET languages, VB.NET includes full-blown support for object-oriented concepts, including simple inheritance. Everything in VB.NET is an object, including all of the primitives (Short, Integer, Long, String, Boolean, etc.) as well as types, events, and even assemblies. Everything inherits from the Object base class.
Event-Driven
All previous versions of Visual Basic were event-driven, but this feature is heavily enhanced under the .NET framework. Events are no longer recognized because they use a certain naming convention (ObjectName_EventName), but now are declared with a Handles ObjectName.EventName clause. Event handlers can also be declared at runtime using the AddHandler command.
.NET Framework
As the name implies, VB.NET runs on top of Microsoft's .NET framework, meaning the language has full access to all of the supporting classes in the framework. It's also possible to run VB.NET programs on top of Mono, the open-source alternative to .NET, not only under Windows, but even Linux or Mac OSX.
Additional Features
As of version 10.0, VB.NET supports generics, anonymous classes, lambda functions, anonymous types, and other great features that make it a great language to learn and use.

## Getting Started using VB.NET

Using Windows
If you do not have the full version of Microsoft Visual Studio, Microsoft provides free tools to create .NET applications using Visual Basic Express.
Using Linux, Mac OSX
You can use MonoDevelop with Linux, Mac OS, or Windows. Despite being limited in its support for all of the features of the language, it allows for cross platform development.

## See Also

* Visual Basic.NET
* .NET Framework
# Visual Basic .NET/Logical operators
## Logical Operators
### Not

The Not operator returns True when the condition is False. Otherwise, it returns False. Example,
Truth Table :
| Condition | Not Condition |
| True | False |
| False | True |

### And

The And operator returns True when the conditions of the left and right are True. Otherwise, it returns False. Both conditions are evaluated before the result is returned. Example,
Truth Table :
| Condition1 | Condition2 | Condition1 And Condition2 |
| True | True | True |
| True | False | False |
| False | True | False |
| False | False | False |

### AndAlso

The AndAlso operator returns False when the condition on the left hand side is False. Else, it returns True when the conditions of the left and right are True. Otherwise, it returns False. The condition on the right hand side is never evaluated when that on the left hand side is False. This is called short-circuited logic.
Truth Table :
| Condition1 | Condition2 | Condition1 AndAlso Condition2 |
| True | True | True |
| True | False | False |
| False | - | False |

### Or

The Or operator returns True when the condition on either side is True. Otherwise, it returns False. Both conditions are evaluated before the result is returned.
Truth Table :
| Condition1 | Condition2 | Condition1 Or Condition2 |
| True | True | True |
| True | False | True |
| False | True | True |
| False | False | False |

### OrElse

The OrElse operator returns True when the condition on the left hand side is True. Else, if the condition on the right hand side is True, it returns True. Otherwise, it returns False. The condition on the right hand side is never evaluated when that on the left hand side is True. This is called short-circuited logic.
Truth Table :
| Condition1 | Condition2 | Condition1 OrElse Condition2 |
| True | - | True |
| False | True | True |
| False | False | False |

### Xor

The Xor operator returns True when the condition on the left hand side or right hand side is True, but not when both are True. Xor means "Exclusive OR".
Truth Table :
| Condition1 | Condition2 | Condition1 Xor Condition2 |
| True | True | False |
| True | False | True |
| False | True | True |
| False | False | False |
# Visual Basic .NET/MS Office Automation

The first step is to download the Microsoft Primary Interop Assemblies for the version of MS Office you are using.
# Visual Basic .NET/GDI+
## GDI+
### Graphics object

A System.Drawing.Graphics object represents a drawing surface.
To get a Graphics object for a PictureBox control, use the .Graphics property of the PaintEventArgs parameter in the PictureBox's Paint event.
To load an image and then draw on it, use Graphics.FromImage
The .Save method can be used to save the Bitmap to a file or a Stream. Note: Bitmap objects created from a file keep the file open and are linked to the file while the object is in use. You will need to copy the file into a MemoryStream first if you do not want the Bitmap object to be linked to the file.

### Drawing Methods

Use methods such as Graphics.DrawLine and Graphics.DrawString to draw lines and text

### Measurement

Graphics.MeasureString can be used to measure how tall or wide a piece of text will be when output with .DrawString.

### Scaling
#### Simple scaling

Use the Graphics.PageUnit property as a simple way to change the coordinate system. More complicated transformations and scaling are described below.

#### World, Page and Device coordinate systems

When you supply coordinates to VB.NET graphics functions, these coordinates are part of the World Coordinate system. The units of the World coordinate system are defined by you, but the default is Pixels.
The World Transformation converts your World coordinates to Page coordinates. Page coordinates can use different units, but are device independent. The idea is that a distance expressed in Page coordinates will be the same if viewed on a monitor, or printed on a page.
The Page Transformation converts Page Coordinates to Device Coordinates. In other words, the Page Transformation ensures that the graphics output looks the same no matter what device the image is sent to. Device Coordinates are usually Pixels.
You can specify a translation matrix to convert the points you specify into the final output. This transformation can translate (offset), scale, rotate or skew the final output. This transformation is called an Affine Transformation.

#### Converting from Twips

Previous versions of Visual Basic used Twips as the unit of measure. 1,440 Twips = 1 inch. However, VB.NET uses Pixels as its unit of measure. To convert from Twips to Pixels requires a Graphics object (since you don't know the number of dots-per-inch). Therefore, if XTwips is the measurement in Twips, then XPixels, the measurement in pixels, is calculated as follows (g is the appropriate Graphics object):
Use g.DpiY to calculate coordinates for the Y axis.
# Visual Basic .NET/Loop statements

There are several kinds of looping structures in VB.NET.
Loops allow you to repeat an action for a number of times or until a specified condition is reached.

## Do...Loop Until loop

A Do...Loop Until loop is a loop that runs until the loop's condition is true, the condition being checked after each iteration of the loop.
Sample:

## Do...Loop While loop

A Do...Loop While loop runs until the loop's condition becomes false. Its condition is checked after each iteration of the loop.
Sample:

## Do Until...Loop loop

A Do Until...Loop loop is almost the same as a Do...Loop Until loop. The only difference is that it has the condition's check at the beginning of each iteration of the loop.
Sample:

## Do While...Loop loop

Likewise, a Do While...Loop loop is almost the same as a Do...Loop While loop. And like the Do Until...Loop loop, the condition's check is at the beginning of each iteration.
Sample:
For x as Integer = 1 To 10 console.writeline("x")

## For loop

A For loop iterates a certain number of times, the value of the counter variable changing each iteration. The For loop is the most well-known looping statement and useful in many programs. A For loop looks like this this:
will loop 10 times, since on the first iteration, a would equal 1, the second iteration 2, etc.
A For loop such as this one:
will loop 10 times, but the counter starts at 10 and goes down to 1.
A For loop like this one:
will also loop 10 times. The counter would start at 11 then stops when it reaches 20 .

## For Each loop

A For Each loop iterates over every index of an array or other iterable object. It requires an object to iterate through, and a variable to hold an index's contents. The object to iterate must implement the IEnumerable or IEnumerator interfaces. The implementation of IList by Array allows arrays to be used as an object, because IList inherits from IEnumerable.
Sample:
# Visual Basic .NET/Inheritance
## Inheritance

Inheritance is mainly used to reduce duplication of code. By using the Inherits keyword, you can extend and modify an existing class to have additional properties and methods.
For example, imagine we have an existing class called "Person":
Now imagine we wanted to create a special class called "Customer", which had all the properties of "Person", but also additional properties called "CustomerID" and "CustomerType". We could just make a different class with similar properties as follows:
An alternative approach, however is to use the Inherits keyword as follows:
"Inherits Person" automatically gives the new "Customer" class all the properties and methods of the "Person" class, as well as the two new properties. This approach also has several advantages:
* We don't have to re-type the FirstName, LastName, DateOfBirth etc properties
* When properties and methods of the "Person" class are updated, the "Customer" class need not be rewritten as well.
* The .FullName property needs to be debugged in only one place
* Any code that uses a "Person" object can also use a "Customer" object.
# Visual Basic .NET/IDisposable
## The IDisposable Interface
### Basics

The IDisposable interface is implemented when an object needs to be "cleaned up" after use. If an object has a "Dispose" method, then it needs to be cleaned up after use.
The easiest way to clean up this sort of object is by using the VB keyword "Using".
When an IDisposable object is a form-level variable, it should be disposed in the Form_Closed event.
# Visual Basic .NET/Interfaces
## Interfaces

An interface is the public methods of a class. They are declared with the Implements keyword.
To create an interface:
To use it from a class:

## Reference

* http://msdn.microsoft.com/en-us/library/28e2e18x%28v=vs.71%29.aspx
* http://www.youtube.com/watch?v=jV4_VhOCMuU
# Visual Basic .NET/Interprocess Communication

Generally, each program in Windows has its own virtual memory space. In other words, one program cannot change variables in another program. Marshalling is the process of passing data and memory addresses between applications. There are several ways different programs can communicate with each other.

### Shared file(s)

This is a 'roll your own' solution. Both applications access files in a shared directory, reading and writing data from them to communicate. The simplest method is for the sending application to write a separate file for each message and the receiving application to delete those files once processed. The sending application should create the file with exclusive access so the receiving application cannot access a half-written file. There should also be a mechanism for re-synchronising if one or the other application is shut down during a conversation.
The main downside of this approach is that the receiving application must poll the shared directory at regular intervals (e.g. by using a Timer control). This generates harddisk/network traffic, and the polling interval limits the responsiveness of the conversation.

### Windows messages

This method consists of overriding the WndProc method in a Form to receive, and the PostMessage Win32 API call to send a custom Windows message.

### .NET Remoting

This method has the advantage of easily accommodating both communication between programs on the same computer, and programs on different computers in the same network (or even across the internet). It uses the System.Runtime.Remoting namespace, which you can add via Project References.

## Older methods

These methods are not used much anymore, but may be encountered if you are trying to communicate with a legacy application.

#### DDE

Dynamic Data Exchange was the original method Windows used for programs to communicate with each other. It is still used by Windows for "Cut and Paste".

#### OLE

Object Linking and Embedding

#### COM

Common Object Model.
* Reference counting
* Late binding via IDispatch

#### OLE Automation

OLE Automation

#### ActiveX

ActiveX EXEs and DLLs
# Visual Basic .NET/Getting Started

To begin programming in Visual Basic .NET, you can either compile directly from the command line with the .NET SDK, use Microsoft's Visual Studio IDE, or the open-source SharpDevelop IDE.
In this manual, however, we will only be covering Microsoft's official IDE. Programming a form (window) by hand can be challenging if you are not familiar with the language, so starting with a good form designer will help a lot.
Okay, it's now time for your first program!

## Application Windows Forms

Start up a Visual Basic .NET IDE and create a windows application.
Double click on the form to open up the code view. You should see something similar to:
Enter in the following code in the Form_Load Sub (between the "Private Sub" line and the "End Sub" line):
This creates your classic "Hello World!" program.
Press F5 or go to the Debug menu and select Start to start the program. You should see an alert box that says "Hello World!" and then the main window (with nothing on it) should open. Click the "X" in the title bar like you would to quit any program!

## Application console

Add a new project via the menu File, then New, Project... and select Application console.
Paste in the Main function:
Now to avoid the program to automatically launch the previous paragraph form instead of the console, right click on the new ConsoleApplication1 from the Solutions explorer, and Set as starting project.
Then the console appears when pressing F5.

## Basic symbols

As Visual Basic, VB.net uses:
* ' before comments
* _ to split a command on the next line
* : to start a new command on the same line
# Wikimedia/The Culture of Wikivoyage

In part because of it's long operational stint prior to becoming a Wikimedia project, Wikivoyage culture differs significantly from other Wikimedia projects. The style of writing on Wikivoyage tends to be more relaxed and direct then on other Wikimedia projects.
# Wikimedia/Meta

Meta-Wiki serves to coordinate and plan efforts across wikimedia.
# Wikimedia/Templates

Templates are automatically generated text boxes which pipe user-entered data in a nice format which may also include a small graphic element. By typing a shortcut an editor can create a prefabricated presentation which permits a better user experience for viewers (end-users) who are not editing.
Templates in Wikimedia belong in the Template namespace. In a page, a template is surrounded by braces, such as {{Example}}. The need to type in {{Template:Example}} is negated, because the braces defaults to the Template namespace unless specified.
Templates can be displayed in two ways. You can either transclude them or substitute them. Normally, a template is transcluded, which shows the version on the original page. If the source page is updated, the template is updated. Substitution copies over the source code of a page as it is. Instead of viewing a page with the parameters specified, it directly pastes the code for the template into the page. The substituted code does not change if the source page changes.
To specify parameters in a template, you use the symbol |. This separates the template name/another parameter from the current parameter. Normally, you have to name the given parameter. For example, if {{Example}} requires a name, then you will have to specify a name by using a parameter, such as {{Example|name=A name}}. If no name is specified, then {{Example|A name}} is the same as {{Example|1=A name}}.
# Wikimedia/The Culture of Wikipedia

* Policies
* WikiProjects
* Wikimoney
* Vandalism
* The Cabal
* The Village Pump
* Conflict Resolution
* Wikitruth
* Wikilawyering
* Spam
* Mirror Sites
* Notability
# Wikimedia/Protection

By default, most Wikimedia pages can be edited by anyone, with or without an account. Some Wikimedia wikis are more restricted than others, but this is the standard approach. Wikimedia is based on the principle that anyone can edit.
However, protection does exist to prevent changing of certain pages or by certain people as necessary. For example, pages which have legal meaning on a project may be protected permanently to prevent errors being introduced. Some pages that are subject to vandalism may be fully protected to prevent changes by anyone except the most trusted users or partially protected to prevent unregistered or new user accounts from changing them. Pages that are fully protected can only be edited by users that have "sysop" or "administrator" rights or above. Pages that are partially protected are generally editable by logged-in users or by users who have had registered accounts that meet a certain participation threshold over a specific number of days.
# Wikimedia/The Culture of Wikipedia/Vandalism

"Vandalism" has long been a problem on Wikipedia, and has caused many to question the wisdom of "anyone can edit".

## History of vandalism on Wikipedia

In the past, Wikipedia had to cope with numerous vandalism.

## Serial vandals

* w:en:User:Willy on wheels

## Resolving vandalism

There are bots and tools that to resolve vandalism in Wikipedia:
* ClueBot NG - a bot to revert possible vandalism changes
* Twinkle - a tools that revert vandalism
# Wikimedia/The History of Wikibooks

* passing references to the history of Wikibooks. These are going to eventually be added into this history, but represent original source material.
* Growing Wikibooks contains at least some of the early attempts to try and figure out what Wikibooks was all about.

## Wikipedia and Textbooks

On June 6th 2003, the Wikipedia page "Organic Textbook" was added to the votes for deletion page on Wikipedia.

## Upheaval and redefinition

* ↑ "Wikipedia:Votes for deletion/archive May 2004". Wikipedia. 10 June 2003. Retrieved 25 July 2021.