OpenLLM-France/wikimedia huggingface dataset:
# Mac OS X Tiger/System Preferences/Desktop & Screensaver

This pane has two tabs at the top. One tab lets you choose a desktop picture, and the other lets you choose a screen saver.

# Desktop Picture

The desktop picture is the backdrop your windows are displayed against. By default, it's a layered blue image that Apple refers to as "Aqua Blue". However, there are tons of other choices available.
The sidebar along the left side of the pane lists various collections of desktop pictures. When you click on a collection, the desktop pictures inside appear in the contents pane to the right. If the image doesn't fit your screen correctly, a pop-up box appears offering a few ways to display the image:
* Stretch to Fill Screen - The image is warped out of shape, shrunk, or enlarged as necessary so that it perfectly fills your screen. This works well for some images, but horribly mangles others.
* Fill Screen - The image is enlarged or shrunk so that your screen is completely covered. However, the shape (aspect ratio) is unaltered, even if the shape of the image doesn't match the shape of your screen. This means that part of the image will most likely not be shown.
* Center - The image is shown actual size, actual shape, smack in the middle of your screen. If the image doesn't fill the screen, then the remaining space is filled with a color of your choice. A color well appears next to the pop-up that lets you choose the color.
* Tile - The image is repeated over and over so that it fills up your screen.
What is lacking is a setting that might be called "Fit Longest Dimension" that would maximize the size of the image without cropping and without altering the aspect ratio. When the aspect ratio of the picture does not match the screen, the remaining space would be filled with a chosen color.

## Screensaver

The Screensaver pane is setup much the same way that Desktop pane is set. It will default to A moving picture of the Apple Logo and your computer's name, but you have a plethora of options, including many freely-released third-party screensavers.
The list of the left of the Preference Pane displays all the screensavers installed on your system along with options to add more. When a screen saver is selected a preview will be generated in the rectangle in the centre of the Preference Pan. You may press Test to see a full screen preview. You have the option of adjusting the delay between user inactivity and the appearance of the screensaver, and by pressing the Options button you can configure any settings that an individual screen saver may have.
# Introduction

A Network is essentially a group of computers hooked up by cable or wireless signal. Networks are especially important these days, since they let you share high-speed Internet connections among more than one computer. This chapter will show you how to set up and maintain your very own network of all Macs or a mix of Macs and PCs.

# Things You Can Do On A Network
## Share an Internet Connection

You can share your Internet connection by opening System Preferences, and selecting the Sharing pane. Go to the Internet tab, and use the drop-down menu to choose which connection to share. Then check the box(es) of the interfaces you want to share your connection through. If you are sharing through AirPort press the AirPort Options... button to configure the wireless network. Now press the Start button to start sharing your connection. The Start button will change to Stop, which you can press to stop sharing.
# Faxing

Faxing is done easily by selecting the print function from within any program's document. In Mac OS X 10.4, the print dialogue menu has a pull-down option in the bottom left corner.
1) Simply scroll down to, "Fax (document)," and the fax function dialogue appears.
2) In the first field, the fax telephone number is to be entered complete with appropriate prefixes. (i.e., 1 for long distance, area code)
3a) The second field is for appropriate predialing prefixes. Examples are, 9 (for outside line,) *70 (to disable call-waiting,) etc.
3b) It is important to follow the predialing prefixes with a comma that allows the dialing to pause after the predial. This pause allows a subsequent dial tone to activate before actual fax telephone number is dialed.
4) Be sure to connect phone line to internal modem port before clicking the "FAX" button (which replaced the typical "Print" button.
5) The watch the cues as the fax is dialed, connected, sent, and disconnected before disconnected any temporary phone line.
One can enter a routine fax target in the Address Book program within OS X. Be sure to designate the fax telephone number as such before saving the entry. Then, when faxing a document, click the human silhouette to the right of the first field to select the address book entry you wish to fax to. Then go to step 3a, above.
# Mac OS X Tiger/System Preferences
## Introduction
### Using System Preferences

