OpenLLM-France/wikimedia huggingface dataset:
# Khepera III Toolbox/Advantages of the Khepera III Toolbox

The Khepera III robot comes with a library called libkorebot to access the sensors and actuators of the Khepera III robot. In addition, a program called khepera3_test can be used to read sensor values on the command line. The Khepera III Toolbox is more or less a clean rewrite of these two pieces of software. Note, however, that the libkorebot library is compatible with several robots produced by K-Team, whereas the Khepera III Toolbox - as its name suggests - is made for the Khepera III robot only.
In this chapter, we motivate why the Khepera III Toolbox should be used instead of the libkorebot library.

## A Nicer, Simpler and Safer API

The Khepera III Toolbox provides an easy-to-use API to access the sensors and actuators of the robot. Values read from sensors are parsed and put inside a data structure for easy access. To read the floor sensor, for example, the following code can be used:
Note that re-entrant versions for programs with multiple threads exist as well, and are just slightly more complicated to use.
The libkorebot library only reads messages and provides the programmer with a buffer, which he has to parse by himself. This is very error-prone and makes the resulting code hard to read. The following piece of code is equivalent to the code above:

## Synchronization Issues when Running Multiple Programs at the Same Time

The libkorebot was written with the idea in mind that only a single program would run on the robot at the same time. The code used to access the sensor values is therefore not safe when two or more programs are running at the same time. E.g., if a program is reading infrared proximity values, and another program ambient infrared values, the programs may occasionally get the wrong type of measurements for their request.
There is not technical reason why running multiple programs at the same time should cause problems, especially when they are working with a different subset of sensors and actuators.
The Khepera III Toolbox communicates with the sensors and actuators in an atomic fashion, and therefore enables running programs side by side.

## Additional Modules

Besides the khepera3 module, the Khepera III Toolbox offers a series of other useful modules to write programs for the robot. Among them are a module to parse command line arguments, a module to send messages over the I2C bus, and a module to track the robot position using wheel odometry.

## Programs

While the khepera3_test program provided by K-Team is one monolithic program intended for testing, the Khepera III Toolbox provides a series of small programs that can be used for testing and serious experiments.

## Speed

Both the libkorebot and the Khepera III Toolbox have comparable speed. The time required to read sensor values or send motor commands mostly depends on the speed of the I2C bus and the length of the messages. The processing overhead is negligibly small.

## Scripts

There is no equivalent to the Khepera III Toolbox scripts in the code provided by K-Team.
# Khepera III Toolbox/Download and Installation
## Download
### Downloading the Package

A more or less stable release of the toolbox is now available on the sourceforge project page. After downloading the file, uncompress it with
This will create a folder khepera3toolbox in your current directory with the whole toolbox.
This is the preferred way of getting the toolbox if you intend to just use it, but not make any contributions (programs, modules, bugfixes, ...) by yourself. Whenever we release a new version, you have to download a new ZIP file, and replace the whole khepera3toolbox with the new version of the toolbox.

### Getting the Latest Revision from SVN

The latest version can be obtained by checking out the following SVN tree:
This will create a folder khepera3toolbox in your current directory with the whole toolbox.
This is the preferred way of getting the toolbox if you plan on making contributions (programs, modules, bugfixes, ...) by yourself, or if you want to use the latest version of the toolbox. To update to a new revision, just type
inside the khepera3toolbox folder.

## Installation

The toolbox does not need to be copied to a specific place - it stays in a convenient place in your home directory.
However, you need to modify two environment variables. This can either be done manually, by typing the following two lines on your bash shell:
or automatically, by adding the above lines to your ~/.bashrc (or ~/.profile) file. Note that if you choose to do it manually, you need to it each time you open a new terminal window.
To check if you set these variables correctly, type
This should print a short help text for the k3go script in your terminal window.
# JavaScript/Handling DOM events/Exercises

