OpenLLM-France/wikimedia huggingface dataset:
# Trigonometry/Worked Example: Area of a Roof

* Area of a Roof
* Note: the image below is a temporary reference image. If the author of this problem wants to finish the problem, the triangle below can be replaced with the correct reference image.
* An engineer is planning to make an roof with a $\displaystyle 30$ m frame base. The angle of the slope of the roof to the base is $\displaystyle \theta$. The sloped sides are congruent. Use the information to answer items (a)-(b).
* (a) Find the area of the roof.
* (b) If the area of each square tile is $\displaystyle 1{\text{ m}}^{2}$, find the number of tiles and right triangle tiles necessary to fully cover the roof.
* The idea of this worked example is to measure the area of a roof, as seen in plan, and then divide by $\displaystyle \cos \theta$, where $\displaystyle \theta$ is the angle of slope of the roof, to get the area of tiles needed. And then the quantity of tiles. Intention is to use a real roof's plan, where all the slopes are the same.
| previous module: "Solving Triangles Given SAS" | • Table of Contents | next module: "Worked Example: Oil Tanker Arriving in Port" |
# Trigonometry/Worked Example: Ferris Wheel Problem
## The Problem
### Exam Question

"Jacob and Emily ride a Ferris wheel at a carnival in Vienna. The wheel has a ${\mathit {16}}\,$ meter diameter, and turns at three revolutions per minute, with its lowest point one meter above the ground. Assume that Jacob and Emily's height $h$ above the ground is a sinusoidal function of time $t$, where ${\mathit {t=0\,}}$ represents the lowest point on the wheel and $t$ is measured in seconds."
"Write the equation for $h$ in terms of $t$."
[For those interested, the picture is actually of a Ferris wheel in Vienna.]
-Lang Gang 2016

### Video Links

The Khan Academy has video material that walks through this problem, which you may find easier to follow:
* Ferris Wheel Trig Problem
* Ferris Wheel Trig Problem (part 2)

## Solution

