text:
User:Asapallsop/sandbox

This WikiBooks page is a critical analysis and appraisal of the journal article "The contribution of office work to sedentary behaviour associated risk" by Parry and Straker (2013)

What is the background to this research?
Sedentary behaviour is a continual concern for our society due to it being heavily related to causing poor health and chronic diseases that could lead to mortality. This is majorly due to the new age where technology has started to overtake our everyday lives, causing an increase in sedentary time which can include sitting and screen-time in an office. Recent studies have found that office workers spend a staggering amount of their time at work sedentary, which is a major concern with such a large population, especially in Australia working in office jobs.

There is a lot of data based upon sedentary behaviours relating to occupations, but there was no knowledge of the contribution that sedentary occupations had towards the overall sedentary exposure of an individual. Therefore, the aim of this study is very important in our current technology-based society that could potentially be at a higher risk of poor health. This study assessed office workers by wearing an accelerometer during the day over the space of a week and recorded daily activities in a diary to determine the relationship between work and non-work activity rates.

Where is the research from?
Parry and Straker conducted their study on office workers from a large resource company in Perth, Australia via the United Kingdom (UK)-based open access publisher BioMed Central. This publisher shares peer-reviewed articles based on many topics such as science and medicine and claims to be the largest open-access science publisher in the world.

Parry and Straker have both researched the sedentary behaviours and worked as physiotherapists in Australia and the UK for many years, but now both currently work at Curtin University in Perth. Straker has a worldwide reputation for his research and is recognised as a leader in physiotherapy in Australia.

What kind of research was this?
This study was classified as an observational study due to having a group of office workers participating in the same method throughout the course of the procedure.There were no random selections for the study, the office workers chosen to participate were recruited via a criterion based upon their working frequency and hours and were asked to then volunteer.The data gathered from the research was done via an accelerometer which was then analysed by using paired t-tests and Pearson’s correlations to see the relationship between work and non-work activity. Due to this being the study’s aim this study design is deemed appropriate.

What did the research involve?
A strict recruiting protocol was taken in place for the office workers with 176 completing a physical activity survey and only 51 subjects were able to volunteer to wear an Actical accelerometer for the seven day period during waking hours. The Actical accelerometers have been shown to a reliable source for physiological data gathering as well as providing valid measurements of low energy expenditure behaviours.

The data gathered from this study included measuring sedentary, light and moderate to vigorous time during work hours and non-work hours throughout an entire week via the accelerometer. Whilst activities that occurred without wearing the accelerometers were recorded in a simple diary, which could potentially be deemed as a very subjective source of information.

Data analysis from the accelerometers occurred via LabView program which was able to identify the intensity of exercise the subjects had. From this data, combined with the diary entries, the results between work and non-hours and work and non-work days were compared by using paired T-Tests, which were further analysed by using Pearson’s Correlation. These two methods are very simple but effective ways of comparing and correlating the data, providing clear and precise results.

What were the basic results?
There were multiple key findings from this well-executed study, one including that office workers spent 82% of their work hours on workdays sedentary, which is a staggering figure to consider when compared to 67% on non-work hours on works days. It was also found that sustained sedentary time above 30 minutes for work hours on workdays (40.8 ± 16.6) was nearly double non-work hours on workdays (22.8 ± 10.9). Another result shown in Table 1 is that light activity bouts between 5-10 minutes showed a massive difference between work hours on works days (2.6 ± 1.7) and non-work hours on works days (6.5 ± 3.4).

Another staggering result was that proportionally, 78% of the subjects had a larger accumulation of sedentary time on workdays in comparison to non-work days. There was a very similar result with 84% of participants also have less light activity on work-days.

Based on the clear results gathered the researchers found and interpreted that working in an office had a massive contribution towards the overall accumulation of sedentary time as well as sustained sedentary time. Although, these results could somewhat be an over-emphasis due to the fact that office work often tends to involve sitting at a desk working on paperwork or devices which does not require much or any physiological demands.

What conclusions can we take from this research?
This observational study provides very important information regarding the staggering amount of time that office workers spend sedentary during their waking hours. It also highlights the importance of needing to interrupt sedentary periods as well as including some form of exercise into their days. With office work having such low physiological demand, it can be quite difficult to incorporate physical activity into a day, but as stated before, the risks associated with prolonged sedentary behaviour can result in chronic disease and premature mortality.

This study also matches the results and conclusions from other sedentary office work studies having a very similar accumulation of sedentary time during work hours as well as sitting time. The conclusions from these studies also show how damaging prolonged sedentary periods can be on the body.

Practical advice
If office workers were to implement an exercise intervention into their days, it is highly necessary to be pre-screened by a health professional prior. Within an office environment, a health and wellbeing program should be taken into to place introducing education and actions, aiming to reduce the detrimental effects of sedentary behaviour.

Over the years there have been many strategies developed within offices to reduce prolonged sedentary time such as; sit and stand work desks, active emails, walking meetings and step challenges within a working cohort. By applying these ideas into working days, the chances of increasing light-moderate exercise time and reducing sedentary time are increased.

These strategies may be helpful, but the company also needs to consider whether they are appropriate for the variety and type of office work as well as considering whether the practical interventions will interfere with work productivity. Ultimately, comes down to the motivation of the individual to participate in trying to reduce sedentary behaviours and incorporate exercise into their everyday lives.

Further information/resources
Prolonged sedentary time combined with physical activity

Sitting pattern at work

Sitting time and mortality from chronic disease

What is sedentary behaviour?

Is standing at work the solution?

Workplace interventions reducing sedentary time for office workers

title: User:Asapallsop/sandbox


text:
Brief History of Europe/Print version

 =Preface=

 = Chaper 1 Classical antiquity and the rise of Islam =

 =Part 1 Middle Ages=

 =Chapter 2 Early Middle Ages=

 =Chapter 3 High Middle Ages=

 =Chapter 4 Late Middle Ages=

 =Part 2 Modern period=

 =Chapter 5 Early modern period part 1=

 =Chapter 6 Early modern period part 2=

 =Chapter 7 Late modern period until 1914=

 =Chapter 8 Europe since 1914=

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Brief History of Europe/Print version


text:
Brief History of Europe/Main page

A Brief History of Europe is a free content online book published on English Wikibooks.

title: Brief History of Europe/Main page


text:
Transportation Geography and Network Science/Legibility

= Legibility (Network Perception) =

Legibility is a visual quality associated with readability, clarity and ease of recognition. While the formal definition of "legibility" is used in typography to describe how easy a reader may recognise individual characters in a text, it is also a desirable trait in urban design. In the Image of the City by Kevin Lynch, legibility is defined as "the ease with which its [the cityscape] parts can be recognized and can be organized into a coherent pattern". For transport networks, legibility is an important design aspect as it determines how the network is perceived by its users. Legibility influences the arrangement of a network on a map presentation or even the physical layout of some parts during the design phase.

Legibility, Imageability and Mental Maps
In the book the Image of the City, the cityscape is divided into five elements: paths, edges, districts, nodes and landmarks. They are essential components for people to construct their "mental maps" (network perception) of the city. Paths represent accessible transport network links; edges are the boundaries which separate different zones of activities; districts are areas/regions with different characteristics, usually related to the land use; nodes are intersections or interchanges which are part of the transport system; landmarks are well-known places often used for navigation or as reference points. In an urban planning context, legibility is reflected by how easily a person can remember these elements and navigate through the city based on the mental map. For a transport network, the paths and nodes are particularly important because space is allocated for transport purposes, but the other elements are also very critical in some contexts.

The visual quality of legibility is often associated with imageability (or apparency) as the city becomes more "vivid" and memorable when the network is clear and easy to understand. An example is how the street names are numbered so that their spatial relationship becomes easy to remember. The road layout needs to be legible for the street numbers to be reasonable. A relevant public transport application is that bus stops often use the same name as the streets so that people can easily relate the bus routes to the road system. However, imageability can contradict with legibility because too many memorable elements would lead to increase network complexity, thus reducing the system legibility.

Legibility in Cartography
Cartography is the study and practice of making maps. It is particularly relevant in the discussion of legibility since maps are one of the most common network visualisation tools. Legibility is part of the generalisation concern which is a fundamental problem in cartography. A balance between accuracy and simplicity is required to deliver the information efficiently. Different types of maps with examples are discussed here to elaborate on how they influence the network legibility.

Topographic vs. Topological Maps
A map can be categorised either as a topographic or topological map based on their presentation style. In brief, a topographic map retains most of the geographical information and usually uses contour lines to present the elevation of terrains. The geographical distance can be calculated by using the map scale and the network layout is similar to reality. On the other hand, a topological map omits most of the geographical information such as distance, layout, and orientation. The map elements are better aligned and arranged such that the map usually has a higher level of legibility. Most public transport network schematics today are drawn in a topological style, following the convention established by the London Underground which shifted from topographic map representations to topological maps in its early years.

The London Underground (also known as the Tube) is the earliest underground passenger rail system, which is opened in 1863. The official network map was initially a topographic map on which the underground rail infrastructure was superimposed on the street map. The map format resulted in poor legibility as the network expanded over the years. In 1926, a map designer Fred Stingemore came up with a new network map that removed most of the surface features, reduced some curvature and used regular inter-station distances. In 1931, engineer Harry Beck used his expertise in the electrical circuit to realign the railway routes as orthogonal or diagonal lines. Beck's modification has been widely adopted by many public transport agencies and topological maps have become the standard of modern (public transport) network map representation.

Topological maps are generally more legible than topographic maps, especially when a large network with many routes and overlaps are displayed. It also allows for greater flexibility as to how the map designers choose to express the network layout and convey essential trip-planning information. Besides using straight lines to represent routes/links/edges, an expert on the London underground map, Maxwell Roberts, also experimented circular distribution of networks including the London Underground, Melbourne and Sydney.

2D vs. 3D Maps
With the advance of 3D modelling software and geographic information system (GIS), there is a trend to convert traditional maps to their 3D equivalent such as the perspective/street-level view in many navigation applications. With the proper use of 3D technology, the amount of information and its accuracy can be significantly improved while maintaining the same (or even higher) level of legibility.

A major difference between 2D and 3D maps is the presentation of landmarks. While traditional maps might use different markers to place an emphasis on the landmarks, the place is difficult to identify information about its appearance or surroundings without any images. For instance, the instruction to turn at a certain intersection or cross the road in front of a certain building would not be helpful if the intersection or building is hard to locate in the first place. Although the graphical representation might be legible, the physical network may still cause some confusion. In contrast, 3D maps are better equipped to give a direct view of the places and landmarks so that the spatial relationship between different elements becomes clear. In the Image of the City, Kevin Lynch found that as people become more familiar with the city, they would rely more on the city's landmark for navigation rather than paths or districts. This is related to the concept of imageability and the time to construct mental maps. This means 3D maps may accelerate the development of mental maps by introducing landmarks more frequently than traditional 2D maps.

Inherently, 3D maps are able to show an extra dimension (i.e. elevation). This is an important feature for modern multi-story infrastructures where users may need to navigate through different levels to access the transport service. It also becomes more convenient to integrate multi-modal transport maps since different transport modes may operate at different elevations (e.g. subway, road system, and aeroplane). 3D maps are also arguably more efficient at showing orientations. While a paper map usually references to the North pole, a 3D map may refer to surrounding buildings or other objects for the direction so that bearing becomes unnecessary.

Network vs. Route Maps

A legibility tool is used to break down the network to show only some parts of it on the map in order to improve the legibility. Singapore's Mass Rapid Transit (MRT) system can be a case study for the discussion on route maps/diagrams. The MRT trains are equipped with SMRT Active Route Map Information System(STARiS) which is a series of LED light indicators of routing information (SMRT is the service operator). While the network has 5 lines in operation, the STARiS on each train only displays station information on the current routes. The lights show the following stations and possible destinations of the current train. The route maps can reduce a complex network to a few lines of interest and improve legibility by only keeping the most essential information.

