OpenLLM-France/wikimedia huggingface dataset:
# Rust for the Novice Programmer/Tuples and Structs
## Tuples and Structs

Let's say we wanted to return multiple values from a function. As an example, let's make a function that gets the minimum, maximum value as well as whether the mean(average) was less than a certain threshold out of a vector of numbers. We can't return a vector or array since the third value we want to return will be a boolean, while the other two will be integers and vectors and arrays can only store values of the same type. Thus, the easiest solution is to return a tuple.
A tuple is just a collection of values, organised with parentheses. So our function will be like
So the function takes in a vector of input values and a threshold as an input, and returns a tuple of two integers and one boolean as an output. The reason to have this as one function rather than three separate functions is that we can calculate all three at the same time while only going through the numbers once. If we had three separate functions, it would be slower to go through all the numbers three times.
The whole code is included for you to look at, examine and try out. I will note that the min and max must have a value to begin with so they are set to the maximum and minimum values initially so pretty much any value inside the vector will overwrite them. The main thing for tuples is that we construct a tuple at the end by putting it in brackets and return it from the function. The order is important as we use it to get the values out of the tuple. In our main function, there are two ways of getting values out. Here is the first way:
Note that we include other things in the text inside the println! here to provide context to the different values. The value after the comma will be inserted where the is. We get the values out of the tuple by referring to their index in the tuple, again like arrays starting from 0. However, unlike arrays and vectors we cannot use variables to get a value out, so we couldn't do:
This is called destructuring, since we mimic the structure of the tuple to get the values out into variables that act like any other variables. Which option you choose to get values out is up to you, and may depend on the situation for whatever is most appropriate.
However, there is a clear disadvantage to this. Imagine we wanted to also get other values like the mode, or the standard deviation(if you don't know what these are that's ok). A tuple that has too many values is unwieldy since we have to remember the order of all the values. The best way to have a more structured view of a set of data is called a struct. We construct/declare a struct like so:
Since this is a declaration, we just specify the types that will be put inside. Then we change our getting values function to:
Now this means in our main function we can do:
Now we refer to the values inside the struct by the names we assigned to them after a dot, which should hopefully be useful to us, more memorable and easier to understand when reading.
Next: Enums
# Rust for the Novice Programmer/Setup
## Setup

We will need to do some setup when just starting out. Before you can run Rust code, you will need to setup a workspace. This workspace is often called a "Development Environment".
* You need to understand how to open a terminal and the basics of using one.
* You will also need some text editor for editing code files.
The easiest way to get started with Rust is to follow the instructions at the official Rust language website..
Next, we can move on to actually doing stuff.
# Rust for the Novice Programmer/Strings
## Strings
#### A short aside about strings

Strings created with the double quotes "" around some text such as the "Hello world!" we created at the start are stored inside the program that is created when we compile it. This means it is easy to find and use when running the program. However, this means we can't change them while the program is running, since all the memory in the program is laid out a certain way. Also strings and characters can be quite complicated. This is because there are so many things to handle; the world isn't just english characters! There are many different languages, many having different alphabets. There are emojis and other special characters. Different formats of storing these different characters will use differing amounts of bytes. If you're working with English, most of the time you will use a standard called UTF-8 which uses 8 bits(one byte) for most common English characters.
In Rust, there are two string types to represent some of this behaviour. There is a primitive type 'str' which is just the starting point and the length of the string. This means that a reference to an str, or &str can be a reference to a string that is stored within the program. The other string type is String, which stores a string like a vector of bytes. Since it is a vector we can modify and change the string. Also since a vector has a start point and a length, we can easily convert a String to a &str, although to convert the other way requires us to clone the data over.
First, let's try to create a function that takes in two Strings and returns one combined String:
What is the push_str function? Do we have to memorise every function that we want to use? No, this is what documentation is for. Documentation provides us a way to find the structs, functions including types as well as often a written explanation of what they do and how to use them. The documentation for the push_str function is found here: https://doc.rust-lang.org/std/string/struct.String.html#method.push_str . If we read it, we see this:
The pub means it is public, so we can use it. The &mut self is shorthand for 'self: &mut String' so it is using self as a mutable reference to a String and it takes in a string of type &str. Since it is a reference, we can use &string2 as an &str since it dereferences to one easily.
Next: Rust for the Novice Programmer/Basic Maths Testing Program
# Rutgers University
## Introduction