Topic: Event handling
We use the following HTML page for the exercises.
1. Implement a 'click' event handler that toggles the 'A' area between the background colors 'silver' and 'gold'.
2. Implement a 'mouseover' event handler. With each mouse movement on the 'B' area its background color changes from "blue" to "lime", "red", "yellow", "green", and back to "blue".
3. Implement two event handlers for the 'C' area, 'mouseenter' and 'mouseleave'. When the mouse pointer enters the area, its background color changes to "red"; when it leaves the area, its background color changes to "green".
4. Bring the above 3 solutions together. We will have a page that reacts on 4 different event types.
# JavaScript/Handling XML
## Simple function to open an XML file

This function first tries for Microsoft Internet Explorer, then for Firefox and others:

## Usage

Now you can do any DOM operations on oNodes.
XML modifications can't be saved in JavaScript, as this is clientside…
# JavaScript/Handling Events

So far, the shown JS programs start automatically when the HTML page is loaded. This kept everything small, simple, and straightforward.
Now we want to introduce the mechanism of starting a program intentionally at specific points in time. When a user types in some content, it may be necessary to evaluate it; when a user clicks a button, it may be necessary to start a complex action like a database query. The actions (validation, DB query) will be handled in a JS function, and some HTML code will initiate the call to such JS functions. To understand how it works, we must learn about events. In a later chapter, we will explain events in detail.
Assume a user clicks on a button. This generates an onclick event. The occurrence of such an event is declaratively combined with a call to a named JS function. The browser calls this JS function. The JS function runs.
The complete HTML with its embedded JS reads:
* In contrast to the previous examples, nothing happens when the page is loaded. This results from the fact that the alert command is embedded in the JS function showSomething. This function is only defined but not started.
* The HTML element <button> has an attribute onclick with a value showSomething.
* When the button is clicked, an onclick event occurs. The event is bound to the button.
* The browser handles the event. He notices that a function with the given name shall run.
* The browser searches for the function in all available JS scripts (please notice that this name as well as all JS code is case-sensitive!).
* After finding the function with exactly this name in the <script>...</script> part, the browser starts the function.
* The function executes and shows the message.
In essence, the JS function with its message-showing behavior will run whenever the user clicks on the button.

## Second Example

This example offers the possibility to change the background color of some HTML elements. It uses 3 buttons, 2 JS functions, and 1 event type (onclick; there are many other types). Furthermore, it introduces the concept of an element id.
What are the differences to the first example?
* There are 3 buttons. The first two are associated with a JS function; the third is not.
* The <body> and the second <button> elements contain an attribute id="...". This assigns an identifier to them. He can be used in JS to locate them.
* The <script> element contains two functions with different names.
* When you click on one of the buttons, the associated JS function is called. Because the third button has no associated JS function, nothing happens there.
* In JS, the code part document.getElementById("...") locates the element with this ID. The code part .style.background = "..." modifies the background color of this element. Please ignore that the two parts are written in separate lines. This is only for better reading of the source code on small devices. You can link the two lines together.
* The makeBlue function executes two statements and changes the background color of the body and of itself.
# JavaScript/Helpful hints
## Predefined functions

All over the Wikibook, code examples are given. Usually, they show their results somewhere in the browser. This is done via methods that are aligned with Web API interfaces and implemented in browsers.

#### alert

The function alert creates a modal window showing the given text.

#### log

The function log writes the message to the console of the browser. The console is a window of the browser that is normally not opened. In most browsers, you can open the console via the function key F12.

#### print

The function print opens the print dialog to print the current document.

#### prompt

The function prompt opens a modal window and reads the user input.

#### write

The use of document.write is strongly discouraged.

## Coding style

Our code examples mostly contain the line "use strict"; before any other statement. This advises the compiler to perform additional lexical checks. He especially detects the use of variable names which are not been declared before they receive a value.
Without the "use strict"; statement the compiler would generate a second variable with the misspelled name instead of generating an error message.

## Faulty visualization in some code examples

Due to a minor fault in the Wikibook template quiz, you will see } // instead of } in some examples. The two slashes at the end are only shown to overcome this problem; they are not necessary.
# JavaScript/Handling JSON
## Native JSON
### Modern JSON Handling

