OpenLLM-France/wikimedia huggingface dataset:
# Programming Fundamentals/Versatile Code with Typedef

An explanation and example creating versatile code using typedef within the C++ programming language.

## Overview

Everyone seeks of ways to be more efficient in what they do. A farmer uses a tractor instead of a horse. A construction worker uses an air powered nail gun instead of a hammer. Programmers are no different than others, in that they are constantly improving their ability to produce correctly working programs. Some aspect of this is the use of modular/structured programming, proper documentation and following industry rules for a specific programming language. One example of efficient coding is letting the computer count the number of elements in an array. If we define an array:
We can use the following expression to calculate the number of members in the array:
This type of flexible coding allows us to change the members of the array by adding or subtracting a values, like this:
Thus, we don't have to modify our code that uses the expression that calculates the number of member in the array.
One use of the typedef is to allow us to write code that can be quickly changed to handle different data types. There are several integer and floating-point data types that all store number values with different domains. If we write our code using some typedef statement, then our code becomes versatile. By changing only our typedef commands, our code can be used to process data of a different data type. This is demonstrated within the demo file provided, thus you need to study this material in conjunction with the demo program.

## Demonstration Program in C++
### Creating a Folder or Sub-Folder for Source Code Files

Depending on your compiler/IDE, you should decide where to download and store source code files for processing. Prudence dictates that you create these folders as needed prior to downloading source code files. A suggested sub-folder for the Bloodshed Dev-C++ 5 compiler/IDE might be named:
* Demo_Programs
If you have not done so, please create the folder(s) and/or sub-folder(s) as appropriate.

### Download the Demo Program

Download and store the following file(s) to your storage device in the appropriate folder(s). Following the methods of your compiler/IDE, compile and run the program(s). Study the source code file(s) in conjunction with other learning materials. You may need to right click on the link and select "Save Target As" in order to download the file.
Download from Connexions: Demo_Versatile_Array_Functions.cpp
Download from Connexions: Demo_Farm_Acres_Input.txt
Download from Connexions: Demo_Deposit_Checks_Input.txt

## Definitions
### versatile

    Easily modifying code to handle another data type.

### flexible coding

    Using the sizeof operator to calculate the number of members in an array.

### typedef

    Allows the programmer to create an alias, or synonym, for an existing data type.
# Programming Fundamentals/Variable Examples C++
## Overview

The following examples demonstrate data types, arithmetic operations, and input in C++.

### Data Types
#### Discussion

Each code element represents:
* // begins a comment
* #include <iostream> includes standard input and output streams//
* #include <sstream> includes standard string streams//
* using namespace std allows reference to string, cout, and endl without writing std::string, std::cout, and std::endl.
* int main begins the main function, which returns an integer value
* { begins a block of code
* int i defines an integer variable named i
* ; ends each line of C++ code
* double d defines a double floating-point variable named d
* string s defines a string variable named s
* bool b defines a Boolean variable named b
* i = , d = , s =, b = assign literal values to the corresponding variables
* cout is standard output
* << directs the next element to standard output
* endl ends the current line
* return 0 returns the value 0 from main, indicating the main function completed successfully
* } ends a block of code

### Arithmetic
#### Discussion

Each new code element represents:
* +, -, *, /, and % represent addition, subtraction, multiplication, division, and modulus, respectively.

### Temperature
#### Discussion

Each new code element represents:
* cin >> fahrenheit reads the next integer from standard input and assigns the value to the fahrenheit variable

## References

* Wikiversity: Computer Programming
# Programming Fundamentals/Variable Examples Java
## Overview

The following examples demonstrate data types, arithmetic operations, and input in Java.

### Data Types
#### Discussion

Each code element represents:
* // begins a comment
* public class DataTypes begins the Data Types program
* { begins a block of code
* public static void main(String args) begins the main function
* int i defines an integer variable named i
* ; ends each line of Java code
* double d defines a double floating-point variable named d
* string s defines a string variable named s
* boolean b defines a Boolean variable named b
* i = , d = , s =, b = assign literal values to the corresponding variables
* System.out.println calls the standard output print line function
* } ends a block of code

### Arithmetic
#### Discussion

Each new code element represents:
* +, -, *, /, and % represent addition, subtraction, multiplication, division, and modulus, respectively.

### Temperature
#### Discussion