* About Rutgers

## Table of Contents
### Admissions

* Admissions

### Academics

* Academics
* Class Registration
* Majors, Schools, and Departments
* Textbooks
* Sakai

### Recreation and Leisure

* Greek Life and Parties
* Sports
* Events
* The Medium

### Daily Life

* Life
* Housing
* Buses
* Money
* Food
* Internet
** DC++
* RU Screw
* The Daily Targum

### Campuses

* New Brunswick and Piscataway:
** Busch
** Cook-Douglass
** Livingston
** College Avenue
* Camden
* Newark

## Useful Links

* NextBus
* Class Schedule
* Class Registration
* Class Catalogs
* myRutgers Portal
* Sakai
* Ratemyprofessors
# Rails 3
## Table of Contents

What you need to know
Ruby on Rails framework
Installing Ruby and Rails
Starting a project
Static pages
Our sample application
Creating Models
Creating Controllers
Creating Views
What's MVC
Uploading Files

## Appendix

Online help
# Rails 3/Ruby on Rails framework
## What's a web framework?

For ages people have programmed the web with Perl and PHP. These languages did not have a definite pattern. People could do any thing with them: put code in middle of web pages, connect to database from anywhere, put images into any folder or insert them into web pages, and so on. All this created a messy, lengthy code which, when written by one programmer was quiet unreadable by another. Even the programmer who wrote such code might not be able to decipher after returning to it after some months.
People began to experiment with standard libraries of code, standard patterns of making web applications. For example, why not store all images in an img folder, why not store all Javascript in a js folder and Stylesheets in a css folder and so forth. The unordered army of web programmers was becoming standardized.
Many open source projects emerged. They all promised and mostly delivered a good web development experience. For example Python language got Django and Turbogears. PHP got Symfony, Codeigniter and PHP on Tracks. Ruby got Merb, and of course, Rails.
Out of these frameworks, Ruby on Rails, or Rails for short, has shot into popularity. Why so? Read the book and you will know.
# Rail Transport in Las Vegas/Multimedia Center

Welcome to the Multimedia Center for the Rail Transport in Las Vegas book! The Multimedia Center includes galleries and pictures of the topics covered in the book as well as external links for more information.
If you have any pictures you would like to donate to the Multimedia Center, first upload it to Wikimedia Commons, then submit it to this page using the [[File:Example.jpg]] template. See Help:Files for more information.

## Rail Transport in Las Vegas Slideshow

This is a short slideshow explaining rail transport in Las Vegas.
# Rails 3/What you need to know

Ruby on Rails is a quite advanced topic and it may be quite difficult even for seasoned web programmers to grasp. To start with Rails you need to know the following
* HTML (Hyper Text Markup Language)
* CSS (Cascading Style Sheets)
* Ruby programming language
It's advised that one is really thorough with Ruby Programming language and has good knowledge of creating web templates and static websites. All these will make you finish your Rails projects with ease.
# Rails 3/Installing Ruby and Rails
## Installing on Ubuntu Linux