Handling JSON may require adding a supporting library, which creates the global JSON object. This object is present natively only in new browsers (e.g. FF 3.5, IE8). Such a library can be found here:

### Old way

In old browsers you could use the following syntax, but this raises issues of security, such as XSS.

## JSONP

Given browser restrictions on cross-domain Ajax (allowed only by configuration in some earlier browsers, by non-standard means in IE8, and with server headers in HTML5), one way to circumvent such restrictions (while still requiring some server-side script coordination) is for sites to insert an HTML script tag dynamically into their code, whereby the cross-domain script they target (typically) supplies JSON, but wrapped inside a function call (the function name being supplied according to the value of a "callback" parameter supplied by the requestor) or some other executable code.
In PHP, one might serve such JSONP in as simple a fashion as this:
jQuery and other frameworks have their own means of generating JSONP requests, but we'll use the following custom code.
Note: It is important to bear in mind that the following code should not be used, if the targeted site or the data supplied by the target site, may come from a non-trustworthy source, since it is possible for such scripts to run with the privileges of the using site (e.g., to read user cookies and pass them on to another site) and thereby execute a Cross-site scripting attack.

## More information

* Using native JSON in Firefox
* Using native JSON in IE8
* Web Application Security Guide/XML, JSON and general API security
# JavaScript/History of JavaScript

JavaScript was originally developed by Brendan Eich of Netscape Communications Corporation under the name Mocha, then LiveScript, and finally renamed to JavaScript. The change of name from LiveScript to JavaScript roughly coincided with Netscape adding support for Java technology in its Netscape Navigator web browser. JavaScript was first introduced and deployed in the Netscape browser version 2.0B3 in December of 1995. When JavaScript was added to Internet Explorer, it had to be officially called "JScript", because Netscape owns the name "JavaScript". The choice of name proved to be a source of much confusion.
As of 2006, the latest version of the language is JavaScript 1.7, which corresponds to ECMA-262 Edition 3 like JavaScript 1.5, except for Array extras, Array and String generics, and pythonic generators and array comprehensions. ECMAScript, in simple terms, is a standardized version of JavaScript. The ECMA-357 standard specifies E4X (ECMAscript For XML), a language extension dealing with XML.

### Versions of JavaScript

JavaScript :
| Version | Support |
| 1.0 | Netscape 2.0 |
| 1.1 | Netscape 3.0 |
| 1.2 | Netscape 4.0-4.05 |
| 1.3 | Netscape 4.06-4.7x |
| 1.4 | Netscape server products |
| 1.5 | Netscape 6.0 |
JScript :
| Version | Support |
| 1.0 | Internet Explorer 3.0 |
| 2.0 | |
| 3.0 | Internet Explorer 4.0 |
| 4.0 | |
| 5.0 | Internet Explorer 5.0 |
| 5.1 | Internet Explorer 5.01 |
| 5.5 | Internet Explorer 5.5, 6.0 |
ECMAScript :
* Version
* v1
* v2
* v3

### ECMAScript

ECMAScript, also known as ISO standard 16262, is a standardization based on JavaScript by ECMA International, first written in 1996. It defines a dynamically-typed language (derived from C) very loosely based on Java and other C-like languages. It supports some object-oriented features through prototype-based objects and pseudo-classes.
All ECMAScript code should work in all major browsers that support JavaScript, but not necessarily vice versa, as there are many proprietary extensions by Netscape, Microsoft (IE), and Opera.
The latest version is ECMA-262 Edition 3, based on version 1.5 of JavaScript, and the specification is publicly available.
# JavaScript/Index
## A

* Adding Elements
* Arrays
* Associative Arrays

## B

* Best Practices
* Bookmarklets

## C

* Changing Elements
* Code Structuring

## D

* DHTML
* DOM
* Debugging

## E

* Event Handling

## F

* Finding Elements
* First Program
* Functions and Objects
* Further Reading

## H

* Hello World

## I

