OpenLLM-France/wikimedia huggingface dataset:
# When It Hits the Fan/Personal Strategies and Know-how/Path Selection
## Path Selection

Deciding how to go form point A to B is extremely important. It is part of the planing process of movement, most of the time we do not even realize this simple process but at times that significant effort and resources will be consumed on the task planning how to proceed should be the second step after deciding for a destination. Path selection is a decision making process by which one alternative is selected over another. Several procedures for making decisions have been outlined in effort to minimize inefficiencies or redundancies. These are idealized (or normative) processes, and describe how decisions might be made in an ideal world, and how they are described in official documents. Real-world processes are not as orderly.
Planning starts by selecting or deciding for a specific destination choice (this selection may in itself depend on many factors) fallowed by mode and route choices. The route selected my constrain or be depended on the modes of locomotion available.
It can be hard to decide if a path selection starts by establishing a destination, since all other components at some point have the same strength on the decision process. But undoubtedly if one is not required to go somewhere that there is no need to move, except if one is forced to move and then the destination may even be irrelevant. It all depends on the specificity of the situation that motivates the choice of a path.
In long trips, making a trip distribution (or intermediary destination choice or zonal interchange analysis). This step matches several origins and destinations to develop a “trip table” a matrix that displays the number of trips going from each origin to each destination. Priorities and resources available as well as costs (even effort) must be taken in account. This is basically turning any complex voyage in a sequence of smaller steps as to reach the final objective.
Trip distribution's zonal interchange analysis yields a set of origin destination tables which tells where the trips will be made, mode choice analysis allows the modeler to determine what mode of transport will be used. Mode choice analysis follows destination choice and may affect route choice.
Route assignment, route choice, or traffic assignment concerns the selection of routes (alternative called paths) between origins and destinations in transportation networks. To determine facility needs and costs and benefits, we need to know the number of travelers on each route and link of the network (a route is simply a chain of links between an origin and destination).
The Fundamentals of Transportation wikibook is a good work to examine in detail the complexity and analysis behind planning transportation.
# When It Hits the Fan/Rebuilding/Plant crops

When planting crops you first must know how, how long it will take to grow and what should be the expected production and the value (for sale or bather). Crops and agriculture in general works on the rules of economy of scale the more you plant of the same type the more assured you can be of the return you will get (depending of the existence of competition).
Planting crops would be the first step to rebuilding a life or starting over "From Scratch" but it will signify to remain static around a specific location. Crops will be easy targets to people raiding, stealing and you will be increasing your chances of killing or be killed. With agriculture there is also a need to establish some infrastructure, to deal with water and compost.

## nuclear polluted environment

After nuclear attack or gamma ray interaction. Take out dirt 5 inches underneath dirt. Put another fresh 5 inches of dirt above original place dirt taken out. Plant seeds, then let plants die only once. Plant new seeds water and feed as you would any other plant to let grow. Over time fertilize crops/plants (Banana peels, apple cores, orange peels, tomatoes. Etc.)
In case of a nuclear winter, it will probably kill any crops and make farming impossible for years.
A person can survive the post nuclear war with the concept of re-construction of the civilization. post nuclear war will take you back to the old time where there was indeed the basics you speak of. If you are NOT SO RELIANT on today's technology than you will survive. Because it gives you time to train yourself for those basics. (that is if the land remains productive)
Lots of people would die from these, only small percentage of the lucky and strong ones might survive (even though living in post-nuclear-war world might not be the best choice).
# When It Hits the Fan/Teaming
## Lone wolf

Realize that when working alone you are limited to what you can manage on your own. Most things that you have no experience with will put you in a learning curve, and you will mostly fail to successfully deal with what you don't know or understand, this resource consuming being time one of the more important one.
When working alone prioritization becomes a matter of life and death, with the only positive factor that if you fail you are the only one that will pay for it.

## Team Work

Spreading task between various elements will get things going faster and safer, since risks are also shared. It is in human nature to cooperate and join together to face adversity. Depending on the situation your best chance will be to act on what humanity has done for time immemorial and join a larger group of people.
# When It Hits the Fan/Personal Strategies and Know-how/Food
## Food
### Food preservation

Food preservation in today's world is mostly a forgotten technology. Most of us have not only lost the capability to produce our own food but even the knowledge on how to preserve it. The household refrigerators (colloquially fridge) were introduced in 1915 , and soon after the practice of using a larder and even creating your own preserves become something of the past. The industrialization and the move from the agrarian culture to the city allied with industrial canning has also contributed to out general loss of knowledge regarding storing food.
When storing food it must be kept in mind that each item reacts to the chemical composition of the environment the other items. It is not only a matter of temperature.

