OpenLLM-France/wikimedia huggingface dataset:
# Programming HP Calculators

Note: Everything mentioned in this manual should work with all Hewlett Packard graphical calculators unless otherwise stated, however this manual has only been tested for commands and variables compatible with the 38g series of calculators.
This book does not work with HP 28 or HP 48 series graphical and scientific calculators. This series used a FORTH like programming language and also provided a symbolic calculation mode. Maybe someone wants to provide material about this series?

## Contents

* Introduction
* Commands
** Aplet Commands
** Branch Commands
** Drawing Commands
** Graphic Commands
** Loop Commands
** Matrix Commands
** Print Commands
** Prompt Commands
** Stat Commands
** Easter Egg Commands
* Variables
# Programming Basics/Conditions

Conditions are used in programming to only do something in the event of something else. This is incredibly useful in a number of tasks.
For example, one might prevent divide by zero errors by check to make sure the devisor is not zero first, and then only dividing if the devisor is not zero.
# Programming Basics/Introduction/What is a translator?

The execution of a program depends on the programming language. For example, a program written in a high-level language cannot be executed right away, because it is written in source code, and the source code is only human-readable and therefore cannot be understood by computers. The source code must therefore be translated into machine code with the help of a translator.
What is a translator?
A translator is a program that translates the program code into machine code.
There are different types of translators. High-level languages can be translated into machine code in two different ways, either by using an interpreter, which allows to translate instructions line by line.
What is an interpreter?
An interpreter is a translator that converts source code into machine code one instruction at a time.
Or by using a compiler, which allows to translate all the instructions at once.
What is a compiler?
A compiler is a translator that converts source code into machine code all in one go.
Any low-level language written in assembly code can also not be understood by computers. Assembly code is translated into machine code using an assembler.
What is an assembler?
An assembler is a translator that converts assembly code into machine code.
# Programming Basics/Introduction/What is coding?

Algorithms are never written in a language that computers can understand. The purpose of coding is to enable the use of these algorithms in a program by translating them into a language that computers can understand.
What is coding?
Coding is the process of transforming a set of instructions into a language that computers can understand.
# Programming Basics/Loops

Loops are used to repeat sections of code, either infinitely, or until a condition is met.
There are two common types of loops, While loops and For loops.
# Programming Basics/Introduction/What is programming?

A computer can’t do anything on its own. To do a task, you have to tell it what to do and how to do it. For example, let’s imagine a computer whose task is to cook a dish. The recipe contains the steps to follow to cook this dish. More specifically, the recipe is the program that tells the computer how to execute this task.
What is a computer program?
A computer program is a sequence of instructions that can be executed by a computer.
The computer needs a recipe to cook the dish. But, how to get this recipe? It is simply a matter of creating the instructions necessary to run the program. In other words, you have to go through the first fundamental process of creating a program, which is programming.
What is programming?
Programming is the process of creating a set of instructions that tell a computer how to perform a task.
# Programming Basics/Functions

Functions used to store code that is used multiple times throughout a program, especially bits of code that repeat throughout a program.
Functions often take input to make them more versatile. This input is called an argument.
# Programming Basics/Introduction
## Concepts

* What is programming?
* What is an algorithm?
* What is coding?
* What is a programming language?
* What is a translator?
# Programming Basics/Introduction/What is a programming language?

Whenever you want to implement an algorithm, you’ll have to translate it into a language that computers can understand, which is known as a programming language.
What is a programming language?
A programming language is a language that allows humans to communicate with computers.
A programming language can be defined as a high-level language or low-level language. A high-level language uses instructions encoded in a language more suited to humans.
What is a high-level language?
A high-level language is a programming language with a high-level of abstraction of the computer language.
While a low-level language uses instructions encoded in a language more suited to computers.
What is a low-level language?
A low-level language is a programming language with a low-level of abstraction of the computer language.
Each type of programming language has a different way of writing instructions. The instructions in a high-level language are called source code and are written in plain text.
What is a source code?
A source code is a collection of instructions written in plain text.
The instructions in a low-level language can be written in two different ways. Either by using binary numbers, and in this case the instructions are called machine code.
What is a machine code?
A machine code is a collection of instructions written in binary numbers.
Or by using mnemonics, and in this case the instructions are called assembly code.
What is an assembly code?
An assembly code is a collection of instructions written in mnemonics.
# Programming Basics/Introduction/What is an algorithm?