In this section we will see how to install Ruby on Rails on Ubuntu GNU Linux distro. At the point of writing this piece of text we have Ubuntu 10.10. We will see how to install Rails 3.x.x in it.
The first step is to launch your terminal by going to Applications -> Accessories -> Terminal.
First, we will install tools that will compile Ruby source code; to do so in your terminal type the following:
Next, we will download the Ruby source code using wget; to do so type the following in terminal:
The above command will download Ruby 1.9.2 source code. The downloaded file is in tar.gz format, it must be unzipped; to do so type the following:
Next, we will compile and install Ruby using the following commands (type the commands one by one):
Next, we need to tell our operating system that Ruby is installed in /usr/bun/ruby ; to do so we need to add the path to /etc/environments file. To do so, type the following
The file opens and you might see something like this:
To the path string add :/usr/local/ruby/bin , it must at last look something like this:
Now, we run the source command for the file /etc/environment to apply changes.
Now check if everything is OK by typing the following:
If everything is done correctly, the output will look something like this:
Now we will create symbolic link to ruby and gem using the following commands:
Now we will install rails with gem using the following commands (type them one by one in terminal):
To check type rails -v, you must get output like something shown below:
When I installed Rails 3.0.3 was the stable version of Rails hence it got installed. Having installed our Rails web framework successfully lets create our first web application.
* ↑ , Installing Ruby 1.9.2 and Rails 3 stable on Ubuntu >
# Raising Cattle

Hobby Ranching can be a very fulfilling experience. Some elderly people who in their younger days ranched for a living will hobby farm since a large herd is too much to keep up with. You do not need a huge farm/ranch to raise them though if space is insufficient your cows will become unhealthy, you may violate local by-laws, and even face animal cruelty charges. However, any facility that is suited to horses is more than sufficient for Cattle.

## Table of Contents
### Getting Started

* Why?
* Fencing - Currently links to the Raising Chickens building a pen section.
* Indoor Facilities
* Purchasing Cattle

### Raising Cattle

* Feed
* Water
* Space
* Calves
** Calving
# Rail Transport in Las Vegas/Primm, NV

Primm, Nevada is a small unincorporated town located where Interstate 15 crosses the California-Nevada border. The community is home to Terrible's Primm Valley Casino and Resorts, which consists of three hotels: Buffalo Bill's, Whiskey Pete's, and Primm Valley.

## Hotels

All three hotels are currently owned by Herbst Gaming. The entire facility operates as Terrible's Primm Valley Casino and Resorts.

### Whiskey Pete's

This was the first hotel built in Primm, which gradually grew to its current size of 36,400 square feet. Amenities include a large swimming pool, a gift shop, four restaurants, and 777 rooms and suites.

### Primm Valley

Primm Valley Resort was built after Whiskey Pete's, and offers 624 rooms and suites as well as over 1,500 slot machines. Both trams depart from this hotel.

### Buffalo Bill's

Buffalo Bill's is 46,000 square feet large and is home to the Desperado roller coaster, one of the world's fastest and tallest roller coasters. The resort also offers 1,242 guest rooms and suites, a buffalo-shaped swimming pool, and the Star of the Desert Arena, which has 6,500 seats for concerts.

## Trams

Primm has two free trams that, together, connect each of the three hotels:
* Primm Valley-Whiskey Pete's Tram
* Primm Valley-Buffalo Bill's Tram

### Tram Guide:

Note: Origin is along the left and destination is along the right. PV-BB = Primm Valley-Buffalo Bill's tram, PV-WP = Primm Valley-Whiskey Pete's tram.
Tram Guide :
| | Buffalo Bill's | Primm Valley | Whiskey Pete's |
| Buffalo Bill's | N/A | PV-BB to Primm Valley | PV-BB to Primm Valley, PV-WP to Whiskey Pete's |
| Primm Valley | PV-BB to Buffalo Bill's | N/A | PV-WP to Whiskey Pete's |
| Whiskey Pete's | PV-WP to Primm Valley, PV-BB to Buffalo Bill's | PV-WP to Primm Valley | N/A |
# Raising Cattle/Feed

If you are lucky you will not need much feed and your cattle can graze on what grows in the pasture. However, in many places seasonal feed is needed.

## Hay

Hay is the most common form of feed available for cattle. If you have a field available that is easily accessible to equipment you can grow your own hay. However, there are many farmers who grow more hay than they need and sell the extra. Some will even deliver to you for an extra price. To find them you can go through your local classifieds.

### Growing your own hay