Each new code element represents:
* private static Scanner input ... defines an object to read from standard input
* input.nextDouble reads input as a double floating-point value

## References

* Wikiversity: Computer Programming
# Programming Fundamentals/Variable Examples Swift
## Overview

The following examples demonstrate data types, arithmetic operations, and input in Swift.

### Data Types
#### Discussion

Each code element represents:
* // begins a comment
* var i: Int defines an integer variable named i
* var d: Double defines a double floating-point variable named d
* var s: String defines a string variable named s
* var b: Bool defines a Boolean variable named b
* i = , d = , s =, b = assign literal values to the corresponding variables
* print calls the print function

### Arithmetic
#### Discussion

Each new code element represents:
* +, -, *, /, and % represent addition, subtraction, multiplication, division, and modulus, respectively.

### Temperature
#### Discussion

Each new code element represents:
* readline! reads the next line from standard input
* Double! converts the input to a double floating-point value
* String converts the output numeric value to a string

## References

* Wikiversity: Computer Programming
# Programming Fundamentals/Variable Examples CSharp
## Overview

The following examples demonstrate data types, arithmetic operations, and input in C#.

### Data Types
#### Discussion

Each code element represents:
* // begins a comment
* using System allows references to Boolean and Console without writing System.Boolean and System.Console
* public class DataTypes begins the Data Types program
* { begins a block of code
* public static void Main begins the main function
* int i defines an integer variable named i
* ; ends each line of C# code
* double d defines a double floating-point variable named d
* string s defines a string variable named s
* Boolean b defines a Boolean variable named b
* i = , d = , s =, b = assign literal values to the corresponding variables
* Console.WriteLine calls the standard output write line function
* } ends a block of code

### Arithmetic
#### Discussion

Each new code element represents:
* +, -, *, /, and % represent addition, subtraction, multiplication, division, and modulus, respectively.

### Temperature
#### Discussion

Each new code element represents:
* Console.ReadLine reads the next line from standard input
* Convert.ToDouble converts the input to a double floating-point value

## References

* Wikiversity: Computer Programming
# DESCRIPTION:

Extracts a value from a series at regular intervals.
EXTRACT is a function value.

# ARGUMENTS

* series -- (Type: series)
* width -- Size of each entry (the skip) (Type: integer)

# REFINEMENTS

* /index -- Extract from an offset position
** pos -- The position (Type: any)
* /default -- Use a default value instead of none
** value -- The value to use (will be called each time if a function) (Type: any)
* /into -- Insert into a buffer instead (returns position after insert)
** output -- The buffer series (modified) (Type: series)

# (SPECIAL ATTRIBUTES)

* catch
# DESCRIPTION:

Search faces to determine if keycode applies.
FIND-KEY-FACE is a function value.

# ARGUMENTS

* face -- (Type: object)
* keycode -- (Type: char word)
# DESCRIPTION:

Returns the fifth value of a series.
FIFTH is an action value.

# ARGUMENTS

* series -- (Type: series date port tuple event)
# DESCRIPTION:

Returns TRUE for file values.
FILE? is an action value.

# ARGUMENTS

* value -- (Type: any-type)
# DESCRIPTION:

Finds a value in a series and returns the series at the start of it.
FIND is an action value.

# ARGUMENTS

* series -- (Type: series object port bitset)
* value -- (Type: any-type)

# REFINEMENTS

* /part -- Limits the search to a given length or position.
** range -- (Type: number series port)
* /only -- Treats a series value as a single value.
* /case -- Characters are case-sensitive.
* /any -- Enables the * and ? wildcards.
* /with -- Allows custom wildcards.
** wild -- Specifies alternates for * and ? (Type: string)
* /skip -- Treat the series as records of fixed size
** size -- (Type: integer)
* /match -- Performs comparison and returns the tail of the match.
* /tail -- Returns the end of the string.
* /last -- Backwards from end of string.
* /reverse -- Backwards from the current position.
# DESCRIPTION:

Determines if a file or URL exists.
EXISTS? is a function value.

# ARGUMENTS

* target -- (Type: file url)
# Rebol Programming/false

FALSE is a logic of value: false
# DESCRIPTION:

Raises E (natural number) to the power specified.
EXP is a native value.

# ARGUMENTS

* power -- (Type: number)
# Operating System Design/Thread