Programming is a process similar to problem solving. It consists of posing a problem, breaking it down into several small problems, then solving each of these small problems in order to arrive at the final solution. The breakdown of this problem will lead to the creation of an algorithm.
What is an algorithm?
An algorithm is a step-by-step set of instructions that tell a computer how to solve a problem.
Algorithms are written in plain language so that it is easily understandable even by non-programmers. There are two main ways that algorithms can be represented-pseudocode and flowcharts. Pseudocode allows to represent textually an algorithm using annotations and informative text for each steps being used.
What is pseudocode?
Pseudocode is a method of writing up a set of instructions using annotations and informative text.
Flowcharts allow to represent graphically an algorithm using different symbols for the steps being used.
What is a flowchart?
A flowchart is a diagram that represents a set of instructions using standard symbols.
# Programming Basics/Files

Files are used to save data to a storage device, which is useful for a number of purposes.
# Making an Island/Facilities/Water
## Desalination of Sea Water

Sea water can be processed to remove any dissolved salts to provide almost pure water. The simplest technique for doing this is simply to heat the water until it evaporates and then re-condense the water into a fresh water tank. As a by-product of this you will have a large quantity of salt. If you break the process into separate stages you can sort these separate salts as they will come out of solution at different points. However, since distilled water has no minerals, you should consider adding 2-4 drops of sea water, which contains the minerals that the body needs to survive. Drinking distilled water is unhealthy and could eventually kill you.

## Desert Cone

Basically you make a hole and then put something to collect water in the bottom, then you cover it with a waterproof tarp and put a rock on the place above the container. then condensation will drip down into the container.

## Distilling Water

You can distill water without using any fuels by using a solar oven or cooker
# Making an Island/Motivations
## Urban Planning

In areas where space for living or activities are extremely limited, land reclamation and island building is often used to create usable space where there was once none. This is particularly useful in urban coastal cities, which are often built up right next to the coast.
Real Life Examples
* Building a major airport takes up a lot of land, often requiring it to be placed far away from the city center, and eliciting protests from residents disturbed by the noise and traffic it creates. Artificial islands avert such problems by placing the airport in the sea next to the bustling city center, as is the cast with Chubu Centrair International Airport in Nagoya.
* The creation of waterfront living-space is also desirable to many, and artificial land projects such as the Palm Jumeirah in Dubai serve both to create living space, and as a prestige project that increases the status of the city as a cutting edge space.

## Infrastructure Support

While not the most exciting function for an artificial island, creating small islands to support infrastructure is perhaps one of the most useful applications of artificial islands.
Another infrastructure use for artificial islands includes creating a base for a lighthouse, as was done for the Cheboygan Crib Light in the Cheboygan River.

## Environmental Support

Floating artificial islands are relatively straightforward to deploy, and have a number of ecologically beneficial uses. For example, artificial floating islands have been deployed as scaffolding for plant life in heavily polluted areas, giving support to struggling wildlife populations.

## Home Improvement

In rural areas it is common to build artificial ponds on a property, both for recreation and for practicality. Building an artificial island in the pond can create a unique space for secluded activities.

## Seasteading

Seasteading is a movement that seeks to make the sea habitable. Many Seasteaders value the freedom of being outside the territorial waters of a state, and many simply want to be pioneers, homesteading a new frontier. While a full description of the seasteader movement is beyond the scope of this book, it should be noted that Seasteaders greatly value the idea of artificial islands for both philosophical and practical reasons. While seasteading can incorporate a number of concepts, typically either artificial platforms or simply living on ships, the idea of making an artificial island to permanently inhabit appeals to many.
Of course, inhabiting artificial islands outside the territorial claims of existing nation states must deal with the same problems as natural islands far from the mainland, primarily relating to either safety or logistics. Thus only the most dedicated seasteaders attempt this route. Seasteaders ideally have a maritime background as many skills are shared between the fields.

