OpenLLM-France/wikimedia huggingface dataset:
# The Cold War/The Berlin Airlift

The Western powers and the USSR emerged victorious out of World War Two and agreed to divide Germany and the capital, Berlin (which was in the Soviet zone) between them into four zones. However, they disagreed over how the country should be run.
The Western powers (Britain, France and the USA) wanted to help rebuild the German economy and infrastructure and get it back on its feet as soon as possible, whereas Stalin hand, wanted compensation and reparations to be paid for the damage done to the Soviet Union during the war. He also wanted to ensure that Germany would never again be able to invade the USSR.
The Soviets transported factory machinery and other goods back to the Soviet Union, from East Germany, and when Harry Truman, the US president, refused to let the Western zones of Germany pay reparations to the USSR, Stalin reacted by putting a communist government in the Soviet zone.

## A New Currency

In June 1948, a new currency, the Deutschmark, was introduced in the Western zones and in West Berlin to help tackle inflation and bring back prosperity to the nation. However, the Soviets viewed this as a threat and were frightened that this would bring the whole of Berlin, and therefore the whole of the Soviet zone under Western, capitalist influence.

## Berlin Blockade

The USSR responded by closing all rail, road and canal links carrying vital supplies from the Western half of Germany into West Berlin in an attempt to starve the people of West Berlin and force the Western powers out of Berlin. However, the Western powers responded by airlifting the much-needed supplies into Tegel and Tempelhof Airports, in West Berlin. This came to be known as the "Berlin Airlift", and lasted for almost a year, from 28th June 1948 until 11th May 1949.
A total of 278, 228 flights were made in and out of Berlin, by USAF, RAF and civilian planes delivering over two million tons of supplies, including food, clothing, medicine, coal and building supplies. Stalin eventually realised that the West was determined to hold on to the city and, on the 11th May 1949, he lifted the blockade, and supplies were once again allowed in overland.

## The Consequences

The West realized that it was impossible to work with the USSR to run post-war Germany and, on 23 May 1949, they decided to merge their zones into a new and separate, democratic state called the Federal Republic of Germany (West Germany). The Soviet Union responded four months later by turning their zone into a communist state called the German Democratic Republic (East Germany).
Germany and the city of Berlin remained a divided country for the next 41 years until the end of the Cold War, when, in 1990, it was re-unified.
The Cold War
Introduction - Background - Strategy - Truman Doctrine - Marshall Plan - Berlin Blockade - Korean War - Hungarian Uprising - Cuban Missile Crisis - USSR under Gorbachev - USA under Reagan - Arms Race - Space Race
Cover - Contents - Study Guide
Please read the page creation guidelines before creating a new page.
# XQuery/Ah-has
### Redundancy in Expressions

better as
and
better as
and
better as
OR
all three return

### XPath predicates clearer and faster than where clauses

better as

### Default values

better as
OR for a sequence of items
OR another possible for a sequence
any number of cascaded defaults can be handled this way.
compare with 'COALESCE' in SQL
# XQuery/All Paths
## Motivation

You want to generate a list of all unique path expressions to a document.
This process is very useful to quickly get familiar with a new data set. It is also important to make sure that your document-style transforms are accessing all the elements. This process can also be used as a basis for generating index files for a new data set.

## Example Output

Paths the list of unique paths for a sample file from the Shakespeare Demos on the eXist demo system at /db/shakespeare/plays/hamlet.xml would generate the following results.
Note that these path expressions are sorted in document order, that is the order that the path first appeared in a document. So you can see that the cast list in the PERSONAE appear before the ACT/SCENE elements. The output can also be sorted in alphabetical order.

## Method

We will use the functx libraries.
In particular the function:
takes as its input a node and returns a sequence of strings of the path expressions.
See Documentation on xqueryfunctions.com

## distinct-element-paths function

The heart of this query is the single expression:
Which says in effect "get me the element names of all the nodes in the document". The next step is to turn this list into a list of distinct element paths. This is done by the function functx:distinct-element-paths

## Working with a single test document

use the document

## Working with a document collection

use collection function

## Acknowledgments