Hay can easily be grown on flat fertile land. As an alternative of using commercial fertilizer, many farmers are using chicken litter. The rising price of commercial fertilizer is the cause of the increasing use of chicken litter. Too much chicken litter can cause the grass to have too much nitrogen. The excessive amount of nitrogen can be harmful to your cattle.
# Raising Cattle/Indoor Facilities

* Land
* Capital
* Pasture
# Patterns Of Screen Writing/gtext

{{{1}}}{{{1}}}
# Peacebuilding Manual/Building Local Capacities in long-term peacebuilding

Building Local Capacities in Peacebuilding
Long-term peacebuilding and conflict-management capacities can be built through participatory training, workshops on key issues, exposure visits to existing programmes, and ongoing coaching, combined with monitoring and evaluation. Minimal resources would be required to support small projects or peace-related events or activities. The programmes would be responsive rather than prescriptive, incorporating the flexibility to adapt according to local conditions. Rather than imposing values or preconceived processes, they would encourage self-analysis and would focus on building human capital.
Peacebuilders, within communities and otherwise, need to possess a specific skill set if they want to be successful in building peace and resolving conflicts in a peaceful manner. Key skills, required in peacebuilders, include:
Perception
Facilitating Dialogue
Communicating
Mediation
Negotiation
Co-operation
Problem-Solving
# Peacebuilding Manual

Drafted by OHW (Organization of Human Welfare), Afghanistan, as part of a peacebuilding project funded by Tawanmandi programe.

## Table of Contents

Chapter 1: Introducing the Peacebuilding Manual
Chapter 2: What is Peacebuilding?
Chapter 3: Need for a Peacebuilding Manual
Chapter 4: Purpose of a Peacebuilding Manual
Chapter 5: Challenges of Peacebuilding
Chapter 6: Key Principles for Building Peace
Chapter 7: Women's Role in Peacebuilding
Chapter 8: Understanding Conflict
Chapter 9: Major Causes of Conflicts
Chapter 10: Conflict Prevention
Chapter 11: Existing Mechanisms of Conflict Resolution
Chapter 12: Impact of Community Peacebuilding
Chapter 13: Building Local Capacities in long-term peacebuilding
Chapter 14: Key Steps for Peacebuilding
# Patterns Of Screen Writing/Scratch Pad

add to an examples
# Patterns Of Screen Writing/ex

Developed by OrenBochman OrenBochman (discuss • contribs) 12:23, 31 July 2011 (UTC)

### Usage

