OpenLLM-France/wikimedia huggingface dataset:
# Using the 3D Connexion SDK/Introducing Visual Basic
## A Quick introduction to programming and Visual Basic

There are many excellent references for learning to program in Visual Basic. Sites such as the Microsoft Developer Network provide a good overview, and the WikiBook [Visual Basic] provides an excellent guide for those with some experience in programming.
It may be useful for those new to programming to read the following section, however, those with experience in Visual Basic Programming should skip to the next section.

### Getting Ready

Let's get started and open up Visual Basic Express (In the Prerequisites section). The program should look like this (arrangements of toolbars may vary): (IMAGE1) Hit CTRL+N to start a new project. This window allows you to choose a project to start.
(IMAGE2)
Most courses start on Consoles (text only), but we're going to start with a Windows Forms Application. We want to create something which looks good (rather than a console window). Double Click the 'Windows Forms Application' to open a new application. You should see this:
(IMAGE3)
Look at the 'Solution Explorer' Panel. This shows all the parts of the program. We have "Windows Application 1", a default name for the program. This contains "My Project" and "Form1.vb". My Project is a set of instructions which tell the computer to run your 'form' (programmer jargon for a window). Form1.vb is a form which you can edit. This has 2 parts: Design and Code. You can switch between these by using these buttons in the Solution Explorer:
(IMAGE4)
Let's look at the code by pressing the View Code Button. (IMAGE5) You can see a text document. This contains some instructions already built in. It should say:
This is simply a way to start and stop the code. Form 1 is a "Class", basically this means that it can contain other bits of code. Making it Public means that other bits of code can refer to it (e.g. If you made another form it could get information from form1). You'll come across Private code later; this is code which can only be accessed by things in the same form.
* Next: Hello World: Your first application
* Home
# Utopia/Anarchism

What anarchy is a simple question; just life, the point is; what it is not. Anarchy is not the vandalism by loading arms or explosives as in the chaotic nature of 1790s France but it is a simplicity philosophy of far east that sourced of lao-tze or Taoism. But still on the contrary to the others, anarchy is not a style of constructing general agreement(choosing the one of the sames)
Wars are very unlikely to occur within an anarchist system, which may sound like zealous wishful thinking because it appears to imply that there will be no conflict between people because of an absence of authority (many would consider this paradoxical in itself). The reason wars are unlikely to happen is because to start and continue a war an individual must have a personal interest in it, kings, presidents, popes, lords and generals (autocrats and oligarchs) all have such an interest in practicing warfare for various reasons. Insurrectionists will also have an interest in continuing a war but will only have the objective of ending it, autocrats and oligarchs will usually wish to continue the war for as long as possible. The more important distinction between the two is that an insurrectionist is likely to be in personal danger of being killed during the war whilst the autocrat or oligarch have the possibility of assassination but are otherwise not in danger. To illustrate the distinction of an anarchist society, suppose there was an anarchist city with two neighbourhoods, for whatever reason they do not share what they have with each other, so neighbourhood A decides that they want to take what they like from neighbourhood B and to do so they will go to war with neighbourhood B (incidentally this is capitalist/fascist rather than anarchist reasoning not but it will have to suffice for the example). Everyone in neighbourhood A that wants to go to war will have to be involved, to play the part of the insurrectionist, to kill and probably die for what they want. This is a very different scenario to the one the autocrat/oligarch find themselves in where they are not personally willing to die for what they want but are willing to sacrifice others for it. So it can be seen that in an anarchist system someone would have to be willing to die for their desire to start a war in order for one to begin at all.
# Utopia
## Contents

* Preface
* Introduction to Utopianism
* Critiques of Utopianism - Is a utopian society an achievable aim?
* History - History of utopianism and previous attempts to realise utopian societies.
** North American Phalanx
** New Harmony
** Oneida Society
** The Kibbutz Movement
* Types of Utopia - Some broad categories of utopian ideologies.
** Scientific and Technological
*** Road map to a technological utopia
** Economic
** Political and Historical
** Religious
* Utopian Ideologies - Some examples of ideologies with 'utopian' elements.
** Marxism
** Feminism
** Anarchism
** Christianity
* Key Elements of Utopia - Some areas which utopian ideologies need to consider.
** Human Nature
** Technology
** Economics
** Politics
* Dystopia
* Authors
* Glossary