However, there is a risk of over-simplifying and providing insufficient information for decision-making. STARiS 2.0, a newer version of the discussed system, is criticised for its lack of aesthetics and poor system design. One of the problems is that the new digital screen only displays the next five stops instead of the whole route as the original STARiS did. This causes frustration and impatience because users need to pay attention to the displayed information at least once per five stops if he/she is not familiar with the route or interchange information. Another problem is the inconsistent use of topographic maps on STARiS 2.0 instead of the topological representation used everywhere else.

Octolinearility vs. Curvature
A study on the subjective and objective map usability for Paris Metro challenges the design principle of octolinearity which is widely adopted by graphic designers and network mapmakers. The research group conducted several experiments involving 120 participants to evaluate the map usability values for both the official map of Paris Metro and an unofficial version with curve routes. Different sets of survey questions are designed to reflect the (perceived) objective measures such as planning time, journey duration and invalid routes and subjective ratings and overall expectation. The results show that the all-curve map has the best performance on planning time and has fewer invalid routes than the commercial Metro map. The argument is that octolinearity leads to poorer legibility for large networks when the change of direction becomes frequent. The Tokyo Metro Map is another example where straight line segments result in an excessive amount of bends and cause confusion to new network users when compared to the new Paris Metro network map.

Legibility and Connectivity
The transport network is heavily dependent on the structure of paths and nodes. As a result, the network legibility has an impact on the organisation of these elements and directly influences the network connectivity. Not only is legibility a tool to show the level of (perceived) connectivity, it may even be an argument against it. While adding more paths to a network can increase its connectivity, it also increases its complexity and reduces legibility. Therefore, the network planner should be aware of the legibility requirement when the main design aim is to provide connectivity and accessibility for the transport network.

Legibility and Hierarchy
Since there is a hierarchy of roads in the transport system, it is logical to reflect such hierarchy on maps to improve network legibility. The RMS classified map is published by Roads & Maritime Services (RMS) and uses different colour codes to represent Auslink, regional roads and state roads in the state of New South Wales. Another example is the Minneapolis high-frequency network map published by MetroTransit. This map highlights several public transport routes (Metro and bus) with a maximum arrival interval of 15 minutes. It can be argued that these routes are more important for the service operation. The network becomes more legible by eliminating information about routes with longer wait time and simplifying the decision-making process.

Legibility and Wayfinding
One of the key benefits of good network legibility is the ease of navigation and wayfinding. This means network legibility, as a network characteristic or quality of its presentation style, affects travel behaviours significantly. The rate of learning is a direct outcome of the accuracy of network perception. Network users spend time and efforts to learn about the transport network system with the assistance of various navigation tools, e.g. maps and GPS technologies. The effectiveness of such tools can be quantitatively assessed by studying the user's decision-making process and results. To some extent, legibility should be considered if a comparison between hypothetical decisions and observed decisions because it might help explain different learning rates associated with certain locations in the network, e.g. some tunnels or highway ramps may be underutilised due to their poor legibility on a 2D map; there might be a larger group of tourists attracted to better-advertised places of interest with a path marked out.

Legibility in Public Transport Operation
Jarrett Walker, a public transport consultant, makes a connection between legibility and freedom in his book Human Transit. The legibility here refers to the clarity of representation of public transport routes and freedom refers to network users' ability to change travel plans. Walker claims that freedom can be derived as an outcome of legibility because efficient utilisation of the network and the trip navigation are based on a good understanding of the system layout. He conceptualises legibility as two characteristics:
 * 1) "simplicity in the design of the network, so that it's easy to explain and remember"; and
 * 2) "clarity of the presentation in all the various media."

In the context of public transport, the significance of legibility varies for different user groups. For commuters who mostly travel along a fixed route between certain origin and destination pairs (e.g. home-workplace or home-school), legibility is a less critical factor in trip planning and decision-making. However, to promote public transport and encourage people to travel to many different locations would require a recognisable and memorable network presentation. A legible network aims to minimise its layout complexity and enhance the users' perception of service routes. Legibility tools and techniques are often implemented to achieve an acceptable level of legibility when complexity is unavoidable given the physical layout of the network.

Zhan Guo, Nigel H.M. Wilson (2011) conducted a study on the cost of transfer for the London Underground system. In this study, legibility is a factor of the Tube user experience (classified under transfer environment and system design) and influences the perceived transfer cost which traditionally only concerns wait time. Although the study lacks a quantitative correlation coefficient for the transfer environment, it has proven its relevance in the decision-making process for transfers.

= Further Reading =
 * Reddit MapVsGeo has a series of animations illustrating the comparison between topological subway/metro maps and their actual geographical forms in several different cities.
 * Project Subway NYC is a website that publishes 3D modelling maps of subway stations in New York City.

= Discussion Questions =
 * 1) What are some of the missing information in a topological map? How does each of them affect the user's decision-making? What are the likely consequences and how would the network be impacted?
 * 2) Why are most public transport maps in the form of topological schematics but significantly less so for road networks? Consider the interaction with the surrounding environment and access points.
 * 3) When would a 3D map be preferred over the traditional 2D network maps? Does it mainly depend on the network size on the map or any other network characteristics?

= References =


text:
Brief History of Europe/TOC

Table of contents

 * Preface

 * Chapter 1 Classical antiquity and the rise of Islam
 * Classical antiquity
 * Late antiquity
 * Islam and the Islamic Golden Age
 * Early fragmentation of the Islamic world

 * Part 1 Middle Ages

 * Chapter 2 Early Middle Ages
 * Peoples of the Early Middle Ages
 * Turkic migration and Viking Age
 * Italian Peninsula in the Middle Ages
 * Francia and the Carolingian Empire
 * Europe from 814
 * Reconquista, and unification of Spain

 * Chapter 3 High Middle Ages
 * States and territories of the High Middle Ages
 * France and England
 * Holy Roman Empire
 * Christianity and the Great Schism
 * Islam and the Crusades
 * Mongol invasions
 * Medieval renaissances and cultural changes

 * Chapter 4 Late Middle Ages
 * States and territories of the Late Middle Ages
 * Crisis of the Late Middle Ages
 * Avignon Papacy and Western Schism
 * Hundred Years' War
 * Burgundian State
 * War of the Roses
 * Holy Roman Empire and Hanseatic League
 * Rise of Muscovy
 * Rise of the Ottoman Empire

 * Part 2 Modern period

 * Chapter 5 Early modern period part 1
 * States and territories of the early modern period
 * Rise of Austria and Brandenburg-Prussia
 * Houses of Habsburg and Habsburg-Lorraine
 * Dutch Golden Age
 * Rise of Brandenburg-Prussia
 * House of Bourbon and France
 * Rise of Russia

 * Chapter 6 Early modern period part 2
 * Age of Discovery and colonial empires
 * Reformation and religious turmoil
 * Thirty Years' War
 * Religious tensions in England and Scotland
 * Rise of philosophy, the arts, science and trade

 * Chapter 7 Late modern period until 1914
 * States and territories of the late modern period
 * Late eighteenth century
 * Napoleonic Era
 * Post-Napoleonic Europe
 * New Imperialism
 * Industrialization and cultural changes

 * Chapter 8 Europe since 1914
 * World War I
 * Eastern Question
 * Interwar Period
 * World War II
 * Cold War
 * Yugoslav Wars
 * Other aspects of the contemporary period

title: Brief History of Europe/TOC


text: User:HubertJ

title: User:HubertJ


text:
Brief History of Europe/Middle Ages

The Middle Ages (or medieval period) lasted roughly from the 5th to the 15th century AD. It can be considered to start from the fall of Rome in 476 AD, or from the 500 AD. Its beginning overlaps with late antiquity (roughly 3rd to 7th centuries AD), the last period of classical antiquity. It ended with the modern period of history, which began in 1500, or with the fall of Constantinople in 1453.

Medium aevum (Latin for middle age) gave rise to the term "medieval".

It can be divided into:

 * Early Middle Ages, which was circa AD 500–1000, and sometimes referred to as the Dark Ages, although this is controversial. It was a time of new empire building, most importantly Francia (the Frankish empire). The rise of Islam created a rivalry with the Byzantine Empire, and Iberia would soon be conquered by them.
 * High Middle Ages, which was circa AD 1000–1300, or 1000–1250. After the Norman conquest of England, the English Plantagenet dynasty would rival the French kings for France. The Holy Roman Empire would get established as a powerful Germanic empire. There was religious turmoil with the crusades, and with the Great Schism the Catholic and Orthodox churches would separate.
 * Late Middle Ages was circa AD 1300–1500 or 1250–1500. The Crisis of the Late Middle Ages was a series of famines, plagues, peasant revolts, and wars, that devastated European populations. It was also the period of the rise of the Ottoman Empire, who would overthrow the Byzantine Empire and come to dominate the Balkans.

title: Brief History of Europe/Middle Ages


text:
Brief History of Europe/Modern period

The modern period was after the Middle Ages, circa 1500. Can also be seen as starting at the Fall of Constantinople (1453), or the discovery of the New World (1492). Can be divided into:

 * Early modern period was circa 1500–1750 AD; it can also be seen as starting at 1453 or 1492 (see above); and ending at the French Revolution (1789), or at 1800. The early modern period was characterized by the ascendancy of Russia, which curtailed the expansion of Sweden after the Great Northern War. Within and outside of the Holy Roman Empire, Brandenburg (which would become Prussia) and Austria (ruled by the House of Habsburg) would dominate geopolitics. The House of Habsburg would have important wars against the Ottoman Empire, and the French in Italy; they would also gain the Spanish crowns. In France, the House of Bourbon would ascend to the throne, and later on would gain the Spanish crowns from the Habsburgs. With the Reformation, Protestants would break with the Catholic Church, leading to the European wars of religion. It was also the Age of Discovery, and vast colonial empires ruled by European countries would result. Philosophy, the arts, science and technology would greatly develop during this period, especially with The Renaissance and Age of Enlightenment.

 * Late modern period was circa 1750–1945, or 1800–1945. It was characterised with three periods of intense conflict, surrounded by periods of relative peace: the French Revolutionary Wars and Napoleonic Wars (1792–1815); World War I (1914–1918); and World War II (1939–1945). The Age of Revolution would see many revolutionary movements, and was especially notable for the American Revolution and the French Revolution. It was also a time of European unification, with the formation of the German Empire, and the Risorgimento (Italian unification). Imperialism continued, especially with Scramble for Africa; but the Ottoman Empire would decline during this period, and with the Spanish American wars of independence and other decolonisation, most empires would eventually be lost. The Industrial Revolutions resulted in huge increases in mechanisation and industry.

 * Contemporary period was from circa 1945 (post World War II) to the present time. It was characterised by the Cold War, in which much of the World would be divided in two groups, largely divided by communist and capitalist ideologies; a flurry of proxy wars occurred between the two dominant superpowers, the USA and the Soviet Union. With the fall of communism, this stalemate would mostly be ended, and the risk of full-blown nuclear conflict largely averted. Decolonisation gained traction during this period, with most territories of colonial empires made independent by 1975. With the European Economic Community and European Union, Europe would enter an era of free trade and movements of many Europeans, with some degree of political union. Huge technological developments occurred, particularly in computing and communications.

title: Brief History of Europe/Modern period


text:
User:Sanyaade/Collections/Compiler Construction

using Java

 * Compiler Construction
 * Compiler Construction/About the Book
 * Compiler Construction/Case Study 1
 * Compiler Construction/Case Study 1B
 * Compiler Construction/Code Generation
 * Compiler Construction/Dealing with errors
 * Compiler Construction/Describing a Programming Language
 * Compiler Construction/External Links
 * Compiler Construction/Glossary
 * Compiler Construction/Intermediate Representation
 * Compiler Construction/Introduction
 * Compiler Construction/Java
 * Compiler Construction/Known Languages Conceptual Implementations
 * Compiler Construction/Lexical analysis
 * Compiler Construction/Objective-C
 * Compiler Construction/Optimization
 * Compiler Construction/References
 * Compiler Construction/Run-time Considerations
 * Compiler Construction/Semantic Analysis
 * Compiler Construction/Stack-based representation
 * Compiler Construction/State.java
 * Compiler Construction/Syntax Analysis
 * Compiler Construction/TestState.java


