text:
Talk:Electric Motors And Generators/AC Motors and Generators

Untitled
This entire subject is not yet organized properly, or at least based on the dominant and most common applications of electrical power use.

DC power has become non-existent in the area of power distribution, and only an extremely small and specialized fraction of power generation andp transmission. In the early 21st century DC power is used at the load level (of power systems), within the appliances themselves, and is derived electronically by the use of solid state devices and circuitry.

I see no mention yet of polyphase AC.

At this point AC and DC motors are barely (yet) correctly defined.

As a person with no experience using CAD, no CAD software, and extremely limited drafting skills, I am presently very limited as far as building proper educational or reference materials for electrical motors and generators. If pics of hand drawn sketches can be included, my limitations are dramatically reduced. Are there willing contributors to this effort to convert such pics into useful graphics?

Is this faction of wiki intending to move materials from older books which have passed into the public domain into the wiki format, and accepting the use of segments of such written and graphic materials without reference to the original sources?

 * Hand drawn graphics are absolutely acceptable. If they are simple graphics, I may be able to render them satisfactorily, though it may take me some time.
 * I'm afraid I'm partly to blame for the inclusion of DC motors in this section. My involvement with this wikibook was mainly to split it so it was in line with contemporary wikibooks formats (Something I've done for a number of books here), and the prior authors had DC motors under the AC motor heading, I kept it that way, assuming perhaps there was a good reason I did not grasp. Since there isn't I'll move those to a separate page soon.
 * "DC power has become non-existent in the area of power distribution, and only an extremely small and specialized fraction of power generation andp transmission. In the early 21st century DC power is used at the load level (of power systems), within the appliances themselves, and is derived electronically by the use of solid state devices and circuitry."
 * I think I might be missing something here. This book is on Electric Motors And Generators, and DC motors are a subcategory of that. Is there somewhere in this book that discusses power transmission? If so you're right that that probably doesn't belong in this wikibook.
 * Hope this helps! --Mbrickn (discuss • contribs) 12:12, 3 January 2022 (UTC)

 * Sorry to be so slow to respond. My comments regarding DC transmission/distribution were primarily to explain or establish the necessity of "drives" and similar systems for interfacing DC motors and generators to the utility grid in any way, at this point in time. 2601:603:1580:A6F0:3DC9:A006:DE0:4074 (discuss) 04:21, 12 April 2023 (UTC)

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


text:
Signetics 2650 & 2636 programming/Tutorial code - State machine

Tutorial code - State machine
This is the code for the tutorial Indexed branching - creating a state machine

SquareState    equ    $1F0E    ;variable indicates state of the Square operation TriangleState  equ    $1F0F    ;variable indicates state of the Triangle operation org    0 reset_vector:                  ; the microprocessor starts here when the reset button is pressed bcta,un reset org    3 interrupt_vector:              ; interrupts shouldn't happen, but we set this just in case retc,un reset: lodi,r0 $20	       ; initialise program status word lpsu                   ; inhibit interrupts, stack pointer=0 lodi,r0 $02 lpsl                   ; register bank 0, without carry, logical compare
 * Tutorial State machine

eorz   r0        stra,r0 effects         ;initialise the 74LS378 stra,r0 objectsize     ;all objects size 0 bsta,un DefineObjects  ;define all objects lodi,r0 $AA stra,r0 score12 stra,r0 score34

eorz   r0        stra,r0 effects         ; !invert = 0

lodi,r0 0              ;  X / 000              /   0     / 000 stra,r0 backgnd        ;    / black background / disabled / yellow screen

lodi,r0 %00011101      ; XX  /  011        /   101 stra,r0 colours12      ;     / obj1 red / obj2 green

lodi,r0 40             ;set initial position of two objects stra,r0 hc1 stra,r0 hc2 stra,r0 vc1 stra,r0 vc2

lodi,r0 0 stra,r0 SquareState lodi,r0 0 stra,r0 TriangleState

endless: bsta,un Vsync0         ; make sure VRST hasn't started bsta,un Vsync1         ; wait for VRST to start loda,r3 SquareState    ; go and make one movement in the Square state-machine bsxa   squareLUT,r3 loda,r3 TriangleState  ; go and make one movement in the Triangle state-machine bsxa   triangleLUT,r3 bctr,un endless        ; repeat endlessly

squareLUT:                      ; look up table connecting index to subroutine bcta,un squaretop           ; 0 bcta,un squareright         ; 3 bcta,un squarebottom        ; 6 bcta,un squareleft          ; 9
 * Define the Square state-machine
 * Define the Square state-machine

squaretop: loda,r0 hc1		       ; move object 1 right addi,r0 1 stra,r0 hc1 comi,r0 150 retc,lt                ; if reached endpoint lodi,r0 3 stra,r0 SquareState    ;   change state to move down retc,un

squareright: loda,r0 vc1		       ; move object 1 down addi,r0 1 stra,r0 vc1 comi,r0 120 retc,lt                ; if reached endpoint lodi,r0 6 stra,r0 SquareState    ;   change state to move left retc,un

squarebottom: loda,r0 hc1		       ; move object 1 left subi,r0 1 stra,r0 hc1 comi,r0 40 retc,gt                ; if reached endpoint lodi,r0 9 stra,r0 SquareState    ;   change state to move up        retc,un

squareleft: loda,r0 vc1		       ; move object 1 up        subi,r0 1 stra,r0 vc1 comi,r0 40 retc,gt                ; if reached endpoint lodi,r0 0 stra,r0 SquareState    ;   change state to move right retc,un

triangleLUT: bcta,un triangleleft        ; 0 bcta,un trianglebottom      ; 3 bcta,un trianglehypo        ; 6
 * Define the Triangle state-machine
 * Define the Triangle state-machine

triangleleft: loda,r0 vc2		; move object 2 down addi,r0 1 stra,r0 vc2 comi,r0 140 retc,lt                ; if reached endpoint lodi,r0 3 stra,r0 TriangleState  ;   change state retc,un

trianglebottom: loda,r0 hc2		; move object 2 right addi,r0 1 stra,r0 hc2 comi,r0 140 retc,lt                ; if reached endpoint lodi,r0 6 stra,r0 TriangleState  ;   change state retc,un

trianglehypo: loda,r0 hc2		; move object 2 left subi,r0 1 stra,r0 hc2 loda,r0 vc2		; move object 2 up       subi,r0 1 stra,r0 vc2 comi,r0 40 retc,gt                ; if reached endpoint lodi,r0 0 stra,r0 TriangleState  ;   change state retc,un

DefineObjects: lodi,r3 $0E lodi,r0 $FF loopDS: stra,r0 shape1,r3-     ; create rectangular shapes stra,r0 shape2,r3 stra,r0 shape3,r3 stra,r0 shape4,r3 brnr,r3 loopDS
 * subroutine -  define shapes and position of all objects
 * subroutine -  define shapes and position of all objects

retc,un

Vsync0: tpsu   sense bctr,eq Vsync0         ; wait for Sense bit to clear retc,un Vsync1: tpsu   sense           ; wait for Sense bit to be set bctr,lt Vsync1 retc,un
 * subroutine - wait for VRST to clear
 * subroutine - wait for VRST to clear
 * subroutine - wait for VRST to set
 * subroutine - wait for VRST to set


text:
Oberon/ETH Oberon/Tutorial/GadgetsUse

Using Gadgets

[ Text | Contents | Index | Master index]

Objective
Learn how a gadget is inserted in the display space, how to name it and, more generally, understand the concept of gadget attributes. Review the rich gadget collection supplied with the system. Understand and exercise the composition of gadgets for building new applications with a graphical user interface or for adapting an existing interface to your preference.

Estimated time: 60 minutes.

Inserting a visual gadget - Gadgets.Insert
Gadgets.Insert ViewNewProc ~ creates a new instance of a visual gadget of the specified type and inserts it in the display space at the caret position. Say, the module M contains a procedure P whose task it is to dynamically allocate a new instance of a certain object type. "M.P" is then called the object's New procedure or generator. Executing the New procedure M.P causes a new instance of that object type to be created and initialized to a default state so that it is ready to accept messages (i.e. it is totally functional). As the object does not know what to do with itself after creation, another command is needed to display the new object (that is, if it is a visual gadget). The Oberon module "Gadgets" provides a standard interface for creating and inserting objects.

Linking a model gadget to a gadget - Gadgets.Link
Gadgets.Link ModelNewProcedure ~ creates a new instance of a model gadget of the specified type and links it to the selected visual gadgets. If a model gadget is already linked to the selected gadgets, it is removed first.

Inserting a visual + model gadget pair
Gadgets.Insert ViewNewProc ModelNewProc ~ has the same effect as the command sequence
 * Gadgets.Insert ViewNewProc ~
 * Gadgets.Link ModelNewProcedure ~

ViewNewProc identifies the New procedure of the visual gadget to create. The ModelNewProc identifies the model gadget to be linked to the newly created gadget. For example, the following creates a Model-View pair of a button and a boolean:

 * Gadgets.Insert BasicGadgets.NewButton BasicGadgets.NewBoolean ~

This new gadget pair is inserted at the caret position. Note that many gadgets function both with and without a model. Typically, a button need not have a model gadget.

The gadget attributes
The interesting property of gadgets is that they can be modified and used wherever they are located. Oberon System 3 creates new user interfaces (GUI) or modifies existing ones in typical drag-and-drop fashion. UI construction is reduced to document editing.

To this effect, each gadget type has its own set of attributes, used to configure a particular gadget instance, but all gadgets have two attributes in common, namely the Gen (Generator) and the Name attributes. Each attribute consists of an attribute name and an attribute value pair, that define a part of the gadget's appearance and behaviour. An attribute is typically used to specify the caption of a button, the color of a gadget or the command that a gadget must execute when solicited by a middle mouse key click.

In addition, a gadget may be extended with user-defined attributes.

Columbus can be used to inspect and change the current attribute values for the purpose of customization. You will have plenty of opportunities to practice that later in this tutorial. Attributes can also be interrogated and set using commands or under program control.

The Gen attribute
The Gen attribute contains the name of the Generator or New procedure which created, or if you prefer allocated, this gadget instance. It is a read-only value, that is, it cannot be customized. However, a visual gadget of a given type can be converted into a gadget of another type with the command Gadgets.Change. This possibility is rarely used.

The Name attribute
The Name is one of the most important attributes of a gadget and each gadget has such an attribute. When a gadget is instantiated the attribute contains the empty string. It is used to reference the gadget, either from other gadgets, or from application programs. A gadget or an application program referencing another gadget's name can search for and find (or not find) that other gadget in a specified environment or context. Gadgets often use names to refer to each other's attributes. Practically, a gadget refers to another gadget's attribute with the following syntax:

 * ObjectName.AttributeName

where ObjectName is the gadget's name (attribute) and AttributeName is the attribute name to access. Have you observed the difference between "name attribute" and "attribute name"?

The name belongs to the gadget, i.e. it is stored inside the gadget itself which means that a copy of a named gadget has the same name.

Name scope
Name scoping is used when a named gadget belongs to a private library. The scope in which the system searches for gadgets is determined by the hierarchy of container elements. The current name scope is determined when a gadget executes a command or receives a message, and is exactly the container in which the gadget is located. The ancestor is sent a special Find message to search for the specified object. The find message propagates in a breadth-first fashion from the ancestor to all descendants until the named object is found. If needed, a gadget may enlarge the search space by starting the find operation at a higher point in the container hierarchy, at the risk of hitting on a ambiguous name.

The Cmd attribute
The Cmd attribute may contain a string specifying what action should be taken when the user clicks on the gadget with the middle mouse key. This action is coded as a procedure in the Oberon language, i.e. the string must represent an Oberon command, with or without parameters. The procedure can search for objects in the user interface and change their state accordingly. For example, the command attribute "Edit.Open Test.Text" specified in a button will open a text viewer displaying the file "Test.Text" when you click on it. Using a very simple script facility, parameters may be edited before they are passed to the procedure: embedding special macro characters in the command string allows attributes to be accessed, selections to be processed, strings to be edited, etc. These macros are used to combine different gadgets together, and have enough power to build graphical interfaces for some classes of Oberon applications.

If this string is empty or it cannot be interpreted as a command, no action is taken.

Very few gadgets do not have this attribute, e.g. the calendar, the clock, etc.

The ConsumeCmd attribute
The ConsumeCmd attribute may contain a string specifying what action should be taken when a gadget is consumed by the gadget. The string's specifications are identical to those of a Cmd attribute string above. In addition a macro character may be used to control consume operations processing the consumee(s). Currently, only the icon gadget is equiped with this attribute.

The Color attribute
Some gadgets have a Color attribute. The Gadget system uses a palette of 16 or 256 colors depending on the hardware installed. Each color is identified by an integer 0 .. 15 or 0 .. 255 respectively. The ColorPicker is very convenient to set the color attribute of a gadget: to this effect, a default value for its Cmd attribute is already defined.

The GridSnap attribute
Container gadgets such as the Panel, are equiped with a grid snap attribute that allows easy positioning of their descendants. The snap function, which has no equivalent in hand drafting, forces displayable gadgets to align to a raster of (invisible) vertical and horizontal lines when moved or copied. The integer value assigned to the attribute specifies the raster lines distance in pixels. The default snap distance is 4 pixels.

The Locked attribute
Often you would like to restrict the editability of the gadgets you create. Editing may mean changing the position or size (see Resizing and moving) of the gadgets in a panel or another container. This editability is determined by two things. First, the gadget may be programmed in such a way that it cannot be moved or resized. This is an inherent restriction determined by the programmer. Second, the Locked attribute is a boolean which determines the gadget's editability.

You will observe in the presentation of the visual gadgets collection that all the container gadgets (iconizer, note-book, organizer, panel, panel document, text gadget) have this attribute. Note that the attribute controls all and only the direct descendants of a container. That is, you cannot selectively lock only some descendants and you have to lock nested containers yourself. Since the editability of a contained gadget is controlled by its context (ancestor), when it is moved to another context its editing behaviour changes.

After having created a UI, you may explicitly freeze it using Columbus, and users can unlock a UI at any time to make adjustments.

The visual gadget collection
Oberon System 3 comes to you with a comprehensive collection of gadgets, each of which is described in detail hereafter. In the future, new applications delivered with the system may add their own gadgets.

Each gadget description contains the following sections:
 * Generator: Procedure used to create a new instance of that type.
 * Alias: Short form for the New procedure, if one is defined.
 * Function: An explanation of the gadget's meaning and usage.

A detailed description of the gadget attributes and of commands related with the gadgets is contained in Chapter 4 of the "The Oberon Companion" which is included in the distribution. This material is best digested in the form of printed document and is too voluminous to fit in a HTML document.

To support the detailed explanations which follow, we suggest that you prepare and reserve a small free area of your desktop for inserting new gadgets in that area (simply clicking on the command) and that you use Columbus to study the various attributes at the same time as you read this tutorial. These gadgets are immediately operational, can be modified and combined at discretion and you can even hone them until they become workable objects, eventually. Otherwise, they are throw-away products.

Alternatively, you could insert an almost complete collection of visual gadgets at once with a single click on BasicGadgets.Panel. In that case you will also need Columbus. You will then observe that all these gadgets are fitted with a 'custom' attribute "Tutorial" otherwise not documented. It serves the purpose of directing the help icon to the gadget's description in this tutorial. Consequently, you are given the choice of reading this tutorial sequentially (the gadgets are presented in alphabetical order) or at random.

The disadvantage of this alternative is that it uses an optically large panel and that your display space will be crowded. You would do well to use the 'Document List' button on your desktop! Do not 'Store' that panel, only 'Close' it.

Button
Generator: Gadgets.Insert BasicGadgets.NewButton ~ Alias: Button

Function: A button can be pushed in and out with a middle mouse key click. You have already exercised with a button in another tutorial. It may have a string or a visual gadget as caption that identifies the button's function. It may be linked to a boolean or to an integer model gadget. A button has the ability to execute a command when clicked on. An attribute indicates if the button should pop out after clicking on it. Buttons function as radio-buttons when linked to an integer value. To build a set of radio-buttons, several buttons are linked to the same integer gadget. Each gadget remembers a certain number, and when the integer gadget has that value, that button will be pushed in. A command is provided to assign unique numbers to button gadgets.

Calendar
Generator: Gadgets.Insert Clocks.NewCalendar ~ Alias: Calendar

Function: A calendar showing the current week day and date.

Caption
Generator: Gadgets.Insert TextFields.NewCaption ~ Alias: None

Function: A caption is a text, often used for titles or comments in panels and other container gadgets. A caption may consist of multiple lines of text. Only limited editing capabilities are provided for captions. The focus point is set with a left mouse key click. The gadget is then framed in a thin rectangle but no caret is visible. When focused, characters typed are appended to the caption. Use the backspace key to correct or modify a caption. A selected text may also be appended by copying. When a caption is selected the font and the text color can be changed with one of the EditTools commands.

Useful hint: A caption may be typed directly in a panel at the caret position. It is not necessary to insert the caption first with Gadgets.Insert Caption ~

CheckBox
Generator: Gadgets.Insert BasicGadgets.NewCheckBox ~ Alias: CheckBox

Function: A check box functions like a button except that it shows a little check mark when set to TRUE. It may be linked to a boolean or to an integer model gadget. It functions like a radio-button when connected to an integer gadget. In that case, the check mark is rectangular.

Circle
Generator: Gadgets.Insert BasicFigures.NewCircle ~ Alias: Circle

Function: A circle of variable radius. Selecting a circle causes two control points to appear, one at the center and the other on the circumference. Either control point may be dragged on the middle mouse key to change the position and the radius of the circle.

Clock
Generator: Gadgets.Insert Clocks.NewClock ~ Alias: Clock

Function: An analog clock with hour and minute hands showing the current time.

ColorPicker
Generator: Gadgets.Insert ColorTools.NewColorPicker ~ Alias: ColorPicker

Function: A ColorPicker shows the current color palette of the system. The color are listed from top to bottom, left to right, from color index 0 to the number of colors available. Pressing the middle mouse key on the ColorPicker pops up a menu from which a color can be selected. The color is then applied to the last selection, either a text, gadget or gadget group. Note that not all gadgets can be colored.

DigitalClock
Generator: Gadgets.Insert Clocks.NewDigiClock ~ Alias: DigitalClock

Function: A digital clock showing the current time in hours and minutes.

Finder
Generator: Gadgets.Insert Finder.NewDocList ~ Alias: Finder

Function: A finder is used to quickly find a document among the many documents piled in a container. Finders are typically placed in the desktop, although they function in other containers too. Moving the mouse cursor to the finder and pressing the middle mouse key pops up a list of document names from which one can be selected. When the mouse key is released, the selected document is brought to the front of the container. A finder is captioned "Document List".

Icon
Generator: Gadgets.Insert Icons.NewIcon ~ Alias: Icon

Function: An icon provides a caption for its content, a single child. When created, an icon contains nothing. At this stage it will consume a gadget as its content. Once an icon has consumed a gadget, it will not accept any other gadget for consumption. Selecting such an icon and issuing the command Icons.Break reverses the operation.

Iconizer
Generator: Gadgets.Insert Icons.NewIconizer ~ Alias: Iconizer

Function: An iconizer is used to build various types of menus. It can be treated as a flip-card, with a gadget on each side of the card. Flipping the card switches from one gadget to the other. Initially, the iconizer contains no gadget, but can be flipped between its two faces Open and Close. A flip button is located in the top left corner of the iconizer. Clicking on this button flips the iconizer. When building a menu, one side of the card represents the menu, and the other represents the menu items. When one state is empty, a gadget may be dropped into the iconizer to become the view of that side of the card. By setting attributes, the iconizers can be changed into different types of pop-up menus.

Line
Generator: Gadgets.Insert BasicFigures.NewLine ~ Alias: Line

Function: Display a line.

List
Generator: Gadgets.Insert Lists.NewList ~ Alias: List

Function: see List

NamePlate
Generator: Gadgets.Insert NamePlates.NewNamePlate ~ Alias: NamePlate

Function: A NamePlate shows the name of the document in the document menubar and the name of the desktop when located inside of one. The name is the string value found in the DocumentName attribute of the TextDoc gadget, LogDoc gadget, or PanelDoc gadget in the case of a desktop. Most editing operations work in the same way as those in a main editable text - the name may be changed, a stretch of text may be selected, deleted or copied. One restriction is that, in order to set the caret (clicking the left mouse key), the mouse focus must point at the very bottom of the NamePlate. The NamePlate then enters a local editing mode in which carriage returns (RETURN) are not accepted. The other restriction is that the font, the color and the vertical offset cannot be changed.

Navigator
Generator: Gadgets.Insert Navigators.NewNavigator ~ Alias: Navigator

Function: Your desktop, as provided by the Gadgets System, has four times the size of your display screen. It is organized in four quadrants, only one of which is visible at a given moment. The navigator is a miniature representation of these 4 quadrants showing profiles of the objects dropped on the desktop and in which the quadrant appearing on the display is marked in black. You can drag objects from the current quadrant to any of the other 3 adjacent quadrants or bring objects to the current quadrant by positioning them on the border between quadrants. Clicking on one the quadrants transports you to that quadrant which becomes visible.

NoteBook
Generator: Gadgets.Insert NoteBooks.New ~ Alias: NoteBook

Function: A note-book organizes gadgets as pages of a note-book. All pages are of the same size which means that, if not locked, resizing a page causes all other pages to be resized accordingly. The title, i.e. the name attribute of the current page is displayed at the top of the note-book. Two arrow-shaped buttons allow you to turn the pages forward or backward. The title bar consumes a new page which is then added to the end of the note-book. A page can be removed by dropping it at a different location or with a right plus left keys interclick.

Organizer
Generator: Gadgets.Insert Organizers.NewPanel ~ Alias: Organizer

Function: An Organizer is a panel extended with a simple constraint solver to reorder the children automatically when the organizer is changed in size. Organizers are distinguished from panels by a diagonal line in the top left corner of the organizer. The constraint system is based on virtual wires: four wires are strung between the four sides of a descendant and an edge of the panel. The horizontal sides of the child gadget are attached to the top or bottom of the panel, and the vertical sides to the left or the right. The length of the four wires are given as four numbers in the Constraint string attribute of the child. Positive numbers string the wire "outward" and negative numbers "over" the gadget.

That is

Gadgets.ChangeAttr Constraints "10 20 10 10" ~

sets a constraint on the selected child where the left edge of the gadget is 10 pixels from the left of the panel, the top edge 20 pixels from the panel top, the right edge 10 pixels from the panel right, and the bottom edge 10 pixels from the panel bottom. Thus the sequence of numbers are left, top, right, and bottom wire distances. Changing the 20 to -20 attaches the top edge of the gadget 20 pixels from the bottom of the panel.

Outline
Generator: Gadgets.Insert Outlines.NewOutline ~ Alias: Outline

Function: An Outline, which functions inside a text gadget only, implements a way to fold text away into a gadget. When folded, the outline is a black rectangle. Middle clicking on the folded outline "unfolds" its content between two arrows. Text in an unfolded outline may be freely edited. Clicking on one of the two arrows folds the text back into the outline: an interesting device for presenting detail or explanatory information without overloading a main text. Be cautious however, deleting an outline arrow may prevent an outline from being folded again. Note that the compiler cannot compile the text contained in folded outlines, you first need to expand them all.

Panel
Generator: Gadgets.Insert Panels.NewPanel ~ Alias: Panel

Function: see extra description

PanelDoc
Generator: Gadgets.Insert PanelDocs.NewDoc ~ Alias: PanelDoc

Function: A PanelDoc is a document containing a single a panel gadget. The document can be given a name and can be saved in a file with that name. If the panel document is opened with the command Desktops.OpenDoc (PanelDoc), it appears with a menu bar containing buttons captioned [Close] and [Store]. If it is opened in a viewer of the textual user interface, the menu bar appears with two additional buttons [Copy] and [Grow].

ProgressMeter
Generator: Gadgets.Insert ProgressMeter.NewFrame ~ Alias: ProgressMeter

Function: Display a meter showing the progression on a data transfer. It is used in the HyperDocs.Panel for example.

Rectangle
Generator: Gadgets.Insert BasicFigures.NewRect ~ Alias: Rectangle

Function: A rectangle, possibly filled. Selecting a rectangle causes two diagonally opposite control points to appear. The control points can be adjusted by dragging on the middle mouse key. A rubber-banding line indicates the current rectangle which takes its final shape when the mouse key is released.

Rectangle3D
Generator: Gadgets.Insert BasicFigures.NewRect3D ~ Alias: Rectangle3D

Function: A rectangle with a 3D-effect, possibly filled. Selecting a rectangle causes two diagonally opposite control points to appear. The control points can be adjusted by dragging on the middle mouse key. A rubber-banding line indicates the current rectangle which takes its final shape when the mouse key is released.

RefFrame
Generator: Gadgets.Insert RefGadgets.NewFrame ~ Alias: RefFrame

Function: A RefFrame (also called visual reference gadget) provides a frame for visualizing a Reference to any object of type Objects.Object. This frame can have three different representations:

 * [[File:OberonColumbus6.png]] - when it does not refer to an object,
 * [[File:OberonColumbus7.png]] - when it refers to a visual gadget,
 * [[File:OberonColumbus8.png]] - when it refers to a model gadget.

The practical advantage of this gadget is that a reference represents an object irrespective of its type (visual gadget or model) and of its size. It can be dragged-and-dropped or copied over to another context just as easily as the object it represents.

A visual reference can be changed either by dropping a visual gadget into its frame or by copying over a selected visual gadget. Alternatively, a reference from another reference can be dropped or copied over with the same effect. When a reference is changed by such a user interaction, it will execute a consume command if so specified. Middle mouse click on a reference to inspect it with Columbus. To remove (or clear) the reference use a right-left interclick inside the reference. Like most other visual gadgets, a reference may execute a command when clicked on. This gadget is used in Objects.Panel and in Libraries.Panel, two components of Columbus for which it was designed, but can be used in any other environment.

Scope
Generator: Gadgets.Insert Gages.NewFrame ~ Alias: Scope

Function: A bar chart of the previous values taken by the model gadget linked to it. A vertical bar is added to the right when the model changes its value. When the chart fills the scope, the bar chart scrolls to left as new vertical bars are added. The minimum and the maximum value observed in the visible portion of the chart are displayed on the left. The scope adjusts its scale automatically according to this value range.

RembrandtDoc
Generator: Gadgets.Insert RembrandtDocs.NewDoc ~ Alias: RembrandtDoc

Function: A picture document displaying a single Picture gadget. The contained picture can be edited with the drawing, operation and color tools provided in Rembrandt.Panel. If it is opened with the command Desktops.OpenDoc (RembrandtDoc), it appears with a menu bar containing buttons captioned [Close], [+], [-] and [Store]. [+] magnifies the selection, or the entire picture if there is none. The button may be clicked 5 times in succession to obtain a magnification of 16. This makes it very easy to retouch pictures pixel-wise. [-] reduces the entire picture. The button may be clicked a maximum of 5 times in succession until the original size is restored, and not beyond. If the document is opened in a viewer of the textual user interface, the menu bar appears with two additional buttons [Copy] and [Grow].

RembrandtFrame
Generator: Gadgets.Insert Rembrandt.New ~ Alias: None

Function: A RembrandtFrame provides a frame for visualizing a single Picture model gadget.

ScrollView
Generator: Gadgets.Insert Gages.NewFrame ~ Alias: ScrollView

Function: A ScrollView is a View which can be fitted with an horizontal or a vertical scrollbar or both according to its attribute values.

SetFrame
Generator: Gadgets.Insert SetGadgets.NewFrame ~ Alias: SetFrame

Function: A SetFrame provides a frame for visualizing a Set model gadget. One bit can be included or excluded by clicking on its placeholder (bit 0 start at the left hand side of the gadget). A bit is on when black bar appears at its corresponding position. A SetFrame may be linked to an integer or to a Set model gadget.

Sisiphus
Generator: Gadgets.Insert Sisiphus.New ~ Alias: Sisiphus

Function: An animated cartoon representing a walking man called Sisyphus. Clicking on a sisiphus activates a screen saver, which is then removed by pressing the Esc key.

Slider
Generator: Gadgets.Insert BasicGadgets.NewSlider ~ Alias: Slider

Function: see Slider. It may be linked to an integer, a real or a string model gadget. Like any other gadget, a slider can be resized but it's particularity is that it may be resized to a vertical or horizontal device with a handle sliding accordingly.

Spline
Generator: Gadgets.Insert BasicFigures.NewSpline ~ Alias: Spline

Function: A spline, possibly filled. Selecting a Spline causes control points to appear at the line joints. The control points are adjusted with the middle mouse key. A right interclick while dragging a control point inserts an additional control point. A left interclick while dragging a control point deletes the point.

TextDoc
Generator: Gadgets.Insert TextDocs.NewDoc ~ Alias: TextDoc

Function: A text document provides the possibility of saving text to files. The child of a text document container is a text gadget. If the text document is opened with the command Desktops.OpenDoc (TextDoc), it appears with a menu bar with buttons marked [Search], [Replace], and [Store]. The [Search] button searches for the selected text stretch in the text. Each time the [Search] button is pressed, the caret advances to the next location in the text where the pattern appears. When the end of text is reached the searching wraps around to the beginning of the text. The [Replace] button replaces the last searched for pattern with the current text selection. The caret then advances to the next occurrence of the search pattern. Repeatedly pressing the [Replace] button replaces all the following occurrences of the search pattern. A replacement can be skipped by pressing the [Search] button as many times as required. At any time the [Replace] button can be pressed to start replacing occurrences of the search pattern.

TextField
Generator: Gadgets.Insert TextFields.NewTextField ~ Alias: TextField

Function: A TextField allows the editing of a single line of text. It can be linked to an Integer, a Real, String or compatible model gadget. Full Oberon-like text editing capabilities are available for a text field. The caret or focus point is set with a left mouse key click and selections are processed with the right mouse key. A text field enters a temporary, local editing mode during editing. During this time the frame of the text field seems to pop out from the screen. While in this editing mode, changes made to the contained text string are not immediately reflected in the model gadget linked to the text field. As soon as the cursor is removed or when the RETURN key is pressed, the local editing mode is left and the model and view are made consistent. The previous value (if still available from the model gadget) is restored in the text field when ESC is pressed. When text fields are linked to model gadgets other than the string model gadget, a value conversion will take place to the same format as the model gadget. In some cases, a conversion is not possible, resulting in a default value being shown depending on the exact nature of the model gadget. When multiple text fields are located in the same container, the TAB key advances the caret from one text field to another. Setting the caret and pressing the left and right arrow keys scrolls the contained text horizontally when the content is wider than the width of the text field.

TextGadget
Generator: Gadgets.Insert Gadgets.New ~ Alias: TextGadget

Function: A text gadget allows the editing of texts. Full Oberon text editing capabilities are available for text gadgets. Most Edit commands also operate on text gadgets. However, the commands Locate, Search and Replace were replaced by similar but more powerful commands implemented in the TextDocs module. In addition to the basic editing facilities of Edit, styles are supported. Styles are inserted in a text gadget by pressing Ctrl-Enter (The keyboard). A style may have one of the following modes: left, middle, right and pad.

TextHyperlink
Generator: Gadgets.Insert TextGadgets.NewControl ~ Alias: TextHyperlink

Function: A TextHyperlink is a text control, and is only visible in a text gadget when control viewing is switched on with the command TextDocs.Controls. A hyperlink contains an Oberon command to be executed when the colored text located immediately in front of the text is middle clicked on. Note that the text in front of the hyperlink has to be in a different color than black for the hyperlink to activate.

TextNote
Generator: Gadgets.Insert TextGadgets.New ~ Alias: TextNote

Function: A TextNote is a TextGadget without a scroll bar. The only difference is that due to the absence of scrolling, the text note grows in size automatically (width and height) to ensure that the entire text is visible.This gadget can be used like a memo pad or post-it note and a set of TextNotes may be organized in a note-book. It can also be used as a pop-up menu, as an alternative to a List, with the additional facility of allowing gadgets to flow in the text. Color may be used to enhance the presentation.

TextStyle
Generator: Gadgets.Insert TextGadgets.NewStyleProc ~ Alias: TextStyle

Function: A TextStyle is a text control gadget that influences the formatting of text. The visibility of style gadgets is toggled with the TextDocs.Controls command. They have the shape of a thin horizontal dotted line with black weights at the end. A style can be inserted at the caret with the TextGadgets.NewStyle command, or by pressing CTRL-ENTER on your keyboard. In that case all the styles are made visible. On the Macintosh, use the num-lock key instead. The style is divided into two sections, the top part, above the dotted line, controls the formatting; the bottom part controls the setting of tabulators (or tabs). Middle mouse key clicks above the dotted line are as follows: when pressing and dragging on the area the black weights occupy, the left border and the formatting width can be specified; clicking next to the weight (but not on top of it), switches the weight on and off. The weights pull the left and right text ends of a text line to them. In this way left, block, center, and right adjust can be selected. A new tab is inserted with a middle and left keys interclick when the mouse focus is positioned below the dotted line. A tab shows up as small black rectangle and can be moved by dragging on the middle mouse key. Tabs are removed by dragging them completely out of the style gadget. All these adjustments can be made more comfortably than with the mouse, by assigning values to the attributes Tabs, Left and Width. Note that tabs only show themselves when left-adjust mode has been selected. Copying a stretch of text always makes a copy of the gadgets contained in that stretch (styles are gadgets too). The Pagebreak attribute is used to specify if a page break should be inserted before the style when printing. Styles that cause a page break are shown with a filled instead of a dotted line. When a TextStyle is named and placed in a public library, it can be re-used many times in the same document or even in different documents

TimeStamp
Generator: Gadgets.Insert TimeStamps.New ~ Alias: TimeStamp

Function: A TimeStamp shows the date and time the document it is contained in was last stored on disk. The date and the time are formatted according the specifications contained in the DateFormat and the TimeFormat fields in the [System] section of the registry. Default values DD.MM.YY and HH:MM:SS respectively, are assigned to these fields in the registry of a newly delivered system.

View
Generator: Gadgets.Insert Views.NewView ~ Alias: View

Function: A View acts as a camera displaying a single visual gadget. This allows you to have many different views of the same gadget. A view may be empty, i.e. display nothing, in which case it can consume a gadget for display. Each view has a certain viewpoint of the thing it displays (camera angle). The viewpoint can be changed by picking the displayed gadget up by its border and moving it to its new location. Should the border be invisible because the gadget is too big, an invisible area around the top left corner of the view can be used to grab and move the displayed gadget. Refer also to the ScrollView which is View with optional horizontal and vertical scrollbars.

The model gadget collection
For an explanation of the model gadgets see Gadgets Introduction and Using Model Gadgets.

Each gadget description contains the following sections:
 * Generator: Procedure used to create a new instance of that type.
 * Alias: Short form for the New procedure, if one is defined.
 * Function: An explanation of the gadget's meaning and usage.

Boolean
Generator: Gadgets.Link BasicGadgets.NewBoolean Alias: Boolean

Function: A Boolean is a model gadget that stores a BOOLEAN value. Booleans function as models of button and check box gadgets. See Boolean

Complex
Generator: Gadgets.Link Complex.New Alias: Complex

Function: Complex is a compound model gadget with attributes specifying the real and the imaginary part of a complex number.

CurrentDirectory
Generator: Gadgets.Link Gages.NewDrv Alias: CurrentDirectory

Function: A CurrentDirectory model gadget stores the working directory the system is currently using. This model gadget is typically visualized by a TextField gadget.

Exercise: Set the caret on the desktop and click on:
 * Gadgets.Insert TextField CurrentDirectory ~

CurrentLoad
Generator: Gadgets.Link Gages.NewLoad Alias: CurrentLoad

Function: A CurrentLoad model gadget stores the current work load of the Oberon system. The workload is estimated from the frequency at which the system obtains control in the Oberon loop. This model gadget is typically visualized by a Scope gadget.

Exercise: Set the caret on the desktop and click on:
 * Gadgets.Insert Scope CurrentLoad~

Event timer
Generator: Gadgets.Link Gages.NewLap Alias: EventTimer

Function: An EventTimer model gadget stores the current system load, which is calculated from the frequency the system gains control in the Oberon tracking and event loop. It is an unscaled number.

Exercise: Set the caret on the desktop and click on:
 * Gadgets.Insert TextField EventTimer~

Integer
Generator: Gadgets.Link BasicGadgets.NewInteger Alias: Integer

Function: An Integer is a model gadget that stores a LONGINT value. It may be visualized by text fields, sliders or buttons. When linked to a set of buttons or check boxes (or a mixture of buttons and check boxes), the buttons and check boxes function as radio buttons. In this case, the buttons and check boxes should be assigned unique integer values to be stored in their respective SetVal attributes. This can be conveniently done with the command BasicGadgets.SetValues. A button or check box is "on" when its assigned integer value corresponds to the integer gadget value. See Integer.

MemoryUsed
Generator: Gadgets.Link Gages.NewMem Alias: MemoryUsed

Function: A MemoryUsed model gadget contains an up-to-date indication of how much of the Oberon heap is currently being used.

Exercise: Set the caret on the desktop and click on:
 * Gadgets.Insert TextField MemoryUsed ~

Picture
Generator: Gadgets.Link Pictures.NewPicture Alias: Picture

Function: A Picture is a model object containing a colored two-dimensional bitmap visualized by a RembrandtFrame to which it is linked as model. It has no attribute at all, and no further attribute can be attached to it. A picture editor called Rembrandt is included in the system to edit bitmaps.

Exercise: Set the caret on the desktop and click on:
 * Gadgets.Insert Rembrandt.New Picture ~

Real
Generator: Gadgets.Link BasicGadgets.NewReal Alias: Real

Function: A Real is a model gadget that stores a LONGREAL value. It can be linked to slider or text field gadgets. See Real

Reference
Generator: Gadgets.Link RefGadgets.NewReference Alias: Reference

Function: A reference to any object which is an extension of Objects.Object. This model gadget is visualized by a RefFrame gadget.

Set
Generator: Gadgets.Link SetGadgets.NewSet Alias: Set

Function: A Set is a model gadget that stores a 32-bit set. It is normally visualized by a SetFrame gadget, but it may also be linked to a text field, a slider, a button or a group of them.

String
Generator: Gadgets.Link BasicGadgets.NewString Alias: String

Function: A String is a model gadget that stores a string value of up to 64 characters. See String

Text
Generator: Gadgets.Link Texts.New Alias: Text

Function: Text is the abstract data type used for manipulating text in the Oberon system. Text can be of (practically) unlimited length, and contain font, color and vertical offset information. Gadgets can float inside a text stream. Texts are not true gadgets and have no attributes.

How to copy gadgets - Gadgets.Copy
Copying gadgets can be done in two different ways. Copying both the visual and the model gadgets is called a deep copy. Copying only the visual gadget which then visualizes the same model gadget as the original is called a shallow copy. A shallow copy can be made directly with the mouse. For example, dragging a gadget with the middle key followed by a right interclick causes a shallow copy of the gadget(s) to be inserted at the mouse position. A deep copy has to be made explicitly with the command:

 * Gadgets.Copy

It takes the selection, makes a deep copy of it, and inserts it at the caret position. Deep copies are structure preserving. The Gadgets.Panel provides a button to make deep copies.

Using model gadgets
To allow programmers to add new model gadgets that function with existing visual gadgets (sliders, buttons, text fields etc), a message protocol between model and visual gadgets is used. The message protocol is currently limited to the simple types boolean, integer, string and real. In essence, a visual gadget can indicate in which attribute (or field or component) of the model gadget it is interested in. A few visual gadgets have a string attribute called "Field" which contain such an attribute name. If this attribute is empty, the default attribute "Value" is assumed. Thus model gadgets may be of a compound nature and can be visualized by many different visual gadgets, each of which is displaying a different attribute of the model gadget they are linked to. Should the model or the view change, the message exchange protocol is activated to ensure the consistency between model and view.

In addition to the commands that instantiate a gadget and manipulate attributes, the gadget module also exports the following commands:

Changing the type of a visual gadget - Gadgets.Change
Gadgets.Change viewNewProcedure ~ changes the selected (of course visual) gadgets into a new type. The old models of these gadgets are kept.

Setting an attribute value - Gadgets.Set
Gadgets.Set Obj.Attr value ~ changes the attribute of the indicated gadget. This command must be executed from the same context as the target's context.

Setting an attribute - Gadgets.ChangeAttr
Gadgets.ChangeAttr attrName attrValue ~ sets the value of the attribute of the selected gadget.

Attributes can be set directly using Oberon commands. These are used seldomly, but are sometimes useful to change attributes under the control of another gadget.

AttributeValue can take several forms, depending on the type of the attribute:

 * {| style="border-collapse: collapse; line-height:0.96rem;"

Note that you may add any attribute you want to a gadget. Attributes that the gadget knows about will be forced to a certain type. Attributes that are unknown will be stored, but ignored.
 * names
 * For string attributes
 * Yes/No
 * For boolean attributes
 * 1234
 * For number attributes
 * "strings"
 * For string attributes
 * }
 * "strings"
 * For string attributes
 * }
 * }