## References

* ↑ Scott, Michael (3 September 2011). "Greening the Cuyahoga River: Man-made floating plant islands the latest scheme in recovery efforts" (in en). cleveland. https://www.cleveland.com/metro/2011/09/greening_the_cuyahoga_river_ma.html.
# Making an Island/Facilities

If you ever get to the point where you have successfully built an artificial island, it still will not be fit for human habitation without some necessities, listed below in descending order of importance:
* Water
* Food
* Power
* Communication
* Transport
# Making an Island/Facilities/Food

If you do not live on the island permanently and have a main base on another body of land, it would be more practical to send routine supplies to the island rather than attempt any of the following.

## Food Producing Plants

Freshwater Plants If you use edible freshwater plants, such as rice, you're going to have to keep the plants away from the saltwater that your island is probably floating in (unless it's built in fresh water, such as a lake.) One solution is to plant these above the ground, in which case you're also going to have to give them some of the salt free drinking water for them to survive. If the island has no native soil then it will be required to either import it or generate it from raw materials. Hydroponics is another option.
Saltwater Plants Edible marine plants include the seaweed kelp and the red alga carrageenan. These can live and thrive in salty seawater; in fact, most of them can only live in saltwater.
Land Plants Edible land plants, such as potatoes or wheat, are also an option, but this will only work if your island has soil. For most plants (except those few that grow at the seashore,) you will also have to provide protection from the sea and access to fresh water, unless of course your island is built in fresh water.

## Fishing

Fish are the most available source of meat for an island, although means of cooking them would be less readily acquired. Sushi is an alternative, combining farmed seaweed and raw fish. Shellfish (such as crabs, lobsters, oysters, and shrimp) can be gathered in large amounts by use of cages and traps.

## Birds

Birds tend to use islands as stopping points as they migrate. While not a reliable source of food, they may provide some variety.

## Insects

Edible insects are another possible source of food, as they do not need much space and can live off of most foods, but you should make sure that they are edible, that there is food for them, and that you can overcome the "Gross!" factor.

## Other

Aquaculture, Hydroponics, and Fungiculture may prove useful food sources.
# Making an Island/Facilities/Transport

Transportation may be the most crucial necessity for living on a man-made island. It allows construction materials, food, and other items to be imported, grants you a means of escape from storms or attack, and most importantly, gets you to your island in the first place.

## Ships & Boats

Ships and Boats will probably make up the basic transit system of your island, used for transporting people and cargoes through the waters around you. Canoes are cheap and practical. They are manually operated, so you need not worry about paying for fuel. Also, they are lightweight and could be stored on your island to protect them if a storm comes. Canoes can carry multiple people and items, thus making them perfect for performing tasks like aquaculture or fishing. Ships are larger, generally require fuel, and are much more cumbersome, however, if you have a larger island, with multiple citizens and a greater need for supplies, it is more logical to use ships.

## Specializing Watercraft

You may require specialized craft for a certain function, such as trawlers, freighters, nuclear submarines, or ferries. Speeders are probably the best choice for carrying one or two people around the outskirts of your waters quickly, but are expensive. Kayaks are a cheaper but less effective alternative. If you plan to carry large amounts of minerals from your island for trade, it may be good to purchase a small freighter. If your island is not far from another landmass, and receives tourism, or if you/your citizens must commute to another landmass regularly, it may be in your best interest to purchase a ferry or make one. Since they are not meant for long journeys or to carry equipment they may be as simple as a primitive raft. Your island may also need ship specialized towards defense, especially if your location is heavily pirated. If you have a wealthy micronation, you may be able to afford some gunboats or other military material. Other than that, armed vehicles will most likely consist of boats with armed people on them.