* Diameter to Radius
* A $16{\text{ m}}$ diameter circle has a radius of $8{\text{ m}}$.
* Revolutions per Minute to Degrees per Second
* A wheel turning at three revolutions per minute is turning
* $\displaystyle {\frac {3\times 360^{\circ }}{60}}$
* per second. Simplifying that's
* $\displaystyle 18^{\circ }$
* per second.
* Formula for height
* At $t=0$ our height $h$ is $1$. At $t=10$, we will have turned through $180^{\circ }=10\times 18^{\circ }$, i.e. half a circle, and will be at the top most point of height $16+1=17$ (because the diameter of the circle is $16$ meters).
* A cosine function, i.e. $\displaystyle \cos \theta$, is $1$ at $\displaystyle \theta =0^{\circ }$ and $-1$ at $\displaystyle \theta =180^{\circ }$. That's almost exactly opposite to what we want as we want the most negative value at $0$ and the most positive at $180$. Ergo, let's use the negative cosine to start our function.
* At $t=10$ we want $\theta =180^{\circ }$, so we will multiply $t$ by $18$ so that we get $\displaystyle -\cos(18t)$. The formula we made is $-1$ at $t=0$ and $1$ at $t=10$. Multiply by $8$ and we get:
* $\displaystyle -8\cos(18t)$, which is $-8$ at $t=0$ and $8$ at $t=10$
* To get make sure reality is not messed up (we can't have negative height $h$), add $9$ and we get
* $\displaystyle 9-8\cos(18t)$, which is $1$ at $t=0$ and $17$ at $t=10$
* Our required formula is
* $\displaystyle h=9-8\cos(18t)$.
* with the understanding that cosine is of an angle in degrees (not radians).
# Trigonometry/Vectors and Dot Products

Consider the vectors U and V (with respective magnitudes |U| and |V|). If those vectors enclose an angle θ then the dot product of those vectors can be written as:
    $\mathbf {U} \cdot \mathbf {V} =|\mathbf {U} ||\mathbf {V} |\cos(\theta )$
If the vectors can be written as:
    $\mathbf {U} =(U_{x},U_{y},U_{z})$
    $\mathbf {V} =(V_{x},V_{y},V_{z})$
then the dot product is given by:
    $\mathbf {U} \cdot \mathbf {V} =U_{x}V_{x}+U_{y}V_{y}+U_{z}V_{z}$
For example,
    $(1,2,3)\cdot (2,2,2)=1(2)+2(2)+3(2)=12.$
and
    $(0,5,0)\cdot (4,0,0)=0.$
We can interpret the last case by noting that the product is zero because the angle between the two vectors is 90 degrees.
Since
    $|\mathbf {U} |={\sqrt {U_{x}^{2}+U_{y}^{2}+U_{z}^{2}}}$
and
    $|\mathbf {V} |={\sqrt {V_{x}^{2}+V_{y}^{2}+V_{z}^{2}}}$
this means that
    $\cos(\theta )={\frac {U_{x}V_{x}+U_{y}V_{y}+U_{z}V_{z}}{{\sqrt {U_{x}^{2}+U_{y}^{2}+U_{z}^{2}}}{\sqrt {V_{x}^{2}+V_{y}^{2}+V_{z}^{2}}}}}$
Next Page: Trigonometric Form of the Complex Number | Previous Page: Vectors in the Plane
Home: Trigonometry
# XML - Managing Data Exchange/The one-to-one relationship/Exercises

XML

# 4. The one-to-one relationship
## Exercises
### Exercise 1

* Create an XML schema to describe the most popular restaurant in a city. Use either the all order indicator or the choice order indicator in your schema. Check that it is well-formed and valid.
* Using the schema, create an XML document and populate it with data for one city that has a most popular restaurant as well as two or more other restaurants. Check that it is well-formed and valid.
* Write an XML style sheet to display the most popular restaurants sorted by name if the restaurant is located in a city with population > 5,000.

### Exercise 2

* Create and XML schema to represent the most popular professors at a university. Include first name, last name, and years teaching.
* Using the XML schema, create and XML document and populate it with data about a university and its most popular professor. Use at least three universities and two professors at each university.
* Write and XML style sheet to display the most popular professors at each school sorted by the professor names.
# XML - Managing Data Exchange/WDDX

* Chapters
* Appendices
* Exercises
* Computer Science Home
* Library and Information Science Home
* Markup Languages
* To do list
* Contributors list
* Contributing to Wikibooks
| Previous Chapter | Next Chapter |
| ← XBRL | RPC → |

## Learning objectives

Upon completion of this chapter, you will be able to answer the following questions:
* What is WDDX?
* What are the uses of WDDX?
* What are Web Syndicate Networks?
* What are the benefits of WDDX?

## Introduction

WDDX (Web Distributed Data eXchange) was created by Allaire, now known as Macromedia, to solve the problem of exchanging data between different web applications. It was originally intended to be used to exchange data between ColdFusion and other web application languages. This XML-based technology enables complex data to be exchanged between totally different Web programming languages by creating 'Web Syndicate Networks.' WDDX consists of a language-independent representation of data based on an XML 1.0 DTD, and a set of modules for a wide variety of languages that use WDDX.

### Features

* can be used with HTTP, SMTP, POP, FTP and other Internet protocols that support transferring textual data
* must be using Netscape 3.0+ or Internet Explorer for Windows or any versions for Unix and Mac platforms
* supports boolean, number, date-time, and string data types
* supports complex data types like arrays, structures, and recordsets
* not a formal standard, but is free and widely distributed and is based on standard-base technologies like XML 1.0

## How it Works

The way that the web distributed data exchange works is by assigning a specific module for the given programming language to translate the data into an abstract XML format. Another specific module then translates the XML back into another programming language for another web application. For example, if you had an array in a ColdFusion program that you wanted to send to an ASP program, it would first be serialized into XML and sent to the ASP server. The ASP server would then deserialize it and convert it to VBScript for use in the ASP program.

## Web Syndicate Networks

The term 'Web Syndicate Network' refers to a group of websites that share their content and transactions. This allows for economies of scale as each site can use shared database content or even transactions and procedures.

## References

OpenWDDX - http://www.openwddx.org WDDX Functions for PHP - http://www.php.net/wddx WDDX FAQ by Macromedia - http://www.macromedia.com/v1/handlers/index.cfm?id=5622&method=full
# XML - Managing Data Exchange/Web Services/Appendix
## Appendix

A .NET Perspective
Now we will create a simple .NET web service using C# and ASP.NET. This web service will provide two methods for it's clients. One will be an adding service and the other will be a subtracting service. Both methods are marked with the [WebMethod] attribute in the following code snippet.
When executing the web service in a debug mode using Visual Studio 2005, we will get the following screen. Note the two methods available for this web service.
Exhibit 1: .Net
If we click on the add link, we will get the following page.
Exhibit 2: .Net
On this page, we will use the add method and enter our parameters for our web service call. For this example, we will enter 10 as the first number and 5 as the second number. After entering numbers and pressing the invoke button, the client will receive the following XML stream containing the sum value of 15.
Technologies Used
* Visual Studio 2005 Beta 2
* .NET Framework 2.0
* ASP.NET 2.0
The example provided is very simple and does not come close to demonstrating the power of .NET Web Services. For more information on implementing .NET Web Services, please visit http://msdn.microsoft.com/webservices/.
# A Neutral Look at Operating Systems/OS slash 2

| A Neutral Look at Operating Systems | Edit template |
Unix (BSD, Linux) | CP/M | DOS | Microsoft Windows | OS/2 | Mac OS
OS/2 is an operating system from IBM and Microsoft, that was intended as the successor to MS-DOS and Microsoft Windows.

## OS/2 1.0

The first version of OS/2 uses a command line interface similar to that of MS-DOS. Unlike MS-DOS, it uses a protected mode kernel and dynamic linking and supports multitasking of native OS/2 applications, which use the same "New Executable" as 16-bit Windows applications, although the two APIs are incompatible. It also can run a single MS-DOS application at a time. This involves forcing the processor back into real mode.

## OS/2 1.1, OS/2 1.2, OS/2 1.3

OS/2 1.1 added the Presentation Manager, a graphical user interface visually similar to Windows 2.0. Presentation Manager also expanded the OS/2 API.
OS/2 1.2 added the High Performance File System (HPFS), which allows filenames up to 255 characters and eliminated several other filename restrictions of the older File Allocation Table (FAT) file system. OS/2 1.2 also updated the appearance of Presentation Manager, creating the visual style more commonly associated with the later, more popular Windows 3.0. OS/2 1.3 is a bug-fix release.
# A Neutral Look at Operating Systems/Control Program for Microcomputers

| A Neutral Look at Operating Systems | Edit template |
Unix (BSD, Linux) | CP/M | DOS | Microsoft Windows | OS/2 | Mac OS
An old operating system created during the late 1970s. CP/M or Control Program for Microcomputers ran on 8 bit microprocessors such as the Intel 8080 or Zilog Z80. Typically these had 4 to 64 kilobytes of RAM and speeds of up to 10 MHz. It was rare for a disk from one CP/M computer to be properly read by a computer from a different company, but was still considered a kind of loose "standard". It faded from popular use by 1985, overtaken by MS-DOS and the Mac OS.
# A Neutral Look at Operating Systems/Hurd

GNU Hurd is an operating system based on the GNU Hurd kernel. It is intended to supplement the GNU userspace utilities. Currently there are only a limited number of distributions that include it as the kernel, as it is not ready for production. It is built on top of a microkernel, GNU Mach, with daemons running on top of it.

## Distributions that include Hurd

There are versions of the Arch and Debian operating systems that use the Hurd kernel instead of the Linux kernel.
# A Neutral Look at Operating Systems/Unix

UNIX® is a registered trademark of The Open Group in the United States and other countries.
Linux is the leading UNIX clone.
# 99 Elm Problems/Problem 18/Solutions

Solution 1: Pointfree version, using List.drop and List.take
# 99 Elm Problems/Problem 2/Solutions

Solution 1: Recursive search for the next to last element
Solution 2: Functional composition
# 99 Elm Problems/Problem 19

Rotate a list N places to the left.
Result:
Solutions
# 99 Elm Problems/Problem 20

Remove the N'th element from a list.
Result:
Solutions
# 99 Elm Problems/Problem 20/Solutions

Solution 1: Using List.take and List.drop
# 99 Elm Problems/Problem 17/Solutions

Solution 1: Using List.take and List.drop
# 99 Elm Problems/Problem 19/Solutions

Solution 1: Using List.drop and List.take
# 99 Elm Problems/Problem 2

Problem 2: Implement the function penultimate to find the next to last element of a list.
Result:
Solutions
# 99 Elm Problems/Problem 18

Extract a sublist from a list, starting and ending at specified indices (inclusive). Start counting the elements with 1.
Result:
Solutions
# 99 Elm Problems/Problem 21

Insert an element at a given position into a list.
Result:
Solutions
# Ada Programming/Types/mod
## Description

Unsigned integers in Ada have a value range from 0 to some positive number (not necessarily 1 subtracted from some power of 2). They are defined using the mod keyword because they implement a wrap-around arithmetic.
where 'First is 0 and 'Last is Modulus - 1.
Wrap-around arithmetic means that 'Last + 1 = 0 = 'First, and 'First - 1 = 'Last. Additionally to the normal arithmetic operators, bitwise and, or and xor are defined for the type (see below).
The predefined package Interfaces (RM B.2) presents unsigned integers based on powers of 2
for which also shift and rotate operations are defined. The values of n depend on compiler and target architecture.
You can use range to sub-range a modular type:
But beware: the Modulus of Half_Byte is still 256! Arithmetic with such a type is interesting to say the least.

## Bitwise Operations

Be very careful with bitwise operators and, or, xor, not, when the modulus is not a power of two. An example might exemplify the problem.
The other operators work similarly.
Now take a modulus that is not a power of two. Naive expectations about the results may lead out of the value range. As an example take again the not operator (see the RM for the others):
The definition of not is therefore:

## See also
### Wikibook

* Ada Programming
* Ada Programming/Types
* Ada Programming/Keywords/mod

### Ada Reference Manual

* 4.4: Expressions
* 3.5.4: Integer Types
# Ada Programming/Types/digits
## Description

To define a floating point type, you only have to say how many digits are needed, i.e. you define the relative precision:
If you like, you can declare the minimum range needed as well:
This facility is a great benefit of Ada over (most) other programming languages. In other languages, you just choose between "float" and "long float", and what most people do is:
* choose float if they don't care about accuracy
* otherwise, choose long float, because it is the best you can get
In either case, you don't know what accuracy you get.
In Ada, you specify the accuracy you need, and the compiler will choose an appropriate floating point type with at least the accuracy you asked for. This way, your requirement is guaranteed. Moreover, if the computer has more than two floating point types available, the compiler can make use of all of them.

## See also
### Wikibook

* Ada Programming
* Ada Programming/Types
* Ada Programming/Types/range
* Ada Programming/Types/delta
* Ada Programming/Types/mod
* Ada Programming/Keywords/digits

### Ada Reference Manual

* 3.5.7 Floating Point Types (Annotated)
# Ada Programming/Types/range

A range is a signed integer value which ranges from a First to a last Last. It is defined as
When a value is assigned to an object with such a range constraint, the value is checked for validity and Constraint_Error exception is raised when the value is not within First to Last.
When declaring a range type, the corresponding mathematical operators are implicitly declared by the language at the same place.
The compiler is free to choose a suitable underlaying hardware type for this user defined type.

## Working example

The following example defines a new range from -5 to 10 and then prints the whole range out.

## See also
### Wikibook

* Ada Programming
* Ada Programming/Types
* Ada Programming/Keywords/range

### Ada Reference Manual

* 4.4 Expressions (Annotated)
* 3.5.4 Integer Types (Annotated)
# Ada Programming/Web 2.0

Here is a list of Web 2.0 resources about Ada:

## News & Blogs

* reddit.com — Ada [RSS], social news website on which users can post links to content on the web.
* Stack Overflow — Ada questions
* Ada Gems, programming tips and articles about specific language features.
* Ada Planet, news aggregator.
* Ada Programming blog [RSS], by Martin Krischik and other authors.
* Java 2 Ada [RSS]

## Social Networks

* @AdaProgrammers at Twitter
* Linked In — Ada developers group (free register needed)
* Gitter chat room

## General Info

* Ada Resource Association
* Awesome Ada, a curated list of awesome resources related to the Ada and SPARK programming language.
* SlideShare, presentations about Ada programming, Ada 95, Ada 2005, Ada 2012 tag pages.
* Open Hub, a directory of Open Source projects. Its main features are source code analysis of public repositories and public reviews of projects
* Ada@Krischik, Ada homepage of Martin Krischik
* WikiCFP — Calls For Papers on Ada [RSS]
* AdaCore channel on youtube.com, Ada related videos.

## Wikimedia projects

* Wikipedia articles (Ada category):
** Ada
** Jean Ichbiah
** Beaujolais effect
** ISO 8652
** Ada Semantic Interface Specification
* Wiktionary entries:
** ACATS
** Ada
** ASIS
* Wikisource documents:
** Steelman language requirements
** Stoneman requirements
* Wikibooks tutorials:
** Programación en Ada, in Spanish
** Programmation Ada, in French
** Ada, in Italian
* Wikiquote:
** Programming languages — Ada
* Wikiversity:
** Ada course

## Source code

* Examples Ada Programming wikibook
* Rosetta Code — Ada Category, programming examples in multiple languages

## Projects

* AdaCL
* The Ada 95 Booch Components
* The GNU Ada Compiler
* ASIS
* GLADE
* Florist
* GNAT — GCC Wiki
* RTEMSAda
* AVR-Ada - Ada compiler for Atmel microcontrollers (Arduinos)
* Ada Bare Bones - Tutorial to write a small Multiboot kernel written in Ada
# Advanced Structural Analysis/Part I - Theory/Materials/Properties/Ductility

A material's capacity to endure plastic deformation without breaking is called ductility. Mild steel, copper and gold are all examples of ductile materials.
The picture to the left displays a test specimen which has undergone a ductile failure during tensile load.
# Advanced Structural Analysis/Part I - Theory/Loads

1.1. INTRODUCTION
The assessment of the loads that could be expected to act on a structure or elements of a structure is probably one of the significant aspects of structural design.
Two main loads
1. Permanent loads 2. Imposed loads
Imposed loads could be one of the following:
-Floor and roof -Wind -Cranes -Thermal -Geotechnical
Load calculations are usually the first to be determined in the actual design procedure for elements and the significance of determining the load intensities accurately cannot be emphasised enough.
All loading and load calculations will be based on the code of practice for the *Basis of structural design and actions for buildings and industrial structures.
The basis of design is "LIMIT STATES" which requires the characteristics loads to be amplified by partial load factors which vary depending on the nature of the applied load.
1.1.1. LOADING PATTERN
1.1.1.1. Uniformly Distributed A uniformly distributed load(UDL) is that which is constant over ant given length or area of a structure. The units are kN/m^2 (applied to slab) or kN/m (applied to beam).
1.1.1.2. Point Load
A point load is that applied by some intense load over a small enough area for it to be considered as acting at a point. The unit is kN.
1.1.1.3. Triangular or Trapezoidal Loss
These loads are common to beams supporting a two-way spanning slab. The units will be kN/m but the intensity of the load will vary along the length of the beam. The load from the slab is assumed to disperse at 45° from corners of the slab if the two edges of the slab meeting at the corner have the same support condition. This results in the beams sharing the load from the slab.
# Advanced Structural Analysis/Part I - Theory/Materials

* Introduction
* Properties
* Materials Science
* Typical Engineering Materials

# Introduction

The physical nature of engineering materials can be described by a set of measurable properties. This chapter defines these measures and discusses their implications in a broad sense. It also covers Material Science, i.e. the science of producing materials with intended properties, and outlines different types of engineering materials and their characteristic qualities. Later in the book, some of these matters will be further investigated by the powerful theories of Continuum Mechanics, FEM etc., which will bring a much more potent and general understanding of solid materials.
# Advanced Structural Analysis/Part I - Theory/General Properties of Materials/Typical Engineering Materials/Metals

* Introduction
* Ferrous Metals
* Non-ferrous Metals
# Tensile Testing

Young's modulus can be measured by tensile testing of specimens such as the one in the picture below.
Equation (1) gives
Although, the procedure may seem perfectly straight forward at a glimpse, there are certain things that should be noted.
# Advanced Structural Analysis/Part I - Theory/Materials/Properties

* Introduction
* Elasticity
* Plasticity
* Ductility
* Hardness
* Resilience

# Introduction

This section covers both qualitative and quantifiable physical properties of solids.
A viable knowledge of mechanical engineering rests on a basic understanding of engineering materials; and the behavior of such materials is the empirical foundation upon which the entire science of solid mechanics is built. Although this is the very beginning, a basin of information is presented that facilitate powerful and sophisticated reasoning by even the simplest means.
# Advanced Structural Analysis/Part I - Theory/Materials/Properties/Elasticity

* Introduction
* Tensile Testing
* Broad Implications
* Additional Aspects

# Introduction

All solid materials display an approximately linear response to moderate loads. This is manifested in Hooke's law:
Where: $\sigma =$ the normal stress $E=$ the elastic modulus (Young's modulus) $\epsilon =$ the normal tension
The figure below illustrates the stress-strain curve of some material. Hooke's law is valid in the linear interval marked "Elastic region". The term elastic, as in elastic deformation, refers to the absence of energy dissipation and permanent deformation. Elastic deformations retract upon unloading.
# AppleScript Programming/3rd Party Codes/Growl

Growl is a application that displays notifications in the corner of your screen. This information will show you about how to make your own Growl notifications to go along with your script.
# AppleScript Programming/Advanced Code List/Hide Application

Sometimes, your script will need to do something that doesn't have an AppleEvent defined to accomplish the task. In this case, you may be able to script the task anyway by going through the graphical user-interface (GUI), using a technique called GUI Scripting.
For example, to hide frontmost application, you can do the follwing:
Then, to hide all background programs:
But when you want to hide a specific application that is at background, it gets more tricky:
Safari is just an example here.
I use iKey to run this script once Adium is deactivated:
Shortly explained, it hides Adium if there is only one window (like, buddy-list) open.