text:
Beginners Guide to Ladino/Verbs in Ladino

Preterite
In Ladino, the preterite indicates that an action taken once in the past was also completed at some point in the past. This is as opposed to the imperfect tense which refers to any continuous, habitual, unfinished or repetitive past action. Thus, "I ate falafel yesterday" would use the first-person preterite form of eat, comí, whereas "When I lived in Izmir, I ran five miles every evening" would use the first-person imperfect tense form, koría. Though some of the morphology has changed, usage is just as in normative Castilian.

Typical conjugation:


text:
Puzzles/Segregation

Segregation type of puzzle is a type of puzzle that are different from the puzzle shown before whereas the main objective are not filling in the grid buat actually divide out the cells according to its category

Domino Set

 * Draw lines to separate the grid to form a complete set of standard dominoes (28 pieces), with exactly one of each domino
 * A '0' represent blank on a traditional domino
 * Use the checklist to help track which dominoes already being placed

Rectangles

 * Draw borders along some grid lines to divide the grid into a set of rectangles, such that each rectangles contain exactly one number
 * All cells are within one rectangle
 * The number inside each rectangle must be exactly equal to the number that grid cells contain.
 * Example, no "4" would contain 1X4, 2X2 or 4X1 rectangle
 * The name rectangle can be meant squares too

Spiral Galaxies

 * Draw along some grid lines to form regions
 * Each region must contain exactly one circles
 * Each region must be symmetrical in such a way that if rotated 180 degrees around its circle then it would look exactly the same
 * Each cells must be in exactly one region

Rooms

 * Each grid cells is considered to be a room
 * Draw along some grid lines to build walls
 * Build a wall that when standing in a room with a number in it, you can see that many rooms by looking along the row or column and DO NOT include the room itself
 * All room are connected together so that walled off rooms or sections cannot be created

Carpet set

 * Draw borders along some grid lines to divide the grids into set of rectangles such that each number is inside exactly one rectangle
 * The number inside each rectangle must be exactly equal to the number of grid cells that rectangle contains, for example "4" could be in 1X4, 2X2 and 4X1 rectangle
 * Not all cells are necessarily contained within a rectangle
 * Note that term rectangle includes 'square' too

Sum Borders

 * Draw borders along some grid lines to divide the grids into set of rectangles such that each number is inside exactly one rectangle
 * All cells are within exactly one rectangle
 * The number inside each rectangle must be exactly equal to the sum of the width and height of that rectangle, measured in cells. For example '5' could be within 1X4,2X3,3X2 or 4X1 rectangles.

title: Puzzles/Segregation


text: Object Oriented Programming/Separation of Static and Dynamic


text:
Object Oriented Programming/Messages, Protocols and Dispatch

Virtualization and Polymorphism
Polymorphism means the ability to take more than one form, that is one name, multiple forms. In oops, an operation may exhibit different behaviour in different instances. The concept of polymorphism is implemented using function overloading and operator overloading.


text:
Object Oriented Programming/Interfaces

= Interfaces =

An Interface allows a class to expose a different set of properties and methods depending on context. For example, say that you were writing a Visual Basic 2005 application that manages clients. A client could be an individual person, or an organization. Part of the program generates address labels for clients.

You might define a person like this:

You might also define an Organization like this:

As you can see, the main differences between a Person and an Organization are:
 * a Person has both a first name and a last name, while an organization has only a single name
 * an Organization has a separate mailing address, while a Person only has one address

So that you can have the one routine to print address labels, you create an interface called "IAddressLabel" (by convention, the name of an interfaces should start with a capital I).

You now change the Person class to implement this interface. The main thing to notice is that the Person's first and last names are combined on the label.

You now change the Organization class to implement the IAddressLabel interface. Notice that the address for the label is the mailing address, not the building address.

Now you can group the disparate objects together as a collection of address labels!

Interfaces vs. Inheritance
Interfaces and Inheritance can both be used to solve the problem of treating dissimilar objects collectively. For example, if you have a Cat class and a Dog class, but have some routine that needs to process them together, you could either:
 * Create an Animal base class, which contains procedures common to both Cats and Dogs, and have Cat and Dog inherit from Animal, or
 * Create an IAnimal interface, and have both Cat and Dog implement the interface.

Which approach to use depends on several factors. In general:
 * If you are extending an existing class, then use inheritance. For example, if you already have an Animal class, and then discover a need to distinguish between Cats and Dogs
 * If you are simply wanting to treat different objects as the same, then use Interfaces. For example, you already have Cat and Dog classes, and then discover a need to manipulate them in a similar fashion

title: Object Oriented Programming/Interfaces


text:
Object Oriented Programming/Lifetime Management

= Lifetime Management =

Object Lifetime Management is the concept of controlling the number of instances a configured service will have and the duration of the lifetime of those instances. In other words, it allows you to determine how returned instances are cached.

Factories
In the real world, factories are used to make stuff (e.g. automobiles). In OO programming, factories also make stuff; specifically, OO factories "make" (instantiate) objects.

At least in Java, a constructor is unable to return a reference to an existing object—it MUST return a brand-new object. This can cause two problems—too many object instances, and identical objects that are duplicates—not the exact same object.

Factories are generally implemented as a public static method inside a class that has only private constructors. In this way, only the factory can create instances "Guaranteeing " that all instances of the object have been created by the factory.

The factory most often has an internal "Cache" of objects. Whenever a user asks the factory for a new object, the cache is consulted first and one of the cached objects are returned if it is identical—otherwise a new instance is created, added to the cache and returned.

Factories can also be used to inject user code into an "Unmodifiable" library. It is possible to save and restore a user object that implements some important functions of a library object. The library then uses that factory to get instances of the users object, and doesn't even know that the user has replaced a core component with completely new code.