This is a template for adding examples to a book.
* the first parameter (nameless) is the example text. If left blank it creates a request for expansion.
* the second parameter (nameless) is the example's title.
* the third parameter is cite expects a citation
   * idealy it would take the form: cite={{RCV|nid=fNorthByNorthWest |people= Lehman E. (Writer); Hitchcock, A. (Director) |date=1959|title=North by Northwest |url=http://www.imdb.com/title/tt0053125/ |medium=Motion picture}} }}
       but the following would work as well cite=Hitchcock, A. (Director). (1956). The Man Who Knew Too Much [Motion Picture].
note: to avoid errors with cite the page must have a <references goup="f"/> tag near the bottom. if the first type is used and a <references /> if the second type is used.
# Patterns Of Screen Writing/person
### Usage

* parameters:
   * anonymous 1=person's name
   * character=character prortrayed by the person
* produces:
   * person a person reference with a link to wikipedia.
   * character (person) + a person reference with a link to wikipedia.
# Patterns Of Screen Writing/Theme

* Patterns Of Screen Writing
* Time-Tested Solutions to Recurring Problems in Screenwriting
* Contents •
* Introduction
* Planning Patterns •
* Structural Patterns •
* Exposition Patterns
* Character Patterns •
* Generic Patterns •
* Pathos Patterns
* Dialogue Patterns •
* Writing & Rewriting Patterns •
* Glossary • Contributors • Bibliography

## Template:Theme
### Applicability

* Emotions
* Exposition
* Scenes
* Conflict
# Rexx Programming/How to Rexx/io

In rexx, input and output is treated as character streams. Characters within a stream appear in the order in which they were provided.

## Transient and persistent streams
### Transient streams

Characters from transient streams can only be read once. The terminal keyboard is an example of an input source that produces a transient stream . Once the characters have been read from a transient stream , they disappear from the input source.

### Persistent streams

Characters from persistent streams can be read multiple times. Files are considered to be an input source for persistent streams. It is possible for files to be read multiple times. The input characters from the file will be obtainable throughout the lifetime of the file.

## Input streams

Characters within a stream appear in the order in which they were provided.
# Rexx Programming/How to Rexx/literal character
## Special characters cannot be directly included in a literal string

Special characters, such as controlcharacters or metacharacters cannot be included directly in a string value because these characters have a special meaning to the rexx interpreter, and including them directly will cause misinterpretation of the script. These characters can be inserted as literal characters by using hexstring notation:

## Literal character representation digraphs are not supported

The rexx language does not support the use of character representation digraphs using a backslash:
say "first line\nsecond line" # This will not interpolate to include a newline

## Hexstring notation

Hexstring notation allows ascii code sequences to be used to represent literal characters within a string:
lf = '0A'x cr = '0D'x greeting = '48656C6C6F'x /* Hello */
# Rexx Programming/How to Rexx/interpolation

The rexx scripting language does not automatically carry out interpolation by default. However, interpolation is easily achieved by using the changestr function:
# Rexx Programming/How to Rexx/numeric comparison

The following example shows a numerical comparison being using comparative operators:
x = 3 if x > 2 then

## Supported operators

The following comparative operators are supported:

## Leading zeros are ignored for numerical comparisons

For a numerical comparison to be made, leading zeros are ignored:
# Rexx Programming/How to Rexx/identifier

Identifiers are the names used to represent variables, constants, functions and labels within a program.

## Identifiers can consist only of alphanumeric and underscore character combinations and some symbols

As with most programming languages, identifiers can consist of a combination of letters, digits, and underscores, but must not begin with a digit. In rexx, variable names may also contain symbols such as hooks, plings and underscores. Compound variables may also contain dot symbols.

## Valid Identifiers

hi_score lumpsum Apples counter2

## Invalid Identifiers

1st_score Not valid because it begins with a digit postcode# Contains an illegal hash character Incomplete$ Contains an illegal dollar symbol double This is a keyword

## Case Sensitivity

The rexx interpreter is case insensitive. This means that identifier names and keywords containing lowercase letters are interpreted as being the same as those containing uppercase letters:
# Rexx Programming/How to Rexx/loops

Loops are control structures that allow sections of code to be executed repeatedly according to the controlling conditions of the loop. The rexx scripting language supports both iterative loops and conditional loops.

## Iterative Loops

An iterative loop repeatedly executes a set of instructions as the iterator steps through a series of values. Types of iterative loops include forloops and foreach loops. The following is a traditional example of an iterative for loop:
In the above example, the say block runs ten times and the iterator variable count, increments on each consecutive loop.
As an iterative loop cycles through its code step after step, it is possible to increase the iterator variable by amounts other than one. The by keyword precedes the amount to add on each iteration.
Alternatively, you can tell Rexx how many times to iterate the loop using the for keyword. We could list the first 20 positive odd numbers as follows:

## Conditional Loops

A conditional loop tests for a condition around the loop, and repeatedly executes a block of instructions whilst the condition is true. Types of conditional loops include while loops and until loops.
A while loop will not even start unless the condition is true.
Until loops are used to start a block of code and continue until some condition is met.

## Loop Controls

Both iterative loops and conditional loops can be controlled by loop modifier statements, such as leave, iterate and signal (Do we also have next, last and redo?). These allow normal flow of execution within a loop to be restarted or terminated.
The LEAVE instruction stops a loop.
The ITERATE instruction skips to the next step without finishing the current one.

## Nested Loops

The rexx scripting language allows nested loop structures to be used. These consist of one or more loops that are nested within other loops.
# Rexx Programming/How to Rexx/length

The length function returns the length of the string argument.