Macros
Macros are used to process the attributes of gadgets. They act as the glue between different gadgets. Typically, a gadget executes a command when activated, the parameters of which are retrieved from the display. The parameters may be the selection, for example, or the value of an attribute of a certain gadget. The macros are first expanded completely and the resulting text is passed to the executed procedure in the normal Oberon fashion. This makes it possible to add user interfaces to existing Oberon applications. The system massages the parameters in such a way that it can be parsed in the conventional way.

Lookup macro &
The lookup macro is useful when you want to pass a command a parameter, where the value of the parameter is the attribute value of a certain gadget. The macro has the syntax &ObjName.AttrName and on expansion it searches for the object named ObjName inside the current scope, extracts its AttrName attribute value, and inserts this value into the command string. An example is when you wish to open a text file (the name of which is written in a text field) when you click on a button. First you have to name the text field, say TF, using Columbus. Then by executing the following command, the Cmd attribute of the button can be set:

 * Gadgets.ChangeAttr Cmd "Edit.Open &TF.Value"

Note that both the button and text field must be in the same name scope i.e. have the same container.

Activator macro #
The activator macro returns an attribute value of the gadget that is executing the command. It is used in the form #AttrName, where AttrName identifies the name of the attribute. An example can be found in the List gadget. Here an attribute Point contains the item that is clicked on in the list.