David Elwell posted this suggestion on the open-exist list on July 22 of 2010
# XQuery/Basic Authentication
## Motivation

You want to use a very basic login process over a secure network such as a secure Intranet or over an SSL connection.

## Method

We will used the base64 encoding and decoding tools to generate the right strings.
Returns the following:

## References

* http://en.wikipedia.org/wiki/Basic_access_authentication Wikipedia Entry on Basic Authentication
# Motivation

You want to automatically generate a index configuration file based on instance or XML schema data.
Creation of an index configuration file is difficult for new users. To help new users get started it is frequently benefitial to generate a sample collection.xconf file for these users based on simple analysis of sample instance data or XML Schemas that are provided by the users.

# Index Types

There are several types of indexes you may want to create. Range indexes are very useful when you have identifiers or you want to sort results based on element content. Fulltext indexes are most frequently used of language text that contains full sentences with punctuation.

## FullText Indexes

The following is some example code on how one might do this.
Lucene fulltext indexes are most useful when they index fulltext sentences. One approach is to scan an instance document for full sentences looking for longer strings with punctuation. Although a full implementation would involve the inclusion of a "Natural Language Processor" library such as Apache UIMA, we can begin with some very simple rules.
Here are some sample steps in the process for non-mixed-text content. Mixed text can also be done but the steps are more complex:
* get a list of all elements in a sample index file
* classify the elements according to if they have simple or complex content
* if they have simple content, look for sentences (spaces and punctuation)
* for each element that has fulltext create a lucene index

# Sample Code for Namespace Generation

This creates an index on <foo> with every namespace that is used in the collection.
# XQuery/Basic Feedback Form
## Motivation

You want to gather feedback from visitors.

## Implementation

A simple HTML form gathers suggested improvements and an email address. The suggestion is emailed to one of the authors and an acknowledgment sent to the submitter. Here the default send-mail client on the eXist implementation at UWE, Bristol is used.

## XQuery script

Feedback Form
# XQuery/All Leaf Paths
## Motivation

You want to generate a list of all leaf paths in a document or document collection.
This process is very useful to get to know a new data set. Specifically you will find that the leaf elements in an XML file carry much of the data in a data-style markup. These leaf elements frequently are used to carry the most semantics or meaning within the document. They for the basis for a semantic inventory of the document. That is each leaf element should be able to be associated with a data definition.
Leaf elements are also good targets for indexing within your index configuration file.

## Method

We will use the functx leaf-elements function
This function takes as input, one or more nodes and returns an array of strings.

## Example Output

For the demo play Hamlet that is included in the eXist demo set the file /db/shakespeare/plays/hamlet.xml will generate the following output:

## Source Code to leaf-elements

This query uses the descendant-or-self::* function with the predicate [not(*)] to qualify only elements that do not have child nodes.

## Adding Attributes

You can also run a query that will get all the distinct attributes. Attributes are all considered leaf data types since they can never have child elements.
This query says in effect to "get all the all the distinct attribute names in the input nodes".
For the MODS demo file: doc('/db/mods/01c73f2b05650de2e6124d9d113f40be.xml')
You will get the following attributes:
* type
* encoding
* authority
</syntaxhighlight>

## References

Documentation on xqueryfunctions.com web site.
# XQuery/Alphabet Poster

This toy programme creates alphabet posters using images from Wikipedia, located via dbpedia.
It is described in a blog entry
# XQuery/BBC Weather Forecast
## BBC Weather forecasts

Some weather data is available from the BBC as RSS feeds. Currently this includes the current conditions and the 3-day forecast. Lacking a standard set of tags fro weather properties, the conditions are expressed in a string and string parsing is needed to access the elemental data.
For other forecasts such as the 24-hr and 5 day which are not available as RSS we must scrape the HTML page.
One approach to this task is this Yahoo Pipe which converts the page to an RSS feed. However the data would be more useful converted to XML elements.

## Dates and times

In all these pages and feeds there is a problem to assign a date to a forecast or observation. Dates are often omitted or expressed as a day-of-the week. This leads to complications in processing both RSS and HTMl pages.