When you open System Preferences, you see the System Preferences main screen. This screen is full of icons, each representing a "pane", or group of controls. System Preferences grouped into Personal, Hardware, Internet & Network, and System rows. As with all other aspects of Tiger, Spotlight is built into the top right corner of the System Preferences menu.

## The Preference Panes

The following is a list of all of the default System Preferences panes. Each pane has a specific purpose. Usually, the name of the window gives it away, while others, such as Security, may have many different purposes.
* Personal
** Appearance
    Change the appearance of your Mac's controls.
** Dashboard & Exposé
    Choose how you activate Dashboard and Exposé.
** Desktop & Screensaver
    Change your Desktop Picture and Screensaver.
** Dock
    Set fine-grained options over the Dock.
** International
    Set up your computer so you can read and write in another language.
** Security
    Lock down your computer with FileVault encryption and other security measures.
** Spotlight
    Organize your Spotlight results and block certain folders for privacy.
* Hardware
** Bluetooth
    Configure your Mac's built-in Bluetooth module.
** CDs & DVDs
    Tell your Mac what to do when a disc is inserted.
** Displays
    Configure the display(s) attached to your Mac.
** Energy Saver
    Set timers and options to lower your computer's power consumption.
** Keyboard & Mouse
    Customize your computer's keyboard and mouse.
** Print & Fax
    Set up printers and send faxes.
** Sound
    Choose a set of speakers and a microphone, set options, and choose an alert sound.
* Internet & Network
** .Mac
    Set up and use .Mac services including iDisk and Sync.
** Network
    Manage your Mac's various network connections.
** QuickTime
    Optimize QuickTime for best performance while playing movies over the Internet.
** Sharing
    Set up your Mac to share services with other computers on a network.
* System
** Accounts
    The master control panel for Mac OS X's account system. The link above will take you to Chapter 8.
** Classic
    Classic lets you run Mac OS 9 inside a bubble, but it's being phased out this year and is not covered in this Wikibook.
** Date & Time
    Adjust you Mac's clock and calendar.
** Software Update
    Set your Mac to automatically check for updates online.
** Speech
    Have your computer speak to you, or speak to your computer.
** Startup Disk
    Choose a disk for your computer to boot from.
** Universal Access
    Set options to accommodate you if you have trouble seeing, hearing, or using a keyboard and mouse.
* Other
    This section contains panes from add-on software products like Apple Remote Desktop and Flip4Mac.
# Mac OS X Tiger/System Preferences/Dashboard & Exposé

The Dashboard and Exposé pane is used to set shortcuts that let you access both Dashboard and Exposé. The default shortcuts are:
* All Windows - F9
* Application Windows - F10
* Desktop - F11
* Dashboard - F12
Using the four pop-up menus at the bottom of the window, you can assign any one of these functions to any "F" key. You can also assign it to the command, option, shift, or control keys, because there are two of each of these keys: if you assign Dashboard to the right shift key, then you can still use the left shift key for its normal purposes.
The top half of the window lets you assign features of Mac OS X to corners of the screen. Drag your mouse into the corner you chose, and the feature you assigned will activate. You can assign each corner to activate one of the following:
* Exposé All Windows
* Exposé Application Windows
* Exposé Desktop
* Dashboard
* Start Screen Saver
* Disable Screen Saver (as long as you leave your cursor in the corner, your screen saver will not start)
# iSync

Build in application into Mac OS X for synchronizing (sync) with .Mac, Palms and Cellphones. The sync can be done through cables or wireless using Bluetooth. It syncs all your contacts information and your calendar on phones with such functions.

## .Mac

If you have a .Mac account (Apple sales tell for about $99.95 on there [Apple Store]) you will have the ability to sync the calendar, contacts.
# Mac OS X Tiger/Spaces disappear

