OpenLLM-France/wikimedia huggingface dataset:
# Aros/Developer/Docs/HIDD/IRQ

* Navbar for the Aros wikibook
* Aros User
* Aros User Docs
* Aros User FAQs
* Aros User Applications
* Aros User DOS Shell
* Aros/User/AmigaLegacy
* Aros Dev Docs
* Aros Developer Docs
* Porting Software from AmigaOS/SDL
* For Zune Beginners
* Zune .MUI Classes
* For SDL Beginners
* Aros Developer BuildSystem
* Specific platforms
* Aros x86 Complete System HCL
* Aros x86 Audio/Video Support
* Aros x86 Network Support
* Aros Intel AMD x86 Installing
* Aros Storage Support IDE SATA etc
* Aros Poseidon USB Support
* x86-64 Support
* Motorola 68k Amiga Support
* Linux and FreeBSD Support
* Windows Mingw and MacOSX Support
* Android Support
* Arm Raspberry Pi Support
* PPC Power Architecture
* misc
* Aros Public License

## Introduction

HIDD API is, in fact, heavyweight. You need to open a HIDD library, open oop.library, instantiate an object (even if there's no object in fact, like in this case); and object calls are more costly then plain library calls.
* Object-oriented approach is good for implementing complex things, because it provides code reuse. It's proven to be nice for graphics and PCI code. But what is IRQ handling? It's just lists, nothing more. You either add or remove handlers, the rest is out of your control.
* In fact the developer should not interact with "IRQ number" entity at all. Our PCI API is incomplete, because it lacks "Add interrupt handler for the device" method. Current approach works only on PC-alike machines, with 1:1 relationship of PCI and system IRQs.
For example, on Amiga there's no such relationship. There all PCI devices share the same system interrupt, which needs to be de-multiplexed using bridge-specific code. Consequently, direct IRQ handling is needed only by:
* lowlevel system components, like PCI driver itself.
* Non-autoconfigurable devices with hardwired IRQs (PC legacy devices).
But doesn't this 'developer should not interact with "IRQ number"' make the KrnAddIRQHandler also wrong from 3rd party developers point of view? Shouldn't the function be moved to pci device object and have it talk with kernel? A proper API would work in terms of "events" or "messages". Interrupts would just be an implementation detail. Or perhaps a signals-slots paradigm. There's some literature out there that compares the two approaches.

## References

Having irq.hidd a thin wrapper over kernel.resource functions is a good think because it gives developers a cohesive interface to work against - always HIDD (irq, pci, graphics, etc). Don't see how such a wrapper can be useful, IMHO it only over complicates things.
many places where struct Interrupt's is_Code is being called with different signatures:
.. and numerous places where drivers are setting up is_Code with functions with different calling signatures but they _should_ be called with the same calling sequence.
On stack-call architectures, the other problems mentioned may lead to bigger issues (different # of arguments).
# Bicycles/Maintenance and Repair/Chains/Chain clean and lube

Chapters: 01. Introduction 02. What Style of Riding is for Me 03. Equipment and Accessories
04. Riding tips and safety tips 05. Guide to safety 06. Maintenance and repair 07. Modifications External Links

### STEP 1: Chain Cleaning

Before you lubricate a chain, any dirt or old lube has to be wiped off. This can be done in different ways: for example, you may use a chain cleaner such as the one we see in the picture above. This device needs to be filled to a certain extent with chain degreaser.

### STEP 2: Chain Lubing

Drip fresh lube onto each link. Then turn the cranks backwards a few turns and wipe off any excess chain lube that has come to the surface (this old/excess lube will be black.)

#### Dry or wet lube?

Commonly dry and wet chain lubrication are utilized. A dry lube hardens on the chain and is excellent for dusty rides, but does not protect from moisture and is typically used in hot summer climates. A wet lube is used whenever there is a chance of water getting on the chain. The downside of a wet lube is that dirt readily clings to it causing wear of the bike's transmission components.
# Bicycles/Maintenance and Repair/Chains/Checking chain wear

Chapters: 01. Introduction 02. What Style of Riding is for Me 03. Equipment and Accessories
04. Riding tips and safety tips 05. Guide to safety 06. Maintenance and repair 07. Modifications External Links
* This chain is not worn out yet
* A worn out chain
Chains increase in length over time due to wear on the pins and bushings. Continuing to use a chain that is beyond a reasonable length can not only cause the chain to "skip" when pedalling under pressure but will also wear out the rest of your drivetrain as the teeth on the cassette/freewheel and chainrings try to match the length of the chain. If you catch a chain before it is too worn you can dramatically increase the life of the rest of your drivetrain.
To check the length of your chain there are two methods.
The ruler method requires only a ruler and is more accurate. Line up a rivet with the zero mark on a standard ruler. Next, you look for the closest rivet to the 12" (304.8mm) mark. On a new chain the rivet will line up exactly, if the rivet is 1/8" (3.175mm) or more past the 12" (304.8mm) mark, the chain needs to be replaced.
If you have access to a tool (e.g. Park CC-2), you can put the pins of the tool into the chain and rotate a dial to obtain a reading indicating the length of your chain. A reading of under 0.5% means the chain is okay, and over 0.5% means the chain needs to be replaced.
If, when you replace your chain, it skips under pressure, this is an indicator that other parts of your drivetrain need to be replaced too.
First of all replace the block (freewheel or cassette), if that does not cure the problem you may need to replace the chainrings.
More information: http://sheldonbrown.com/chains.html How to clean your chain: http://www.youtube.com/watch?v=kMGxiLc8jHE
Trouble Shooting Guide http://chain-guide.com/basics/7-1-6-troubleshooting.html
If there doesn't seem to be any wear be sure that your derailleur is in the correct position. If you still have problems with the chain riding up and skipping, see this walk through: http://bicycles.stackexchange.com/questions/9534/why-is-my-chain-riding-up-and-skipping-teeth-on-the-freewheel
# Bicycles/Maintenance and Repair/Brakes/Coaster Brakes

Chapters: 01. Introduction 02. What Style of Riding is for Me 03. Equipment and Accessories
04. Riding tips and safety tips 05. Guide to safety 06. Maintenance and repair 07. Modifications External Links

## Coaster Brakes

Coaster brakes don't need adjusting but they may need lubricating to reduce wear. They are supposed to be greased with a special high viscosity lubricant such as Sachs: "fett fur stahlbremsmantel" which is likely no longer available. So instead use a cheap, high friction grease. To take the hub apart, Torpedo and Sturmey Archer say to start on the brake lever side, but I've seen the opposite proposed.
However, you need to take apart the hub to apply grease so it's a lot easier to lubricate the brakes with heavy oil that doesn't contain anti-friction additives. Apply it via an oil filler hole in the hub (if it exists). Don't use oil with anti-friction additives such as teflon or graphite that will result in slippery brakes.
On a long downgrade of over 1000 feet (300 M) the coaster brake may overheat and the any oil in it may boil and smoke. One may try filling the hub with water to keep the brakes cool by generating steam. Make sure that all the water has boiled off by the end of your trip. Do not expect a coaster brake to perform reliably or safely in hilly terrain. It's even possible to melt metal inside the hub. Also realize that if your chain derails or breaks, your coaster brake will no longer function.

## See Also

* Adjusting Rim Brakes
# Bicycles/Maintenance and Repair/Brakes

Chapters: 01. Introduction 02. What Style of Riding is for Me 03. Equipment and Accessories
04. Riding tips and safety tips 05. Guide to safety 06. Maintenance and repair 07. Modifications External Links

## Brakes

There are many different types of brakes for bicycles. Most bicycle brake systems have three basic parts: a mechanism for the rider to apply the brakes, such as brake levers or pedals; cables or the bicycle chain to enact the braking of the bicycle; and the brake itself, a pad or the reversal of momentum, which actually stops the bicycle with pressure.
Brake cables often come loose, pads often become slick in the rain or worn down, and these problems should be addressed immediately for safe riding.

## See Also

   * Cables and Housings
   * Adjusting brakes
   * Coaster brakes
# Bicycles/Maintenance and Repair/Chains

Chapters: 01. Introduction 02. What Style of Riding is for Me 03. Equipment and Accessories
04. Riding tips and safety tips 05. Guide to safety 06. Maintenance and repair 07. Modifications External Links

## See Also

   * Chain sizes
   * Chain cleaning and lubrication
   * Checking a chain for wear
   * Removing a bicycle chain
   * Mending a broken chain

## External Links

* The Complete Guide to Chain - general, not specific to bicycles
# Biology, Answering the Big Questions of Life/Organic Chemistry
## Lab 3 - Organic Chemistry Lab

Organic molecules are chemicals which contain carbon. The structure of a molecule and its charge determine whether or not it will dissolve in water.
Chemicals which can dissolve in water are said to be 'hydrophilic'(water loving) while those which do not dissolve in water are said to be 'hydrophobic' (water fearing).
In the cell, hydrophilic molecules are found in the cytoplasm, while hydrophobic molecules are found in the phospholipid membranes.
Some molecules have both hydrophilic and hydrophobic parts. These molecules are said to be 'amphipathic'.
Phospholipids, the molecules which make up the plasma membrane are amphipathic, they have a charged phosphate group which is hydrophilic as well as a hydrocarbon chain which is hydrophobic. This allows cells to remain dissolved in water.
Amphipathic chemicals will form 'emulsions'. Solutions where oil droplets stay suspended in the water. Hydrophobic molecules will separate into the oil layer, while hydrophilic molecules will dissolve in the water fraction of the cell.
In this lab we will determine if molecules are hydrophilic, hydrophobic or amphipathic.

### Instructions:

1. Place four test tubes with lids in a test tube rack. Fill each tube to about 1/4 full with corn oil, then Add water until tube is about 2/3 full.
2. Add the following to each tube.
* Tube 1 - Control (do not add anything to this tube)
* Tube 2 - Sudan IV dye ( about 10 to 12 drops)
* Tube 3 - Methylene blue (about 5 drops)
* Tube 4 - Dishwashing detergent (about 1/2 dropper)
3. Seal each test tube and mix it well.
4. Let the tubes sit for several minutes in the test tube rack as the solutions separate out.
5. Sketch each tube showing whether the substance dissolved in the oil or water fraction. If the tube does not separate out after several minutes, and the control has separated, list the chemical as amphipathic.
6. Fill the table.
| Tube number | Description of tube | hydrophilic/hydrophobic/amphipathic |
# Biology, Answering the Big Questions of Life/Plants

The world around us is full of plants. Trees, flowers, and grass surround us all of our lives, but what are plants? What makes a plant a plant and an animal an animal? Why don't plants move? This chapter talks about plants and why they are something that humans can't live without.
# Biology, Answering the Big Questions of Life/Osmosis

--Red Onion Osmosis Lab -- Make a wet mount of the onion leaf. Use a small piece of paper towel to pull a salt solution through the mount by placing a drop of salt water on one side of the coverglass, and the paper towel on the other.
Using red onion really helps in this lab because the cells are already dyed. The problem is that you cannot use the thin membrane between the onion layers to perform this experiment. You must peel the top layer off of the onion off to do this lab. For this reason, It may be prudent for the instructor to use a razor blade and prepare the samples in advance.
Smaller samples will make better pictures. Closing the diaphram on the condensor will prevent the sample from appearing washed out under the microscope.
Students should focus on only the colored layer of cells. For best results focus on the cells on the edge of the sample as the salt will affect them first.
We prepared a 20% by weight salt solution and observed results within 5 minutes.

### Alternatives

This laboratory can be done with other plant cells, but cells with many chloroplasts, such as Elodea are the best.
Onion skin slides can be made and dyed with iodine which makes the cells slightly yellow. (Note) Iodine fixes (kills) the cells. To make onion skin slides, peel a piece of onion. The skin is a thin area on the bottom of an onion leaf that can be peeled off and laid between a slide and a coverglass in a wet mount.
A demonstration can be done with blood cells, but remember that in this era fear of AIDS means that all blood samples must be treated with extreme caution. See your administrator before doing any laboratory using blood.
# Biology, Answering the Big Questions of Life/Osmosis lab

Osmosis is defined as the diffusion of water (solvent) from areas of high solvent (more amount of water) concentration to areas of low solvent (less amount of water) concentration across a semi-permeable membrane.
We call the liquid with more dissolved solutes in it a hypertonic solution and the liquid with less dissolved solutes is called a hypotonic solution. If the solutions on both sides of the membrane have the same concentration, it is called isotonic. In osmosis, water moves from a hypotonic solution to a hypertonic solution.
All organisms must have strategies to deal with the movement of water into and out of their cells by osmosis. Plant cells usually have more dissolved solvents inside their cells than the water found in the soil. Because of this, water will rush into the cells. To prevent the cells from bursting (lysis), plant cells are surrounded by a hard cell wall.
If the plant finds itself in a hypertonic solution, water will rush out of the cells causing the cells to shrivel up. This process is called plasmolysis.
In this lab we will observe plasmolysis in red onion cells.

## Instructions:

   * Make a wet mount of red onion cells.
   * Observe the red cells under the microscope at 100X and 400X.
   * Draw the cells and label this drawing BEFORE.
   * While keeping the slide under the microscope.
Add a few drops of 20% salt solution to the edge of the slide. You may need to pull the liquid across by placing a piece of paper on the opposite side of the slide at the edge of the coverslip.
   * Observe the cells. You may have to refocus the image as the increased liquid will change the location of the coverslip.
   * Draw the image and label this cell AFTER.
   * Explain what happened to the cells.

### Alternative Instructions:

Alternative 1: You may do the same using a small slice of potato, if red onion skin is not available.
Alternative 2 (only if there is no access to a microscope): Look at this image. Which diagram represents cells in regular blood? Which represents cells in pure water? Which represents cells in a saturated salt solution? Answer these questions, then look at this article and check your answers. Then write a conjecture about why one's fingers seem "pruny" after a long bath, but not after being in the ocean for an extended time.
Warning
    Always wear gloves when doing experiments using blood samples.
# Biology, Answering the Big Questions of Life/Organic chem
## Laboratory Setup

In this laboratory it is important to rinse all glassware well before use. Trace amounts of detergent on the glassware will affect the results.
The experiment requires about: 15 minutes of student prep, 5 minutes to perform, and 15 - 20 minutes clean up.

### The dyes

Sudan IV is a strongly hydrophobic dye and will give good results, but it does have some health hazards, so you may want the students to wear gloves.
Read the stains file entry on Sudan IV here.
http://stainsfile.info/StainsFile/dyes/26105.htm
Methylene blue is pretty safe. It may be an irritant. It is hydrophilic, but if there is detergent in the glass blue dots will also be suspended in the emulsion making results unclear.
The detergent will form an emulsion. Have the students compare the tubes to the control if they have difficulty determining which dyes are hydrophobic.
If Methelene blue is unavailable, most store-bought food colorings will do. For inexpensive hydrophobic dyes, you might try a deep colored oil. Although I have not had a chance to test it, some brands of hot pepper oil found in the Asian sections of grocery stores are dyed with red dye that may work in this experiment. Test out different substances before hand to see which work best.

## relevance

This process of extracting chemicals by seeing which fraction (oil or water) they will dissolve in is a basic technique in organic chemistry.
# C Programming/wchar.h/fgetws

fgetws is a function in the C programming language. It is wide-character version of the function fgets. The w in fgetws is for wide. A string is read as a multibyte-character or a wide character string by fgetws depending on whether the stream is opened in text/binary mode respectively. The fgetws subroutine reads characters from the input stream, converts them to the corresponding wide character codes, and places them in the array pointed to by the string parameter.
The subroutine continues until either:
* The number of characters specified by the number parameter '-1' are read
* The subroutine encounters a newline or EOF character.
The fgetws subroutine terminates the wide character string with a NULL wide character.

## Parameters

fgetws has three parameters:
* string - a string used to provide storage location for data
* n - the maximum number of readable characters
* stream - a FILE pointer

## Requirements

Although fgetws is wider relative to fgets, it can be compiled by an additional optional header along with stdio.h called wchar.h. However, fgets requires stdio.h compulsorily. Hence, fgetws provides option.

## Return value

Just as fgets function, fgetws function also returns the same value string i.e. a ws is returned on success. The error condition is taken care-of by this function using a NULL pointer. A Null pointer is returned to the function-called for error or even at EOF(end of file). One can use also use the feof or ferror for error determination.

## Compatibility

ubuntu, fedora, ANSI, Win 98, Win Me, Win NT, Win 2000, Win XP

## References

* http://pubs.opengroup.org/onlinepubs/009695399/functions/fgetws.html
* http://www.freebsd.org/cgi/man.cgi?query=fgetws&apropos=0&sektion=0&manpath=FreeBSD+7.1-RELEASE&format
* http://msdn.microsoft.com/en-us/library/c37dh6kf(v=vs.71).aspx
* http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.basetechref/doc/basetrf1/getws.htm
# C Programming/wchar.h/mbrlen

mbrlen is the standard library function used to determine the length of the multi-byte character using conversion state . The mbrlen function differ from 'mblen' 'mblen l' by its restartability.

## Need

To use this function in program one include the standard header file<wchar.h>.

## Syntax

the mbrlen function inspects at most maxsize of the string pointed i.e. s and extracts the next complete multibyte character . It updates the shift state *ps .If the multibyte character is not the NULL wide character , it returns the number of the bytes that were consumed by s.

## Return value

(size_t) - 2 : the resulting conversion state indicates an incomplete multibyte character after all maxsize character were converted .
(size_t) - 1 : the function detected an encoding error before completing the next multibyte character, in which case the function errno to EILSEQ amd leaves the resulting conversion state undefined.
0 : the next complete character is a null character , in which case the resulting conversion state is the initial conversion state .
positive : if the next n or fewer byte complete a valid character ; the value returned shall be the number of bytes that complete the character .

## Sources

* http://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrlen.html .
* http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_lib_re/m/mbrlen.html.
* http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf1/mbrlen.htm.
# C Programming/wchar.h/mbrtowc

mbrtowc function is used for converting the multibyte character to wide character using conversion state.

## mbrtowc
#### Function of mbrtowc

mbrtowc convert the multibyte character to wide character using conversion states

#### SYNOPSIS of a function mbrtowc:

#include <wchar.h>
size_t mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);

#### Description of mbrtowc function:

Let us consider s is a Null pointer. Then mbrtowc function can be called as: mbrtowc(NULL, "", 1, ps); Here value of pwc and n is ignored. If s is not NULL, function should inspects mostly n bytes starting from where first s is pointed for the determination of number of bytes that will be needed for the completion of next character and it determines the value of corresponding wide character. And then if pwc is not a null pointer,it stored that value in the object pointed by pwc. If that corresponding wide character is wide null character then whatever is the resulting state described is the initial conversion state. If the specified state pointer i.e. if ps is a null pointer then mbrtowc function should use its own mbstate_t object, which shall be initialized to the initial conversion state at the starting of the program. Otherwise mbstate_t object pointed to by ps should be used to describe the current conversion state of the associated character sequence.

#### Parameter used:

s:
s is used as string whose bytes are to be converted or counted.
n:
n is used for specification of maximum number of bytes for examination.
ps:
ps is the conversion state. If this is null then internal mbstate_t object is used.

#### Return values:

0:
It returns 0 when the next count or fewer bytes complete the multibyte character that represent a null wide character.
>0:
It returns the value greater than zero i.e. positive value when the next count or fewer bytes complete the valid multibyte character, the value return is the number of bytes that complete the multibyte character.
-1:
It returns -1 when an encoding error occurs, i.e. the next count or fewer bytes don't contribute for complete and valid multibyte character, the errno value will be EILSEQ and the conversion state is confusing as it can be understood in more ways.
-2
It returns -2 when the next count bytes contribute to an incomplete multibyte and all count bytes have been processed.
http://pubs.opengroup.org/onlinepubs/009604499/functions/mbrtowc.html