## 24-hour forecast

This script uses the eXist module httpclient to get the HTML, parses the HTML and generates an XML file. This XML could then be transformed via XSLT to a viewable page.

### Interface

This script has two parameter:
* region - required - a numeric code unique to the BBC (? code list)
* area - optional - a sub region , typically the beginning of the postcode
24 hour forecast for Bristol
# Wii Sports/Boxing
## Technique Overview - Punching

Aiming Punches - by placing your Wiimote at varying angles (from horizontal to vertical), your fighter will try high, mid and low punches. By flicking the wiimote from vertical, it will try a high punch, flicking from a lower angle will provide a mid-level punch, and a still lower flick delivers a low punch. Leaning from side to side allows lateral positioning of punches.
Punch Types:
* Jab - flick the lead (off) hand away from the body; angle determines height and power determines the strength of the punch/recovery time.
* Cross - flick the rear (dominant) hand away from the body; similarly, angle determines height and power determines strength and recovery time.
* Hook - rotate the chosen hand's controller outwards (left hand anti-clockwise, right hand clockwise). A dominant-handed high hook can be performed by rotating in the opposite way. Long recovery time.
* Uppercut - flick the chosen hand upwards from a horizontal position. Long recovery time.
Each punch has a recovery time - the more powerful the punch, the longer this time. Attempting to throw a series of heavy punches very quickly will therefore result in the game not registering those punches which fall inside the recovery time of a previous punch.
More powerful punches come from combination punches. Hitting with several punches in sequence does more damage to your opponent.
Smaller sharp movements are equally as effective as longer powerful movements if you use the physics of the remote correctly, since the actual maximum power that can be achieved through the controllers is fairly low.

## Technique Overview - Guards and Dodging

Blocking/Guarding - A player can block the punches of an opponent by placing their gloves in the path of a punch. Simply holding the controllers at a specific angle close together will raise the player's gloves into an appropriate guard. Holding them at a higher angle produces a guard which covers the face, and a lower angle a guard that covers the body.
Leaning and Dodging - Leaning the Wiimote and nunchuk from side to side will also cause your player to dodge and step from side to side. Dodging opponents' punches successfully by tilting the controllers as a punch is thrown will result in a brief period of slow motion during which powerful punches can be thrown which almost never miss.
# WifiLapper/WifiLapper Eclipse 4.2 Setup & Build Config

1. Download Eclipse 4.2 & unzip to a Folder: http://download.eclipse.org/eclipse/downloads/
2. Download & Install Java 6 http://java.com/en/download/manual_v6.jsp
3. Download & Install Android SDK: http://developer.android.com/sdk/installing/index.html
4. Ensure the following are installed:
* Android SDK Tools
* Android SDK Platform-tools
* Android 4.1
* Android 2.2
5. Install ADT plugin for Eclipse: http://developer.android.com/sdk/installing/installing-adt.html
6. Install the OEM diver for your phone: http://developer.android.com/tools/extras/oem-usb.html
7. Install the EGit Plugin for Eclipse: Help->Install New Software->Type "egit" in search box. Install EGgit package.
8. Right-click in Package Explorer->Import->Git->Next->(you can figure out the rest.) Enter https://github.com/arthare/wifilapper.git for the repository
9. Right click each Project->Properties->Java Compiler->
* Uncheck "Enable project specific settings."
* Click "Configure Workspace Settings."
* Change "Compiler compliance level:" to 1.6
* Eclipse might complain that jre6 is not available
* Click Configure at the bottom of the window and add the jre6 folder (usually c:\program files\java\jre6)
10. Repeat for all projects.
11. Create the folders 'res' & 'src' in each of the WifiLapper Projects (Full, Lite, Tablet)
12. Menu->Project->Clean...
At this point you should no longer be getting any "red" errors. There are 173 "Yellow" errors, but those seem to be just bad coding practice (right Art?) and everything is fine.
13. Connect your phone to the USB port, right-click WifilapperFull->Debug As->Android application
14. If Anything weird happens, delete all occurances of 'bin' and 'gen' folders from all the Projects. These are auto-generated files by Eclipse and will be rebuilt.
# WifiLapper/WifiLapper Feature Request List
## Feature Request List
### App