As an example... Say the library uses Library objects all over the place. The library user can create a class (let's call it User) that extends Library. The user then calls LibraryFactory.set(User.class), and the factory stores it. Inside the library, whenever the library wishes to use a Library object, it calls the LibraryFactory.Factory function to get a new instance. Without changing any code, the user can now completely change the way the library functions by overriding one or more methods in his User class.

This is used in various places inside the Java SDK to allow you to change how chunks of the SDK works without rewriting any of the code.

Reference Counting
Reference counting is a programming technique of storing the number of references, pointers, or handles to a resource, such as an object, a block of memory, disk space, and others.

Garbage Collection
Garbage collection refers to freeing of heap-allocated memory. The heap memory must be freed eventually. Either the programmers code must explicitly free it, or some automatic system mechanism is required.

The most common mechanism is mark and sweep. This is where the system knows of certain top-level classes (Threads and windows mostly). It follows all the references from these "Known" classes to every class that can be reached and marks each class. When it's done, it "sweeps" (gets rid of) every unmarked class.

Garbage Collection is a huge enabler of Object Oriented development—it completely changes the way you design. With code-based memory management it is necessary to have some way to track an object. If it is created on the stack, it will be deleted when the method exits (so instances passed outside your method will become invalid). If it is created on the heap, some object must delete it manually—so if your method is going to create an object and pass it to two other objects that both retain the object, you have a problem. Who deletes the object? The original method can't because it will have exited before the two objects are finished with it, and the two objects shouldn't know anything about each other.

This type of problem is often solved with "Reference counting" which is another form of garbage collection, but a manual one. It also leads to fewer long-lived, free-roaming classes being created since they have to be tracked.

GC solves problem, that of ownership. If you are programming in a language with Garbage Collection, you may create classes on the fly, pass them off, retain a copy or forget about it... You really can't go wrong. When all instances have been "Forgotten", the class disappears.

The drawback is that GC tends to take a solid chunk of time. This is less true lately as at least Java has threaded GC and the ability to limit the amount of time GC will run. There are actually dozens of tuning and reporting options and the ability to select from multiple GC systems to fit your need.

GC Implementations run from trivial (instance counting) to amazingly complex. The current default Java VM uses a multi-tiered system with different mechanisms for new, middle-aged and old objects. For instance, since almost all new objects tend to die almost instantly, the first section (Eden) is divided in half. When one half becomes full, the currently referenced objects are copied to the other side. The system switches to using the "new" side and completely forgets about the old half. There is no explicit code invoked to delete objects that are already gone.

This means that GC can actually be more efficient than traditional allocation/free since there is no free operation for nearly all objects.

Garbage collection should be considered essential to OO Design.

Persistence
Persistence is simply the act of having objects that "Stick around" between invocations of your program.

This can be trivial (Just serializing an object out when exiting, serializing it back in when loading) to a full OO-database implementation.

Hibernate is a good program that sits between your application and a database and ensures that your objects are properly persisted.

Serialization
Serialization is converting an object to a stream of bytes that can then be saved to a file or transmitted over a network.


text:
Object Oriented Programming/Generic Programming

= Generic Programming = "The key idea of generic programming or programming with templates is to define families of functions or classes. By providing the concrete type you get automatically a function or a class for this type. Generic programming provides similar abstraction like object-oriented programming."

Proxies
"A proxy, in its most general form, is a class functioning as an interface to something else. The proxy could interface to anything: a network connection, a large object in memory, a file, or some other resource that is expensive or impossible to duplicate. In short, a proxy is a wrapper or agent object that is being called by the client to access the real serving object behind the scenes."

Abstracting Classes
In this article along with the demo project, I will discuss Interfaces versus Abstract classes. The concept of Abstract classes and Interfaces is a bit confusing for beginners of Object Oriented programming. Therefore, I am trying to discuss the theoretical aspects of both the concepts and compare their usage. And finally, I will demonstrate how to use them with C#.


text:
Wikibooks:Reading room/Administrative Assistance/Archives/2019/July

IP vandalism from 79.97.155.176
Some IP editor is having a merry old time vandalizing a page in the Muggles' Guide. Chazz (talk) 16:34, 10 July 2019 (UTC)
 * I've applied a brief block. --Pi zero (discuss • contribs) 16:43, 10 July 2019 (UTC)

Protection of pages : Dutch Empire/Indonesian Independence
Recently, I saw that there are high amount of vandalism activities these 2 days at : Dutch_Empire/Indonesian_Independence. I propose maybe admin can protect the page for 1 month at least to prevent re-occurrences of vandalism A concerned Wikibookians 08:38, 29 June 2019 (UTC) — Preceding unsigned comment added by Encik Tekateki (talk • contribs)
 * ✅. One-month semi-protection. --Pi zero (discuss • contribs) 12:01, 29 June 2019 (UTC)
 * Note it's actually the same disruption by the LTA I mentioned in the previous section. PlyrStar93 (discuss • contribs) 12:39, 29 June 2019 (UTC)

 * History of Islam/Modern period/Indonesia This page too should be protected for one month . By concerned Wikibookians Encik Tekateki (discuss • contribs) 16:14, 29 June 2019 (UTC)
 * Also ✅. --Pi zero (discuss • contribs) 16:24, 29 June 2019 (UTC)

 * Thanks guys -- appreciate it -- this LTA has been a problem for years. Antandrus (discuss • contribs) 18:36, 29 June 2019 (UTC)

 * No problem, just suspect that the troll maybe have way too much time in their summer holiday or they need to get their mental health diagnosed. Commented by Encik Tekateki (discuss • contribs) 01:30, 30 June 2019 (UTC)

 * Dear admins , kindly apply the full protection of History of Islam/Modern period/Indonesia for 1 year. Also it seems like the chapter's content of History of Islam/Modern period/Indonesia do not reflect on history of Islam on Indonesia at all. More likely the modern history of Indonesia. Concerned Wikibookians    Encik Tekateki (discuss • contribs) 15:34, 11 July 2019 (UTC)

 * I've extended the existing semi-protection, currently counting down from one month, to one year. --Pi zero (discuss • contribs) 17:07, 11 July 2019 (UTC)

 * Hi, is the lock is effective ?  I still see  is still locking it. Too many spams from IP hopper around. One month is not even up and still can see the IP hopper troll edit the Indonesia pages.
 * IMHO, beside banning the account creation of banned IP for 1 week, I suggest to lock them out from editing any of the Wikibooks pages. It is really counter - productive to combat the spam pages. Encik Tekateki (discuss • contribs) 10:29, 17 July 2019 (UTC)
 * Wikis are about openness. Wikipedia tried, a while back, prohibiting unregistered IPs from editing; it was, predictably, a terrible idea.  It's unfriendly, and at the grand scale, for a wiki, friendliness is, well, crucial. It somehow hadn't registered on me, until just now, that one of the basic influences on my approach as an admin to dealing with troublemakers is the scene from Road House where Dalton tells the bouncers to "be nice."  ("If somebody gets in your face and calls you a cocksucker I want you to be nice[...] Ask him to walk, be nice. If he won't walk, walk him, but be nice. If you can't walk him, one of the others will help you and you will both be nice. I want you to remember that it's the job, it's nothing personal.") --Pi zero (discuss • contribs) 13:28, 17 July 2019 (UTC)
 * (That can't be quite right; surely en.wp didn't do a blanket prohibition on IPs. They did some sort of across-the-board restriction on them... well, as may be.) --Pi zero (discuss • contribs) 00:24, 18 July 2019 (UTC)

 * Maybe the fact that it does not allow IP users to create pages in mainspace. Leaderboard (discuss • contribs) 11:25, 18 July 2019 (UTC)
 * That may be it. --Pi zero (discuss • contribs) 12:11, 18 July 2019 (UTC)


text:
User:Nivledikiw/sandbox

= QEMU/Windows 98 РУССКИЙ = У вас есть устаревшее программное обеспечение, которое не может работать в Wine или в более новых версиях Windows? Если у вас есть установочный диск Windows 98 вы можете установить операционную систему на виртуальную машину QEMU. CD должен быть для общих систем. Если вы получили свою копию от OEM-производителя (например, HP или Dell), возможно, они не содержат драйверов, которые могут понадобиться QEMU.

Настройка виртуальной машины
Если компакт-диск содержит загрузочную дискету, возможно, вам понадобится ее использовать; некоторые компакт-диски не предназначены для прямой загрузки и содержат только материалы, необходимые для установки операционной системы. Если у вас есть только не загружаемый компакт-диск, FreeDOS можно установить первым вместо него, и он может запустить установку. Вам захочется скопировать ваш компакт-диск Windows 98 в образ ISO. Предполагая, что он был назван win98.iso и помещен в ту же папку, он может быть извлечен и сохранен в своем каталоге.

Вам нужно будет создать образ для жесткого диска. Это то место, куда вы будете устанавливать Windows, и мы будем использовать собственный формат qcow2 Qemu. Общие размеры составляют 512 МБ (512 МБ) и 1 ГБ (1 ГБ), но все, что больше 2 ГБ, может побудить программу установки запросить поддержку большой файловой системы, которую вы в этом случае захотите разрешить. Интересно отметить, что если в вашей хост-системе достаточно памяти для хранения всего образа в оперативной памяти, установка и использование могут быть значительно ускорены. В Windows это можно сделать с помощью драйвера виртуального диска ImDisk при подключении файла необработанного образа и копировании образа на подключенный диск.

 * -cdrom позволяет нам использовать образ ISO. Можно также использовать virsh для пересылки физического диска в файл, но чтение данных с жесткого диска обычно происходит быстрее.
 * -boot позволяет нам указать порядок для d, который является CD.
 * -drive позволяет нам использовать орбраз, который мы только что создали.
 * -enable-kvm включает аппаратное ускорение в x86, используя ядро KVM. KVM вызывает проблемы на хостах Windows при выключении гостя и может даже предотвратить его запуск в некоторых случаях. Если это произойдет, вы можете безопасно удалить его из команды.
 * -m выделяет гостевую RAM. В этом случае мы используем 512, но выход за рамки этого может быть опасным для Windows 9x.
 * -soundhw позволяет нам использовать звуковую карту Creative SoundBlaster 16 (sb16) для получения звука. Стандартные диски Windows 98 поставляются с драйверами для него.
 * -display позволяет нам использовать альтернативный движок отображения, а не GTK +. В этом случае мы используем Simple DirectMedia Layer, потому что он не сильно конфликтует с полноэкранной поддержкой. Вы можете нажать Ctrl + Alt + F, чтобы войти и выйти из полноэкранного режима, и Ctrl + Alt, чтобы QEMU захватил или отменил ввод с клавиатуры и вызвал монитор как обычно.
 * -vga устанавливает стандарнтый видеодрайвер. Вы можете получить разрешение до 2560 x 1600 пикселей без использования гостевых драйверов. Это значение по умолчанию, начиная с QEMU 2.2. Так же можно использовать драйверы qlx, vmware, virtio и none.

К концу установки вы загрузитесь без компакт-диска, а это означает, что флаги -cdrom и -boot могут быть безопасно удалены.

__INDEX__ __NEWSECTIONLINK__

title: User:Nivledikiw/sandbox


text:
Oberon/A2/Oberon.MIME.Mod

(* ETH Oberon, Copyright 2001 ETH Zuerich Institut fuer Computersysteme, ETH Zentrum, CH-8092 Zuerich. Refer to the "General ETH Oberon System Source License" contract available at: http://www.oberon.ethz.ch/ *) MODULE MIME IN Oberon; (** portable *) 	IMPORT Streams, TextStreams, Files, Dates, Strings, Fonts, Texts, Display, Display3, 		Objects, Attributes, Gadgets, BasicFigures, Out, Oberon; 	CONST 		BufLen = 1024; 		MaxLine = BufLen-1; 		MaxSMTPLine = 1000; 		MimeVersion* = "Mime-Version: 1.0"; 		TextMime* = "text/plain"; ISOVer* = "ISO-8859-1"; 		OberonMime* = "application/compressed/oberon"; 		EncAuto* = -1; EncBin* = 0; Enc8Bit* = 1; Enc7Bit* = 2; EncQuoted* = 3; EncBase64* = 4; EncAsciiCoder* = 5; 		EncAsciiCoderC* = 6; EncAsciiCoderCPlain* = 7; 		ContEncQuoted* = "Content-Transfer-Encoding: quoted-printable"; (* EncQuoted *) 		ContEnc7Bit* = "Content-Transfer-Encoding: 7bit"; (* Enc7Bit *) 		ContEnc8Bit* = "Content-Transfer-Encoding: 8bit"; (* EncBin, Enc8Bit*) 		ContEncBase64* = "Content-Transfer-Encoding: Base64"; (* EncBase64 *) 	TYPE 		OpenString* = POINTER TO ARRAY OF CHAR; 		Header* = POINTER TO HeaderDesc; 		HeaderDesc* = RECORD 			fields*: OpenString 		END; 	(** A list of the mime content-types supported. 			The mime-types supported by Oberon are described in the "MIME" section of oberon.ini. 			The syntax of a mime entry is: 				mimedef = mime "=" [ suffix [ prefix ] ] . 				mime	The mime type, e.g: "text/html", "image/gif", ... 				suffix	Suffix to be used for temporary files. 				prefix	Prefix to be used for temporary files . 					e.g. "c:/temp/" writes the temporary files in the c:/temp directory *) 		ContentType* = POINTER TO ContentTypeDesc; 		ContentTypeDesc* = RECORD 			typ*: ARRAY 32 OF CHAR; 			subTyp*: ARRAY 64 OF CHAR; 			suffix*: ARRAY 8 OF CHAR; 			prefix*: ARRAY 128 OF CHAR; 			support*: BOOLEAN; 			next: ContentType 		END; 		Content* = POINTER TO ContentDesc; 		ContentDesc* = RECORD 			h: Header; 			pos, len*: LONGINT; 			typ*: ContentType; 			encoding*: LONGINT (* 0: binary; 1: 8 bit; 2: 7 bit; 3: 7 bit, quoted; 4: Base64; 5: AsciiCoder; 6: AsciiCoder % *) 		END; 		Part = POINTER TO PartDesc; 		PartDesc = RECORD 			name: ARRAY 64 OF CHAR; 			no: LONGINT; 			next: Part 		END; 	VAR 		contTypes*: ContentType; (** Root of the content-typ list. *) 		textCont*: Content; 	PROCEDURE ReadHeader*(S, echo: Streams.Stream; VAR h: Header; VAR len: LONGINT); 		VAR 			buf: OpenString; 			bufLen, bufPos, begPos, begLen: LONGINT; 			ch, eolc: CHAR; 			end, eol, field, anyField, white: BOOLEAN; 		PROCEDURE Read; 		BEGIN 			IF (ch # Strings.LF) & (echo # NIL) THEN 				TextStreams.Write(echo, ch) 			END; 			Streams.Read(S, ch); INC(len) 		END Read; 	BEGIN 		len := 0; begLen := 0; anyField := FALSE; 		NEW(h); bufLen := 1024; NEW(h.fields, bufLen); bufPos := 0; 		ch := Strings.LF; Read; eol := FALSE; 		REPEAT 			end := TRUE; field := FALSE; white := FALSE; begPos := bufPos; 			WHILE ~S.eos & ~eol DO 				IF bufPos >= (bufLen-3) THEN 					h.fields[bufPos] := 0X; 					INC(bufLen, 1024); NEW(buf, bufLen); 					COPY(h.fields^, buf^); h.fields := buf 				END; 				IF ((ch = ":") OR (ch = "+")) & ~field THEN	(* "+OK xxx octets" workaround *) 					end := FALSE; field := ~white; anyField := anyField OR field 				ELSIF ch <= " " THEN 					ch := " "; white := TRUE 				END; 				h.fields[bufPos] := ch; INC(bufPos); 				Read; 				IF (ch = Strings.CR) OR (ch = Strings.LF) THEN 					eolc := ch; Read; 					IF eolc # Strings.LF THEN 						IF ch # Strings.LF THEN 							eolc := Strings.CR 						ELSE 							Read; eolc := Strings.LF 						END 					END; 					IF ch > " " THEN 						eol := TRUE 					ELSE 						WHILE ~S.eos & (ch <= " ") & (ch # eolc) DO 							Read 						END; 						eol := ch = eolc; 						IF ~eol THEN 							h.fields[bufPos] := " "; INC(bufPos) 						END 					END 				ELSE 					eol := FALSE 				END 			END; 			end := end OR (bufPos <= begPos) OR (ch = Strings.CR) OR (ch = Strings.LF); 			IF field THEN 				begLen := len-1; 				IF S.eos & ~((ch = Strings.CR) OR (ch = Strings.LF)) THEN 					INC(begLen) 				ELSIF ~S.eos THEN 					DEC(begLen) 				END 			END; 			h.fields[bufPos] := 0X; field := FALSE; INC(bufPos); 			eol := FALSE 		UNTIL end; 		len := begLen; h.fields[bufPos] := 0X; 		IF ~anyField THEN 			h.fields[0] := 0X; h.fields[1] := 0X 		END 	END ReadHeader; 	PROCEDURE FindFieldPos*(h: Header; field: ARRAY OF CHAR; VAR pos: LONGINT); 		VAR len, i: LONGINT; 	BEGIN 		len := LEN(h.fields^); 		WHILE pos < len DO 			i := 0; 			WHILE (pos < len) & (CAP(field[i]) = CAP(h.fields[pos])) & (field[i] # 0X) DO 				INC(i); INC(pos) 			END; 			IF (field[i] = 0X) & ((h.fields[pos] <= " ") OR (h.fields[pos] = ":")) THEN 				WHILE (pos < len) & (h.fields[pos] # ":") & (h.fields[pos] # 0X) DO 					INC(pos) 				END; 				IF h.fields[pos] = ":" THEN 					INC(pos); 					WHILE (pos < len) & (h.fields[pos] <= " ") & (h.fields[pos] # 0X) DO 						INC(pos) 					END 				END; 				RETURN 			ELSE 				WHILE (pos < len) & (h.fields[pos] # 0X) DO 					INC(pos) 				END 			END; 			INC(pos) 		END; 		pos := -1 	END FindFieldPos; 	PROCEDURE FindField*(h: Header; field: ARRAY OF CHAR): LONGINT; 		VAR pos: LONGINT; 	BEGIN 		pos := 0; FindFieldPos(h, field, pos); 		RETURN pos 	END FindField; 	PROCEDURE NextValue*(h: Header; VAR pos: LONGINT); 		VAR len: LONGINT; 	BEGIN 		len := LEN(h.fields^); 		IF (pos < 0) OR (pos >= len) THEN 			RETURN 		END; 		WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] # ";") DO 			INC(pos) 		END; 		IF h.fields[pos] = ";" THEN 			INC(pos) 		END; 		WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] <= " ") DO 			INC(pos) 		END 	END NextValue; 	PROCEDURE HexVal(ch: CHAR): LONGINT; 	BEGIN 		IF (ch >= "0") & (ch <= "9") THEN 			RETURN ORD(ch)-ORD("0") 		ELSIF (ch >= "A") & (ch <= "F") THEN 			RETURN ORD(ch)-ORD("A")+10 		ELSIF (ch >= "a") & (ch <= "f") THEN 			RETURN ORD(ch)-ORD("a")+10 		END 	END HexVal; 	PROCEDURE DecodeValue(VAR value: ARRAY OF CHAR); 		VAR 			i, j, l: LONGINT; 			quoted: BOOLEAN; 			ch: CHAR; 	BEGIN 		quoted := FALSE; 		i := 0; j := 0; l := LEN(value); 		ch := value[i]; 		WHILE ch # 0X DO 			ch := Strings.ISOToOberon[ORD(ch)]; 			IF ch = "=" THEN 				IF ~quoted & ((i+14) < l) & (value[i+1] = "?") & (value[i+12] = "?") & (value[i+14] = "?") THEN 					quoted := TRUE; INC(i, 14) 				ELSIF quoted & Strings.IsHexDigit(value[i+1]) & Strings.IsHexDigit(value[i+2]) THEN 					value[j] := Strings.ISOToOberon[HexVal(value[i+1])*16+HexVal(value[i+2])]; INC(j); 					INC(i, 2) 				ELSE 					value[j] := ch; INC(j) 				END 			ELSIF (ch = "?") & quoted & (value[i+1] = "=") THEN 				quoted := FALSE; INC(i) 			ELSE 				value[j] := ch; INC(j) 			END; 			INC(i); ch := value[i] 		END; 		value[j] := 0X 	END DecodeValue; 	PROCEDURE ExtractValue*(h: Header; pos: LONGINT; VAR val: ARRAY OF CHAR); 		VAR len, i, vlen: LONGINT; 	BEGIN 		COPY("", val); 		len := LEN(h.fields^); 		IF (pos < 0) OR (pos >= len) THEN 			RETURN 		END; 		WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] <= " ") DO 			INC(pos) 		END; 		vlen := LEN(val)-1; i := 0; 		WHILE (pos < len) & (h.fields[pos] # 0X) & (i < vlen) DO 			val[i] := h.fields[pos]; INC(i); INC(pos) 		END; 		val[i] := 0X; DEC(i); 		WHILE (i > 0) & (val[i] <= " ") DO 			val[i] := 0X; DEC(i) 		END; 		DecodeValue(val) 	END ExtractValue; 	PROCEDURE FindParam*(h: Header; pos: LONGINT; param: ARRAY OF CHAR; VAR val: ARRAY OF CHAR); 		VAR len, i, vlen: LONGINT; 	BEGIN 		COPY("", val); 		len := LEN(h.fields^); 		IF (pos < 0) OR (pos >= len) THEN 			RETURN 		END; 		WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] <= " ") DO 			INC(pos) 		END; 		vlen := LEN(val)-1; 		WHILE (pos < len) & (h.fields[pos] # 0X) DO 			i := 0; 			WHILE (pos < len) & (param[i] # 0X) & (CAP(param[i]) = CAP(h.fields[pos])) DO 				INC(i); INC(pos) 			END; 			IF param[i] = 0X THEN 				WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] <= " ") DO 					INC(pos) 				END; 				IF h.fields[pos] = "=" THEN 					INC(pos); 					WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] <= " ") DO 						INC(pos) 					END; 					IF h.fields[pos] = 022X THEN 						INC(pos) 					END; 					vlen := LEN(val)-1; i := 0; 					WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] # 022X) & (h.fields[pos] # ";") & (i < vlen) DO 						val[i] := h.fields[pos]; INC(i); INC(pos) 					END; 					val[i] := 0X; DEC(i); 					WHILE (i > 0) & (val[i] <= " ") DO 						val[i] := 0X; DEC(i) 					END 				END; 				RETURN 			END; 			NextValue(h, pos) 		END 	END FindParam; 	PROCEDURE ExtractEMail*(h: Header; pos: LONGINT; VAR email: ARRAY OF CHAR); 		VAR 			len, i, len2: LONGINT; 			end: CHAR; 	BEGIN 		COPY("", email); 		len := LEN(h.fields^); 		IF (pos < 0) OR (pos >= len) THEN 			RETURN 		END; 		WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] # "@") DO 			INC(pos) 		END; 		IF h.fields[pos] = "@" THEN 			WHILE (pos >= 0) & (h.fields[pos] > " ") & (h.fields[pos] # "<") DO 				DEC(pos) 			END; 			IF h.fields[pos] <= " " THEN 				INC(pos) 			END; 			IF h.fields[pos] = "<" THEN 				INC(pos); end := ">" 			ELSE 				end := 0X 			END; 			len2 := LEN(email)-1; i := 0; 			WHILE (i < len2) & (pos < len) & (h.fields[pos] > " ") & (h.fields[pos] # end) DO 				email[i] := h.fields[pos]; INC(i); INC(pos) 			END; 			email[i] := 0X 		END 	END ExtractEMail; 	PROCEDURE StrToMonth(VAR str: ARRAY OF CHAR): LONGINT; 	BEGIN 		CASE CAP(str[0]) OF 			"A": IF (CAP(str[1]) = "P") OR (CAP(str[1]) = "V") THEN (* April, Aprile, Avril *) 						RETURN 4 					ELSE (* August, Agosto, Aout *) 						RETURN 8 					END 			|"D": RETURN 12 (* December, Dezember, Dicembre, Decembre *) 			|"F": RETURN 2 (* February, Febbbraio, Fevrier *) 			|"G": IF CAP(str[1]) = "E" THEN (* Gennaiv *) 						RETURN 1 					ELSE (* Giugno *) 						RETURN 6 					END 			|"J": IF CAP(str[1]) = "A" THEN (* January, Januar, Janvier *) 						RETURN 1 					ELSIF CAP(str[2]) = "L" THEN (* July, Juli, Juillet *) 						RETURN 7 					ELSE (* June, Juni, Juin *) 						RETURN 6 					END 			|"L": RETURN 7 (* Luglio *) 			|"M": IF CAP(str[2]) = "R" THEN (* March, März, Mars *) 						RETURN 3 					ELSIF CAP(str[2]) = "Z" THEN (* Mazzo *) 						RETURN 3 					ELSE (* May, Mai, Maggio *) 						RETURN 5 					END 			|"N": RETURN 11(* November, Novembre *) 			|"O": RETURN 10 (* October, Oktober, Ottobre, Octobre *) 			|"S": RETURN 9 (* September, Seltombre, Septembre *) 		ELSE 		END; 		RETURN 0 	END StrToMonth; 	PROCEDURE GMTTime(h, m, s: LONGINT; zone: ARRAY OF CHAR; VAR time, date: LONGINT): BOOLEAN; 		VAR dH, dM, i: LONGINT; 	BEGIN 		IF (zone[0] = "+") OR (zone[0] = "-") THEN 			IF Strings.Length(zone) > 5 THEN 				dH := 0 			ELSE 				Strings.StrToInt(zone, dH) 			END; 			IF dH < 0 THEN i := -1 ELSE i := 1 END; 			dM := i*ABS(dH MOD 100); 			dH := i*ABS(dH DIV 100) 		ELSE 			dH := 0; dM := 0; 			Strings.Upper(zone, zone); 			IF (zone = "UT") OR (zone = "GMT") OR (zone = "AM") THEN 				(* nix *) 			ELSIF zone = "EST" THEN 				dH := -5 			ELSIF zone = "EDT" THEN 				dH := -4 			ELSIF zone = "CST" THEN 				dH := -6 			ELSIF zone = "CDT" THEN 				dH := -5 			ELSIF zone = "MST" THEN 				dH := -7 			ELSIF zone = "MDT" THEN 				dH := -6 			ELSIF zone = "PST" THEN 				dH := -8 			ELSIF zone = "PDT" THEN 				dH := -7 			ELSIF zone = "MET" THEN 				dH := +2 			ELSIF (zone[1] <= " ") & (zone[0] >= "A") & (zone[0] <= "Y") & (zone[0] # "J") THEN (* military *) 				IF zone[0] >= "N" THEN 					dH := ORD(zone[0])-ORD("N")+1 				ELSIF zone[0] < "J" THEN 					dH := -(ORD(zone[0])-ORD("A")+1) 				ELSE 					dH := -(ORD(zone[0])-ORD("A")) 				END 			ELSIF zone = "PM" THEN 				dH := +12 			ELSE (* local time *) 				dH := Dates.TimeDiff DIV 60; 				dM := Dates.TimeDiff MOD 60 			END 		END; 		h := h-dH; m := m-dM; 		WHILE m < 0 DO 			DEC(h); INC(m, 60) 		END; 		h := h+(m DIV 60); m := m MOD 60; 		date := Dates.AddDay(date, SHORT(h DIV 24)); h := h MOD 24; 		time := h*1000H + m*40H + s; 		RETURN TRUE 	END GMTTime; 	PROCEDURE GetClock*(VAR time, date: LONGINT); 	BEGIN 		Oberon.GetClock(time, date); 		Dates.AddTime(time, date, -Dates.TimeDiff * 60)	(* convert to GMT *) 	END GetClock; 	PROCEDURE ExtractGMTDate*(h: Header; pos: LONGINT; VAR time, date: LONGINT); 		VAR 			len, i, day, year, month, hour, min, sec: LONGINT; 			mo, zone: ARRAY 16 OF CHAR; 			j: INTEGER; 	BEGIN 		time := 0; date := 0; 		len := LEN(h.fields^); 		IF (pos < 0) OR (pos >= len) THEN 			RETURN 		END; 		i := pos; 		WHILE (i < len) & (h.fields[i] # 0X) & (h.fields[i] # ",") DO 			INC(i) 		END; 		IF h.fields[i] = "," THEN 			pos := i+1 		END; 		(* date *) 		j := SHORT(pos); Strings.StrToIntPos(h.fields^, day, j); pos := j; 		WHILE (i < LEN(mo)-1) & (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] <= " ") DO 			INC(pos) 		END; 		i := 0; 		WHILE (pos < len) & (h.fields[pos] > " ") DO 			mo[i] := h.fields[pos]; INC(i); INC(pos) 		END; 		mo[i] := 0X; month := StrToMonth(mo); 		IF (month >= 1) & (month <= 12) THEN 			j := SHORT(pos); Strings.StrToIntPos(h.fields^, year, j); 			IF year >= 1900 THEN 				date := (year-1900)*200H + month*20H + day 			ELSIF year < 80 THEN 				date := (year+100)*200H + month*20H + day 			ELSE 				date := year*200H + month*20H + day 			END; 			(* time *) 			Strings.StrToIntPos(h.fields^, hour, j); 			WHILE (j < len) & (h.fields[j] # 0X) & (h.fields[j] # ":") DO 				INC(j) 			END; 			IF h.fields[j] = ":" THEN 				INC(j); Strings.StrToIntPos(h.fields^, min, j) 			ELSE 				min := 0 			END; 			WHILE (j < len) & (h.fields[j] # 0X) & (h.fields[j] <= " ") DO 				INC(j) 			END; 			IF h.fields[j] = ":" THEN 				INC(j); Strings.StrToIntPos(h.fields^, sec, j) 			ELSE 				sec := 0 			END; 			WHILE (j < len) & (h.fields[j] # 0X) & (h.fields[j] <= " ") DO 				INC(j) 			END; 			i := 0; 			WHILE (j < len) & (h.fields[j] > " ") DO 				zone[i] := h.fields[j]; INC(i); INC(j) 			END; 			zone[i] := 0X; 			IF GMTTime(hour, min, sec, zone, time, date) THEN 				RETURN 			END 		END; 		GetClock(time, date) 	END ExtractGMTDate; 	PROCEDURE EnumMIME(key, value: ARRAY OF CHAR); 		VAR 			contType: ContentType; 			i, j: LONGINT; 	BEGIN 		NEW(contType); contType.next := contTypes; contTypes := contType; contType.support := TRUE; 		i := 0; 		WHILE (key[i] # 0X) & (key[i] # "/") DO 			contType.typ[i] := key[i]; INC(i) 		END; 		contType.typ[i] := 0X; Strings.Lower(contType.typ, contType.typ); 		IF key[i] = "/" THEN 			INC(i) 		END; 		j := 0; 		WHILE key[i] # 0X DO 			contType.subTyp[j] := key[i]; INC(j); INC(i) 		END; 		contType.subTyp[j] := 0X; Strings.Lower(contType.subTyp, contType.subTyp); 		i := 0; 		WHILE value[i] > " " DO 			contType.suffix[i] := value[i]; INC(i) 		END; 		contType.suffix[i] := 0X; 		WHILE (value[i] # 0X) & (value[i] <= " ") DO 			INC(i) 		END; 		j := 0; 		WHILE value[i] > " " DO 			contType.prefix[j] := value[i]; 			INC(j); INC(i) 		END; 		contType.prefix[j] := 0X; 		WHILE (value[i] # 0X) & (value[i] <= " ") DO 			INC(i) 		END 	END EnumMIME; (** Find a content-type description. *) 	PROCEDURE GetContentType*(fullTyp: ARRAY OF CHAR): ContentType; 		VAR 			contType: ContentType; 			typ: ARRAY 32 OF CHAR; 			subTyp: ARRAY 64 OF CHAR; 			i, j: LONGINT; 	BEGIN 		i := 0; 		WHILE (fullTyp[i] # 0X) & (fullTyp[i] # "/") DO 			typ[i] := fullTyp[i]; INC(i) 		END; 		typ[i] := 0X; Strings.Lower(typ, typ); 		IF fullTyp[i] = "/" THEN 			INC(i) 		END; 		j := 0; 		WHILE fullTyp[i] # 0X DO 			subTyp[j] := fullTyp[i]; INC(j); INC(i) 		END; 		subTyp[j] := 0X; Strings.Lower(subTyp, subTyp); 		IF typ = "" THEN 			typ := "text" 		END; 		IF subTyp = "" THEN 			subTyp := "plain" 		END; 		contType := contTypes; 		WHILE (contType # NIL) & ~((contType.typ = typ) & (contType.subTyp = subTyp)) DO 			contType := contType.next 		END; 		IF contType = NIL THEN 			NEW(contType); contType.next := contTypes; contTypes := contType; contType.support := FALSE; 			COPY(typ, contType.typ); COPY(subTyp, contType.subTyp); 			contType.prefix := ""; contType.suffix := "" 		END; 		RETURN contType 	END GetContentType; 	PROCEDURE LoadTypes; 		VAR S: Texts.Scanner; key: ARRAY 64 OF CHAR; 	BEGIN 		contTypes := NIL; 		Oberon.OpenScanner(S, "MIME"); 		IF S.class = Texts.Inval THEN 			Out.String("Oberon.Text - MIME not found"); Out.Ln 		END; 		WHILE S.class IN {Texts.Name, Texts.String} DO 			COPY(S.s, key); Texts.Scan(S); 			IF (S.class = Texts.Char) & (S.c = "=") THEN 				Texts.Scan(S); 				IF S.class IN {Texts.Name, Texts.String} THEN 					EnumMIME(key, S.s); Texts.Scan(S) 				END 			ELSE S.class := Texts.Inval 			END 		END; 		NEW(textCont); textCont.typ := GetContentType("text/plain"); textCont.encoding := Enc8Bit; 		textCont.h := NIL; textCont.pos := 0; textCont.len := MAX(LONGINT)-BufLen-1 	END LoadTypes; (** Create a temporary file name for contType. *) 	PROCEDURE MakeTempName*(contType: ContentType; VAR tempName: ARRAY OF CHAR); 	BEGIN 		COPY(contType.prefix, tempName); 		Strings.Append(tempName, "Temp."); 		Strings.Append(tempName, contType.suffix) 	END MakeTempName; 	PROCEDURE ExtractContentType*(h: Header; pos: LONGINT; VAR cont: Content); 		VAR 			len, i: LONGINT; 			fullTyp: ARRAY 32+64 OF CHAR; 	BEGIN 		NEW(cont); cont.typ := GetContentType(TextMime); cont.encoding := EncBin; 		cont.h := h; cont.pos := pos; 		len := LEN(h.fields^); 		IF (pos < 0) OR (pos >= len) THEN 			RETURN 		END; 		WHILE (pos < len) & (h.fields[pos] # 0X) & (h.fields[pos] <= " ") DO 			INC(pos) 		END; 		i := 0; 		WHILE (pos < len) & (h.fields[pos] > " ") & (h.fields[pos] # ";")DO 			fullTyp[i] := h.fields[pos]; INC(i); INC(pos) 		END; 		fullTyp[i] := 0X; cont.typ := GetContentType(fullTyp); 		cont.pos := pos; cont.len := MAX(LONGINT) 	END ExtractContentType; 	PROCEDURE ReadText*(in: Streams.Stream; VAR W: Texts.Writer; cont: Content; mail: BOOLEAN); 		VAR 			buffer: ARRAY BufLen OF CHAR; 			len, rlen, i, offs, maxLen: LONGINT; 			ch, ch1: CHAR; 			iso, quoted, cr: BOOLEAN; 	BEGIN 		iso := cont.encoding IN {Enc8Bit, Enc7Bit, EncQuoted}; quoted := cont.encoding = EncQuoted; 		IF cont.h # NIL THEN 			FindParam(cont.h, cont.pos, "charset", buffer); iso := iso OR (buffer # "") 		END; 		ch := 0X; cr := FALSE; 		offs := 0; maxLen := cont.len; 		in.mode := Streams.binary; len := in.Available(in); 		WHILE (maxLen > 0) & ((len > 0) OR (~in.eos & in.buffer)) DO 			IF len > (BufLen-2) THEN 				rlen := BufLen-2 			ELSE 				rlen := len 			END; 			IF rlen > maxLen THEN 				rlen := maxLen 			END; 			in.ReadBytes(in, buffer, rlen); DEC(maxLen, rlen); 			i := 0; 			WHILE i < rlen DO 				IF (buffer[i] = Strings.CR) OR (buffer[i] = Strings.LF) THEN 					IF (buffer[i] = Strings.LF) & cr THEN 						(* ignore LF after CR *) 					ELSE 						Texts.WriteLn(W); 						IF mail & (offs = 1) & (ch = ".") THEN 							RETURN 						END; 						offs := 0 					END; 					cr := (buffer[i] = Strings.CR) 				ELSIF iso THEN 					ch := buffer[i]; 					IF ~quoted OR (ch # "=") THEN 						ch := Strings.ISOToOberon[ORD(ch)]; 						IF ~mail OR (offs > 0) OR (ch # ".") THEN 							Texts.Write(W, ch) 						END 					ELSE 						INC(i); 						IF i < rlen THEN 							ch := buffer[i]; INC(i) 						ELSE 							Streams.Read(in, ch); INC(rlen); DEC(maxLen) 						END; 						IF i < rlen THEN 							ch1 := buffer[i] 						ELSE 							Streams.Read(in, ch1); INC(rlen); DEC(maxLen) 						END; 						IF Strings.IsHexDigit(ch) & Strings.IsHexDigit(ch1) THEN 							ch := Strings.ISOToOberon[HexVal(ch)*16+HexVal(ch1)]; 							Texts.Write(W, ch); ch := 0X 						ELSIF (ch1 = Strings.LF) OR (ch = Strings.LF) THEN 							(* Texts.WriteLn(W); offs := 0 *) 						ELSE 							Texts.Write(W, "="); 							Texts.Write(W, ch); Texts.Write(W, ch1); 							INC(offs, 2); ch := ch1 						END 					END; 					INC(offs) 				ELSE 					ch := buffer[i]; 					IF ~mail OR (offs > 0) OR (ch # ".") THEN 						Texts.Write(W, ch) 					END; 					INC(offs) 				END; 				INC(i) 			END; 			DEC(len, rlen); 			IF len <= 0 THEN 				len := in.Available(in) 			END 		END 	END ReadText; 	PROCEDURE SearchBoundary(F: Files.File; VAR boundary: ARRAY OF CHAR; VAR pos: LONGINT): BOOLEAN; 		CONST 			MaxPatLen = 128; 		VAR 			sPat: ARRAY MaxPatLen OF CHAR; 			sDv: ARRAY MaxPatLen + 1 OF LONGINT; 			i, l, sPatLen: LONGINT; 			R: Files.Rider; 			prev, ch: CHAR; 		PROCEDURE CalcDispVec; 			VAR i, j, d: LONGINT; 		BEGIN 			i := 1; d := 1; 			WHILE i <= sPatLen DO 				j := 0; 				WHILE (j + d < sPatLen) & (sPat[j] = sPat[j + d]) DO 					INC(j) 				END; 				WHILE i <= j + d DO 					sDv[i] := d; INC(i) 				END; 				INC(d) 			END 		END CalcDispVec; 	BEGIN 		COPY(boundary, sPat); 		sPatLen := Strings.Length(sPat); 		CalcDispVec; prev := 0X; 		IF sPatLen > 0 THEN 			Files.Set(R, F, pos); prev := ch; Files.Read(R, ch); 			INC(pos); l := Files.Length(F); i := 0; 			WHILE (i # sPatLen) & (pos <= l) DO 				IF (i = 0) & (prev >= " ") THEN 					prev := ch; Files.Read(R, ch); INC(pos) 				ELSE 					IF ch = sPat[i] THEN 						INC(i); 						IF i < sPatLen THEN 							prev := ch; Files.Read(R, ch); INC(pos) 						END 					ELSIF i = 0 THEN 						prev := ch; Files.Read(R, ch); INC(pos) 					ELSE 						i := i - sDv[i] 					END 				END 			END 		ELSE 			i := -1 		END; 		RETURN i = sPatLen 	END SearchBoundary; 	PROCEDURE TextEncoding*(h: Header; pos: LONGINT; cont: Content); 		VAR 			val: ARRAY 64 OF CHAR; 			i: LONGINT; 	BEGIN 		ExtractValue(h, pos, val); 		i := 0; Strings.CAPSearch("quoted", val, i); 		IF i >= 0 THEN 			cont.encoding := EncQuoted 		ELSE 			i := 0; Strings.Search("7", val, i); 			IF i > 0 THEN 				cont.encoding := Enc7Bit 			ELSE 				cont.encoding := Enc8Bit 			END 		END; 		cont.len := MAX(LONGINT) 	END TextEncoding; 	PROCEDURE HorzRule(VAR W: Texts.Writer; name: ARRAY OF CHAR); 		VAR f: BasicFigures.Figure; 	BEGIN 		NEW(f); BasicFigures.InitRect3D(f, Display.Width, 2); 		Gadgets.NameObj(f, name); 		Texts.WriteObj(W, f); Texts.WriteLn(W) 	END HorzRule; 	PROCEDURE DecodePart(F: Files.File; beg, end: LONGINT; T: Texts.Text; VAR W: Texts.Writer; VAR parts: Part; mail: BOOLEAN); 		VAR 			R: Files.Rider; 			S, wS: Streams.Stream; 			h: Header; 			cont: Content; 			pos, begPart, n, oldBeg: LONGINT; 			val: ARRAY 64 OF CHAR; 			part: Part; 			ch: CHAR; 	BEGIN 		Files.Set(R, F, beg); 		Files.Read(R, ch); INC(beg); 		WHILE (ch <= " ") & (beg <= end) DO 			Files.Read(R, ch); INC(beg) 		END; 		IF ch = "-" THEN 			RETURN 		END; 		NEW(part); 		IF parts = NIL THEN 			part.no := 0 		ELSE 			part.no := parts.no+1 		END; 		part.next := parts; parts := part; 		S := Streams.OpenFileReader(F, beg-1); S.mode := Streams.iso8859; oldBeg := beg-1; 		Texts.Append(T, W.buf); 		wS := TextStreams.OpenWriter(T); begPart := T.len; 		ReadHeader(S, wS, h, n); 		IF (n > 0) & ~((h.fields[0] = 0X) & (h.fields[1] = 0X)) THEN 			wS.Flush(wS); INC(beg, n) 		ELSE 			DEC(beg) 		END; 		pos := FindField(h, "Content-Type"); ExtractContentType(h, pos, cont); 		FindParam(h, pos, "name", part.name); 		Strings.IntToStr(part.no, val); HorzRule(W, val); 		Texts.Insert(T, begPart, W.buf); 		S := Streams.OpenFileReader(F, beg); S.mode := Streams.binary; 		pos := FindField(h, "Content-Disposition"); 		IF pos > 0 THEN 			pos := FindField(h, "Content-Transfer-Encoding"); 			IF pos > 0 THEN 				ExtractValue(h, pos, val); 				IF Strings.CAPPrefix("Base64", val) THEN 					Texts.WriteString(W, "Base64.Decode "); 					pos := FindField(h, "Content-Disposition"); 					FindParam(h, pos, "filename", val); 					IF part.name = "" THEN 						COPY(val, part.name) 					END; 					Texts.WriteString(W, val); Texts.WriteString(W, " ~"); Texts.WriteLn(W); 					Texts.Append(T, W.buf); cont.encoding := EncBase64 				ELSIF cont.typ.typ = "text" THEN 					TextEncoding(h, pos, cont) 				ELSIF Strings.CAPPrefix("Quoted", val) THEN 					Texts.WriteString(W, "QuotedPrintable.DecodeFile "); 					pos := FindField(h, "Content-Disposition"); 					FindParam(h, pos, "filename", val); 					IF part.name = "" THEN 						COPY(val, part.name) 					END; 					Texts.WriteString(W, val); Texts.WriteString(W, " ~"); Texts.WriteLn(W); 					Texts.Append(T, W.buf); cont.encoding := EncBin 				ELSE 					cont.encoding := EncBin 				END 			ELSE 				cont.encoding := EncBin 			END 		ELSE 			pos := FindField(h, "Content-Transfer-Encoding"); 			TextEncoding(h, pos, cont) 		END; 		IF part.name = "" THEN 			COPY(cont.typ.typ, part.name); 			Strings.AppendCh(part.name, "/"); 			Strings.Append(part.name, cont.typ.subTyp) 		END; 		Texts.Insert(T, begPart, W.buf); (*Texts.WriteLn(W);*) 		cont.len := end-beg; ReadText(S, W, cont, mail); (*Texts.WriteLn(W)*) 	END DecodePart; 	PROCEDURE DecodeMultipartFile(F: Files.File; VAR T: Texts.Text; boundary: ARRAY OF CHAR; mail: BOOLEAN); 		VAR 			W: Texts.Writer; 			last, next, parts: Part; 			obj: Objects.Object; 			cmd: ARRAY 64 OF CHAR; 			pos, beg, end, len: LONGINT; 	BEGIN 		NEW(T); Texts.Open(T, ""); Texts.OpenWriter(W); 		pos := 0; end := 0; len := Files.Length(F); parts := NIL; 		IF SearchBoundary(F, boundary, pos) THEN 			DecodePart(F, 0, pos-Strings.Length(boundary)-2, T, W, parts, mail); 			WHILE end < len DO 				beg := pos; 				IF SearchBoundary(F, boundary, pos) THEN 					end := pos-Strings.Length(boundary)-2 				ELSE 					end := len+1 				END; 				DecodePart(F, beg, end, T, W, parts, mail) 			END 		END; 		Texts.Append(T, W.buf); 		last := NIL; 		WHILE parts # NIL DO 			next := parts.next; parts.next := last; 			last := parts; parts := next 		END; 		Texts.WriteLn(W); 		parts := last; 		WHILE parts # NIL DO 			Texts.WriteString(W, "[ "); 			Texts.SetColor(W, SHORT(Display3.blue)); 			Texts.WriteString(W, parts.name); 			Texts.SetColor(W, SHORT(Display3.textC)); 			obj := Gadgets.CreateObject("TextGadgets.NewControl"); 			cmd := "HTMLDocs.Locate '"; 			Strings.IntToStr(parts.no, boundary); 			Strings.Append(cmd, boundary); 			Attributes.SetString(obj, "Cmd", cmd); 			Texts.WriteObj(W, obj); 			Texts.WriteString(W, " ] "); 			parts := parts.next 		END; 		Texts.WriteLn(W); Texts.WriteLn(W); 		Texts.Insert(T, 0, W.buf) 	END DecodeMultipartFile; 	PROCEDURE ReadMultipartText*(in: Streams.Stream; VAR T: Texts.Text; cont: Content; mail: BOOLEAN); 		VAR 			h: Header; 			F: Files.File; 			R: Files.Rider; 			buffer: ARRAY BufLen OF CHAR; 			boundary: ARRAY 128 OF CHAR; 			len, rlen, i, state, maxLen: LONGINT; 	BEGIN 		maxLen := cont.len; state := 1; h := cont.h; 		F := Files.New(""); Files.Set(R, F, 0); 		in.mode := Streams.binary; len := in.Available(in); 		WHILE (maxLen > 0) & ((len > 0) OR ~in.eos) DO 			IF len > BufLen THEN 				rlen := BufLen 			ELSE 				rlen := len 			END; 			IF rlen > maxLen THEN 				rlen := maxLen 			END; 			in.ReadBytes(in, buffer, rlen); DEC(maxLen, rlen); 			IF mail THEN 				i := 0; 				WHILE (i < rlen) & (state # 2) DO 					IF (buffer[i] = Strings.CR) OR (buffer[i] = Strings.LF) THEN 						state := 1 					ELSIF (state > 0) & (buffer[i] = ".") THEN 						INC(state); 						IF (i < (rlen-1)) & (buffer[i+1] = ".") THEN 							INC(i); INC(state) 						END 					ELSE 						state := 0 					END; 					INC(i) 				END; 				IF state = 2 THEN 					maxLen := 0 				END 			END; 			Files.WriteBytes(R, buffer, rlen); 			len := in.Available(in) 		END; 		FindParam(h, cont.pos, "boundary", buffer); 		boundary := "--"; Strings.Append(boundary, buffer); 		DecodeMultipartFile(F, T, boundary, mail) 	END ReadMultipartText; 	PROCEDURE HexDigit(i: LONGINT): CHAR; 	BEGIN 		IF i < 10 THEN 			RETURN CHR(i+ORD("0")) 		ELSE 			RETURN CHR(i-10+ORD("A")) 		END 	END HexDigit; 	PROCEDURE WriteText*(T: Texts.Text; beg, end: LONGINT; out: Streams.Stream; cont: Content; mail, crlf: BOOLEAN); 		VAR 			buffer: ARRAY BufLen OF CHAR; 			R: Texts.Reader; 			i, j, offs: LONGINT; 			ch: CHAR; 			iso, quoted: BOOLEAN; 	BEGIN 		iso := cont.encoding IN {Enc8Bit, Enc7Bit, EncQuoted}; quoted := cont.encoding = EncQuoted; 		Texts.OpenReader(R, T, beg); 		offs := 0; i := 0; out.mode := Streams.binary; 		Texts.Read(R, ch); INC(beg); 		WHILE ~R.eot & (beg <= end) DO 			IF R.lib IS Fonts.Font THEN 				IF ch = Strings.CR THEN 					out.WriteBytes(out, buffer, i); 					out.WriteBytes(out, Strings.CRLF, 2); 					offs := 0; i := 0 				ELSIF mail & (ch = ".") & (offs = 0) THEN 					IF i > (MaxLine-3) THEN 						out.WriteBytes(out, buffer, i); i := 0 					END; 					buffer[i] := ch; buffer[i+1] := ch; INC(offs, 2); INC(i, 2) 				ELSIF ch # Strings.LF THEN 					IF iso THEN 						ch := Strings.OberonToISO[ORD(ch)]; 						IF ~quoted OR ((ch < CHR(128)) & (ch # "=")) THEN 							buffer[i] := ch 						ELSE 							IF i > (MaxLine-3) THEN 								out.WriteBytes(out, buffer, i); i := 0 							END; 							buffer[i] := "="; 							buffer[i+1] := HexDigit((ORD(ch) DIV 16) MOD 16); 							buffer[i+2] := HexDigit(ORD(ch) MOD 16); 							INC(i, 2); INC(offs, 2) 						END 					ELSE 						buffer[i] := ch 					END; 					INC(i); 					IF mail & (offs >= (MaxSMTPLine-5)) THEN 						j := i-1; 						WHILE (j > 0) & (buffer[j] > " ") DO 							DEC(j) 						END; 						IF j > 0 THEN 							INC(j); 							out.WriteBytes(out, buffer, j); 							out.WriteBytes(out, Strings.CRLF, 2); 							IF j < i THEN 								offs := i-j; 								FOR i := j TO offs DO 									out.WriteBytes(out, buffer[i], 1) 								END 							ELSE 								offs := 0 							END 						ELSE 							out.WriteBytes(out, buffer, i); 							out.WriteBytes(out, Strings.CRLF, 2); offs := 0 						END; 						i := 0 					ELSIF i >= MaxLine THEN 						out.WriteBytes(out, buffer, i); i := 0 					END; 					INC(offs) 				END 			END; 			Texts.Read(R, ch); INC(beg) 		END; 		out.WriteBytes(out, buffer, i); 		IF crlf THEN 			out.WriteBytes(out, Strings.CRLF, 2) 		END 	END WriteText; 	PROCEDURE WriteISOMime*(S: Streams.Stream; cont: Content); 	BEGIN 		S.mode := Streams.iso8859; 		TextStreams.WriteString(S, MimeVersion); TextStreams.WriteLn(S); 		TextStreams.WriteString(S, "Content-Type: "); TextStreams.WriteString(S, TextMime); 		TextStreams.WriteString(S, "; charset="); TextStreams.WriteString(S, ISOVer); 		TextStreams.WriteLn(S); 		IF cont.encoding = EncQuoted THEN 			TextStreams.WriteString(S, ContEncQuoted) 		ELSIF cont.encoding = Enc7Bit THEN 			TextStreams.WriteString(S, ContEnc7Bit) 		ELSE 			TextStreams.WriteString(S, ContEnc8Bit) 		END; 		TextStreams.WriteLn(S); 		IF (cont.len > 0) & (cont.len < MAX(LONGINT)) THEN 			TextStreams.WriteString(S, "Content-Length: "); TextStreams.WriteInt(S, cont.len, 0); TextStreams.WriteLn(S) 		END 	END WriteISOMime; BEGIN 	LoadTypes END MIME.

title: Oberon/A2/Oberon.MIME.Mod


text:
User talk:Oak22

Welcome
Welcome, Oak22!

If you have any questions, you can ask in the assistance reading room or possibly contact me personally.

The Syntaxhighlight feature is a good way to make your code look neater, and I recommend that you use it. Leaderboard (discuss • contribs) 18:52, 30 August 2019 (UTC)

title: User talk:Oak22


text:
Talk:Puzzles/Set theory puzzles/Infinite Hotel

countable and infinite? Is that not an oxymoron?


text:
User talk:3forme33

--Pi zero (discuss • contribs) 00:47, 31 August 2019 (UTC)

title: User talk:3forme33


text:
Wikijunior:How Things Are Made/Rubber

What is rubber?
Rubber, which derives from plants that grow best in an equatorial climate, was first discovered by European explorers in the Americas, where Christopher Columbus encountered Mayan Indians using water-proof shoes and bottles made from the substance. Intrigued, he carried several Mayan rubber items on his return voyage to Europe. The word rubber was born in 1770, when an English chemist named Joseph Priestley discovered that hardened pieces of rubber would rub out pencil marks.

In the late nineteenth century, British rubber manufacturers began to foster the development of rubber plantations in British colonies like Malaya and Ceylon. Rubber plantations thrived in the warm climate of Southeast Asia, and the European rubber industry thrived as well, because now it could avoid the expense of importing rubber from the Americas, which lay beyond Britain's political and economic control.

List
The products listed here are mainly rubber based.

title: Wikijunior:How Things Are Made/Rubber


text:
Wikijunior:How Things Are Made/Rubber/Tire

Products
Tires (or tyres) are used to attached as most of the major transport vehicle wheels and are mostly made of rubbers.

What do we need to make this thing?
Rubber is the main raw material used in manufacturing tires, and both natural and synthetic rubber are used. Natural rubber is found as a milky liquid in the bark of the rubber tree, Hevea Brasiliensis.

The other primary ingredient in tire rubber is carbon black. Carbon black is a fine, soft powder created when crude oil or natural gas is burned with a limited amount of oxygen, causing incomplete combustion and creating a large amount of fine soot.

What is the step by step process?

 * Step 1: The first step in the tire manufacturing process is the mixing of raw materials to form the rubber compound. Gigantic mixers, hanging like vertical cement mixers, stir the rubber and chemicals together in batches
 * Step 2: Each mix is then re-milled second time with additional heating to soften the batch and additional chemicals are mixed.
 * Step 3: For third milling, the batch goes through a mixer again, here additional chemicals are added to form what is known as the final mix. During all three steps of mixing, heat and friction are applied to the batch to soften the rubber and evenly distribute the chemicals.
 * Step 4: Once a batch of rubber has been mixed, it goes through powerful rolling mills that squeeze the batch into thick sheets. These sheets are then used to make the specific parts of the tire.
 * Step 5: For the beads of a tire, wire bundles are formed on a wire wrapping machine. The bundles are then formed into rings, and the rings are covered with rubber.
 * Step 6: The rubber for the tire tread and sidewalls travels from the batch mixer to another type of processing machine called an extruder. In the extruder, the batch is further mixed and heated and is then forced out through a die-a shaped orifice-to form a layer of rubber. Sidewall rubber is covered with a protective plastic sheet and rolled. Tread rubber is sliced into strips and loaded into large, flat metal cases called books.
 * Step 7: The rolls of sidewall rubber, the books containing tread rubber, and the racks of beads are all delivered to a skilled assembler at a tire-building machine.
 * Step 8: At the center of the machine is a collapsible rotating drum that holds the tire parts. The tire assembler starts building a tire by wrapping the rubber-covered fabric plies of the body around the machine drum. After the ends of these plies are joined with glue, the beads are added and locked into place with additional tire body plies laid over the beads. Next, the assembler uses special power tools to shape the edges of the tire plies. Finally, the extruded rubber layers for the sidewalls and tread are glued into place, and the assembled tire-the green tire-is removed from the tire-building machine.
 * Step 9: A green tire is placed inside a large mold for the curing process. A tire mold is shaped like a monstrous metal clam which opens to reveal a large, flexible balloon called a bladder. The green tire is placed over the bladder and, as the clamshell mold closes, the bladder fills with steam and expands to shape the tire and force the blank tread rubber against the raised interior of the mold. During this curing process, the steam heats the green tire up to 280 degrees. The longer it is inside the mold, the harder the tyre will become.
 * Step 10: The tire is placed on a test wheel, inflated, and spun. Sensors in the test wheel measure the balance of the tire and determine if the tire runs in a straight line.


text:
Wikijunior:How Things Are Made/Metal

This pages listed all the materials that are metal based

title: Wikijunior:How Things Are Made/Metal


text:
Wikijunior:How Things Are Made/Metal/Nails

Products
Nails consists of a metal rod or shank, pointed at one end and usually having a formed head at the other side. It can be hammered into pieces of wood or other materials to fasten them together.

What do we need to make this thing?
Most nails are made of steel. Aluminum, copper, brass, bronze, stainless steel, nickel, silver, monel, zinc, and iron are also used.

What is the step by step process?

 * Step 1: Wire is drawn from a coil and fed into the nail-making machine where it is gripped by a pair of gripper dies. The shape of the head of the nail has been machined into the end of the dies.
 * Step 2: While the dies clamp the wire in place,the free end of the wire is struck by a mechanical hammer. This deforms the end of the wire into the die cavity to form the head of the nail.
 * Step 3: With the wire still clamped in the dies, a set of shaped cutters strike the opposite end of the nail, forming the point and cutting the nail free from the rest of the wire coming off the coil.
 * Step 4: The dies open and an expelling mechanism knocks the nail into a collection pan below the machine. The free end of the wire is drawn from the coil and fed into the machine. The cycle then begins again.
 * Step 5: The nails are cleaned in a rotating barrel filled with hot caustic soda. This removes any oil from the forming machine and cleans up any small metal scraps, or nipping, that might be clinging to the nails.


text:
Algorithm Implementation/Mathematics/Polynomial interpolation

Lagrange interpolation is an algorithm which returns the polynomial of minimum degree which passes through a given set of points {$(x_{i}, y_{i})$}.

Algorithm
Given the $n$ points $(x_{0}, y_{0}), ..., (x_{n-1}, y_{n-1})$, compute the Lagrange polynomial $$p(x) = \sum_{i=0,...,n-1}y_i\frac{\prod_{j\neq i}(x-x_j)}{\prod_{j\neq i}(x_i-x_j)}$$. Note that the $i^{th}$ term in the sum, $$y_i\frac{\prod_{j\neq i}(x-x_j)}{\prod_{j\neq i}(x_i-x_j)}$$ is constructed so that when $x_{j}$ is substituted for $x$ to have a value of zero whenever $j≠i$, and a value of $y_{j}$ whenever $j$ = $i$. The resulting Lagrange polynomial is the sum of these terms, so has a value of $p(x_{j})$ = $0 + 0 + ... + y_{j} + ... + 0$ = $y_{j}$ for each of the specified points $(x_{j}, y_{j})$.

In both the pseudocode and each implementation below, the polynomial $p(x)$ = $a_{0} + a_{1}x + a_{2}x^{2} + ... + a_{n-1}x^{n-1}$ is represented as an array of it's coefficients, $(a_{0}, a_{1}, a_{2}, ..., a_{n-1})$.

Pseudocode
algorithm lagrange-interpolate is input: points $(x_{0}, y_{0}), ..., (x_{n-1}, y_{n-1})$ output: Polynomial p such that $p(x)$ passes through the input points and is of minimal degree for each point (xi, yi) do compute tmp := $$y_i/\prod_{j\neq i}(x_i-x_j)$$ compute term := tmp*$$\left(\prod_{j\neq i}(x-x_j)\right)$$ return p, the sum of the values of term

In sample implementations below, the polynomial $p(x)$ = $a_{0} + a_{1}x + a_{2}x^{2} + ... + a_{n-1}x^{n-1}$ is represented as an array of it's coefficients, $(a_{0}, a_{1}, a_{2}, ..., a_{n-1})$.

While the code is written to expect points taken from the real numbers (aka floating point), returning a polynomial with coefficients in the reals, this basic algorithm can be adapted to work with inputs and polynomial coefficients from any field, such as the complex numbers, integers mod a prime or finite fields.


text:
User:Lukhozi

our stories our diaries

title: User:Lukhozi


text:
User talk:Lukhozi

Diary ka Yolanda : ndimthanda enjalo
Introduction 💛

Hi guys my name is Yolanda yollz Dlamini 💕 I am 23 years old and I am doing my fifth year in varsity I live with my mom,dad and my sister I have one freind ( amahle) we are in the same varsity she is my neighbor 💕

Mom( phelisa Dlamini 💕 she is 43 years old and a nurse)

Dad( John Dlamini 💕 he is 47 years old and a business man 💞)

Sister( snalo she is 7 years old and doing grade 3 the way she is brilliant is making me proud)

I have no boyfriend and I am still a virgin 🔐 i have one ex from high school ( lunga)

I need your support ke guys💋

 * 1) Yollz💛💘💛💦✌ Lukhozi (discuss • contribs) 16:52, 31 August 2019 (UTC)

Diary ka Yolanda: ndimthanda enjalo
Insert 1✌💦

Yollz's POV 💛

Friday morning 🌄☀

Trrrrrr 🕧 🔊 Argh that's my alarm today I am not attending today yhay💃🎉 I turned off the alarm and slept again

I woked up and checked the time it was 11: 30am ndivukile ezigubeni ndondlula ibhedi 🛏 ndavula I curtains ne festile then ndathatha I gown yam epink nayinxiba ne morning shoes ezipink ndaya downstairs ndifike kungekho mntu ooh kanene umama no snalo base town and udaddy yena andimazi ndaya eroomini yomama nxa ndifika udaddy uleli nomama ka pretty ( my enemy) babe bebusy ndiye ndathatha ifoun yam Ndaba record (er) xa begqiba ndakhawuleza ndayi saver gqiba ndabaleka ndaya ekitchini ndazenzela ukutya 🥣 then utata wehla enxibe I gown yakhe wathatha Amanzi efrigini

Dad: morning princess ☺

Me: morning 😬

Dad: what's wrong princess ☺

Me: it's nothing dad( faking a smile)🙂

Dad: oky☺

Waphuma Waya upstairs e roomini yakhe ndiye ndagqiba ukutya ndahlamba isitya Sam gqiba ndaphindela ezigubeni Kuba bekubanda phandle🌫🌬🌀❄

 * 1) Yollz🔥🔥💛💦✌💘💋💕 Lukhozi (discuss • contribs) 17:06, 31 August 2019 (UTC)