A thread is really just a process without certain rights. Threads only have access to the stack and registers, and use a program counter. The program counter gives the program instructions to the CPU when time. Threads are useful because they hold variables, and are a good way of keeping track of instructions. The Thread actually has the same address as its process, therefore the thread runs "inside the process". If a program uses one process, and the process has one thread, the thread could be doing one function while the process another. Having more that one thread sharing process address space is called multithreading. Multithreading increases the CPU efficiency due to the possible fact of having more than one process running in User space.
# Operating System Design/Virtual

Virtual memory is a memory management technique that offers two main benefits:
* Each process "thinks" it has all the system's memory to itself
* It becomes possible to access more memory than the actual physical amount
Virtual memory is very useful and is implemented in most operating systems by using the memory management unit (MMU) in the CPU.
The second is accomplished by the MMU setting up a small, contiguous portion of the hard drive and treating it like physical RAM. That is, the operating system will place memory segments or pages into the file as if it were loading it into actual RAM. Thus, it has a place to hold "unused" pages of memory until they are needed and have a place to "Swap Out" memory segments that are no longer needed in memory. This technology is commonly used in paging, our next topic.
# Operating System Design/User Ability

It is important for designers of mass-market User Interfaces to keep in mind that not all users are equally computer savvy. A mass-market operating system, such as Windows, has amongst its user base both beginners, as well as experienced power-users. What makes an OS interface more user-friendly for a first-time user may not be user-friendly to a power-user. For instance, the 'Clippy' assistant in Office may be of assistance to first-time users. Yet it is often described as annoying for seasoned users of office suite software, and in many cases may detract from the usability of the software.
As a rule, operating systems meant for more advanced users have fewer graphical configuration tools, and may have more of a focus on speed than looks. As an example, Slackware Linux has virtually no configuration tools and so is seen as a power-user's operating system, while Ubuntu has most tasks automated and so is seen as a user-friendly operating system.
Nearly all operating systems, even if they have a easy-to-use GUI, also allow users to go around the GUI to hand-tweak the configuration. "It is a significant advantage to all users if advanced users can make hand-tweaked modifications to config files when serious problems arise."
Many people have the idea of making the computer present one user interface by default to new users, then later present a different "advanced user interface" to "advanced users". This is generally regarded as a well-meaning mistake.

## Further reading

* ↑ Wiki: PreferenceEditorPattern
* ↑ "FAQ: Why user levels are bad usability"
* ↑ "No matter where you put an advanced setting, somebody will tell you that you are an idiot"
# Operations Research

Operations research or operational research (OR) is an interdisciplinary branch of mathematics which uses methods like mathematical modeling, statistics, and algorithms to arrive at optimal or good decisions in complex problems which are concerned with optimizing the maxima (profit, faster assembly line, greater crop yield, higher bandwidth, etc) or minima (cost loss, lowering of risk, etc) of some objective function. The eventual intention behind using operations research is to elicit a best possible solution to a problem mathematically, which improves or optimizes the performance of the system.
Optimization aims to find the minimum (or maximum) value of an objective function subject to constraints that represent user preferences and/or limitations imposed by the nature of the question at hand. Research in optimization involves the analysis of such mathematical problems and the design of efficient algorithms for solving them. It is therefore no surprise that optimization, while integral to operations research, has become an indispensable tool in other areas such as statistics, machine learning, computer vision, and computational biology, just to name a few. Optimization technologies are shining examples of how deep mathematical techniques help to provide concrete computational tools for solving a diverse suite of problems.
This book is intended for both mathematics students and also for those interested in the subject from a management point of view.

## Table of contents

* Decision Making Environments
** Certainty, uncertainty and risk situations
** Uses of decision trees
** Managerial decision making
* Linear Programming
** Graphical LP solution
** The Simplex Method of solving LPP
** Sensitivity analysis
** Duality
* Transportation and Assignment Problem
** Methods of solving the TP problem
** Assignment model and its applications
* Five Element Theory
* Game Theory
** Concept of a game
** Two person zero-sum game
** Pure and mixed strategy games
** Saddle point, Odds method
** Dominance method and graphical method for solving mixed strategy game
* Sequencing Problem
** Johnson's algorithm for n jobs and 2 or 3 machines
** Jobs and m machines problem
* Queuing Theory
** Characteristics of M/M/1 Queue model
** Application of Poisson and Exponential distribution in estimating arrival and service rate
** Application of Queue model for better service to the customers
* Replacement Problems
** Replacement of assets that deteriorate with time
** Replacement of items that deteriorate suddenly
* Project Management
** Rules for drawing the network diagram
** Applications of CPM and PERT techniques in project planning and control
** Crashing and resource leveling of operations
** Simulation and its uses in Queuing theory and materials management
* Network Models
* Markov Models
* Neural Networks