Phone beep on incoming message
Shift lights on Dash (Maybe Pitside option)
New UI workflow/mockups
Use AIM Beacon to set Start/Finish into IOIO
Configuration Streamlining
Online Track DB
Relative instead of absolute speedometer
Hardware button into IOIO for Set Splits/Acknowledged & General Marker
Reduce # of splits
Tap phone to change speedometer style
Scriptable IOIO outputs
Bluetooth headset to headphone jack relay
Addressed already:
Accelerometer option for Z Chan, Calibrate Accelerometer

### Pitside

Unique passcode to link to Pitside
Lap delta time column
"Live" Driver Tracker
Auto-check for updates
Scriptable IOIO outputs

### Documentation/Development

Forum/Website ideas

### HTTP Server

Web UI Suggestions/tasklist
# WifiLapper/Feature Request List
## Feature Request List
### App

Calibrate Accelerometer
Phone beep on incoming message
Accelerometer option for Z Chan
Shift lights on Dash (Maybe Pitside option)
New UI workflow/mockups
Use AIM Beacon to set Start/Finish into IOIO
Configuration Streamlining
Online Track DB
Relative instead of absolute speedometer
Hardware button into IOIO for Set Splits/Acknowledged & General Marker
Reduce # of splits
Tap phone to change speedometer style
Scriptable IOIO outputs
Bluetooth headset to headphone jack relay

### Pitside

Unique passcode to link to Pitside
Lap delta time column
"Live" Driver Tracker
Auto-check for updates
Scriptable IOIO outputs

### Documentation/Development

Forum/Website ideas

### HTTP Server

Web UI Suggestions/tasklist
# Wii Sports/Bowling