## Other Resources

* 1984
* Brave New World
# Using the 3D Connexion SDK/Hello World
### Hello World: Your first application

Let's switch back to design view with the button in the solutions explorer (IMAGE6). It is easy to create a new button for the program. Click the Toolbox button (IMAGE7). This opens up the toolbox:
(IMAGE8)
Click and drag a button onto your window. It should appear in the window with the name 'Button1':
(Image9)

#### Properties

Every object you place on your window has a set of properties. You can view these by single clicking on an object and clicking the Properties pane (Image10). You may have to hunt around for this. Here are the properties of my button:
(Image11)
You will never use some of these properties, but some you will use all the time. The three most important ones are 'Text', 'Position' and 'Size'. Try changing these and see what happens. Note that Position and Size only accept numbers.

#### Events

An event is something which happens which causes the computer to run a section of code. This could include clicking on a button, changing the text of a text box, moving the mouse across an image or any number of other things. Each event has a listener process which keeps waiting for the event to happen. As soon as it does, it tells the computer to run the appropriate bit of code. We'll make some of our own listeners later, but for now, let's use the ones built into Visual basic.
Press the lightning bolt icon to open the events window: (Image12). Here are the events for Button 1:
(Image13)
Click is the most common (default) event. To add the Click event to your program, double click in the text box next to 'Click'. The windows will change to enter Code view. Notice that it has added the words:
The exact meaning of this is not important; essentially it the first line means "This is a bit of code called 'Button1_Click'. It starts here" and the last line means "Stop here if you're trying to run the Button1_Click code".
Let's add some code. The way you use a property in code view is by typing the name of the object (in our case, Button1), followed by a dot, followed by a property. You can change it by typing = and then the new value in "double quotes" So, let's type:
Your complete code should look like this:

#### Compiling your Code

Compiling is a process where Visual Basic converts your design and your code into an application which your computer can run. There are two stages to this; debugging and compiling.
Before it makes your program, it has to understand what you've typed. The compiler checks through what you've typed to make sure it makes sense. This is called debugging. If you make a mistake, it will underline it in the code in blue:
(Image14)
Here, I've left out the = symbol. The debugger has looked through the code and underlined it. It has also added a line to the errors list.
Once the code is all valid, it is compiled into a program. A program cannot be compiled if it contains errors.
To compile your code, hit F5, or press the Play (Image15) button. This opens up the program. Press the button and watch it change!
* Next: Using Variables
* Home
# Using the 3D Connexion SDK/Introducing the 3D Connexion SDK
## Introducing the 3D Connexion SDK

An SDK is a Software Development Kit, a load of code to allow you to make programs which do things with companies' products.
Let's unzip the VB.ZIP file which 3D connexion provides as part of the SDK, and drag the monitor.sln file into Visual Basic Express. You will need to run it through the converter to upgrade to your version of Visual Basic, so just keep pressing Ignore, Yes or Next until it finishes. Hit F5 to try it out. You should see a live readout of the data that the device is feeding back; which button is being pressed, what its rotation is, all sorts of nice, useful stuff.
Double click Form1.vb to look at the code. What this is a mixture of massively complex code which the 3D connexion team has written to connect your mouse to your computer, and stuff which we don't actually need. What we're going to do is make a template file from this project. First, go into design view and select all. Delete and go into code view. Delete all code and paste the following in:
(Reproduced by kind permission of Logitech)
You need to save all of this, by pressing Save All. Now close Visual Basic. To create a new program, create a copy of the template folder and open the Monitor.sln file in Visual Basic. There are ways to create your own from scratch, however, it gets complicated.
So, let's have a look at the code:
First they start Form1:
Don't worry about this bit
Here, they add in the TDx Sensor objects. The TDx sensor is the data which the 3D Connexion mouse sends back.
This starts the feed of information
This is a "listener" for changes in the sensor's state:
This is an example procedure using inputs from the mouse:
This 'signs out' from the mouse when you finish with it
Don't worry about the exact details of this. All you need to know is that it created 7 variables:
Rotation.x: The rotation in the x axis as an accurate decimal
Rotation.y: Rotation in the y axis given as 0, -1 or 1. Rotation.y * rotation.Angle must be used for this.
Rotation.z: rotation in the z axis
rotation.angle: The total angle that the device has moved from its rest position
translation.x: The total translation in the x axis
translation.y: guess
translation.z: guess
translation.length: The distance the node of the device has moved from rest.
# Refugee Phrasebook/documentation-overview