## Resources

* Operations Research, by Hamdy Taha.
* Real cases of using Operations Research

## See also

* Graph Theory
# DESCRIPTION:

Network setup. All values after default are optional. Words OK for server names.
SET-NET is a function value.

# ARGUMENTS

* settings -- [email-addr default-server pop-server proxy-server proxy-port-id proxy-type esmtp-user esmtp-pass] (Type: block)

# NOTE

Use set-user, it's a window with forms. It's more human friendly.
# DESCRIPTION:

(undocumented)
SET-PARA is a function value.

# ARGUMENTS

* aface -- (Type: any)
* word -- (Type: any)
* val -- (Type: any)
# DESCRIPTION:

Returns TRUE for set-path values.
SET-PATH? is an action value.

# ARGUMENTS

* value -- (Type: any-type)
# DESCRIPTION:

Set a style by its name.
SET-STYLE is a function value.

# ARGUMENTS

* name -- (Type: word)
* new-face -- (Type: object)

# REFINEMENTS

* /styles
** ss -- Stylesheet (Type: any)
# DESCRIPTION:

(undocumented)
SET-FONT is a function value.

# ARGUMENTS

* aface -- (Type: any)
* word -- (Type: any)
* val -- (Type: any)
# DESCRIPTION:

Changes mode settings for a port.
SET-MODES is a native value.

# ARGUMENTS

* target -- (Type: file url block port)
* modes -- (Type: block)
# DESCRIPTION

Show a window to set user preferences:
SET-USER is a function value.
# Royal Australasian College of Physicians Examinations/Introduction/About this book

This project was started in April 2008, to try and replace the no-longer-updated site Pass the FRACP. It is intended to be a reference for candidates for the written and clinical examinations, and provide a source of:
* Exam wisdom from those that have gone before
* Resources for candidates (study notes etc).
Before adding anything, please read the Disclaimers, but other than that - jump right in.
# Royal Australasian College of Physicians Examinations/Resources/Clinical Exam/Short Cases

This page will hopefully be a collection of summaries for various short cases - both the procedure to follow for the examinations, and also a card for each common short case, listing the things to look out for.
# Royal Australasian College of Physicians Examinations/Resources/Clinical Exam/Short Cases/Example Cases/3rd Nerve Palsy
## The 3rd Nerve Palsy

Stem: This patient presents with a headache. Please examine his eyes.

### Key Features

* dilated pupil
* abducted and depressed eye with reduced movement
* ipsilateral ptosis

### Look for

* IV nerve palsy (tilt head towards side of lesion)
* V nerve palsy (corneal reflex, sensation V1 / V2)
* VI nerve palsy (lateral rectus palsy)
* Contralateral UMN signs in Limbs = Weber's D

### Example presentation

This patient has a left 3rd nerve palsy, evidenced by a dilated pupil, and an abducted and depressed globe, with paralysis of movement and ptosis. There are no other cranial nerve abnormalities. The cause may be a berry aneurysm, causing headache and compressing the nerve. I would also consider a diabetic 3rd nerve palsy, or hypertension – although these would spare the pupil; or also a stroke in the midbrain, which would usually be accompanied by contralateral pyramidal signs; or a lesion in the cavernous sinus.
Back to Neurology
Index
# Motor Neurone Disease

Stem: This patient has difficulty speaking. Please examine the relevant cranial nerves and proceed.

## Key Signs