Initiator macro !
When objects are consumed by other objects, the objects being consumed are called the initiators or senders, and the object doing the consuming is called the recipient or receiver. This macro appears often in ConsumeCmd attributes, and allows access to the attribute values of the initiators. The consume command is executed by the recipient. The macro takes the form !AttrName, and expands to a list of attribute values of each object in the group of initiators. It can be used for compiling a list of files when you drop their icons on a compiler icon. Suppose the attribute Filename indicates the name of the file (it must be an attribute of the file icons), then the following may be used to set the ConsumeCmd attribute of the compiler icon:
 * Gadgets.ChangeAttr ConsumeCmd "Compiler.Compile !Filename ~"

Selection macro ^
As in the standard Oberon system, this macro expands to the current selection. The Gadgets System uses a slightly extended selection semantics. Here a macro in the form ^AttrName expands into a list of attribute values of all selected objects. If no gadget is selected, the text selection is assumed. This allows, for example, the creation of a command that act on a group of selected gadgets. As before, this device can be used to elegantly build a compile button that takes the selection as parameter. Note that the selection returned always contains at least a whole word even when only the beginning of the word is selected.

Processor macros {, }, |
A processor macro always has the following form: { prefix | suffix | list}. When it expands, each word in the list is given a prefix and/or a suffix as indicated. Prefix and postfix may be omitted. A processor sequence like { | /s | ^ } would expand to the current selection with each word with a /s suffix.