If you use Font Book:
* First close all applications.
* Search for installed copies of the font with the Finder's Search and remove them from all system font files.
* Open the font with FontLab 4.5 or higher (or your own favorite font manipulation application). BTW: This doesn't work with all kinds of file formats.
* Choose from the File menu; Generate Font.
* From the popupwindow Font Format button, change 'FontLab' to 'OpenType-CFF' and save the file.
* By The Way: Do yourself a favour and choose a descriptive name, like TemplateGothicBold instead of temgotbol or something like that and avoid spaces. OS X doesn't have a problem with spaces, but a lot of others systems, like on the internet do.
* Double-click the new .otf file and install it by clicking the button in the popup window.
# Mac OS X Tiger/Running Tiger Today

When Mac OS X Tiger was first released, Macintosh computers ran on PowerPC-based processors. Halfway through Mac OS X Tiger’s life, Apple announced that all new Macs made would use Intel processors. Today’s Macs use Apple-designed, ARM based processors. As a result, no modern Mac will run Tiger. However, there is still a way to run it if you so choose: in a virtual machine.
You can use an app called UTM to run virtual machines using the PowerPC processor. This will work on an Intel Mac or an M1 Mac just the same. It is assumed that you have already downloaded the Mac OS X Tiger install DVD from another source and converted it to an ISO file if necessary.

### Creating a virtual machine

* Install UTM from the Mac App Store. Open UTM.
* Choose File > New on the menu bar to create a new virtual machine.
* Select Emulate, then Other.
* Click Browse and locate your Tiger install ISO. Click Continue.
* Under Architecture, choose PowerPC. Under System, choose “Mac99 Power Mac.” Set Memory to 2048 and CPU Cores to 1. Click Continue.
* Choose a size for your virtual machine’s hard disk. It will not take up this much space on your real hard disk immediately; this is a maximum setting. The virtual machine’s hard disk file will be as large as its contents and not a byte more. Click Continue.
* Skip the Shared Directory step; it is not compatible with Mac OS X Tiger. Click Continue.
* Give your virtual machine a better name, then click Save.
You now have a virtual machine that works identically to a PowerPC Mac of the same era as Mac OS X Tiger. To run it, click the big Play button.
# Curiously Recurring Template Pattern
### Intent

Specialize a base class using the derived class as a template argument.

### Also Known As

* CRTP
* Mixin-from-above
* Static polymorphism
* Simulated dynamic binding
* Upside-down Inheritance

### Motivation

To extract out a type-independent but type-customizable functionality in a base class and to mix-in that interface/property/behavior into a derived class, customized for the derived class.

### Solution and Sample Code

In CRTP idiom, a class T inherits from a template that specializes on T.
This is valid only if the size of X<T> can be determined independently of T. Typically, the base class template will take advantage of the fact that member function bodies (definitions) are not instantiated until long after their declarations, and will use members of the derived class within its own member functions, via the use of a static_cast, e.g.:

### C++23

C++23 added a new feature called explicit object parameter, which allows you to pass the object a method is called on as the first parameter of a method instead of *this. When calling the method, as with all function calls, upcasts are only performed if necessary, making it possible to change the behavior of a method for derived classes without overriding it by using a method template or auto. If the CRTP base class you would have written only has non-static methods, this removes the need to pass T as a template parameter, making it similar to deriving from an ordinary base class.
One benefit of this approach is that if T is a base class of Derived, the mixin methods of Derived will use Derived methods rather than T methods. Another is that it makes const and non-const method overloads unnecessary because the explicit object parameter can bind to const and non-const references if a constraint is not used to prevent this.

### Known Uses

Barton-Nackman trick

### Related Idioms

* Parameterized Base Class Idiom
* Barton-Nackman trick

### References

Curiously Recurring Template Pattern on Wikipedia
# Execute-Around Pointer
### Intent