* Introduction
* Introduction to the Document Object Model
* Iteration

## L

* Lexical Structure
* Links

## M

* Message

## N

* Numbers

## O

* Operators
* Optimization

## R

* Regular Expressions
* Removing Elements
* Reserved Words

## S

* Strings
* Substring
* The SCRIPT Tag

## T

* Time
* Types

## U

* Useful Software Tools

## V

* Variables
# JavaScript/Inheritance
## instanceof operator

The instanceof operator determines whether an object was instantiated as a child of another object, returning true if this was the case. instanceof is a binary infix operator whose left operand is an object and whose right operand is an object type. It returns true, if the left operand is of the type specified by the right operand. It differs from the .constructor property in that it "walks up the prototype chain". If object a is of type b, and b is an extension of c, then a instanceof b and a instanceof c both return true, whereas a.constructor === b returns true, while a.constructor === c returns false.

## Inheritance by prototypes

The prototype of an object can be used to create fields and methods for an object. This prototype can be used for inheritance by assigning a new instance of the superclass to the prototype.

## References

* ↑ Matthew Batchelder. "Object Oriented JavaScript" describes one way to implement inheritance in JavaScript.
# JavaScript/Handling HTML

Handling HTML returned from AJAX is surprisingly difficult. Since XMLHttpRequest was designed to work with well-formed XML, attempting to parse an HTML page with the responseXML property almost invariably produces an XML parse error. The responseText property contains the HTML source, of course, and one can attempt to parse this with regular string functions or regular expressions. However, the XMLHttpRequest object does not provide an easy way to parse returned HTML with DOM operations.

## Using the browser's HTML parser

One way to parsing HTML returned from AJAX is to add the entire page as a child of the current document in the browser. Simply create a new node and place the returned HTML text in the new node's innerHTML property, as shown below:
The HTML document is parsed automatically, and can then be searched, navigated, and manipulated with DOM operations.
# History of Greece

* Ελληνική ιστορία - History of Greece
* The tiny Mediterranean country known officially as the Hellenic Republic has had a fascinating history stretching back through the ages. This nation, known commonly as Greece, is widely considered the birthplace of Western civilization, and thus, its long and complex history continues to exert influence worldwide.
Chapters: -- Introduction
* Minoan Civilization --3000-1100 BCE
* Mycenaean Civilization --1600-1100 BCE
* Greek Dark Ages --1100-750 BCE
* Classical Greece --750-336 BCE
* Hellenistic Greece --336-146 BCE
* Roman Greece --146 BCE-330 CE
* Byzantine Empire --330-1453 CE
* Ottoman Greece --1453-1821 CE
* Independent Greece --1821-1974 CE
* Modern Greece --1974-2024 CE
Appendices:
    Contributors
    Bibliography
    Print version
# Acer TravelMate2300
## Year of First Manufacture

* First Manufactured:

## CPU

* CPU: Intel Celeron 1.5 GHz

## Memory

* Memory: 240MB (Maximum )
* Memory Type:

## Video Graphics Display

* Video Graphics Chipset: Intel 82852/82855 GM/GME Graphics Controller
* Screen Size:
* Maximum Screen Resolution: 1280 x 800

## Audio

* Audio Chipset: Conexant AC Link Audio

## Network Ports

Ethernet: 100baseT

## USB Ports

2 x USB

## Pointing Device

* Pointing Device Type: Touchpad
# Laptop Computer Models/Acer/Aspire 3660WLMI
## Web Camera

* ALi Corp M5602 Inbuilt Web Camera
# Aspire 5920G
## CPU

* CPU:

## Memory

* Memory:
* Memory Type:

## Video Graphics Display

* Video Graphics Chipset: Nvidia GeForce 8600M GT (???MB)
* Screen Size:
* Maximum Screen Resolution:

## Audio

* Audio Chipset:

## Pointing Device

* Pointing Device Type: Touchpad
# Acer TravelMate2501TCi
## Year of First Manufacture

* First Manufactured:

## CPU

* CPU: Intel Pentium 4 2.8 GHz