String concatenation
Most macros behave in a way that may seem strange at first. Macros are identified by a special initial symbol !, &, etc followed by a parameter. While expanding macros, the system needs to know when to terminate parsing the parameter. By default, this is when no character is left to be scanned (end of string) or a space is reached. However, when a space is reached first, the space is not included in the expanded macro. If you want a space to be included in the expanded text, you have to explicitly insert another space after the first one. This feature allows you to concatenate macros. For example, if O1.Value is "Hello" and O2.Value is "World", then:
 * "&O1.Value &O2.Value"   (one space separator)

will expand to "HelloWorld", while:
 * "&O1.Value &O2.Value"   (with two spaces in-between)

will expand to "Hello World".

Interactive composition of gadgets
One of the most interesting and novel aspects of the gadgets is that they can be changed in size and position, in addition to being used, from creation onwards until they are explicitely locked by the user. This is in contrast to most other systems where the user receives his user interface locked, and must "take it or leave it". A significant part of a user's time can be spent organizing the existing user interface or building a new one. This can be compared to the user adjusting his private text tools in the classic Oberon system.

This chapter explains how interactive composition of gadgets is done at run-time. Creating a new interface or changing an interface does not necessarily require programming.

A simple composition exercise
Try this simple example of interface composition. A step-by-step execution of the following instructions will lead you to create a simple compiler interface panel.