## Aircraft

If you have an island far from any human outpost, Aircraft may be critical to your island's survival. But they are painfully costly. Just the vehicle itself can cost several hundred thousand dollars at best. Not to mention fuel, safety equipment, and a pilot/flying class. If you have the means, however, aeronautics can provide a myriad of opportunities to your island. You can travel to other places, transport supplies, export your island's goods, and launch nuclear strikes at any entity that does not recognize your island's sovereignty. They travel faster than watercraft, but cannot carry as much.
# Making an Island/Facilities/Communication

Shortwave Radio: assuming your island now has power or batteries that can run a shortwave radio this would be your best option for communication.

## Communications

Communications can be split into two general areas, data and voice.

## External Communications

Voice
Tying into the worldwide telephone network is not difficult even if out at sea. There are a number of satellite networks designed for just this purpose. However due to the geosynchronous nature of most of the satellites used they have a problem covering the poles. The main exception to this is the iridium system which uses many polar orbiting satellites to provide full coverage of the world. However if we have a data connection using satellite then it is not necessary to use voice channels over the satellite as it can all be provided via VoIP. If we are close enough to land we may even be able to lay fiber optic cables out to the island, thus providing much more bandwidth than any satellite ever could for a much lower cost.
Data
What has just been said about voice communication can equally be said about data networks.

## Internal communications

As voice communications can be digitized easily and carried over a data network in makes sense only running one type of communication network throughout. There are many options for this, the cheapest solution would be to leverage standard commercial hardware for the purpose. This boils down to 3 media types and a handful of standards. The media types are radio, fiber and cable. Each of these has advantages and disadvantages. Radio is very cheap to install but has problems with interference, range and lack of bandwidth. Cable, meaning Gigabit Ethernet in this case also has a range problem unless routers are used but has quite a lot of bandwidth and more can be added by just running an extra cable. Fiber is the most expensive to install but has fewer limits of range (few km for multi mode fiber and around 80km for single mode fiber) and has a lot of scope for upgrading bandwidth (WDM can be used to send multiple signals down a single pair).
# RAC Attack - Oracle Cluster Database at Home/RAC Attack 12c/Configure Bind DNS

Prev: Prepare Host
* Create VirtualBox VM
* VirtualBox VM Settings
* OS Installation
* Linux Post Installation
* Install VirtualBox Addons
* Configure Bind DNS
* Prepare Linux for Oracle
Next: Create Cluster
* Enable BIND DNS to start at boot time.
* Change named directory permissions.
* Backup the BIND configuration file.
* Change /etc/named.conf permissions.
* Run the following command or edit the /etc/named.conf file to change the named configuration manually.
* Create the zone file for the racattack domain on collabn1 by running the following command:
* Create the reverse zone file on collabn1.
* Generate the rndc.key file.
* Restart the named service.
* Check that the parameter PEERDNS is set to no in /etc/sysconfig/network-scripts/ifcfg-eth2 to prevent the resolv.conf from being overwritten by the dhcp client:
* If it was set to yes previously, restart the network and verify that the file /etc/resolv.conf contains now the correct nameservers:
* /etc/resolv.conf should contain:
* Check that the master DNS on collabn1 is working.
# RAC Attack - Oracle Cluster Database at Home/RAC Attack 12c/Configure SSH Equivalence

Prev: Install Linux
* Create Virtualbox Shared Storage
* Configure Storage Persistent Naming
* Clone VirtualBox VM
* Create Second VirtualBox VM
* Configure Second Linux VM
* Complete DNS Setup
* VNC Server Setup
Next: Install Grid Infrastructure
# RAC Attack - Oracle Cluster Database at Home/RAC Attack 12c/Configure Storage Persistent Naming

