OpenLLM-France/wikimedia huggingface dataset:
# Ada Programming/Libraries/System.Address Image
## Description

Address_Image is a GNAT specific function that returns a string (hexadecimal digits with upper-case letters) representing the address (string is 8/16 bytes for 32/64-bit machines).
The Address_Image function is a child unit of the System package.

## See also

* GNAT Reference Manual - 9.87 System.Address_Image (s-addima.ads)

### Wikibook

* Ada Programming
* Ada Programming/Libraries
* Ada Programming/Libraries/System

### Ada Reference Manual

- extension to the standard -
# Ada Programming/Libraries/System.Atomic Operations.Exchange

This language feature has been introduced in Ada 2022.
System.Atomic Operations.Exchange is a unit of the Predefined Language Environment since Ada 2022.
# Ada Programming/Libraries/System.Atomic Operations.Integer Arithmetic

This language feature has been introduced in Ada 2022.
System.Atomic Operations.Integer_Arithmetic is a unit of the Predefined Language Environment since Ada 2022.
The operations of this package are defined as follows:
# A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Data Representation/Gray coding

Changing binary numbers from one value to another can involve changing several bits at once. For example changing from 7 to 8, 0111 to 1000 involves 4 digits changing, but why is this an issue?
As you know, computers are very fast and sometimes multiple things happen at once, especially if you are dealing with realtime systems. If program 'A' wanted to read a number stored by program 'B', and read the number mid way through that number changing, program 'A' might read a midstate, an incorrect number.
Hello Penwell, i can see u (;
Taking the simple example above, imagine if we were dealing with money where program B was working out the interest on your account, increasing your money from £7 to £8. Program A might be a cash machine telling you how much money you had in your account. If you look at the program above you see that the cash machine would tell you that you had £13, so you take out £13 and then become immediately overdrawn. (Bank databases actually use locking to solve this, but the example is a good one).
This could be particularly catastrophic if this error occurred in the military. Can you imagine an anti-air battery (Program A) deciding where to fire its missiles, and due to reading the direction of enemy planes stored on a remote radar system (Program B), shooting the missile in the wrong direction and shooting down an allied plane!
What is needed is Gray Code, a number system that changes one bit at a time to avoid midstates. Take a look at the examples below and see how only one bit changes for subsequent number:
| Binary Number | Gray Code |
| Rotary encoder for angle-measuring devices marked in 3-bit binary 0 = 000 1 = 001 2 = 010 3 = 011 4 = 100 5 = 101 6 = 110 7 = 111 | Rotary encoder for angle-measuring devices marked in 3-bit binary-reflected Gray code (BRGC) 0 = 000 1 = 001 2 = 011 3 = 010 4 = 110 5 = 111 6 = 101 7 = 100 |
Usually in the exam you wouldn't be asked to convert anything more that 3 or 4 bits. But in case you do here is an easy method for converting binary to gray code.
* Take the first bit as it is.
* For the next bit, add the previous bit to the current bit.
* If you have a carry ignore it. E.g. 1+1=10. Take it as 0 rather than 10.
* Repeat for the rest of the bits.
* Exercise: Gray Code
* Explain how Gray Code works:
* Answer:
* Gray code works by only one bit changing between subsequent numbers. This is to avoid midstates
* Explain why we might want to use Gray Code
* Answer:
* We need to use gray code in situations where we are worried about midstates. That means in situations where we might accidentally read a value before it has completely changed from one state to another, giving us an incorrect value.
* Complete the following sequence of Gray Code states:
* 0 = 000
* 1 = 001
* 2 = ...
* 3 = ...
* 4 = ...
* 5 = 111
* 6 = 101
* 7 = 100
* Answer:
* 0 = 000
* 1 = 001
* 2 = 011
* 3 = 010
* 4 = 110
* 5 = 111
* 6 = 101
* 7 = 100
# A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Data Representation/Sound synthesis

Sound Synthesisers are also used to create electronic sounds, unknown in the traditional music scene. In 1951 the University of Manchester created the earliest example of computer generated music using the Ferranti Mark 1 computer. Since then computers have had a massive impact on the music industry and this section will look into sound synthesis.
Sound Synthesis generally creates smaller file sizes compared to recordings taken from live recordings such as MP3 and AAC as it records notation which the computer performs using a selection of programmed or digital instruments, rather than recording the wave forms of each second of sound. However, the recordings often don't sound as real as the live recordings. Listen to the music on the left to see what I mean.
A common means to produce sound synthesised music is by using MIDI. MIDI does not record analogue sound, but send digital signals recording musical notation, pitch and intensity, control signals for parameters such as volume, vibrato and panning, cues, and clock signals to set the tempo. The computer then interprets these commands and outputs sound corresponding to them. MIDI is a popular way to record music from devices such as electronic keyboards.
* Extension: Creating a Sound Synthesiser
* As we know each character on our keyboard has an ASCII code attached to it. We are going to take this code and turn our computer keyboard into a musical keyboard!
* console.beep(frequency,duration)
* Where frequency is the number of oscillations per second and duration is the length that the beep will last in milliseconds.
* AscW(key)
* Where AscW is the ASCII number of key pressed. Giving us:
* Dim duration As Integer = 200
* Dim frequency As Integer
* Dim key As String 'stores the numeric ASCII value
* Console.WriteLine("press any key to play music, press q to quit")
* Do
* key = Console.ReadKey.KeyChar 'get the numeric ASCII value input
* frequency = (AscW(key) + 50) * 50
* Console.Beep(frequency, duration)
* Loop Until key = "q"
* To extend this try to add the following:
* + - increase and decrease frequency
* = _ increase and decrease duration of sound
* Exercise: Sound synthesis
* Why might you prefer to use sound synthesis over recording an orchestra
* Answer:
* Sound synthesis produces smaller file sizes without loss of quality
* Sound synthesis allows for easy editing of files after they have been recorded
* Sound synthesis allows for sounds that would be unachievable using traditional instruments
* Why might you not want to use sound synthesis
* Answer:
* Sound synthesis struggles to recreate the sounds made by traditional instruments
* Sound synthesis struggles to recreate the human voice
# A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Data Representation/Error checking and correction

When you send data across the internet or even from your USB to a computer you are sending millions upon millions of ones and zeros. What would happen if one of them got corrupted? Think of this situation: You are buying a new game from an online retailer and put £40 into the payment box. You click on send and the number 40 is sent to your bank stored in a byte: 00101000. Now imagine if the second most significant bit got corrupted on its way to the bank, and the bank received the following: 01101000. You'd be paying £104 for that game! Error Checking and Correction stops things like this happening. There are many ways to detect and correct corrupted data, we are going to learn two.
# A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Data Representation/Information coding schemes

So far we have seen the different ways that binary can be used to store numbers. As we already know, most computers can only understand binary and we often need to store alpha-numeric text (numbers, letters and other characters). To do this a computer will use a coding scheme. The most popular coding schemes are ASCII and Unicode. You'll need to know how each works and the benefits and drawbacks of using them.
# A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Data Representation/Nyquist-theorem

We have seen the various ways that you can reduce the size of files, we have also seen that humans have a limit to the frequencies that they can perceive, so what sampling rate would be needed to only store the samples that humans can perceive. The full range of human hearing is between 20 Hz and 20 kHz.
* Extension: Human hearing limit
* People are able to hear different frequencies, up to what level can you hear?
* For x = 0 To 25
* Console.WriteLine("Can you hear: " & x * 1000 & "Hz?")
* Console.Beep(x * 1000, 500)
* Next
* You lose your hearing with age, so the older you are the less likely you are to be able to hear the full spectrum.
So why not just use 20 kHz as our sampling rate record 20k cycles per second and be done with it? There is a small problem:
What we need to properly represent a sound wave is to sample it at least two times per cycle:
Therefore the minimum sampling rate that satisfies the sampling for the human ear is 40 kHz (2*20 kHz). The 44.1 kHz sampling rate used for Compact Disc was chosen for this and other technical reasons.
Shannon's version of the theorem states:
   If a function x(t) contains no frequencies higher than B Hz, it is completely determined by giving its ordinates at a series of points spaced 1/(2B) seconds apart.
We can relate Frequency and period together using this equation. This equation will be very useful for working out the sample rate of a given wave.
What happens when you have a graph of time against displacement? We know that Nyquist's Theorem is that the sample rate should be double than the highest frequency. So to calculate the sample rate,
* Work out the period by looking at the time taken for one complete oscillation.
* Work out the frequency
* Work out the sample rate with this:
* Exercise: Nyquist-theorem
* Describe Nyquist's-theorem
* Answer:
* You should set the sample rate at a frequency which is at least twice the value of the highest frequency in the sampled signal
* For a sound sample of maximum frequency 16 kHz what should the sample rate be?
* Answer:
* 32 kHz
* How many cycles per second in the following sample?
* For the sample what should the sample rate be according to Nyquist's-theorem?
* Answer:
* the sample has a frequency of 4 cycles per second. using Nyquist's theorem you would have to sample this at at least 8 Hz

## References

* ↑ C. E. Shannon, "Communication in the presence of noise", Proc. Institute of Radio Engineers, vol. 37, no. 1, pp. 10–21, Jan. 1949. Reprint as classic paper in: Proc. IEEE, vol. 86, no. 2, (Feb. 1998)
# A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Data Representation/Parity bits

Sometime when you see ASCII code it only appears to have 7 bits. Surely they should be using a byte to represent a character, after all that would mean they could represent more characters than the measly 128 they can currently store (Note there is extended ASCII that uses the 8th bit as well but we don't need to cover that here). The eighth bit is used as a parity bit to detect that the data you have been sent is correct. It will not be able to tell you which digit is wrong, so it isn't corrective.
There are two types of parity odd and even. If you think back to primary school you would have learnt about odd and even numbers, hold that thought, we are going to need it.
* Odd numbers : 1,3,5,7,9
* Even numbers : 0,2,4,6,8 (note 0 is here too)
* Example: How to detect errors using parity bits
* When we send binary data we need to count the number of 1s that are present in it. For example sending the ASCII character 'B' 1000010. This has two occurrences of 1. We can then apply another bit to the front of it and send it across the internet.
* If we are using even parity 01000010
* If we are using odd parity 11000010
* Now when the data gets to the other end and we were using even parity
* 01001010 - odd parity, there has been an error in transmission, ask for data to be sent again
* 01000010 - even parity, the data has been sent correctly
* Exercise: Test your knowledge of parity bits
* Try and apply the correct parity bit to the following:
* _1011010 (even parity)
* Answer:
* 01011010
* _1011010 (odd parity)
* Answer:
* 11011010
* _1111110 (even parity)
* Answer:
* 01111110
* _0000000 (odd parity)
* Answer:
* 10000000
* However, if we receive 10010110, knowing that the number had odd parity, where is the error? The best we can do is ask for the data to be resent and hope it's correct next time. Parity bits only provide detective error. We need something that detects and corrects..
# A-level Computing/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Fundamentals of Data Representation/Comparison between vector and bitmaps

* Bitmap images scale resulting in file size increase / decrease
* Vector images scale without distortion to the image
* Bitmap images distort (pixellate) when scaling
* Bitmaps are better for photo editing
* Bitmaps require less processing power to display
* Exercise: Vector vs Bitmap
* You wish to create an image that will be made into a giant banner for the side of a building. What type should you use and why?
* Answer:
* Vector, as it allows for scaling without distortion and retaining its file size
* You wish to create an image that will be used in a game, that will run on a mobile phone and a home console. What type should you use and why?
* Answer:
* Vector, as it allows for scaling without distortion and retaining its file size. You would only need one image to use on all the different systems.
* You want to take an image of a local cat stuck in a tree. What type should you use and why?
* Answer:
* Bitmap as it is better for photographs.
# AI Art Generation Handbook/Text Prompting in Stable Diffusion
## Text Prompting in Stable Diffusion

(i) GUI Interface (Prominently used by Auto1111 , SD.Next, Fooocus , Oomost, Forge)

### Auto1111

[1] GUI Interface
[2] T2I (Text to Images)

### SD.Next

[i] GUI Interface

### Fooocus

[i] GUI Interface
# AI Art Generation Handbook/VACT/Camera Types
## Introductions

In this chapter, we are going to see the effect of camera and the lenses

## Camera Type

To ensure consistency between images, following prompt was used :
Photograph taken by << Camera Type>> showing anthropomorphic rhinoceros wearing business suit and standing on two feet
Note 1: As usual , if there are missing camera , you may want can propose the missing camera to be added in Discussion tab above.
Note 2: If anyone knows how to use the standard prompts for use on all camera in SDXL (Preferably Fooocus) , you can share the prompts with me too inside Discussion tab
| Camera Type | Remark |
| 360 Degree | Verdict : PASS |
| Action | Verdict : PASS |
| Bodycam | Verdict : PASS |
| CCTV | Verdict : PASS Note: Added token of VHS Quality for more real-to-life generations |
| Dashcam | Verdict : PASS |
| Digital | Verdict : PASS |
| Drone | Verdict : PASS |
| DSLR | Verdict : PASS |
| High Speed | Verdict : PASS Note: Added token of splashed on water for more real-to-life generations |
| iPhone | Verdict : PASS |
| Film | Verdict : PASS |
| Nokia 0.5MP | Verdict : PASS Note: Added token of low resolution for enhanced effect |
| Night Vision | Verdict : PASS |
| Pinhole | Verdict : PASS |
| Point and Shoot | Verdict : PASS |
| Polaroid | Verdict : PASS |
| Thermographic | Verdict : PASS |
| Toy | Verdict : PASS |
| Traffic Speed | Verdict : PASS |
| Trailer | Verdict : PASS |
| Underwater | Verdict : PASS |
| Vintage folding | Verdict : PASS |

## Lenses Type

To ensure consistency between images, following prompt was used :
High quality DLSR photograph taken with <<Lenses Type>> showing a single anthropomorphic rhinoceros wearing business suit and standing on two feet , background of forest
Note 1: As usual , if there are missing camera , you may want can propose the missing lenses to be added in Discussion tab above.
Note 2: If anyone knows how to use the standard prompts for use on all lenses in SDXL (Preferably Fooocus) , you can share the prompts with me too inside Discussion tab
| Lenses Type | Remark |
| Anamorphic | Verdict : PASS |
| Fish-Eye | Verdict : PASS |
| Lensebaby | Verdict : PASS |
| Macro | Verdict : PASS |
| Soft Focus | Verdict : PASS |
| Prime | Verdict : PASS |
| Telephoto | Verdict : PASS |
| Tilt Shift | Verdict : PASS |
| Wide Angle | Verdict : PASS |
| Zoom | Verdict : PASS |
# AI Art Generation Handbook/VACT/Camera Shots & Framing Techniques
## Introductions

In this chapter, we are going to see the effect of camera shots and some of the framing techniques lenses

### Camera Type

To ensure consistency between images, following prompt was used :
High quality DLSR photograph taken at <<Shot Type>> showing a single anthropomorphic rhinoceros wearing business suit and standing on two feet , background of wall's graffiti
Note 1: As usual , if there are missing camera techniques, you may want can propose the missing techniques to be added in Discussion tab above.
Note 2: If anyone knows how to use the standard prompts for use on all shot in SDXL (Preferably Fooocus) , you can share the prompts with me too inside Discussion tab
| Shot Type | Remark |
| Close Up | Verdict : PASS |
| Cowboy | Verdict : PASS |
| Dutch Angle / German Angle | Verdict: FAILUnable to generate skewed angles no matter which prompts that were used |
| Extreme Close Up | Verdict: PASS For the successful generation , removed tokens wearing business suit and standing on two feetand added face |
| Full Shot | Verdict : PASS |
| Medium Close Up | Verdict : PASS For the successful generation , removed tokens standing on two feet |
| Medium Long | Verdict : FAILAll of the images does not include the shots up to knee levels |
| Split Shot | Verdict : PASS For the successful generation , added tokens bottom half underwater |
# Ada Programming/Attributes/'Mod
## Description

Will correctly convert any integer type to a given modular type (S), using wraparound semantics.
This function returns Arg mod S'Modulus, as a value of the type of S.
# Ada Programming/Attributes/'Model Emin
## Description

Model number version of S”Machine_Emin.
Yields the smallest (most negative) value of exponent such that every value expressible in the canonical form (for the type T), having a mantissa of T'Machine_Mantissa digits, is a machine number (see 3.5.7) of the type T.
This attribute yields a value of the type universal_integer.
# Ada Programming/Attributes/'Model
## Description

Model number of floating point type.
If the Numerics Annex is not supported, the meaning of this attribute is implementation defined.
# Ada Programming/Attributes/'Modulus
## Description

X'Modulus is an Ada attribute where X is any modular type. This returns the modulus of X.

## See also
### Wikibook

* Ada Programming
* Ada Programming/Attributes

### Ada Reference Manual

* 3.5-4 Integer Types (Annotated)
* Annex K Language-Defined Attributes (Annotated)
# Ada Programming/Attributes/'Model Mantissa
## Description

Model number version of S’Machine_Mantissa.
Yields the largest value of p such that every value expressible in the canonical form (for the type T), having a p-digit mantissa and an exponent between T'Machine_Emin and T'Machine_Emax, is a machine number of the type T. This attribute yields a value of the type universal_integer.
# Ada Programming/Attributes/'Model Small
## Description

Smallest positive model number of subtype.
Yields the value T'Machine_Radix$^{T'Model_Emin–1}$. The value of this attribute is of the type universal_real.
# Ada Programming/Attributes/'Null Parameter
## Description

A reference T'Null_Parameter denotes an imaginary object of type or subtype T allocated at machine address zero. The attribute is allowed only as the default expression of a formal parameter, or as an actual expression of a subprogram call. In either case, the subprogram must be imported.
The identity of the object is represented by the address zero in the argument list, independent of the passing mechanism (explicit or default).
This capability is needed to specify that a zero address should be passed for a record or other composite object passed by reference. There is no way of indicating this without the Null_Parameter attribute.
# Ada Programming/Attributes/'Mechanism Code
## Description

func'Mechanism_Code yields an integer code for the mechanism used for the result of function func, and subprog'Mechanism_Code (n) yields the mechanism used for formal parameter number n (a static integer value, with 1 meaning the first parameter) of subprogram subprog. The code returned is:

### 1

    by copy (value)

### 2

    by reference
# Ada Programming/Attributes/'Min
## Description

'Min(X, Y) is a scalar type attribute. It returns the lesser of the two parameters.

## See also
### Wikibook

* Ada Programming
* Ada Programming/Attributes
* Ada Programming/Attributes/'Max

### Ada Reference Manual

* 3.5 Scalar Types (Annotated)
* Annex K Language-Defined Attributes (Annotated)
# Ada Programming/Attributes/'Model Epsilon
## Description

Absolute difference between the model number 1.0 and the next model number above for subtype.
Yields the value T'Machine_Radix$^{1–T'Model_Mantissa}$. The value of this attribute is of the type universal_real.
# Ada Programming/Libraries/IO