Provide a smart pointer object that transparently executes actions before and after each function call on an object, given that the actions performed are the same for all functions. This can be regarded as a special form of aspect oriented programming(AOP).

### Also Known As

Double application of smart pointer or decorator.

### Motivation

Often times it is necessary to execute a functionality before and after every member function call of a class. For example, in a multi-threaded application it is necessary to lock before modifying the data structure and unlock it afterwards. In a data structure visualization application might be interested in the size of the data structure after every insert/delete operation.
Such a repetition of function calls is error-prone and tedious. It would be ideal if calls to visualizer could be automated. Visualizer could be used for std::list <int> as well. Such functionality which is not a part of single class but rather cross cuts multiple classes is commonly known as aspects. This particular idiom is useful for designing and implementing simple aspects.

### Solution and Sample Code

Overloaded -> operator of visualizableVector creates a temporary proxy object and it is returned. Constructor of proxy object logs size of the vector. The overloaded -> operator of proxy is then called and it simply forwards the call to the underlying vector object by returning a raw pointer to it. After the real call to the vector finishes, destructor of proxy logs the size again. Thus the logging for visualization is transparent and the main function becomes free from clutter. This idiom is a special case of Execute Around Proxy, which is more general and powerful.
The real power of the idiom can be derived if we combine it judiciously with templates and chain the overloaded -> operators.

### Related Idioms

Smart Pointer

### References

* ↑ Execute Around Sequences - Kevlin Henney
# More C++ Idioms/Enable if
## Intent

Sometimes a member function of a class template (possibly one of an overloaded set) only makes sense for certain template parameters. The enable_if idiom uses SFINAE to eliminate unwanted functions before overload resolution.

## Known Uses

One use of enable_if is in implementing requirements such as that on the (size_type, value_type) constructor of a standard container, which has special behavior if the value_type is an integral type. More primitive solutions exist, but enable_if is elegant in this context.

## Related Idioms

SFINAE, metafunctions.
# Exploding Return Type
### Intent

An idiom to return either by error code or by throwing an exception.

### References

* Choose your Poison: Exceptions or Error Codes?
* Overload no. 53
# Covariant Return Types
### Intent

Avoid unnecessary casting of the derived value returned from an overridden method in a derived class.

### Motivation

In C++ a base class determines the method signatures of virtual functions that derived classes might override. The type of the return value in the overridden function is generally same as that of the base class's function. However, this can be limiting if the type returned by the overridden function is substitutable (sub-class) for the type of the base function. Consider the following example.
The caller of clone knows that the run-time type of the object returned by the function is Derived. However, a dynamic_cast is necessary to downcast the Base pointer to Derived if functions specific to Derived are to be used.

### Solution and Sample Code

C++ allows the derived type to implement an overridden function with return type that is a (pointer to a) sub-type of the return type of the base function. Here's an updated example.
This alternative is direct and saves unnecessary casts.
# Counted Body/Reference Counting (intrusive)
### Intent

Manage logical sharing of a resource/object, prevent expensive copying, and allow proper resource deallocation of objects that use dynamically allocated resources.

### Also Known As

* Reference Counting (intrusive)
* Counted Body

### Motivation

When Handle/Body idiom is used, quite often it is noticed that copying of bodies is expensive. This is because copying of bodies involves allocation of memory and copy construction. Copying can be avoided by using pointers and references, but these leave the problem of who is responsible for cleaning up the object. Some handle must be responsible for releasing memory resources allocated for the body. Usually it is the last one. Without automatic reclamation of memory resources, it leaves a user-visible distinction between built-in types and user-defined types.

### Solution and Sample Code

The solution is to add a reference count to the body class to facilitate memory management; hence the name "Counted Body." Memory management is added to the handle class, particularly to its implementation of initialization, assignment, copying, and destruction.
Gratuitous copying is avoided, leading to a more efficient implementation. This idiom presumes that the programmer can edit the source code for the body. When that's not possible, use Detached Counted Body. When counter is stored inside body class, it is called intrusive reference counting and when the counter is stored external to the body class it is known as non-intrusive reference counting. This implementation is a variation of shallow copy with the semantics of deep copy and the efficiency of Smalltalk name-value pairs.
The output should be as below:

### Consequences

Creation of multiple reference counts will result into multiple deletion of the same body, which is undefined. Care must be taken to avoid creating multiple reference counts to the same body. Intrusive reference counting easily supports it. With non-intrusive reference counting, programmer discipline is required to prevent duplicate reference counts.

### Known Uses

* boost::shared_ptr (non-intrusive reference counting)
* boost::intrusive_ptr (intrusive reference counting)
* std::shared_ptr
* the Qt toolkit, e.g. QString

### Related Idioms

* Handle Body
* Detached Counted Body (non-intrusive reference counting)
* Smart Pointer
* Copy-and-swap

### References

C++ Idioms by James O. Coplien
# OpenSCAD User Manual/First Steps/Opening an existing example model

Open one of the many examples that come with OpenSCAD (File, Examples). Or you can copy and paste this simple example into the OpenSCAD window:
* Usage example 1
* difference {
* cube(30, center=true);
* sphere(20);
* translate([0, 0, 30]) {
* cylinder(h=40, r=10);
Then press F5 to get a graphical preview of what you typed (or press F6 to get a graphical view).
You get three types of movement in the preview frame:
* Drag with left mouse button to rotate the view around the rotation center (view with ctrl-3) along the X and Z Axis. The bottom line changes the rotate values. (use shift while left-drag to rotate around X and Y )
* Drag with any other mouse button (or control-drag under OSX) to translate (move) the view. The bottom line changes translate values.
* Use the mouse scroll to zoom in and out. Alternatively you can use the + and - keys, or right-drag with the mouse while pressing a shift key (or control-shift-drag under OSX). The Viewport line at the bottom of the window shows a change in the distance value.

## See also

Previous: Model views
Next: The OpenSCAD User Interface
# OpenSCAD User Manual/First Steps/Positioning an object

We have already seen how to create a simple cuboid. Our next task is to attempt to use the translate positioning command to place an identical cuboid next to the existing cuboid. Type the data as shown below. There are a total of 4 lines of code. Press F5 or F6 function key when done to see the preview.
| Usage example 1 - positioning an object: |
| cube([2,3,4]); translate([3,0,0]) { cube([2,3,4]); } | OpenSCAD positioning an object |

### There is no semicolon following the translate command

Notice that there is no semicolon following the translate command. This is because the translate command relates to the following object. If the semicolon was in place, then the effect of the position translation would end, and the second cuboid would be placed at the same position as the first cuboid.

### See Also

Previous: Creating a simple model
Next: Changing the color of an object
# OpenSCAD User Manual/Integration with other applications
## FreeCAD

* OpenSCAD Workbench allows both import and export of *.CSG files - http://www.freecadweb.org/wiki/index.php?title=OpenSCAD_Module
* FreeCAD to openSCAD converter http://www.thingiverse.com/thing:1751345
# Learning Python 3 with the Linkbot/The End

So here we are at the end, or maybe the beginning. This tutorial is on Wikibooks, so feel free to make improvements to it. If you want to learn more about Python, The Python Tutorial by Guido van Rossum has more topics that you can learn about. If you have been following this tutorial, you should be able to understand a fair amount of it. The Python Programming wikibook can be worth looking at, too. Here are few other books which cover Python 3:
* A Byte of Python by Swaroop C H
* Hands-on Python Tutorial by Dr. Andrew N. Harrington
* Subject:Python programming language lists other Wikibooks related to Python.
Hopefully this book covers everything you have needed to get started programming. Thanks to everyone who has sent me emails about it. I enjoyed reading them, even when I have not always been the best replier.
Happy programming, may it change your life and the world.