here are gdoc-sources documented used to compile the documents and pdf

### Short Version
#### sources

sources
1)
2) https://docs.google.com/spreadsheets/d/10Ch8eIACzROPYql5aztkG3_VvdCdkDInnVVK7QPK2E0/pubhtml?gid=418287843&single=true

#### rows and languages
### Refugee Phrasebook - main-doc
#### sources

source

#### rows and languages
### Juridical Phrasebook
#### sources

source at

#### rows and languages
### Medical Phrasebook
#### sources

ATTENTION
Please CHECK ON FACEBOOK WHAT SOURCES TO USE
1) MPfR 9.9.15
2) Medical Phrases for Refugees Booklet-copy for NE-african
# Refugee Phrasebook/providing help

This text should be rewritten and reordered.
DO NOT USE THIS TEXT IN A PRODUCTIVE ENVIRONMENT :)

# Help

Cite from refugeephrasebook.de:
Currently a lot of work and coordination is done through Facebook. But not everybody uses Facebook or even has an account on it!

## Donations

http://www.refugeephrasebook.de/donations/

## Help needed - here YOU can help

Please add Date of creating that announcement and due-date if you think people have to work together - create 2 or more entries

### request by organisations or helpers

if you have an request from an organization, you are from an organization and want a rpb, and/or need help on creating new rpb, please post them to info @ refugeephrasebook . de

### translator (proofreading)

* (ANYLANGUAGE) Write autonym, hello and good morning: create pattern-matching examples, , @github: author; C:20150929, D:anytime

### translator (new language)

translation: it's hard to say what languages are needed and provided
take a look and select a few languages from here: https://github.com/refugee-phrasebook/backendscripts/blob/master/bash-scripts-for-pdf-generation/languages/iso-639-3_Id-Ref_Name_sortbyname.tab

### designer

note: please add the app you need - use ANYAPP if you need just results
* (ANYAPP) create pattern-matching examples,, @github: author; C:20150929, D:anytime
if you need help: please provide some input what you need, a homepage to get more information and a contact (maybe you), announcement+due-date is appreciated

## I need help from you
### request by organisations or helpers

if you have an request from an organization, you are from an organization and want a rpb, and/or need help on creating new rpb, please post them to info @ refugeephrasebook . de

### translator (new language)

If you are a native speaker of a language that is not included yet, please write to info @ refugeephrasebook . de and request access to the documents.

### translator (proofreading)
#### translator (xyz)

e.g.: i'm a translator and can translate FROM: ger TO pol , contact me at me @ example . com
# Refugee Phrasebook/test chapter
### Everyday Life

| German | Arabic | Arabic Phonetic | English | Croatian,Serbian,Bosnian | Albanian |
| Hallo | مرحبا / اهلا | Saalam/ Merhaba | Hello | Zdravo / Bok (C) / Здраво (Ћао) | Përshëndetje |
| guten Morgen | صباح الخیر | Sabáh al-khayr | Good morning | Dobar dan / Добар дан | Mirëdita |
# XQuery/Wikibook list of code links
## Motivation