#### Canning
### Famine

What was previously a natural disaster, famine at a large scale today is a human created disaster, lack of planning and support to avoid a widespread lack of food in a region. It can be characterized as a lack of access or capacity to produce agriculture foodstuffs, a lack of livestock (by disease, weather or other factors. It is a generalized lack of all foodstuffs required for basic nutrition and survival.
Generalized famine is is a slow process, almost always caused by pre-existing conditions, such as drought, but its effects may be exacerbated by social factors, such as war. Particularly devastating examples include the Ethiopian famine and the Irish Potato Famine.

### Cannibalism

Cannibalism is the consumption of members (or specific parts) of one's own species. Cannibalism is also practiced by humans, referred as anthropophagy, and is practiced even in the present days in human society, for survival or even by choice.
Cannibalism of human beings is nearly universally seen as taboo, however there are societies that condone cannibalizing deceased people and cultures that incorporate it into rituals where family members consume the flesh of their departed relatives. The practice of eating dead members of one's own culture, tribe or social group is called Endocannibalism. Cannibalism of healthy individuals is generally frowned upon due to the seemingly universal ethical belief in the sanctity of life, and is considered a punishable offense by most modern societies. Only in extreme cases do most modern societies condone taking the life of another human being.
Placentophagia, eating the placenta, is practiced in some parts of the world.
Exocannibalism is the practice of eating human corpses from people outside one's own community, tribe or social group.
In this book you will learn how cannibalism is practiced, what the potential risks and dangers of practicing cannibalism are, the moral and ethical issues involved in practicing cannibalism, and why people practice cannibalism.

#### Moral and ethical issues

History Mythology Religious practices
# Writing Adolescent Fiction/Character names/Southern/Southwestern double boys' names

* Bennie Ray
* Billie Joe
* Billy Bob
* Billy Dale
* Billy Joe
* Billy Neil
* Billy Ray
* Billy Wayne
* Bobby Gene
* Bobby Jo
* Bobby Joe
* Bobby Lee
* Bobby Ray
* Danny Lee
* Danny Ray
* Denny Lee
* Donnie Lee
* Donnie Ray
* Doug Ray
* Freddie Joe
* Freddie Ray
* Garry Lee
* Gary Ray
* Gordon Ray
* Jackie Glenn
* Jackie Joe
* Jackie Wayne
* Jerry Glenn
* Jim Bob
* Jimmie Dale
* Jimmy Joe
* Jimmy Lee
* Jimmy Mack
* Jimmy Ray
* Joe Bob
* Joe Edd
* Joe Neil
* John Edd
* Johnny Lee
* Johnny Ray
* Johnny Wayne
* Kenneth Joe
* Larry Don
* Larry Ray
* Randle Tom
* Robert Earl
* Robert Lee
* Ronnie Joe
* Sammie Lee
* Sandy Lee
* Stevie Ray
* Terry Lee
* Tommy Lee
* Willy Scott
# Writing Adolescent Fiction/Character names/Tahitian
## Girls' names

* Fara
* Haina
* Hana
* Heiata
* Heimata
* Heitiare
* Herehia
* Hina
* Hinano
* Hinarii
* Hinatea
* Hinerava
* Hiriata
* Laina
* Loma
* Maeana
* Maeva
* Maiana
* Maima
* Maimiti
* Maire
* Mairete
* Manina
* Mareta
* Mareva
* Maruia
* Mata
* Mataari
* Meherani
* Mehetia
* Mere
* Mila
* Miri
* Miriama
* Moana
* Moe
* Moea
* Moeani
* Moearii
* Moeava
* Moerani
* Nanahi
* Ninirei
* Orama
* Poe
* Poema
* Pori
* Rahera
* Raiana
* Raina
* Raita
* Rarahu
* Rava
* Ravahere
* Roiti
* Roti
* Tamara
* Tatiana
* Tea
* Tehani
* Tehei
* Temere
* Terii
* Teriimaevarua
* Teriimarevareva
* Teumere
* Tevahine
* Tevai
* Tevaite
* Tiare
* Timeri
* Tina
* Titaina
* Titi
* Tumata
* Turere
* Vaea
* Vaetua
* Vaihere
* Vaima
* Vaitare
* Vaite
* Vaitere
* Verani

## Boys' names

* Ani
* Apaapa
* Arupaeo
* Faimano
* Feri
* Firipa
* Heiarii
* Heimata
* Heimoana
* Henere
* Here
* Hereiti
* Heremoana
* Hio
* Hiro
* Mahine
* Mare
* Matahi
* Menalee
* Minarii
* Moana
* Niau
* Omo
* Otoo
* Pai
* Paofai
* Pitu
* Pomare
* Taaroa
* Tahi
* Tama
* Tamaeva
* Tamatoa
* Tane
* Taniera
* Tautahi
* Tavi
* Tehau
* Teiatu
* Teimua
* Teina
* Teiva
* Temaeva
* Tematahi
* Tepau
* Tepeva
* Tepoea
* Tere
* Teremoana
* Terii
* Tetahiti
* Tetua
* Teva
* Teve
* Timi
* Tini
* Tino
* Tinorua
* Toa
* Torea
* Toti
* Tu
* Tuaihau
* Tumoana
* Vetea

## Surnames

* Airima
* Aitamai
* Amaru
* Amo
* Anania
* Arai
* Aromaiterai
* Ateni
* Etaeta
* Faaio
* Faaruia
* Faatau
* Faatiarau
* Faatoa
* Faatuarai
* Fanaura
* Faretahua
* Fareura
* Farone
* Fatupua
* Faua
* Faura
* Fauura
* Haapaitahaa
* Haerehoe
* Haoa
* Haoatai
* Hapairai
* Hapipi
* Hauarii
* Harua
* Hauata
* Haumani
* Heremoana
* Hoata
* Hoatua
* Huioutu
* Huria
* Huuti
* Ioane
* Maamaatua
* Maiarii
* Maiau
* Maihi
* Maihota
* Maihuti
* Maiotui
* Maitere
* Mamatui
* Manate
* Manavarere
* Manea
* Manutahi
* Mara
* Maraetaata
* Marama
* Mariteragi
* Maruhi
* Mataiki
* Matehau
* Meitai
* Moevai
* Nena
* Nui
* Oopa
* Paama
* Paeamara
* Paoaafaite
* Paofai
* Para
* Parau
* Peni
* Pereitai
* Poroi
* Pumua
* Puputauki
* Putoa
* Raapoto
* Raimana
* Raioha
* Raparii
* Ravetupu
* Roomataroa
* Taerea
* Taero
* Taharia
* Tahi
* Tahimanarii
* Tahuhuterani
* Tahutini
* Taiarui
* Tama
* Tamarii
* Tapi
* Taputu
* Taputuarai
* Tarahu
* Tarati
* Taruoura
* Tau
* Tauaroa
* Tauatiti
* Tauhiro
* Tauotaha
* Tauraa
* Tauru
* Tautu
* Teahe
* Teamo
* Teamotuaitau
* Teariki
* Teauna
* Tefaatau
* Tehaamatai
* Tehahe
* Tehei
* Teheiura
* Tehoiri
* Teiho
* Teihotaata
* Teihotu
* Teihotua
* Teinauri
* Teiva
* Temaiana
* Temanaha
* Temarii
* Temaru
* Tematahotoa
* Temauri
* Temehameharii
* Temorere
* Tepa
* Tepava
* Tepuhiarii
* Terai
* Teraiamano
* Terii
* Teriierooiterai
* Teriiiti
* Teriinatoofa
* Teriipaia
* Teriitahi
* Teriitau
* Teriitehau
* Teriitetoofa
* Terorotua
* Teterahi
* Tetiarahi
* Tetuamanuhiri
* Tetuanui
* Teuira
* Teupoo
* Teuru
* Teururai
* Tevaearai
* Tevaria
* Tiatia
* Tihoni
* Timiona
* Tinorua
* Tokoragi
* Toofa
* Toomaru
* Toromona
* Tuahine
* Tuairau
* Tuheiava
* Tuifua
* Tuihagi
* Tuiho
* Tuitete
* Tumahai
* Tunutu
* Urima
* Utia
* Vahine
* Vaiho
* Vairaaroa
* Vanaa
* Viriamu
# Writing Adolescent Fiction/Character names/Southern girls' names
## Usage note

Class is still evident in many parts of the Southern United States, and names can tell background and education. Patrician families will often give their children family names as a first name, and/or use classical names that have a very antebellum feel. Working class families often give two-part names like Bobbi Jo.

## Southern girls' names

* Aimee
* Alberta
* Alice
* Amber
* Amberleigh
* Amberlynn
* Amelia
* Ashleigh
* Aubrey
* Audelia
* Audrey
* Belle
* Bijou
* Bonnie
* Calandria
* Camellia
* Carolina
* Cassandra
* Cecelia
* Charlotte
* Cherie
* Claire
* Columbia
* Dahlia
* Diana
* Dixie
* Dixon
* Elise
* Evelyn
* Felina
* Flora
* Georgia
* Grace
* Jade
* Kimberley
* Kitten
* Kitty
* Laura
* Leigh
* Lettice
* Lillian
* Lily
* Louisa
* Maybelle
* Melissa
* Missy
* Natalie
* Natasha
* Olympia
* Ophelia
* Paige
* Phoebe
* Priscilla
* Robin
* Scarlett
* Shelby
* Sheri
* Stephanie
* Tess
* Theophania
* Tiffany
* Trixie
* Veronica
* Victoria
* Violet
* Virginia
* Vivian
* Whitney

## Patrician family names

* Arrowsmith
* Dexter
* Griffin
* Houston
* Oberon
* Roarke
* Sigourney

## See also

* w:List of most popular given names by state in the United States
# XQuery/Using Triggers to assign identifiers
## Motivation

You want to automagically assign unique identifiers to all new incoming documents or XML nodes: no matter if they are created from a controller that you scripted, if they are resulting from an HTTP PUT operation in a REST call, if they are the product of a webdav COPY operation, or uploaded from the java admin RPC client.

## Method

We will create a trigger that will fire on all document store operations. The trigger will modify the document to be stored in the database. Our identifier will be taken from the output of the util:uuid function. A simple assignment will do due diligence. No special authority, such as an incremental counter, will be necessary.

## System Configuration

This example assumes that the documents that you want to tag with identifiers live below /db/my-collection. eXist triggers are declared in a configuration file that is placed in the /db/system/config area with the above path added to it. Such a file with the relevant lines will look like this:
/db/system/config/db/my-collection/collection.xconf
Now every time a store or update event happens to this collection the XQuery script /db/triggers/assign-id.xq gets run.
Beware! You cannot, due to limitations of current (<=1.5dev) design, attach more than one xquery script to the same trigger event. Only the trigger declared last for an event will be used.

## XQuery Script

The script will add the uuid as an attribute to the root element of the incoming document, overwriting any uuid attribute that is already there.
NOTE: These examples do not work reliably: As soon as your xquery causes exceptions in the thread that it runs in, then there is a great chance, that it will hang indefinitely, eg. if you store a binary resource below the path it works on. Further operations on the processed resource then will NOT trigger the script until a restart of the whole database.

## References

Guide to configuring eXist triggers
# XQuery/Updates and Namespaces
## Motivation

You want to update an XML file and understand how the XQuery update process might impact the namespace of the document the next time it is viewed.

## Method

We will use the XQuery update statement to change the values of XML documents and note how the default output changes with respect to how the default namespaces and namespace prefixes are rendered. XQuery updates can impact how namespaces are rendered.

## Example

Suppose we have a task that includes a default namespace like the following XML document.
Example XML document using a default namespace.
In the following example we refer to this XML document as $doc.
Most people that want to view XML prefer to use a default namespace and not clutter the entire document with unnecessary prefixes.
Suppose we have just saved this file and we now want to add an ID value to the <id> element. After we update this XML file with the following update statement we note that the serialization will change.
The next time we view this document we see the following:
This is known as "fully qualified" document where the namespace prefix of every element is fully shown. It is technically equivalent to the prior example. This may not be what you would like.

## Updating the Element Value, not the entire Element

To get around this we can just update the text node of the id instead of the entire id element:
or you can use the update/value syntax
Using either of these techniques will not dirty up your default namespace structures.

## Acknowledgments

Joe Wicentowski was kind enough to make these observations and provide samples.
# XQuery/Uploading Files
## Motivation

You want to upload files to your eXist database using simple HTML forms.

## Method

We will use the HTML <input> element in the web form and the store function in an XQuery.

## HTML Form

We will use a standard HTML form but we will add a enctype="multipart/form-data" attribute.
Screen Image:

## XQuery

On the server side, we will use the request:get-uploaded-file-name to get the name of the incoming file and the request:get-uploaded-file-data function to get the data from the file. We can then used the xmldb:store function to save the file.
File: upload.xq

## Acknowledgments

This example was posted on the eXist open mailing list by Rémi Arnaud on Nov. 05, 2010.
# XQuery/Using Triggers to Log Events
## Motivation

You want to log all changes in files of a single collection.

## Method

We will create a trigger that logs these events. The trigger will append a string to a log file.
There are six trigger event types:
* store: Fired when a document is created in the collection or sub-collection
* update: Fired when a document is updated in the collection or sub-collection
* remove: Fired when a document is deleted from the collection or sub-collection
* create: Fired when a sub-collection is created
* rename: Fired when a sub-collection is renamed
* delete: Fired when a sub-collection is deleted

## Sample Code

NOTE: These examples do not reliably work on eXist 1.4! I have not yet tested on 2.0.
In this example we will be logging all store, update and remove events from the collection /db/my-collection
Here is a sample trigger configuration file. This file is placed in the /db/system/config are with the same db path added to it that you want to monitor:
Here is what the trigger file looks like:
collection.xconf
Note that the three trigger operations (store, update, remove) are listed in the event attribute and separated by commas. When these operations are fired the XQuery /db/triggers/log-changes.xq gets run. You can pass parameters to this query using the parameter element.

## References

Guide to configuring eXist triggers
# XQuery/Using Intermediate Documents

Processing XML often involves the creation of intermediate XML fragments for subsequent processing. Here is an example of two approaches, one using multiple passes on the same data, the other a constructed intermediate view of the data.

## MusicXML

MusicXML is an XML application for recording music scores. There is a range of software which produces and consumes MusicXML.
There are two styles of MusicXML with two related schemas, one in which measures are within parts (partwise), the other in which parts are within measures (timewise).
An example of a MusicXML partwise score is Mozart's Piano Sonata in A Major, K. 331
Here is a sample definition of a note:

## Notes Range

The Recordare site has some sample code to demonstrate the use of XQuery to process MusicXML . The first script finds the lowest and highest notes in the score. The script shown on the site is not conformant to the current XQuery standard, but a few minor changes brings it up-to-date.
With output:
execute

## Ancestor access

The path to the measure in which a note is located
uses a fixed set of steps back up the hierarchy. This limits the application of this script to one type of MusicXML schema because the position of the measure in the hierarchy is different in the two schemas. When the script was written, the ancestor axis was not supported but it is now, so those lines are more generally expressible as:

## Note-to-midi

The function to convert notes to midi numbers uses nested if-then-else expressions. XQuery lacks a switch expression which might be used but a clearer approach would be to use a lookup-table, defined either locally in the script or stored in the database.
Here a sequence of notes is created as a look-up table. This is bound to a global variable which is used in a revised note-to-midi function:

## Intermediate XML

The original script required repeated access to the original MusicXML source. An alternative approach would be to create an intermediate structure to hold the midi notes and use this in subsequent analysis. This structure is a computed view of the original notes augmented with derived data - the midi note and the measure.
and this view is then used to locate the high and low notes and their position in the score:

## Revised script

execute

## Discussion

Although arguably a cleaner, more direct design, the second script relies on the construction of temporary XML nodes which are then the subject of XPath expressions. These temporary XML nodes are handled differently in different implementations. In older versions of eXist each is written to a temporary document in the database which creates a performance overhead and problems of garbage collection. In the 1.3 release, intermediate XML nodes remain in memory, resulting in a major performance improvement.
There is, however, another problem with this approach. The size of the intermediate node may exceed pre-set, but configurable, limits on the size of constructed nodes.
# XQuery/Using the Math Module
## Motivation

You want to use basic math functions directly within your XQuery program.

## Method

We will use the XQuery module function that is available for eXist.

## Configuring eXist

You must first make sure that the math module is enabled in your version of eXist. To do this make sure the following lines are uncommented in your $EXIST_HOME/conf.xml file:
If you make a change to the file you will need to restart eXist.

## Listing of Math functions

You can now just reference any of the math functions in the math module.
Here is a list of all the functions:
http://demo.exist-db.org/exist/functions/math

## Sample Program

Here is a sample XQuery program:
# XQuery/UWE StudentsOnline

This site has been developed to support staff, students and prospective students in the Faculty of Computing, Engineering and Mathematical Sciences (CEMS) at the University of the West of England, Bristol, UK
The public face of this site is Students Online with an intranet called FOLD. This site is implemented in XQuery with some XSLT on eXist-db.
(more)
# XQuery/Unzipping an Office Open XML docx file
## Motivation

You want to uncompress an docx file

## Method

We will use the compression:unzip function used in the prior example and pass it a local version of the function that handles the uncompression.

## File Names

Some file names in docx files such as '[Content_Types].xml' are not valid URIs. So these must be renamed to files with valid URIs.
Here is a typical list of the path names in a docx file:
Note that there are three subfolders created (_rels, word and docProps). The XML files are stored in these files.

## unzip-docx function

The following function is used to unzip a docx file. This function name must be passed as a parameter to the unzip function to tell it to do with each docx file.
Note that you must pass in parameters to this function from the calling function.
unzip-docx function: