OpenLLM-France/wikimedia huggingface dataset:
# Trigonometry/Collection of Problems/Trigonometric Functions of Angles
## Standard Position of Angles

Sketch each of the following angles in standard position, and state whether it is a first-, second-, third-, or fourth-quadrant angle.
| 1. | $30^{\circ }$ | 2. | $160^{\circ }$ | 3. | $-80^{\circ }$ | 4. | $370^{\circ }$ |
| 5. | $700^{\circ }$ | 6. | $-110^{\circ }$ | 7. | $220^{\circ }$ | 8. | $400^{\circ }$ |
Each of the angles $\theta$ and $\phi$ are in standard position. Are they coterminal?
| 9. | $\theta =40^{\circ }\phi =400^{\circ }$ |
| 10. | $\theta =200^{\circ }\phi =-160^{\circ }$ |
| 11. | $\theta =-290^{\circ }\phi =-70^{\circ }$ |
| 12. | $\theta =-290^{\circ }\phi =70^{\circ }$ |
| 13. | $\theta =110^{\circ }\phi =-290^{\circ }$ |
| 14. | $\theta =210^{\circ }\phi =-510^{\circ }$ |

## Values of Trigonometric Functions

In each of the figures find the values of $\cos \theta$, $\sin \theta$, and $\tan \theta$:
1.
2.
3.
4.
5.
6.
# Trigonometry/Circles and Triangles/The Seven circles theorem

The seven circles theorem states that if you take a circle, and arrange six circles around it so that they all touch it and each of the six touches its two neighbours, then the three lines joining opposite pairs of contact points are concurrent.
NB: this works even if six of the circles are inside the seventh.
Corollary
Take any triangle and draw its incircle. Draw the three circles that touch the incircle and two of the other sides of the triangle. The lines joining the points where each of these tree circles touches the incircle to the point where the opposite side touches the incircle are concurrent.
This follows from the theorem by allowing three circles to have infinite radius.
# WikiRobotics/Mathematics of Robot Control
## Introduction

In a previous chapter, we talked about different approaches to how a robot can operate with specific problems. Now we talk about how what it can do relates to mathematics. Mathematics is useful in varying ways to many situations, especially in matters science-related. The more complicated functions and calculations the robot does, the more math is involved, particularly in how the robot can move. For example, if you had a robot that had legs, you'd have to consider the angle of when each foot leaves then touches the ground as well as divide the total weight of the robot by the amount of legs touching the ground at any given time. Factors like these should be considered if you don't want the robot to fall over.
# WikiRobotics/Programming Concepts
## Programming Crash Course

One of the biggest blessing/curses of computer programming is that it’s so complicated, with so many concepts to apply to it. It’s a curse only that it could be hard to understand for even a novice at programming. But it is a blessing that more different approaches mean more possibilities.
First to understand is the algorithm, which is basically a set of phases in programming to arrive at a certain solution. There’s also the Function which like the algorithm is meant to carry out specific tasks. It also can helps make a program that much simpler to make when it comes to its source code. The source code is the set of instructions the computer understands to run a program. It’s a unique language in that out of context makes no sense to any human being; it serves to be comprehended solely by the computer. It comprehends it by putting it in a compiler, which converts the source code the computer can use to turn into a program.
Data types is how you classify the bits on information in each program, from integers to single characters. Variables work as containers that hold a certain value in a program that can be change, except when it comes to constants in which the value never changes. Another type of variable is the array, which instead of one value contains a list of values.
There can be sets of code in a program that only activate when a certain condition is met. The conditional only executes once when conditions are met, but the loops execute more than once, though not necessarily infinity.
There’s also class, something used in object-oriented programming in that it’s a template for real-world objects.
# WikiRobotics/Robot Hardware
## Hardware

The type of hardware needed to build a robot is quite diverse. It really depends on what kind of robot you're trying to build. (How heavy is it, what does it need to do, the material that would be best suited, the quantity needed, etc.) While many different types of metal are common material for the parts, it's not always the best choice for certain functions, given it could be too heavy or too expensive, so in some cases, plastic or rubber are used, the latter especially if it's supposed to have wheels. Whatever the case, it has to be sturdy in built, not just in the part alone, but how it fits with the others in order for it to work properly.
Gears are considered by many to be the symbol of not only robotics, but machinery and technology in general, and for good reason. It symbolizes how doing one thing leads to other events happening, while the first action continues. Not only are gears common in robotics, there are different variations of it that can be used. Of course, if you're going to talk about gears, you might as well include chains, pulleys, and belts because not only can they prove just as important, but also in conjunction in gears as a driving mechanism. But when it comes to the power source, what powers the driving mechanism, a power supply is needed for that. Once again, it depends on several factors, (how big is the robot and how hard is it going to need to work) so a proper source could range form a few batteries to being plugged into an outlet at all times.

## Interface

And finally, there's the interface, or the point where human interaction decide what the robot does next. It could be a set of buttons or a connected wire to a computer that holds the program to run the robot, it's a part in the robot's design that hopefully, over time plays a smaller part in how it operates.
# WikiRobotics/The Future of Robotics
## Robotics and Popular culture

Popular conception, when it comes to robots, is frequently rooted in science fiction stories taking place in the future. We often start from this sort of story-like concept of where we are possibly going, because it is the most familiar frame of reference for those who know little of robotics to begin with. There are some who predict we will serve roles more similar to those in science fiction at some point, perhaps even within the next ten to twenty years. However, the advancement of robotics over the past century can be considered a little underwhelming; most major advances in technology have been more software-based than hardware. This is not entirely a bad thing, since better software means more possible things to program a robot to do.

## Methods

There are two ways to consider the future (of anything). In the first, we can look at a few years down the road and make an educated guess as to what robotics companies are working on now would result in. Secondly, we can consider what it will be like in the longer term, multiple decades later, where things become more fantastic and the technology is more sophisticated overall. In either of these frames of reference, we can consider what purposes tomorrows robots will serve, as well as who is building them.

### Near Future

Most robots being used today and in the near future are usually centered on menial labor or military usage, though these are hardly the only uses. While robots exist that can be able to perform surgery, it is not routine yet; in 10 years it may be. Robots to perform household tasks are roughly 20 years away. Whenever a “new” technology is created, the first to use it are frequently the military. Although there currently aren’t any autonomous robots at the military's disposal, which could change twenty years down the road.

### Long Term

When it comes to who, that question is not just restricted to companies, but countries as well. (Japan, America, South Korea, etc.) While most of the world could expect the types of robots mentioned above in twenty years, there are Japanese companies that plan to make such advancements and more in ten years. One such advancement involves nanorobots. There is the hope of perfecting them to the point where placing these in the bloodstream could make them slow down, and perhaps even stop aging, among other health benefits. South Korea plans to have a robot in every household as soon as they can.
It would be unwise to expect many big steps forward in this field within the next five years. We’re still a quarter of a century away at least from having things like the flying car or the android. Before then, we’ll have to make do with robots that entertain or work for us rather than those that can fly us around. However, given it’ll take less than fifty years for such growth to happen, I’m sure some of us could wait.
# WikiRobotics
## Chapters

* The Future of Robotics
* Mathematics of Robot Control
* Programming Concepts
* Robot Control
* Robot Hardware
* DIY Libre-hardware Robot

## See also

* Open Source Robotics Foundation
* How to Build a Robot at Home
# WikiRobotics/Robot Control
## Making Decisions

One of the main differences between man and machine when it comes to how we operate is that when we make a mistake, we try to learn from it so it doesn’t happen again. With a machine, if something goes wrong, it could continue to make it; not because it’s dumb (at least not our definition of it), but because it could lack the programming of what to do in the face of it. Even if it recognizes something is wrong, there’s nothing it can do to fix it short of breaking down. Even if you built the robot perfectly with no huge design flaws and with a source of energy that’s reliable and ready, there’s still the possibility of it not working properly. That’s not to say a gear getting jammed or a wire getting disconnected could be a problem, but they can be solved with minimal difficulty, at least compared to programming issues. Programming a robot to respond in the face of whatever could go wrong is quite difficult.

## Obstacle handling

There are four approaches a robot could take to an obstacle; thinking followed by acting, reacting, thinking and acting simultaneously, and behavior-based acting. There are upsides and downsides to all these approaches; thinking too long can lead the robot having an accident, thinking in itself requires the robot to have accurate information on the world around it, etc. These approaches can be hard to distinguish when not looked at carefully, adding to the challenge. There are many factors like these to consider when programming a robot to interact with its environment.
# World Stamp Catalogue/I.R.O.

Definitives - Swiss Stamps of 1941 and 1949 Overprinted "Organisation internationale pour les réfugiés" in Black
| Date Issued | Denom. | Paper. | Color | Perf. | Cat. No. Mi/Sc/Gi | No. Issued | Designer/ Engraver |
| 1950-02-01 | 5 cents | | Orange | 11 3/4 | MI 1 Sc 6O1 SG LR 1 | 24,000 | Engraved |
| 1950-02-01 | 10 cents | | Yellow Green | 11 3/4 | MI 2 Sc 6O2 SG LR 2 | 24,000 | Engraved |
| 1950-02-01 | 20 cents | | Brown Carmine | 11 3/4 | MI 3 Sc 6O3 SG LR 3 | 25,000 | Engraved |
| 1950-02-01 | 25 cents | | Red | 11 3/4 | MI 4 Sc 6O4 SG LR 4 | 24,000 | Engraved |
| 1950-02-01 | 40 cents | | Blue | 11 3/4 | MI 5 Sc 6O5 SG LR 5 | 26,000 | Engraved |
| 1950-02-01 | 80 cents | Granite | Black on Grey | 11 3/4 | MI 6 Sc 6O6 SG LR 6 | 25,000 | Engraved |
| 1950-02-01 | 1 Franc | Granite | Dark Green on Green | 11 3/4 | MI 7 Sc 6O7 SG LR 7 | 28,000 | Engraved |
| 1950-02-01 | 2 Francs | Granite | Red on Pink | 11 3/4 | MI 8 Sc 6O8 SG LR 8 | 29,000 | Engraved |
# World Stamp Catalogue/Hong Kong
## Postage Stamps by Year

| 1800-1899 | 1900-1999 | 2000 onwards |
| N/A | 1900-1909 | 2000-2009 |
| N/A | 1910-1919 | 2010-2019 |
| N/A | 1920-1929 | N/A |
| N/A | 1930-1939 | N/A |
| N/A | 1940-1949 | N/A |
| N/A | 1950-1959 | N/A |
| 1860-1869 | 1960-1969 | N/A |
| 1870-1879 | 1970-1979 | N/A |
| 1880-1889 | 1980-1989 | N/A |
| 1890-1899 | 1990-1999 | N/A |
Note: Please note that the above information is based on the 2015 edition of Yang's Postage Stamp & Postal History Catalogue of Hong Kong.
# World Stamp Catalogue/Ireland
## Ireland

* Postage stamps of Ireland
* Definitive postage stamps of Ireland
* 1935 Irish 2d coil stamp
# World Stamp Catalogue/Italy
## Italy

* Postage stamps and postal history of Italy
| Date Issued | Denom. | Color | Perf. | Subject | Cat. No. Mi/Sc/Gi | No. Issued | Designer/ Engraver |
| 1863 | 5 c. | | | | | | |
| 10 april 1867 | 20 c. | blue | 14 | Victor Emmanuel II of Italy | 26/20A/35 | 522,501,000 | Lodovico Bigola |
| 1877 | 20 c. | | | | | | |
| 1879 | 25 c. | | | | | | |
# World Stamp Catalogue/K
### K

* Karelia
* Kazakhstan
* Kenya
* Korea
* Kuwait
* Kyrgyzstan
# World Stamp Catalogue/Hong Kong/1860-1869

Definitive Stamp
1862 Queen Victoria 1st Issue
Watermark: Unwatermarked
Perforation: 14
Printer: De La Rue & Co.
1863 Queen Victoria 2nd Issue
Watermark: Crown CC
Perforation: 14
Printer: De La Rue & Co.
# World Stamp Catalogue/I
### I

* Iceland
* India
* Indian Convention States
* Indian Native States
* Indian Overseas Forces
* Indo-China
* Indo-Chinese Post in China
* Indonesia
* Inini
* International Organisations
* Ionian Islands
* Iran
* Iraq
* Ireland
* Isle of Man
* Isö (bogus issues/cinderellas)
* Israel
* Italian Aegean Islands
* Italian Colonies
* Italian East Africa
* Italian Post Abroad
* Italian State, Lombardy Venetia
* Italian State, Modena
* Italian State, Naples
* Italian State, Neopolitan Province
* Italian State, Papal State
* Italian State, Parma
* Italian State, Romagna
* Italian State, Roman State
* Italian State, Sardinia
* Italian State, Sicily
* Italian State, Tuscany
* Italian States
* Italy
* Ivory Coast
# World Stamp Catalogue/I.O.C.

Summer Olympic Games Sydney
| Date Issued | Denom. | Color | Perf. | Type Die/Wmk | Subject | Cat. No. Mi/Sc/Gi | Designer/ Engraver | notes |
| 2000-09-15 | 20 cents | Yellow | Imperf. | REG | Sydney Olympic Games | MI 1 SG LW 1 | Designer: Border: Beat Leuenberger Stamp: Jean-Michel Folon Rotogravure Printer: The House of Questa, London | Hand holding flowers with Olympic rings |
| 2000-09-15 | 70 cents | Green | Imperf. | REG | Sydney Olympic Games | MI 2 SG LW 2 | Designer: Border: Beat Leuenberger Stamp: Jean-Michel Folon Rotogravure Printer: The House of Questa, London | Hand holding flowers with Olympic rings |
| 2000-09-15 | 90 cents | Multi | | BOOKLET | Sydney Olympic Games | MI 1/2 | Rotogravure Printer: The House of Questa, London | Musee Olympique booklet |
Summer Olympic Games Athens
| Date Issued | Denom. | Paper. | Color | Perf. | Type Die/Wmk | Subject | Cat. No. Mi/Sc/Gi | Design | No. Issued | Designer/ Engraver | notes |
| 2004-05-06 | 100 cents | 102 gm2 white stamp paper with optical brightener | Multi. | 13¼ x 13½ | REG | Athens Olympic Games | MI 3 SG LW 3 | | | Designer: Karin Fanger-Schiesser Offset Printer: Cartor Security Printing, France | Marathon runner |
International Year of Sport 2005
| Date Issued | Denom. | Paper. | Color | Perf. | Type Die/Wmk | Subject | Cat. No. Mi/Sc/Gi | Design | No. Issued | Designer/ Engraver | notes |
| 2004-11-23 | 180 cents | 110 gm2 white stamp paper with optical brightener | Multi. | 13¼ x 13½ | REG | International Year of Sport | MI 4 | | 216,000 | Designer: Roland Hirter Offset Printer: Cartor Security Printing, France | This stamp was also valid in Switzerland (MI 1895) and United Nations (Geneva)(MI507) |
Winter Olympic Games Turin
| Date Issued | Denom. | Paper. | Color | Perf. | Type Die/Wmk | Subject | Cat. No. Mi/Sc/Gi | Design | No. Issued | Designer/ Engraver | notes |
| 2005-11-22 | 130 cents | | Multi. | 13 1/2 x 13 | REG | Turin Olympic Games | MI 5 SG LW 4 | | | Karin Schiesser | Ice Hockey |
| 2005-11-22 | 130 cents | | Multi. | 13 1/2 x 13 | Miniature Sheet | Turin Olympic Games | MI 5 | | | | Block of six |
Summer Olympic Games Beijing
| Date Issued | Denom. | Paper. | Color | Perf. | Type Die/Wmk | Subject | Cat. No. Mi/Sc/Gi | Design | No. Issued | Designer/ Engraver | notes |
| 2008-05-08 | 180 cents | | Brown | | REG | Beijing Olympic Games | MI 6 | | | Silvio Galbucci | Cyclist |
# World Stamp Catalogue/J
### J

* Jamaica
* Japan
* Japanese Post Abroad
* Jersey
* Jordan
# XQuery/Delivery Status Report

A common task is the need to integrate local data with related data on another site. Although an increasing number of sites provide an RSS feed, it is often necessary to scrape web pages to get the relevant data.

## Delivery Status Reporting

One such case is where a company needs to monitor the status of their deliveries which use a courier service.
In this mock example, a company maintains their own records of all deliveries commissioned, the delivery service used and the service's consignment number.. As an XML file, this might look like;

## Integrated Report

The following script shows how the local delivery data can be combined with the data for this delivery obtained from the delivery company. In this case, the delivery company City-Line provides a page for each consignment reporting its status.
The script loops over the relevant deliveries and constructs the appropriate URL to read the page for each delivery. The page is input to an HTML-to-XML conversion (used in the Yahoo Weather feed), and then specific elements are retrieved from the HTML to build an extract in XML of the page. This XML data is then combined with the local data to create a combined report.
Show Report

## Notes

* In production, a simple script to extract and store the delivery data in the database could be scheduled to run every hour to reduce the demands on the sites used in this application.
* The script uses a generic function to convert any simple tabular XML to an HTML table.
* The mapping between HTML elements and XML depends on the stability of this page. The paths are simplified by the presence of ids for the relevant tables.
* A production system must be able to detect HTTP errors and act accordingly. This would require more control over the HTTP requests and responses. This facility is provided by the HTTP module in later releases of eXist. The simplistic approach taken here to obtain the XML would need to be replaced.
# XQuery/Digest Authentication
## Motivation

The API you are using uses digest authentication, for example the Talis platform There is no direct support for this in the eXist httpclient module, but one can be written in XQuery.
The following implementation is based on the description and examples in Digest Authentication.

## Modules and concepts

* eXist httpclient : for basic POST operation
* eXist util : for uuid generation and md5encoding

## XQuery Module

Two functions transform between a comma-delimited list of name="value" pairs and an XML representation:
The first function takes strings in the following format: string="value",string1="value2",string3="value3"
Note that the replace function removes all double quotes from the right side of each expression.

## Supporting Functions

The following two functions convert key-value encoded strings of this form:
into XML structures of the form:
Here are the supporting functions:

## Post With Digest Function

The main function handles a POST operation in two steps. The first POST will get a 401 response (should check this). The Digest is constructed and sent back with the second POST.
Note that on under eXist 1.4 the util:md5($string) function has been deprecated. You should now use util:hash($string, 'md5) function with the second parameter now the type of hash.

## Example

In this example, an RDF file is POSTed to the Talis server.

## References

* http://en.wikipedia.org/wiki/Digest_access_authentication Wikipedia Page on Digest Authentication
* https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc780170(v=ws.10) Microsoft Technet Article
# XQuery/Displaying data in HTML Tables
## Motivation

You would like to display your XML data in an HTML tables and display alternate rows using a colored background.

## Data File

Assume you have a data file such as the following XML file which is a sample glossary of terms and definitions:

### terms.xml

The <term> tags will repeat for each term in your glossary.
You would like to display these terms in an HTML table.

## Screen Image

The following XQuery will perform the task.

## Discussion
### Sorting before counting

There are two nested for loops. The outer loop has the additional at count parameter that increments a counter for each result returned. The inner loop has the loop that returns a generic sorted item to the outer loop. Note that the inner loop does the sorting first and the outer loop does the counting of each item so that alternate rows are shaded.
Note that if you know the original file is in the correct order the nested for loops are not necessary. A single for loop with the at $count is all that is needed.

### Dynamic Element Construction

The following lines:
conditionally creates a light blue background color for odds rows, rows which evaluate true because modulus 2 of their $count is not zero. This is an example of dynamic element construction.
Odd rows:
Even rows:
It does this by conditionally adding an attribute bgcolor="Lavender" for odd rows in the table. If the test ($count mod 2) is zero, i.e. on even rows, an attribute will not be added.
It is recommended best practice that the style of shading alternate rows of a table be done in a central cascading style sheet. The most general way to keep the table formats standard throughout your site would be to add semantic class tags to each row to label them even or odd.
The CSS file would then contain the following:
# XQuery/DocBook to PDF
## Motivation

You want to convert your DocBook 5 files to PDF format. PDF standardized page-layout format that allows you to to print books using standards.

## Method

We will create an XQuery module with one main TypeSwitch statement for each of the main elements of DocBook. This will create an XSL-FO file that can then be converted directly to PDF using the Apache-FO 1.0 processor.
This will be done entirely using XQuery. No XSLT will be required.

## Sample Input Document

We will start with a simple DocBook 5 document. This document used the DocBook namespace and includes the xlink namespace. A very small sample of the document might have the following structure:
# XQuery/Dates and Time
## Motivation

You want a quick reference page of sample functions that work with dates and times.

## Method

We will provide a sample list of XQuery expressions and their results.

### Current Date

This function returns the current date on the system that is executing the XQuery in W3C XML Schema date format:
Result:
Note that the "-05:00" is the offset from GMT of the server.

### Current Time

Result:

### Current Date and Time

Result
Note that default the letter 'T" separates the date and the time. The results after the decimal point are the number of milliseconds.

### One Week Ago

Result:
# XQuery/Displaying Lists
## Motivation

You have a list of items in an XML structure and you want to display a comma separated list of the values in an output string.

## Method

XQuery provides the "string-join" function that will take a sequence of items and a separator string and create and output string with the separator between each of the items. The format of the function is: string-join(nodeset, separator) where nodeset is a list of nodes and separator the string that you would like to separate the values with.

## Output
# Create a CSV file from XML

We will use two "string-join" functions, one for all rows and one for each row. We will create one large string and then use the "response:stream" function to return the results.
Which returns:

# Discussion

The "string-join" function takes two arguments, the first is the sequence of strings to be joined and the second is the separator.