Prev: Install Linux
* Create Virtualbox Shared Storage
* Configure Storage Persistent Naming
* Clone VirtualBox VM
* Create Second VirtualBox VM
* Configure Second Linux VM
* Complete DNS Setup
* VNC Server Setup
Next: Install Grid Infrastructure
* Once the new disks are visible by the server, add a primary partition on each of them with fdisk.
* Repeat the same step for sdc, sdd and sde.
* Configure the option -g for the scsi_id command to expect an UUID from the shared devices.
* Test to see if scsi_id - returns data
* Prepare the file /etc/udev/rules.d/99-oracle-asmdevices.rules by running the following script:
* Once completed, the file should look like the following (except for the scsi UUID).
* Reload the udev rules and restart udev:
* The new disks are ready for use:
# RAC Attack - Oracle Cluster Database at Home/RAC Attack 12c/Convert to Flex ASM

Check the ASM flex status -
[grid@vm1 ~]$ asmcmd showclustermode ASM cluster : Flex mode disabled
Now you can fireup the ASMCA to convert this to a flex ASM
Flex ASM enables ASM instances to be run on separate physical server from the database servers. The DGs are managed by a small set of ASM instances running on a subset of cluster nodes. --- the cardinality
Flex ASM requires one or more designated network interfaces for communication among the ASM instances. Dedicated ASM Listener is configured for ASM instance communication on the ASM network.
You can have dedicated network for ASM communication or you can share the same network as the interconnect.
There is a mixed mode of flex ASM also - where the ASM instances are run on all the nodes. This option is used in case you need to user DB's with versions lower than 12.1
Conversion requires GRID INFRA to be restarted one node at a time. then it would ask to run the following script on the local node -
/u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
After running the script the flex mode is enabled, however, clusterware would need to be restarted on both the nodes.
[grid@vm1 ~]$ asmcmd showclustermode Connected to an idle instance. ASM cluster : Flex mode enabled <<<<<<<<<<<<<< says so on both the nodes
However, as recommended, restart clusterware on both nodes.
hold that thought, it seems the script is doing that on its own.
Once the script completes, it's done -
[grid@vm1 ~]$ asmcmd showclustermode ASM cluster : Flex mode enabled
[grid@vm2 ~]$ asmcmd showclustermode ASM cluster : Flex mode enabled
So, that's it. No need to restart. It was restarted for you.
Following resource added to the cluster -
ora.ASMNET1LSNR_ASM.lsnr ONLINE ONLINE vm1 STABLE ONLINE ONLINE vm2 STABLE
[grid@vm2 ~]$ srvctl config asm ASM home: <CRS home> Password file: +CRS/orapwASM ASM listener: LISTENER ASM instance count: 3 <<<<<<<<<<<<< this is the default cardinality Cluster ASM listener: ASMNET1LSNR_ASM
For now the following instances are running -
grid 22426 1 0 03:55 ? 00:00:00 asm_pmon_+ASM1 -- vm1 grid 17905 1 0 03:58 ? 00:00:00 asm_pmon_+ASM2 -- vm2
Yes, proxy instances are not running. Because they arent supposed to run. No ACFS
via command line run asmca in silent mode -
asmca -silent -convertToFlexASM -asmNetworks interface_name/subnet, interface_name/subnet... -asmListenerPort ASM_listener_port_number
REDUCE CARDINALITY
[grid@vm1 ~]$ srvctl modify asm -count 1 <<<<<<<<<<< can reduce the cardinality. 2 is minimum PRCA-1123 : The specified ASM cardinality 1 is less than the minimum cardinality of 2. [grid@vm1 ~]$ srvctl modify asm -count 2
Earlier
ora.asm 1 ONLINE ONLINE vm1 Started,STABLE 2 ONLINE ONLINE vm2 Started,STABLE 3 OFFLINE OFFLINE STABLE <<<<<<<<< I'd only 2 nodes and cardinality was 3, no node for this to run
after reducing cardinality, the resource was removed from OCR ora.asm 1 ONLINE ONLINE vm1 Started,STABLE 2 ONLINE ONLINE vm2 Started,STABLE