Creating a panel

 * 1) Create a new, empty panel: Desktops.OpenDoc (PanelDocs.NewDoc).
 * 2) Open the Gadgets.Panel: Desktops.OpenDoc Gadgets.Panel.
 * 3) Place the caret in the newly created panel and insert a button by clicking on "Button" in the "View" list in the Gadgets.Panel.
 * 4) Click on the button a few times, see how it works.

Adapting the panel

 * 1) Open the inspector by clicking on the [Columbus] button in the Gadgets.Panel.
 * 2) Select the new button with the right mouse key.
 * 3) Hit the [Inspect] button of the inspector.
 * 4) Change the "Caption" text field to Compile.
 * 5) Type Compiler.Compile * in the "Cmd" text field.
 * 6) Check the "Popout" check box.
 * 7) Hit the [Apply] button. Note that the button's caption has changed.
 * 8) Deselect the button by hitting the Esc key or by selecting the button with the right key again.
 * 9) Open a text viewer with an Oberon source text (any *.Mod file).
 * 10) Mark the viewer.
 * 11) Hit the [Compile] button to start the compilation.

Storing the finalized panel and using it

 * 1) Place the caret into the name plate and give the panel a name by typing "My.Panel".
 * 2) Store the panel by clicking on the "Store" button in the menu bar (of the panel). Your work is now saved and ready for repeated use.
 * 3) Close the panel by clicking on the [Close] button in the menu bar.
 * 4) Re-open the panel to use it Desktops.OpenDoc My.Panel.

A gadgets composition tool
To help you to compose new user interfaces or modify existing ones we are providing the Gadgets.Panel. Behind the scene it uses a set of Gadgets module commands which have been reviewed earlier. Do not forget, these commands can also be executed directly in text in the usual Oberon manner.

 * [[File:OberonGadgetsToolkit.png]]

The two lists contain the standard set of visual and model gadgets. Note in passing that 'View' is briefer than 'visual gadget' and 'Model' more concise than 'model gadget'. Also for the user's convenience, the list entries are aliases of the real New procedure names. Clicking on one of the entries in the View list inserts a gadget of that type at the caret position. Clicking on an entry in the Model list links a model gadget of that type to the selected gadget or gadgets. The [Recall] button recalls the last deleted panel (Note: it only works for a panel gadget). The [Columbus] button opens a fresh Columbus panel, and the buttons [Back] and [Front] change the display priority of the selected gadgets. By display priority is meant which gadgets overlap others in a panel. By default, new gadgets are always inserted in front of the gadgets already located in a container, and keep their current priority until it is explicitly changed. One exception is the document gadget; these pop to the front when they are focused. If you want to bring a gadget to the front of the container, the consume interclick combination can be used as a short cut. Notice however that the new consume position is the same container as before, otherwise the gadget may change containers unexpectedly.

The [Deep Copy] button controls the execution of a Gadgets.Copy command.

The Align Menu panel allows you to control the alignment of the selected gadgets:
 * [[File:OberonGadgetsAlignMenu.png]]

Alignment normally takes place relative to some imaginary line. For example, Left alignment means that all selected gadgets should be lined up on their left edges, the reference line being the the left-most gadget of the selection.

Aliases
To remember all New procedures can be quite difficult. Gadgets includes an aliasing feature which allows you to use shorter names for New procedures. The [Aliases] section in the registry (_OBERON.INI) determines these aliases. The complete list of aliases currently defined can be displayed in the system log with the following command: System.Get Aliases

Each alias appears once in this section on a text line with the following format:
 * AliasName = M.P

where AliasName identifies an alias for the New procedure M.P. It is now possible to use the following much shorter command to create a Model-View pair, as in this example:
 * Gadgets.Insert Button Boolean ~

Aliasing is only available with the commands "Gadgets.Insert" and "Gadgets.Link".

To modify an alias, use the command: System.Set Aliases AliasName := M.P ~

What's next?
Learn how to manipulate gadgets from within Oberon programs in Using Gadgets from within Oberon.

If you had liked to develop your own Gadgets learn all about it in Programming new Gadgets.

Index
[ A | B | C | D | E | F | G | I | L | M | N | O | P | R | S | T | U | V ]

A

activator macro # aliases attributes

B

Boolean Button

C

Calendar Caption CheckBox Circle Clock Cmd attribute color attribute ColorPicker Complex composition tool concatenation ConsumeCmd attribute CurrentDirectory CurrentLoad

D

deep copy DigitalClock

E

RembrandtFrame EventTimer

F

Finder

G

gadget composition gadget instance Gadgets.Change Gadgets.ChangeAttr Gadgets.Copy Gadgets.Insert Gadgets.Insert Gadgets.Link Gadgets.Set Gen attribute generator grid snap attribute GUI

I

Icon Iconizer initiator macro ! Integer

L

Line List locked attribute lookup macro &

M

macro MemoryUsed Model-View

N

Name attribute NamePlate Navigator New procedure NoteBook

O

Organizer Outline

P

Panel PanelDoc Picture processor macros {, }, | ProgressMeter

R

Real Rectangle3D Rectangle Reference RefFrame RembrandtDoc

S

Scope ScrollView Selection macro ^ SetFrame Set shallow copy Sisiphus Slider Spline String

T

TextDoc TextField TextGadget TextHyperlink TextNote TextStyle Text TimeStamp

U

user interfaces

V

View

Revised, afi 26 Nov 1996 Installed on 30 05 1997

title: Oberon/ETH Oberon/Tutorial/GadgetsUse


text: Category:Book:Infrastructure Past, Present, and Future Casebook


text: Infrastructure Past, Present, and Future Casebook/Printable version


text:
Cookbook talk:Sugar

Reworked Page Jan 2022
I've reworked the page to include more specific categories, and I've combined terms that are very similar (e.g. caster sugar and superfine sugar, whose individual pages should be merged anyway). I've also included a gallery of various kinds of sugar! Nostriker (discuss • contribs) 04:36, 2 January 2022 (UTC)

title: Cookbook talk:Sugar


text:
Cookbook:Potato and Leek Soup

| United States |Vegetable | Vegetable Soup

Potato leek soup is a light soup that can be prepared from freezer to table in under 2 hours. It's easy to prepare ahead of time and refrigerate or freeze for later use.

Ingredients

 * 1 tablespoon extra-virgin olive oil
 * 1 medium onion, chopped
 * 1 leek, white and light green parts only, sliced and rinsed well
 * 2 cloves garlic, minced
 * 1.25–1.5 pounds (2 large) russet or Yukon gold potatoes, peeled and diced
 * 6 cups vegetable stock
 * 1 cleaned leek green
 * Bay leaf
 * A few sprigs each of parsley and thyme (optional), tied together
 * Salt to taste
 * 5 ounces lettuce leaves, washed and coarsely chopped (4 cups)
 * Freshly-ground black pepper

Procedure

 * 1) In a large, heavy soup pot, heat the olive oil over medium heat and add the onion and leeks. Cook, stirring occasionally, for about 5 minutes until soft,.
 * 2) Add ½ teaspoon salt and the garlic. Cook, stirring constantly, for 1 minute or until the garlic is aromatic.
 * 3) Add the potatoes, stock, leek green, bay leaf, and parsley/thyme bundle. Bring to a simmer, and season with salt to taste.
 * 4) Cover and cook for 45 minutes on low heat.
 * 5) Add the lettuce, and simmer for another 15 minutes. The potatoes should be completely soft and fall apart when you press them.
 * 6) Blend the soup until smooth with an immersion blender, blender, or food processor fitted with the steel blade (working in stages and covering the blender lid or food processor with a kitchen towel to keep the hot soup from spilling). If you want the soup to have a smoother, silkier texture, strain it through a medium sieve.
 * 7) Return the soup to the boil, and season with salt and freshly ground pepper to taste.
 * 8) Serve.

title: Cookbook:Potato and Leek Soup


text:
PHP Programming/Secure HTTP headers

The returned by a PHP script can reveal its security breaches.

Hide versions
To avoid to be the target of the security breaches linked to a PHP or a web server version, it's better to hide them in the HTTP headers.

This is generally done in the server configuration files, but can also be realized in PHP:

Other attacks
The can be prevented by configuration.

Example of protections:

Attention: a bad configuration can provoke (CORS) errors.

title: PHP Programming/Secure HTTP headers


text:
PHP Programming/Encryption

PHP provides several functions to encrypt data.

Symmetrical encryption
Storing passwords in clear (unencrypted), in a file or a database, constitutes a security breach. To be able to encrypt and decrypt them, a can be done by:

Asymmetrical encryption
The est used to check an identity, via a public and a private key. In PHP, it's done with:

Hashing
crypt is a for a string, which can add a  as an optional second parameter.

title: PHP Programming/Encryption


text:
Oberon/ETH Oberon/2.3.7/Examples.Mod