This Wikibook contains links to code samples executed on a University server. We need to keep track of all the links so that we can ensure that they remain live, so that all links can be executed by a test bed and to support changes to the directory structure or filenames.

## Approach

The script is similar to the index script at the beginning, to get the list of pages in the book. Then it fetches each page and extracts the anchor tags where href contains ".xq" . This is a bit loose and includes some false positives. The WikiBook page is linked from the page title and the actual URL is listed.
* Code links
# XQuery/Validating a hierarchy

Whilst schema validation can check for some aspects of model validity, business rules are often more complex than is expressible in XML schema. XQuery is a powerful language for describing more complex rules.
One such rule is that a relationship should define a tree structure,for example, the relationship between an employee and her manager.
Consider the following set of employees:
The criteria for a valid hierarchy are:
* one root (the boss);
* every employee has at most one manager;
* every employee reports finally to the boss;
* there are no cycles
In XQuery we can define the management hierarchy from the boss down to an employee as :
The function is initially called as
The hierarchy is built up as a parameter to allow cycles to be detected.
Finally, the condition for the management structure to be a tree is
# XQuery/Wiki weapons page

Over on Matt Turner's blog, he uses MarkLogic to get a list of medieval weapons from the wiki page as the first step in the enrichment of the texts of Shakespeare's plays.
Here's another attempt at this task, using only standard XQuery functions. Again, we are fortunate that wiki pages are well-formed XML.
The complex path here is it ensure that only the relevant li tags are included and that only terminals in a hierarchy of terms are included, hence the check that the li has no ul child.
# XQuery/Web XML Viewer
## Motivation

You want to view XML documents using your web browser using HTML markup.

## Method

We will use an XQuery function that uses the dispatch pattern and the typeswitch function.

## Sample CSS File

File: syntax-colors-oxygen.css
# XQuery/Wikibook index page
## Motivation

You want to create an index of pages in a Wikibook.

## Method

Fetch the Category page for the book and re-format based on the initial letter of the page, hence skipping the category level.

## Simple Index page

This index page is based on the names of pages within the book. Its starting point is the Category with the same name as the book, into which all pages need to be put.
XQuery Index
XForms Index
XRX
# XQuery/Wikipedia Events RSS

Rather than simply representing the Wikipedia events as a re-designed page, a more useful form would be to generate an RSS feed since this is not provided by Wikipedia.
# XQuery/Validating a document
## Motivation

You want to validate a document using an XML Schema.

## Method

Note: Validation is a very complex topic. eXist come with default setting that may prevent files from being added that are associated with a namespace once a schema is saved in the registry. Please be aware of these factors that are documented here.
eXist supports a validation module that includes a validate function to validate an XML file against a grammar file such as an XML Schema.
validation:validate($input-doc as item, $schema-uri as xs:anyURI) as xs:boolean
where: $input-doc is the document you want to validate $schema-uri is a URI to the XML Schema you want to use to validate the document. Note that this must be of type xs:anyURI.
This function return a single true/fales value which is true if the document is valid according to the XML Schema.

## Sample XML Schema

Here is a sample XML Schema to validate a very small XML file. In eXist 1.3 only XML files with a namespace are supported.
There are two important points about this XML Schema.
The targetNamespace="http://example.com" attribute indicates that this XML Schema is targeting the http://example.com namespace.
The elementFormDefault="qualified" attribute indicates that as the XML parser reads the root of the file, the target namespace should be used.
Without these two attributes the validation will not work.

## Getting Error Messages

The validate function only returns a simple boolean true/false value. If there is an error in your XML file this function is not very useful at finding the errors. To assist with this process their is another function called validate-report. It has the same arguments:
validation:validate-report($input-doc, $schema-uri)
The result can be modified to be the following:

## References

Documentation on validation in eXist
# XQuery/Validation using a Catalog
## Motivation

You have a library of XML Schemas that you want to associate with namespaces.

## Method

An XML Catalog file contains a list of URIs and the files use to validate them.
For example the following is a catalog file that describes how DocBook files should be validated:

## References