Bowling is fairly simple to pick up. Hold B, and raise the remote as shown on screen. Keep B held, swing your arm back (as shown on screen), then swing forward, and release B when you want to let go of the ball. Spin can be put on the ball by tilting the controller on release. By using the directional buttons, you can change where the ball will go. Press A, then use the directional buttons to rotate the direction. Once again, experiment, and try the training exercises.
The sooner you let go of the B button the more spin you will put on. For example if you wait for your Mii to raise the arm upwards before releasing B then you will throw the ball and not get much spin on. However if you release B when your Mii's arm is near the ground then you will get a lot of spin on it.
A popular technique for getting a strike is to position your Mii so as to be 3/4 of the lane to the right (assuming you're right handed, reverse if you are left handed) and angle the path of your ball left so that it will strike the first pin. When you throw the ball make sure to release it a tad late so as to avoid too much spin and this should hopefully result in a strike. Vary said technique based on personal preference. It should be noted that an early drop may be equally effective. One, albeit cheap, trick to get an almost perfectly straight throw is to keep your arm held back until you have already ran up to the line. Then swing, preferably quite high. This will lob, or "pop" the ball, while still causing it to maintain a good amount of speed. If done right, a perfect game is easily attainable. However, because of the aforementioned cheapness of the move, and because it is not truly possible in real life, people should refrain from using this in a multiplayer match, in the interest of fairness.
The game can run within a playing session for a while without the DVD being inserted.
# Wii Sports/Baseball
## Hitting

The hitting in this game is rather simple. All you have to have is the right timing to get the bat on the ball. If it is timed right, you get a better hit. The player should usually hit the inside pitches to your batter sooner than the outside pitches. Also you want to remember to aim up for home runs and down for ground balls. And the harder you swing, the harder you hit the ball. Lastly always remember splitters in this game are 99 times out of 100 going to be balls. How can you tell if the pitch is going to be a splitter? When the pitcher releases the ball, the ball looks like the seams don't move very much. If they aren't moving, then lay off.

## Pitching

Pitching is the real key and hardest part of this game. You have 4 pitches to choose from. The fastball(hold nothing), the screwball(hold A button), the curveball(hold B button), and the splitter(hold both A and B buttons). Each ball has a unique purpose and each ball can be thrown fast or slow depending on how much whip action you put on the controller. The fastball has two purposes: it can be used to blow by the batter, usually about 93-94mph, or it can be used like a change-up when it is thrown softly. The screwball for a right handed pitcher moves inside to a right handed batter. The curveball for a right handed pitcher moves outside to a right handed batter. And lastly the splitter moves down to any batter. The best part about a splitter is it can almost never be hit in play for a hit, the worst part is it is almost never a strike, so people can lay off of it if they learn to read the seams of the ball. You can also move the pitch either up, down, left, or right by pressing the D-pad in that direction, it can be pressed 2 times in one direction furthering the position away from the center of the plate. Finally the 1 and 2 buttons on the Wii-mote change the pitch from being thrown over-hand (the 1 button) and side-arm (the 2 button). After you get past the initial trial of using the pitches and knowing what they do, now the strategy is just like any other pitcher's. Try to change speeds well, by using a fastball and then a slow curve. Change up speeds and when they least expect it, use a splitter to get the strike out. Also this comes from knowing your opponent. If they're a person who has only hits fastballs out of the park then throw him some change-ups (slow fastballs) or some splitters. It takes practice but it can become very easy to fool hitters.
# WifiLapper/Display Freezes

If your live display freezes shortly after it starts, the problem could be due to your phone's GPU usage:
The option is under the phone's Settings/Developer Options menu. It may be labelled "Force GPU Updates" or "Force GPU Rendering". Uncheck this box and retry.
[ reference in the forum: http://wifilapper.freeforums.org/animation-freezes-no-live-display-t189.html ]
# WifiLapper/Speeding up Connection Times

If you are having trouble make a connection between the WifiLapper app and Pitside over Wifi, here are a few tips.

## Check the Wifidots

First things first you'll need to make sure the phone is in range of the router. This can done by opening pitside and loading the Database corresponds to the sessions you were having issues in. In the example below you can see that both Wifi Dots channels logged something during a lap. This indicates that the phone was "seeing" the selected Wifi Network. As you can see, the connection was available for a while (about 15 seconds).

## Making Changes

Depending on the Android phone model, the Wifi connection interval can be set anywhere from 2 to 90 seconds from the factory. We can edit these parameters to speed up the connection time of WifiLapper to Pitside. The phone will need to be rooted to make this change. Beware that rooting your phone may void your Warranty or violate your wireless carrier contract. If you don't know how to root your phone, Google it. Be warned if something isn't done right during the rooting process, damage can be done to the phone. It's pretty hard to hurt Android phones, or "brick it" in hacking terms, but anything is possibly in experimental hacking. Users have reported getting it wrong 5 times on a phone while attempting to root it, but no physical harm was done to the device. As always, your mileage may vary. Consider this prior warning.
After the phone has been rooted, use File Manager to gain access to the "build.prop" file. Start by opening the File Manager app and open the setting menu, scroll to the bottom and enable Root Explorer and Mount System Folders.
Use the Up button to get to the root folder (usually 2 taps)
Find the "system" folder, click it
You should now see the build.prop file in the current folder
Tap and Hold on the file until the following menu comes up
Tap Permissions
Make a note of how the File Permissions are set before making any changes. You will want to set them back to this when we are finished editing.
Enable Read, Write and Execute permissions for all 3 groups to allow the file to be edited. They may not all have to be enabled but it always works this way
Close the menu and tap "build.prop"
Choose "Open as Text"
Be careful while in here, changes may break stuff** Now find the line that reads "wifi.supplicant_scan_interval=". This is how many seconds between attempts to connect to a known WiFi Network. Some phones are set to 90 seconds. For typical lap times at most race tracks, that means the window of connection opportunity is very limited. The WifiLapper team recommends setting the wifi.supplicant_scan_interval to 2 seconds.
Make sure you Save the changes when you exit. It is also a good idea to return the "build.prop" file permissions to how they were originally found to prevent any accidental changes in the future.
Reboot the phone. The changes don't take effect until rebooted. Run some test laps at safe speeds around your neighborhood to verify WiFi connection to Pitside.