## Memory

* Memory: 512MB (Maximum )
* Memory Type: DDR333 SDRAM

## Video Graphics Display

* Video Graphics Chipset: ATI Mobility 9000 IGP
* Screen Size: 14.1" XGA
* Maximum Screen Resolution: 1280 x 800

## Audio

* Audio Chipset:

## Network Ports

Ethernet: 100baseT

## USB Ports

4 x USB

## Pointing Device

* Pointing Device Type: Touchpad and thumb cursor
# Aspire 6920G
## CPU

* CPU:

## Memory

* Memory:
* Memory Type:

## Video Graphics Display

* Video Graphics Chipset: Nvidia GeForce 9500M GS (???MB)
* Screen Size:
* Maximum Screen Resolution:

## Audio

* Audio Chipset:

## Pointing Device

* Pointing Device Type: Touchpad
# Acer Aspire 1300DXV
## Year of First Manufacture

* First Manufactured:

## CPU

* CPU:

## Memory

* Memory:
* Memory Type:

## Video Graphics Display

* Video Graphics Chipset: S3 Savage4 (Shared Memory) AGP 4x UMA
* Screen Size: 14.1 inch
* Maximum Screen Resolution: 1024 x 768

## Audio

* Audio Chipset: Via VT8231
* Integral Microphone

## Pointing Device

* Pointing Device Type: Touchpad (with scroll button)
# Acer Aspire 1300
## Year of First Manufacture

* First Manufactured:

## CPU

* CPU: Athlon XP1400+

## Memory

* Memory: 128Mb
* Memory Type:

## Video Graphics Display

* Video Graphics Chipset: S3 Savage4 (Shared Memory) AGP 4x UMA
* Screen Size: 14.1 inch
* Maximum Screen Resolution: 1024 x 768

## Audio

* Audio Chipset: Via VT82C686 AC97
* Integral Microphone

## Network Ports

Networking chipset type: Via VT6102 (Rhine II)

## Pointing Device

* Pointing Device Type: Touchpad (with scroll button)

## Web Camera

* ALi Corp M5602 Inbuilt Web Camera
# Aspire 8920G
## CPU

* CPU:

## Memory

* Memory:
* Memory Type:

## Video Graphics Display

* Video Graphics Chipset: Nvidia GeForce 9500M GS (???MB)
* Screen Size:
* Maximum Screen Resolution:

## Audio

* Audio Chipset:

## Pointing Device

* Pointing Device Type: Touchpad
# Laptop Computer Models/Acer/TravelMate 2500

The following computer models are badged as Travelmate 2500:
TravelMate 2501XCi
# Linux Guide/Building software

Sometimes it is necessary or desirable to build a program's executable binaries from the source code provided by the programmer or programming team. Perhaps there are no pre-built binaries available for your system, or perhaps you have some special configuration or optimization requirements that are not available in pre-built form.
The source code for a program is normally provided in a single archive file and the first step is to download this file, or locate and copy it from (for example) a CD or DVD disk.
Once you have obtained the source code for a program there is a typical sequence of steps normally required: (note: anything in square brackets you replace with whatever is applicable)
* Open a command line (console) session
* cd to the directory containing the archive: cd /root/Desktop/[filename.tar.gz]
* Decompress
** If the archive ends in .tar.gz or .tgz then type in this command: gzip -d [filename.tar.gz]
** If the archive ends in .tar.bz then type in this command: bzip2 -d [filename.tar.bz2]
* Separate the archive by typing in: tar -xvf [archivename.tar]
* cd to the uncompressed archive by typing in: cd [progname]
At this stage, you have unpacked the files from the archive and they should now be examined for any documentation files, typically called README or INSTALL. These files will normally give specific installation and configuration instruction for the program. These typically consist of:
* configure it by typing in: ./configure
* make it: make
For the final installation steps, it is usually necessary to have root (super user) privileges. These can be obtained by issuing the su command and entering the password when prompted.
* install it: make install
* now run it by typing: [progname]