The following libraries help you when doing input/output:

## AdaCL, Ada Class Library

    A multipurpose library featuring filtering of text files, string I/O, command line parsing, etc.

## XML/Ada

    XML and Unicode support.

## Matreshka

    SAX-style XML reader and writer. Supports XML1.0 (Fifth Edition), XML1.1 (Second Edition), Namespaces in XML and XML Base Specifications. Strings, files and sockets can be used as input source in both blocking and non-blocking modes. Full Unicode support and many text codecs is provided also.

## See also
### Wikibook

* Ada Programming
* Ada Programming/Libraries
# Ada Programming/Libraries/Interfaces

The Interfaces package helps in interfacing with other programming languages. Ada is one of the few languages where interfacing with other languages is part of the language standard. The language standard defines the interfaces for C, Cobol and Fortran. Of course any implementation might define further interfaces — GNAT, for example, defines an interface to C++.
Interfacing with other languages is actually provided by pragma Export, pragma Import and pragma Convention.
In Ada 2012 these clauses have an alternate form using "with" in place of "pragma."

## Example

As an example, here is a complete program that queries the terminfo (terminal information) database on Unix systems to get the dimensions of the current terminal window. It interfaces with C language functions in the ncurses package, so it must be linked with ncurses (e.g. with the -lncurses switch) when it is compiled.

## Child Packages

* Interfaces.C
** Interfaces.C.Extensions (GNAT)
** Interfaces.C.Pointers
** Interfaces.C.Streams (GNAT)
** Interfaces.C.Strings
* Interfaces.CPP (GNAT)
* Interfaces.COBOL
* Interfaces.Fortran
* Interfaces.OS2Lib (GNAT, OS/2)
** Interfaces.OS2Lib.Errors (GNAT, OS/2)
** Interfaces.OS2Lib.Synchronization (GNAT, OS/2)
** Interfaces.OS2Lib.Threads (GNAT, OS/2)
* Interfaces.Packed_Decimal (GNAT)
* Interfaces.VxWorks (GNAT, VxWorks)
** Interfaces.VxWorks.IO (GNAT, VxWorks)

## See also
### Wikibook

* Ada Programming
* Ada Programming/Libraries
* Ada Programming/Libraries/Standard
* Ada Programming/Libraries/Ada
* Ada Programming/Libraries/System

### Ada Reference Manual
#### Ada 95

* Annex B Interface to Other Languages (Annotated)
* B.2 The Package Interfaces (Annotated)

#### Ada 2005

* Annex B Interface to Other Languages (Annotated)
* B.2 The Package Interfaces (Annotated)