* XII:
** Bulbar
*** Tongue weakness
*** wasting
*** fasiculations
** Psudobulbar
*** Spastic – unable to protrude
* IX / X
** Decreased voluntary palate elevation
** Gag hyperreactive (PB) or absent (B)
* VII
** Weakness of facial movement (both)
** Normal movement with laughing
* V
** Weakness of jaw opening / closure (both)
** Jaw jerk increased (PB) or absent (B)
(B = bulbar / PB = psuedobulbar / PMA = progressive muscular atrophy)
* Upper / Lower Limbs:
** Inspection: Wasting / Fasiculations
** Power: Predominantly distal weakness, esp of finger abduction
** Reflexes: Usually present in wasted muscles, although may be absent in SMA. Extensor plantar
** Sensation: Normal
* Higher centres: Normal function
* Speech – nasal (bulbar) or indistinct / “Donald Duck” (PB)

## Proceed to

* ? PEG tube
* Respiratory weakness
** Forced Expiratory Time
** Spirometry / Ask for RFTs

## Example Presentation

This patient has clinical features of motor neurone disease, including mixed bulbar signs such as tongue wasting and fasiculations, with pseudobulbar signs such as increased gag reflex and jaw jerk. In the upper and lower limbs, there are mixed upper and lower motor neurone signs, with extensor plantars, and weakness of the distal muscles, confirming the diagnosis. I would also consider ordering an EMG / nerve conduction studies which I would expect to show denervated muscles with fibrillations, but normal conduction velocities.
Back to Index
Back to Example Cases
Back to Neurology
# Examination of the Eye
## Procedure

* General Appearance:
** Thyroid stare ± goitre
* Eyelids
** xanthelasma
** Ptosis
*** unilateral
**** III palsy (Examination procedure / Sample Case)
**** Horner's Sx
***** Pupil changes
***** Sweating
*** bilateral
**** myaesthenia
**** myotonic dystrophy
** Exophthalmos
*** Thyroid Stare (goitre)
*** Mass lesion
*** bilateral
*** Eaton-Lambert myaesthenic syndrome
*** Botulism
*** Muscular dystropy
*** Mitochondrial myopathy
* Cornea:
** Arcus senilus
** Kaiser-Fleischer Rings
* Sclera
** Jaundice
** Pallor
** Blue
*** Osteogenesis Imperfecta
*** Ehlers-Danos
*** Marfan's Syndrome
* Orbits
** Palpate for Tenderness
** Brow sweating for Horner's
* Neurological:
** II
*** acuity
*** fields
*** fundoscopy
** II & III
*** pupils
*** light reflex (direct / consensual)
*** afferent pupillary defect
*** accommodation reflex
** III IV VI
*** diplopia
*** nystagmus
*** gaze palsies
** V VII
*** corneal reflex
* Gaze Fatigue – Myaesthenia
* Central Blindness:
** Hemianopia
** Bitemporal
** Homonymous

## Patterns of Eye Movement Disorders

* III only
** orbital
** brainstem
*** pupil involved – eg posterior communicating artery aneurysm
*** pupil spared – eg infarct, hypertension, diabetic palsy
* III, IV, VI
** superior orbital fissure lesion
* III, IV, V, VI
** cavernous sinus pathology
** check internal carotid
* III + contralateral hemiparesis – midbrain stroke
* III + movement disorder - red nucleus lesion
Main Page
Neurology Index
# Royal Australasian College of Physicians Examinations/Introduction/Disclaimers

Wikibooks works as a free repository for non-copyright material. Copyright material should not be included here - specifically:
* No wholesale reproduction of other texts (eg Talley & O'Connor's various books)
* No College Copyright material (this includes past exam papers)
* Remembered questions are a grey area and best avoided.
Also, standard disclaimers about medical information on the internet apply - a good version is here on Ganfyd - the medical wiki.
# Horner's Syndrome
## Key features

* ptosis
* miosis
* enophthalmosis
* anhydrosis

## Associated with

* descending fibre palsy
** lateral medullary syndrome (+ nystagmus)
** ipsilateral V pinprick, IX, X, XII palsy + contralateral pinprick on body
*** ganglion
**** eg Pancoast's tumour, trauma, other chest lesion
* ascending fibres
** carotid dissection, canvernous sinus lesion

## Example Presentation

This patient has features of a left Horner's syndrome – with anhydrosis, miosis and enophthalmposis with an ipsilateral lateral medullary syndrome, evidenced by left Vth nerve anaesthesia, left tongue and palate weakness with an absent gag. There is associated nystamus and cerebellar signs in the left upper limb and loss of pinprick sensation on the right.
Back to Example Cases
Back to Neurology
Back to Main Index