(* ETH Oberon, Copyright 1990-2003 Computer Systems Institute, ETH Zurich, CH-8092 Zurich. Refer to the license.txt file provided with this distribution. *) (* 	Examples.Mod, jm 24.2.93 - Modified by AFI - December 18, 1994. 	This module illustrates how gadgets can be manipulated under program control. 	Commands exported by this module are used in the tutorial "GadgetsOberon.html". *) MODULE Examples; (** portable *) IMPORT Attributes, BasicGadgets, Desktops, Display, Gadgets, Oberon, Objects, Out, Printer, Texts, Documents; VAR W: Texts.Writer; tmp: Objects.Object; (*-- Increment integer gadget --*) (* This command must be executed from a gadget *) PROCEDURE Increm*; VAR obj: Objects.Object; BEGIN obj := Gadgets.FindObj(Gadgets.context, "Level"); IF (obj # NIL) THEN INC(obj(BasicGadgets.Integer).val); Gadgets.Update(obj) END END Increm; (*-- Decrement integer gadget --*) (* This command must be executed from a gadget *) PROCEDURE Decrem*; VAR obj: Objects.Object; BEGIN obj := Gadgets.FindObj(Gadgets.context, "Level"); IF (obj # NIL) THEN DEC(obj(BasicGadgets.Integer).val); Gadgets.Update(obj) END END Decrem; (*-- Create a slider gadget and insert it at the caret position --*) PROCEDURE InsertAtCaret*; VAR obj: Objects.Object; BEGIN Out.String("Inserting slider gadget at caret"); Out.Ln; obj := Gadgets.CreateObject("BasicGadgets.NewSlider"); Gadgets.Integrate(obj) END InsertAtCaret; (*-- Create a text field linked to an integer and insert it at the caret position --*) PROCEDURE InsertPair*; VAR F: Display.Frame; obj: Objects.Object; L:Objects.LinkMsg; BEGIN Out.String("Insert view/model pair"); Out.Ln; F := Gadgets.CreateViewModel("TextFields.NewTextField", 								"BasicGadgets.NewInteger"); Gadgets.Integrate(F); (* Name the model "Volts" *) Gadgets.NameObj(F(Gadgets.Frame).obj, "Volts"); (* Create a slider, insert it in the desktop and name it "Slider" *) obj := Gadgets.CreateObject("BasicGadgets.NewSlider"); Gadgets.Integrate(obj); Gadgets.NameObj(obj, "Slider"); (* Link the integer to the slider *) (* NOT so: obj(Gadgets.Frame).obj := F(Gadgets.Frame).obj 		but so, sending a link message to the slider. *) L.id := Objects.set; L.obj := F(Gadgets.Frame).obj; L.name := "Model"; L.res := -1; Objects.Stamp(L); obj.handle(obj, L); Gadgets.Update(obj) END InsertPair; (*-- Display names assigned in previous example --*) PROCEDURE ShowNames*; VAR S: Display.SelectMsg; ObjName: ARRAY 64 OF CHAR; BEGIN S.id := Display.get; S.F := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN Out.String("Visual gadget name: "); Gadgets.GetObjName(S.obj, ObjName); Out.String(ObjName); Out.Ln; (*==================*) 		IF S.obj(Gadgets.Frame).obj # NIL THEN Out.String("Model gadget name: "); Gadgets.GetObjName(S.obj(Gadgets.Frame).obj, ObjName); Out.String(ObjName); Out.Ln 		ELSE Out.String("No model exists"); Out.Ln 		END END END ShowNames; (*-- Display information about an object --*) PROCEDURE Info*(obj: Objects.Object); VAR A: Objects.AttrMsg; BEGIN IF obj # NIL THEN A.id := Objects.get; A.name := "Gen"; A.s := ""; A.res := -1; obj.handle(obj, A); (* Retrieve its new procedure *) IF A.s # "" THEN Texts.WriteString(W, " "); Texts.WriteString(W, A.s) 		ELSE Texts.WriteString(W, "  Unknown generator!") END; IF obj IS Desktops.DocGadget THEN Texts.WriteString(W, ": desktop document") ELSIF obj IS Documents.Document THEN Texts.WriteString(W, ": document") ELSIF obj IS Gadgets.View THEN Texts.WriteString(W, ": view") ELSIF obj IS Gadgets.Frame THEN Texts.WriteString(W, ": visual gadget") ELSIF obj IS Display.Frame THEN Texts.WriteString(W, ": display frame") ELSIF obj IS Gadgets.Object THEN Texts.WriteString(W, ": model gadget") ELSE Texts.WriteString(W, ": type unknown") END; Texts.WriteLn(W) END; Texts.Append(Oberon.Log, W.buf) END Info; PROCEDURE Explore*; BEGIN Info(Oberon.Par.frame); Info(Oberon.Par.obj); Info(Gadgets.executorObj); Info(Gadgets.context) END Explore; (*-- Tell everything about the execution environment --*) (* This command must be executed from a gadget. *) PROCEDURE FindObj*; VAR obj: Objects.Object; BEGIN (* Note: the context is already set before reaching this point. *) obj := Gadgets.FindObj(Gadgets.context, "Test"); IF (obj # NIL) & (obj IS BasicGadgets.Button) THEN Out.String("Executor gadget:"); Out.Ln; Info(Gadgets.executorObj); Out.String("found:"); Out.Ln; Info(obj); Out.String("in context:"); Out.Ln; Info(Gadgets.context); Out.Ln 	END END FindObj; (*-- Select gadget --*) (* This command must be executed from a gadget *) PROCEDURE SelectGadget*; VAR S: Display.SelectMsg; obj: Objects.Object; BEGIN obj := Gadgets.FindObj(Gadgets.context, "Test"); IF (obj # NIL) THEN Out.String("Select gadget 'Test'"); Out.Ln; S.id := Display.set; S.F := obj(Display.Frame); S.obj := NIL; S.sel := NIL; S.time := -1; Display.Broadcast(S); Info(S.obj); Info(S.sel); Out.String("Gadget selected."); Out.Ln; Gadgets.Update(obj); Out.String("  and now redrawn.") ELSE Out.String("No object 'Test' found") END; Out.Ln END SelectGadget; (*-- Deselect selected gadget --*) (* This command must be executed from a gadget *) PROCEDURE DeselectGadget*; VAR S: Display.SelectMsg; obj: Objects.Object; BEGIN Out.String("Deselect gadget"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN obj := S.obj; S.id := Display.reset; S.F := obj(Display.Frame); S.obj := NIL; S.sel := NIL; S.time := -1; Display.Broadcast(S); Info(S.obj); Info(S.sel); Out.String("Gadget deselected"); Out.Ln; Gadgets.Update(obj); Out.String("  and now redrawn.") ELSE Out.String("No object selected.") END; Out.Ln END DeselectGadget; (*-- Display information about the currently selected objects --*) PROCEDURE GetSelection*; VAR S: Display.SelectMsg; obj: Objects.Object; BEGIN Out.String("Examples.GetSelection"); Out.Ln; S.id := Display.get; S.F := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN obj := S.obj; WHILE obj # NIL DO 			Info(obj); Out.String("   Ancestor:"); Info(S.sel); obj := obj.slink END ELSE Out.String("No object selected.") (*-- time is still = -1 and obj = NIL --*) END END GetSelection; (*-- Remove selected gadget --*) PROCEDURE RemoveSelection*; VAR S: Display.SelectMsg; C: Display.ControlMsg; BEGIN Out.String("Remove selected gadget"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN C.id := Display.remove; C.F := S.obj(Display.Frame); Display.Broadcast(C) END END RemoveSelection; (*-- Suspend selected gadget --*) PROCEDURE SuspendSelection*; VAR S: Display.SelectMsg; C: Display.ControlMsg; BEGIN Out.String("Suspend selected gadget"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN C.id := Display.suspend; C.F := S.obj(Display.Frame); Display.Broadcast(C) END END SuspendSelection; (*-- Locate gadget at screen coordinates X, Y --*) PROCEDURE LocateP*; VAR F: Display.Frame; X, Y: INTEGER; u, v: INTEGER; BEGIN X := Oberon.Pointer.X; 	Y := Oberon.Pointer.Y; 	Out.String("Gadget at X="); Out.Int(X, 5); Out.String(" Y="); Out.Int(Y, 5); Out.Ln; Gadgets.ThisFrame(X, Y, F, u, v); Info(F); Out.String(" Rel. point coord. "); Out.String("u="); Out.Int(u, 5); Out.String(" v="); Out.Int(v, 5); Out.Ln END LocateP; (*-- Locate gadget at screen coordinates X, Y --*) PROCEDURE Locate*; VAR L: Display.LocateMsg; X, Y: INTEGER; BEGIN X := Oberon.Pointer.X; 	Y := Oberon.Pointer.Y; 	Out.String("Gadget at X="); Out.Int(X, 5); Out.String(" Y="); Out.Int(Y, 5); Out.Ln; L.X := X; L.Y := Y; L.res := -1; L.F := NIL; L.loc := NIL; Display.Broadcast(L); Info(L.loc); Out.String(" Rel. point coord. "); Out.String("u="); Out.Int(L.u, 5); Out.String(" v="); Out.Int(L.v, 5); Out.Ln END Locate; (*-- Move selected gadget to absolute coordinates X, Y --*) PROCEDURE MoveGadget*; VAR S: Display.SelectMsg; M: Display.ModifyMsg; F: Display.Frame; AS: Attributes.Scanner; X, Y: INTEGER; BEGIN Out.String("Moving gadget."); Out.Ln; Attributes.OpenScanner(AS, Oberon.Par.text, Oberon.Par.pos); Attributes.Scan(AS); IF AS.class = Attributes.Int THEN X := SHORT(AS.i); Attributes.Scan(AS); IF AS.class = Attributes.Int THEN Y := SHORT(AS.i); S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN F := S.obj(Display.Frame); M.id := Display.move; M.mode := Display.display; M.F := F; 				M.X := F.X + X; M.Y := F.Y + Y; 				M.W := F.W; M.H := F.H; 				M.dX := X; M.dY := Y; 				M.dW := 0; M.dH := 0; Display.Broadcast(M) END END END END MoveGadget; (*-- Show selected gadget location (X, Y) and size (W, H) --*) PROCEDURE LocateGadget*; VAR S: Display.SelectMsg; F: Display.Frame; BEGIN Out.String("Gadget frame coordinates:"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN F := S.obj(Display.Frame); Out.String("X="); Out.Int(F.X, 5); Out.String("  Y"); Out.Int(F.Y, 5); Out.Ln; Out.String("W="); Out.Int(F.W, 5); Out.String("  H="); Out.Int(F.H, 5); Out.Ln 	END END LocateGadget; (*-- Move selected gadgets to the caret --*) PROCEDURE MoveToCaret*; VAR S: Display.SelectMsg; C: Display.ControlMsg; obj: Objects.Object; BEGIN Out.String("Moving gadget to caret"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN obj := S.obj; C.id := Display.remove; C.F := obj(Display.Frame); Display.Broadcast(C); Gadgets.Integrate(obj) END END MoveToCaret; (*-- Print selected gadgets --*) PROCEDURE PrintGadget*; VAR S: Display.SelectMsg; P: Display.DisplayMsg; obj: Objects.Object; BEGIN Printer.Open("LPT1", ""); Out.String("Printing gadget"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN obj := S.obj; P.device := Display.printer; P.id := Display.contents; P.F := obj(Display.Frame); P.res := -1; Display.Broadcast(P); END END PrintGadget; (*-- Show a named attribute of a gadget --*) PROCEDURE RetrObjAttr(name: ARRAY OF CHAR); VAR A: Objects.AttrMsg; BEGIN Out.String("   "); Out.String(name); A.id := Objects.get; COPY(name, A.name); A.res := -1; Objects.Stamp(A); tmp.handle(tmp, A); IF A.res >= 0 THEN	(* Attribute exists *) IF A.class = Objects.String THEN Out.String(" is string = "); Out.String(A.s) 		ELSIF A.class = Objects.Int THEN Out.String(" is integer = "); Out.Int(A.i, 5) ELSIF A.class = Objects.Real THEN Out.String(" is real = "); Out.Real(A.x, 5) ELSIF A.class = Objects.LongReal THEN Out.String(" is real = "); Out.LongReal(A.y, 5) ELSIF A.class = Objects.Char THEN Out.String(" is char = "); Out.Char(A.c) 		ELSIF A.class = Objects.Bool THEN Out.String(" is boolean = "); IF A.b THEN Out.String("TRUE") ELSE Out.String("FALSE") END ELSE Out.String("Unknown class") END END; Out.Ln END RetrObjAttr; PROCEDURE EnumAttr*; VAR S: Display.SelectMsg; obj: Objects.Object; A: Objects.AttrMsg; BEGIN Out.String("Examples.EnumAttr"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN obj := S.obj; WHILE obj # NIL DO 			tmp := obj; Info(obj); A.id := Objects.enum; A.Enum := RetrObjAttr; A.res := -1; Objects.Stamp(A); obj.handle(obj, A); obj := tmp.slink END END END EnumAttr; PROCEDURE EnumAttr2*; VAR S: Display.SelectMsg; obj: Objects.Object; At: Attributes.Attr; AV: Attributes.StringAttr; BEGIN Out.String("Examples.EnumAttr2"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN obj := S.obj; WHILE obj # NIL DO 			tmp := obj; Info(obj); Info(obj(Gadgets.Frame).obj); At := obj(Gadgets.Frame).attr; (* Why is this = NIL ??? *) IF At = NIL THEN Out.String("Is Nil") END; NEW(AV); AV.s := "Gogo"; AV.next := NIL; Attributes.InsertAttr(At, "Andr�", AV); Attributes.DeleteAttr(At, "Tutorial"); Out.String("Done"); obj := tmp.slink END END END EnumAttr2; (*-- Show the 'Value' attribute of objects --*) PROCEDURE ShowValue*; VAR S: Display.SelectMsg; obj: Objects.Object; BEGIN Out.String("Show 'Value' attribute"); Out.Ln; S.id := Display.get; S.F := NIL; S.obj := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN obj := S.obj; WHILE obj # NIL DO 			Info(obj); tmp := obj; RetrObjAttr("Value"); obj := obj.slink END END END ShowValue; (*-- Resize selected gadgets --*) PROCEDURE Resize*; VAR S: Display.SelectMsg; obj: Objects.Object; F: Display.Frame; M: Display.ModifyMsg; AS: Attributes.Scanner; W, H: INTEGER; BEGIN Out.String("Resize selected gadgets"); Out.Ln; Attributes.OpenScanner(AS, Oberon.Par.text, Oberon.Par.pos); Attributes.Scan(AS); IF AS.class = Attributes.Int THEN W := SHORT(AS.i); Attributes.Scan(AS); IF AS.class = Attributes.Int THEN H := SHORT(AS.i); S.id := Display.get; S.F := NIL; S.time := -1; Display.Broadcast(S); IF (S.time # -1) & (S.obj # NIL) THEN obj := S.obj; WHILE obj # NIL DO 					F := obj(Display.Frame); M.id := Display.extend; (* OR Display.reduce: means change size for gadgets *) M.mode := Display.display; (* display changes immediately *) M.F := F; 					M.X := F.X; M.Y := F.Y; 					M.dX := 0; M.dY := 0; M.W := W; M.H := H; 					M.dW := W - F.W; M.dH := H - F.H; (* deltas *) Display.Broadcast(M); (*	F.handle(F, M);	???	*) obj := obj.slink END END END END END Resize; (*-- Shows the current message path --*) (* This command must be executed from a gadget *) PROCEDURE ShowThread*; VAR obj: Objects.Object; BEGIN Out.String("Examples.ShowThread"); Out.Ln; obj := Oberon.Par.obj; WHILE obj # NIL DO 		Info(obj); obj := obj.dlink END END ShowThread; (* Consume command. Delete the object thrown into the executor of this command *) PROCEDURE Delete*; VAR C: Display.ControlMsg; BEGIN Out.String("Examples.Delete"); Out.Ln; IF Gadgets.senderObj # NIL THEN C.id := Display.remove; C.F := Gadgets.senderObj(Display.Frame); Display.Broadcast(C) END END Delete; (*-- Look for an integer model gadget called "Test" in the current 		context and increment its val field. The model is visualized by 		a text field.--*) (*-- This command must be executed in a given context. --*) PROCEDURE Inc*; VAR obj: Objects.Object; BEGIN obj := Gadgets.FindObj(Gadgets.context, "Test"); IF (obj # NIL) & (obj IS BasicGadgets.Integer) THEN WITH obj: BasicGadgets.Integer DO 			INC(obj.val); BasicGadgets.SetValue(obj) END END; (*-- Look for an slider gadget called "Slider" in the current 		context and increment its val field --*) obj := Gadgets.FindObj(Gadgets.context, "Slider"); IF (obj # NIL) & (obj IS BasicGadgets.Slider) THEN WITH obj: BasicGadgets.Slider DO 			INC(obj.val); BasicGadgets.SetValue(obj) END END END Inc; (*-- Look for an integer object called Test in the current context, 		build a slider and link them together, and 		insert the slider at the caret position. *) (* This command must be executed from a gadget. *) PROCEDURE AddSlider*; VAR obj: Objects.Object; F: Objects.Object; BEGIN obj := Gadgets.FindObj(Gadgets.context, "Test"); IF (obj # NIL) & (obj IS BasicGadgets.Integer) THEN F := Gadgets.CreateObject("BasicGadgets.NewSlider"); WITH F: Gadgets.Frame DO 			F.obj := obj; (* Link slider to the integer object *) Gadgets.Integrate(F); Gadgets.Update(obj) END END END AddSlider; PROCEDURE ShowDoc*; VAR D: Documents.Document; BEGIN D := Documents.MarkedDoc; Info(D); END ShowDoc; PROCEDURE OpenDoc*; VAR D: Documents.Document; BEGIN D := Documents.Open("Tutorials.html"); IF D # NIL THEN Desktops.ShowDoc(D) ELSE Out.String("No such document found.") END END OpenDoc; (*---*) (* Used in the GadgetsOberon.html tutorial. *) PROCEDURE Add*; VAR x, a, b: BasicGadgets.Real; PROCEDURE GetReal(name: ARRAY OF CHAR): BasicGadgets.Real; VAR obj: Objects.Object; BEGIN obj := Gadgets.FindObj(Gadgets.context, name); IF (obj # NIL) & (obj IS BasicGadgets.Real) THEN RETURN obj(BasicGadgets.Real) ELSE RETURN NIL END END GetReal; BEGIN (* 1. get the real gadgets *) x := GetReal("xx"); a := GetReal("aa"); b := GetReal("bb"); IF (x = NIL) OR (a = NIL) OR (b = NIL) THEN RETURN END; (* 2. solve the equation *) IF Gadgets.executorObj(Gadgets.Frame).obj # x THEN (* command executed from text field aa or bb *) x.val := b.val -a.val END; (* 3. notify clients of model x that x.val has changed *) BasicGadgets.SetValue(x) END Add; (*---*) 	BEGIN Texts.OpenWriter(W) END Examples. Some commands to test out the above module: Examples.GetSelection ~ Examples.RemoveSelection ~ Examples.MoveSelection ~ Examples.ShowAttr ~ Examples.Resize 100 25 ~ Gadgets.ChangeAttr Cmd Examples.ShowThread ~ Gadgets.ChangeAttr ConsumeCmd Examples.Delete ~ Examples.Build ~ Gadgets.ChangeAttr Cmd Examples.Inc ~ Gadgets.ChangeAttr Cmd Examples.AddSlider ~ Examples.MoveGadget 10 10 ~ Examples.LocateGadget

title: Oberon/ETH Oberon/2.3.7/Examples.Mod


text:
Talk:Ada Programming/Delimiters/**

In which order is x ** y evaluated? Since, when y == 0 the answer is always 1, am I correct to assume that y is first evaluated and then x?

139.63.195.177 (discuss) 14:23, 3 January 2022 (UTC) What is the value of 0 ** 0 in Ada? There is some discussion in mathematics on this value ;-)

139.63.195.177 (discuss) 14:23, 3 January 2022 (UTC)

 * See NOTES in https://www.adaic.com/resources/add_content/standards/05aarm/html/AA-4-5.html
 * NOTES
 * 14
 * 11  The two operands of an expression of the form X op Y, where op is a binary operator, are evaluated in an arbitrary order, as for any function_call (see 6.4). ManuelGR (discuss • contribs) 15:53, 3 January 2022 (UTC)

title: Talk:Ada Programming/Delimiters/**


text:
User:Avatuna/sandbox

Krishna-Caitanya, the Hidden Treasure of India, His Life and His Teachings
This book is a translation of W. Eidlitz' main work, Krishna-Caitanya, Sein Leben und Seine Lehre, Stockholm University, 1968.

In order to get a preview one can download a part of the book.

About the English edition:

This English edition is a REVISED edition which includes later corrections by the author and some additional explanations and translations from the original sources, provided by his guru, Svami Sadananda Dasa. When we came across passages we thought needed clarification we made annotations in square brackets or added a translators’ note.

title: User:Avatuna/sandbox


text: Template:Nav/test

title: Template:Nav/test


text:
User:Siamraptor

Hi.

title: User:Siamraptor


text:
Mechanics of Materials/Force-based Static Equilibrium/Static Form of Newton's Second Law of Motion

=3.2 Static Form of Newton's Second Law of Motion= Newton's Second Law of Motion relates the sum of the forces on a body with a given mass to its acceleration. In the study of statics, we simply set this acceleration to zero meaning the body does not accelerate. When thinking about bridges and buildings, this condition may seem intuitively obvious but it is still worth pointing out that we do not want these structures to move.


text:
Chess Opening Theory/1. e4/1...e5/2. Nf3/2...Nc6/3. Bc4/3...Nf6/4. Ng5/4...Bc5/5. Bxf7/5...Ke7/6. Bd5/6...Rf8/7. O-O/7...d6/8. c3/8...Bg4/9. Qb3/9...Bb6/10. Bxc6/10...bxc6/11. h3

=Traxler Counterattack=

11. h3

Theory table
.
 * 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 Bc5 5. Bxf7+ Ke7 6. Bd5 Rf8 7. O-O d6 8. c3 Bg4 9. Qb3 Bb6 10. Bxc6 bxc6 11. h3


text:
European History/Early Modern Colonialism and Commerce

The Columbian Exchange
As Europeans explored, colonized, and exploited the “New World” in the late 1400s and 1500s, they brought new animals, plants, diseases, and ideas with them, and when they returned, they brought the American versions of these goods and living things back to Afro-Eurasia. Since the Americas and Afro-Eurasia had not been previously connected, and their ecosystems evolved separately. This exchange of plants, animals, and ideas brought unprecedented changes to both the Americas and Afro-Eurasia. In 1972, historian Alfred Crosby coined the term “the Columbian Exchange” to describe this transfer of microbes, plants, and ideas.

Specifically, European explorers brought foods such as wheat, sugar, and coffee to the Americas; they imported livestock such as horses, cows, sheep, and pigs. Europeans also brought ideas like the alphabet and weapons such as gunpowder, but perhaps the most impactful element that Europeans transferred to the Americas was disease. Smallpox, typhus, the flu, and measles devastated native populations.

On the other hand, Europeans carried crops like potatoes, tomatoes, corn, tobacco, and chocolate back to Afro-Eurasia. Potatoes were high in nutrients and easier to grow than wheat, so European societies quickly adopted them. Most importantly, potatoes helped support the massive population growth of Europe in the 18th century. Crops like tobacco and sugar contributed to a consumerist culture in Europe. Furthermore, Europeans transported animals from the Americas to Afro-Eurasia: turkeys, llamas, alpacas, and guinea pigs. Explorers did bring syphilis from the Americas to Afro-Eurasia, but it did not have the devastating impact that diseases from Europe had in America.

Historians often depict the decline of the indigenous population of America as inevitable due to native populations not possessing immunity to European diseases. In the sixteenth and seventeenth centuries, European diseases contributed to an unprecedented deterioration in indigenous population, which declined by an estimated 90%. However, the idea that this demographic shift was solely due to European disease erases the conscious efforts of European colonists to subjugate native peoples. European colonizers fought wars with indigenous groups and supported conflicts between tribes, contributing to the decline in native populations. They forced natives to labor in mines, in which many natives perished from overwork. Furthermore, European colonizing powers seized land, leading to a decreased area of land for natives to cultivate food. Colonizers also disrupted native trade networks, further contributing to food shortages and making natives dependent on colonizers. In these awful conditions, alcohol became addictive and deadly, leading to a breakdown of order and responsibility in native societies.

Mercantilism

Mercantilism is an economic theory that was a commonly practiced in Europe from the 16th-18th century, especially by absolute monarchs. It promoted governmental regulation of a nation’s economy for the purpose of augmenting state power at the expense of rival national powers. Its main belief was that exports should be encouraged by the government and imports should be minimized as much as possible.

Colonialism
According to mercantilism, the wealth of a nation was based on how much "bullion", usually gold or silver, a nation had. Because of this, nations believed that wealth was limited, meaning that in order to get more wealth, another nation would have to get less wealth. This belief encouraged European nations to colonize as much of the New World as they could in order to increase their power.

Mercantilism ensured that a colony only provided its raw materials to its mother nation in exchange for manufactured goods from the mother nation. For example, Great Britain would get raw materials, such as sugar, tobacco, tropical fruits, and gold, primarily from their colonies. In exchange, the mother nation would provide the colony with manufactured goods. The colony would also be prohibited from manufacturing their own goods, giving the mother nation a monopoly over the colony and allowing the mother nation to profit.

France
Under Louis XIV especially, France had a mercantilist economy. His economic policies were mostly headed by Jean-Baptiste Colbert, who helped France prosper economically by raising tariffs and encouraging major public works projects.

The Triangular Trade
The triangular trade was the system of trade that developed during the Age of Exploration. It can be divided into three parts:

 * West African slaves being sent to work in the Americas.
 * Raw materials produced from the Americas being sent to Europe.
 * Manufactured goods from Europe being sent to Africa.

The Transatlantic Slave Trade
The transatlantic slave trade was the part of the Triangular Trade that occurred between Africa and the Americas.

It was characterized by the exchange of African men, women, and children slaves to the Americas which lasted from the mid-sixteenth century until the 1860s. European traders loaded African captives mostly from West Africa and sent them to work in the sugar plantations in the Caribbean colonies. The trade was initiated by the Portuguese and Spanish colonizers.

The Zong Massacre
In August of 1781, the Zong, a British slave ship owned by a group of wealthy merchants and slavers based in Liverpool, set sail from Ghana for Jamaica. Onboard the ship were 442 enslaved Africans, double the number the ship was designed to carry. Due to alleged navigational errors, the trip took longer than expected, and the ship ran low on water. Luke Collingwood, the ship’s captain, subsequently decided to throw 133 enslaved Africans overboard. As was common practice, the Zong’s shipowners had taken insurance for their “cargo” of enslaved people and attempted to make a claim for compensation. However, the insurers, a syndicate of Liverpool slave-ship owners, refused to pay and the case went to court in London in March 1783. The insurers’ appeal claimed the loss of the enslaved Africans was the result of the mismanagement of the ship (i.e. an insufficient water supply and navigational errors) rather than the blatant cruelty of mass murder. Ultimately, the court ruled in the insurers’ favor.

The Zong massacre was widely publicized and, as a result, the abolition movement gained momentum. However, it was not an isolated event during the transatlantic slave trade. Around 1.5 million people died on the Middle Passage, the slave-trade route from West Africa to the West Indies. Onboard slave ships, European slave traders chained captured African people, giving them around the space of a coffin. The overcrowded ships lacked ventilation, and diseases like dysentery spread like wildfire. Enslaved Africans were frequently thrown overboard or committed suicide by throwing themselves overboard; sharks even learned to follow the slave ships.

Even before the birth of modern capitalism, enslaved Africans were treated like inanimate cargo. However, as the slave trade expanded to unprecedented numbers, countries began to deregulate the slave trade. The free market that European thinkers fought for was built on the mass enslavement of the African people. The dependency of the free market on slave labor became entrenched into society, even influencing Adam Smith’s famous Wealth of Nations. The Zong case exposed the brutality and disregard of human life during the trans-Atlantic slave trade as business owners valued making a profit more than the wellbeing of real people. At the expense of human life, Europe profited greatly from the exploitation of enslaved Africans for free labor. As journalist Blake Smith described in reference to early slave traders, “It is a grotesque irony that this pioneering free-trader could equate ‘liberty’ and the slave trade….”

The Silver Trade
Spain had gained lots of silver from its colonies, especially in the Potosí silver mines, located in modern-day Bolivia. They traded most of its silver to the Chinese in exchange for popular goods, such as silk and porcelain.

Many scholars consider the silver trade to mark the beginning of a genuinely global economy, with one historian noting that silver "went round the world and made the world go round."

Private Companies
The original motive for exploration was to find another route to India and to dominate the Indian Ocean trade. This created competition, as the Dutch, English, and French created companies to challenge Portuguese control over the East Indies.

The Dutch East India Company
The Dutch East India Company, also known as Verenigde Oostindische Compagnie, abbreviated as VOC, was the first joint stock company in the world and is sometimes considered to have been the first multinational corporation. This company was very powerful and was able to gain a monopoly over the Indian Ocean trade throughout the 17th century and early 18th century by taking over previous Portuguese holdings. However, it started to decline as the British East India Company gained power.

The British East India Company
The British East India Company was a joint-stock company created during the reign of Elizabeth I. They initially struggled to gain power because of competition with the Dutch East India Company, so they prioritized gaining a foothold in mainland India and improving relations with the Mughal Empire. However, after the four Anglo-Dutch Wars, the British East India Company was able to weaken Dutch control of the East Indies.


text:
User talk:71.162.172.81

Warning
—Atcovi (Talk - Contribs) 16:24, 4 January 2022 (UTC)

title: User talk:71.162.172.81


text:
User talk:Teichert Fischer

Recipe template
Hello! Just wanted to let you know that your user page kept showing up in the recipes (ex: when using the random recipe feature), so I edited the recipe template with nowiki markup so it will stop appearing like that. If you'd like to make it an official recipe page feel free :) Nostriker (discuss • contribs) 17:28, 4 January 2022 (UTC)

title: User talk:Teichert Fischer


text:
User:Cics.Ciara

woah this user is maybe the coolest person on earth. you are so lucky to have stumbled upon their page.

unfortunately the username isn't great bc all the good ones were taken and they couldn't think of a better one.

title: User:Cics.Ciara


text:
Cookbook:Ginger Garlic Paste

Ginger garlic paste, also known as ginger garlic masala or adrak-lehsun paste, is a mixture of finely minced or crushed fresh ginger and garlic. It can be made at home or purchased.

title: Cookbook:Ginger Garlic Paste


text:
User:John MC70

Do not follow where the path may lead. Go instead where there is no path and leave a trail.

 * Trust
 * Honesty
 * Kindness

title: User:John MC70


text:
User:Fantastic Bk

Bakang Mompe aka Fantasic Bk Born day:28/03/2006

title: User:Fantastic Bk


text:
History of video games/Platforms/TRDR Pocket

History
The development of the TRDR Pocket was handled by the British company Aerosax Research & Technology ltd, lead by Gianni O'Conner. The Spanish developer Go Games Ltd is also associated with the console.

The TRDR Pcket was heavily associated with the American rapper Soulja Boy, as a special edition "Fireball Red" version of the console was made in association with him. The Fireball Red version of the console retailed for either $299.99 USD, or $199.99 near launch in late 2021.

Technology
The TRDR Pocket hardware is noted for its similarity to the Powkiddy A19 and descendant Retroid Pocket, though there were at least some technical differences and improvements.

Compute
The TRDR Pocket was powered by an ARM based Helios P60 SOC with 3 gigabytes of RAM.

Hardware
The system is said to have a touchscreen, though this was disputed by some reviewers.

Games

 * Fortnite - The TRDR Pocket was noted for being avertized as being Fortnite capable.


text:
History of video games/Platforms/Miyoo Mini

History
The Miyoo Mini was followed by the Miyoo Mini Plus.

Compute
The system was powered by a SigmaStar SSD202D SOC.

Hardware
The console was noted for its relatively good build quality.

The system included a vibration motor.

Games
This console was primarily used for emulation.


text:
History of video games/Platforms/SMATCH Z

Steamboy
The original Steamboy, later renamed the Smatch Zero, was pitched in 2015 as a portable Steam Machine with a predicted release date in 2016.

SMATCH Z
In 2019 the console design was revised to incorporate a superior AMD Ryzen CPU, with plans to ship later in the year. This revision of console hardware was playable at E3 2019. Later that year another CPU upgrade was announced.

Production issues lead to the console being delayed to 2020. The Smatch Z was then intended to release in 2020.

By 2021 the manufacturer of the still unreleased console faced bankruptcy.


text:
Biology, Answering the Big Questions of Life/virus1

A virus destroys immune system, making it vulnerable to infections hence causes illness