http://atomic.exist-db.org/articles/Validating%20XML%20in%20eXist.pdf
# XQuery/Validation with Schematron
## Motivation

You want to check your XML document against a set of business rules. These rules may be more complex then a single pass XML Schema can perform.

## Overview

Schematron provides a different approach to validation than a standard Schema. Rather than stating the correct form of a document, Schematron allows you to define rules which can be applied as needed. You can also specify rules in one part of a document that reference other parts of the document using XPath expressions. This is very useful when a document is created in stages and specific business rules need to be checked prior to using the data.
Schematron may also work along side of traditional XML Schemas. You can use XML Schemas to check the overall document structure and data types and use Schematron to express rules that can be done best with XPath rules.
Schematron is also ideal because it allows the rule designer to specify the exact error messages for rules. XML Schema error messages are often not easy for users to understand.

## Example

Here's an example: prior to sending a confirmation email for a "school-booking", the booking must contain a school/id, a Teacher's email-address, and a Date for the booking. The Date must be in the future.
To apply this schema from an XQuery:
And the results (edited for clarity):
The results can be used to highlight the error and display a message to the user.

## Setup in eXist-db

I've chosen the XSLT 2.0 version of the Schematron validation - so eXist-db needs to have Saxon 9 installed. (...)
* Get the iso-schematron-xslt2 and upload the (unzipped) contents to your database.
* Create a schema in the db
* Compile and run the schema on your data

## XQuery Module for ISO Schematron

Jing only supports Schematron 1.5. A more advanced version of Schematron is the ISO Schematron, which Jing will not run. To get this to work you must "compile" your Schematron rules using XSLT.
The following is a sample XQuery module that does this compilation.
Note that the xslt assumes an include file.
# Tajik/Introduction

* Tajik Language Course
* Introduction • Lesson 1 • Lesson 2 • Lesson 3 • Lesson 4 • Grammar • Vocabulary • Tajik Names • Useful Words and Expressions
* Numbers • Declensions • Adjectives • Conjugations • Prepositions • Verbal Aspect • Interrogative, Personal, and Possessive Pronouns
* Appendix • Alphabet • Internet
Welcome to the English Wikibook for learning the Tajik Language.
This course requires no prior knowledge of Tajik. It aims to teach grammar, vocabulary, common phrases, conversational language, and formal/literary Tajik. By the end, you should be able to read and write Tajik but will probably need a human teacher to help with listening and speaking. The book is meant to be read starting with lesson 1 and moving forward. It will move slowly.

## The Persian Language

The Tajik language (sometimes written Tadjik or Tadzhik; тоҷикӣ, تاجیکی‎, tojikí [tɔːdʒɪˈki]) is a variant of the Persian language spoken in Central Asia. It is an Indo-European language, more specifically part of the Iranian language group. Speakers of Tajik live mostly in Tajikistan, Uzbekistan, Afghanistan, and western Pakistan. Tajik is the official language of Tajikistan. It is written in the Cyrillic alphabet.
Knowledge of the Tajik language will let you fully appreciate a rich and diverse body of literature.

## Vocabulary and grammar

In learning to read or speak any language, the two aspects to be mastered are vocabulary and grammar. Acquiring vocabulary is a matter of memorization. Children learn thousands of words of their native language by the time they are conscious of the learning process, so it is easy to underestimate importance of having a large vocabulary. This process can be reactivated by immersion: moving to where the language is spoken and one’s native tongue cannot be used for daily communication.
Without the opportunity to move to a Tajik-speaking area, a student must make a substantial effort to learn the meaning, pronunciation, and proper use of words. Be sure to learn all of the vocabulary words in each lesson. Early lessons have simple sentences because the student’s vocabulary is presumably limited, but more complex sentences in later lessons demonstrate more typical Tajik. It may be helpful to translate these using a Tajik-English dictionary. Access to a print dictionary is very helpful. Other sources of Tajik, such as newspapers, magazines, and web sites can help to build vocabulary and to develop a sense of how Tajik sentences are put together.