title: User talk:Lukhozi


text:
Puzzles/Stripe

Stripe are type of puzzles which stripes (lines) had to be drawn in order to complete the puzzle.

Rules

 * Join all dots (without exceptions) to form a single loop
 * The loop cannot cross or touch itself at any points
 * Only horizontal and vertical lines between dots are allowed
 * Some parts of the loop are already given

Rules

 * Join circled numbers with horizontal or vertical lines
 * Each number must have as many lines connected to it as specified by its value
 * No more than 2 lines may join any pair of numbers and no line may cross
 * The finished layout must connect all numbers, so that you can travel between any pair of numbers by following one or more lines

Rules

 * Draw a single horizontal or vertical lines across full width or the height of the center of every white cell
 * The total length of all lines touching each black cells must be equal to the number printed on the cell. The length of a line is the number of cells it cover

Rules

 * Draw a single loop by connecting together some dots so that each numbered square has the specified number of adjacent line segment
 * Dots can only be joined by horizontal or vertical lines
 * The loop cannot touch, cross or overlap itself in any way.

Rules

 * Draw a series of separate path, each connecting a pair of identical numbers
 * No more than one line can enter any cell, and line can travel horizontally, or vertically between cells.

Rules

 * Draw a single loop by joining empty cells with horizontal and vertical lines, such that the loop do not revisit any cell.
 * Any empty cells which the loop does not visit must be shaded. Shaded cells cannot touch except diagonally
 * Arrows in cells indicate exact number of shaded cells in given direction
 * Not all of shaded cells are identified by arrows

Rules

 * Draw a single loop using only horizontal and vertical lines that passes through center of each every circle
 * White circle - Pass thru in a straight line
 * Black circle - 90 degrees turn
 * If the loop hit the wall, need to turn 90 degrees
 * The loop cannot enter any cells more than once

title: Puzzles/Stripe