text:
Java Programming/The Java Platform

The Java platform is the name given to the computing platform from Oracle that helps users to run and develop Java applications. The platform does not just enable a user to run and develop a Java application, but also features a wide variety of tools that can help developers work efficiently with the Java programming language.

The platform consists of two essential pieces of software:
 * the Java Runtime Environment (JRE), which is needed to run Java applications and applets; and,
 * the Java Development Kit (JDK), which is needed to develop those Java applications and applets. If you have installed the JDK, you should know that it comes equipped with a JRE as well. So, for all the purposes of this book, you would only require the JDK.

In this section, we will explore in further detail what these two software components of the Java platform do.

Java Runtime Environment (JRE)
Any piece of code written in the Java programming language can be run on any operating system, platform or architecture — in fact, it can be run on any device that supports the Java platform. Before Java, this amount of ubiquity was very hard to achieve. If a software was written for a Unix-based system, it was impossible to run the same application on a Windows system — in this case, the application was native only to Unix-based systems.

A major milestone in the development of the Java programming language was to develop a special runtime environment that would execute any Java application independent of the computer's operating system, platform or architecture.

The Java Runtime Environment (JRE) sits on top of the machine's operating system, platform and architecture. If and when a Java application is run, the JRE acts as a liaison between the underlying platform and that application. It interprets the Java application to run in accordance with the underlying platform, such that upon running the application, it looks and behaves like a native application. The part of the JRE that accomplishes this complex liaison agreement is called the Java Virtual Machine (JVM).

Executing native Java code (or byte-code)
Native Java applications are preserved in a special format called the byte-code. Byte-code remains the same, no matter what hardware architecture, operating system, or software platform it is running under. On a file-system, Java byte-code resides in files that have the  (also known as a class file) or the   (also known as a Java archive) extension. To run byte-code, the JRE comes with a special tool (appropriately named java).

Suppose your byte-code is called. If you want to execute this Java byte-code, you would need to use the following command in Command Prompt (on Windows) or Terminal (on Linux or Mac OS):

If you want to execute a Java byte-code with a  extension (say,  ), you would need to use the following command in Command Prompt (on Windows) or Terminal (on Linux or Mac OS):

Do you have a JRE?
Most computers come with a pre-installed copy of the JRE. If your computer doesn't have a JRE, then the above commands would not work. You can always check what version of the JRE is installed on the computer by writing the following command in Command Prompt (on Windows) or Terminal (on Linux or Mac OS):

Java Virtual Machine (JVM)
Quite possibly, the most important part of the JRE is the Java Virtual Machine (JVM). The JVM acts like a virtual processor, enabling Java applications to be run on the local system. Its main purpose is to interpret (read translate) the received byte-code and make it appear as native code. The older Java architecture used this process of interpretation to execute Java byte-code. Even though the process of interpretation brought the WORA principle to diverse machines, it had a drawback — it consumed a lot of time and clocked the system processor intensively to load an application.

Just-in-Time Compilation
Since version 1.2, the JRE features a more robust JVM. Instead of interpreting byte-code, it down-right converts the code straight into equivalent native code for the local system. This process of conversion is called just-in-time compilation or JIT-compilation. This process only occurs when the byte-code is executed for the first time. Unless the byte-code itself is changed, the JVM uses the compiled version of the byte-code on every successive execution. Doing so saves a lot of time and processor effort, allowing applications to execute much faster at the cost of a small delay on first execution.

Native optimization
The JVM is an intelligent virtual processor. It has the ability to identify areas within the Java code itself that can be optimized for faster and better performance. Based on every successive run of your Java applications, the JVM would optimize it to run even better.

Was JVM the first virtual machine?
Java was not the first virtual-machine-based platform, though it is by far the most successful and well-known. Previous uses for virtual machine technology primarily involved emulators to aid development for not-yet-developed hardware or operating systems, but the JVM was designed to be implemented entirely in software, while making it easy to efficiently port an implementation to hardware of all kinds.

Java Development Kit (JDK)
The JRE takes care of running the Java code on multiple platforms, however as developers, we are interested in writing pure code in Java which can then be converted into Java byte-code for mass deployment. As developers, we do not need to write Java byte-code; rather we write the code in the Java programming language (which is quite similar to writing C or C++ code).

Upon downloading the JDK, a developer ensures that their system has the appropriate JRE and additional tools to help with the development of applications in the Java programming language. Java code can be found in files with the extension .java. These files are called Java source files. In order to convert the Java code in these source files to Java byte-code, you need to use the Java compiler tool installed with your JDK.

The Java compiler
The Java compiler tool (named javac in the JDK) is the most important utility found with the JDK. In order to compile a Java source file (say, ) to its respective Java byte-code, you would need to use the following command in Command Prompt (on Windows) or Terminal (on Linux or Mac OS):

This command would convert the  source file into its equivalent Java byte-code. The resultant byte-code would exist in a newly created file named. This process of converting Java source files into their equivalent byte-codes is known as compilation.

There are a huge array of tools available with the JDK that will all be explained in due time as you progress with the book. These tools are briefly listed below in order of their usage:

Applet development

 * — Java applets require a particular environment to execute. Typically, this environment is provided by a browser with a Java plug-in, and a web server serving the applet. However, during development and testing of an applet it might be more convenient to start an applet without the need to fiddle with a browser and a web server. In such a case, Oracle's appletviewer from the JDK can be used to run an applet.

Annotation processing

 * For more about annotation processing, read this

In Java 1.5 (alias Java 5.0) Oracle added a mechanism called annotations. Annotations allow the addition of meta-data to Java source code, and even provide mechanisms to carry that meta-data into compiled  files.

 * — An annotation processing tool which digs through source code, finds annotation statements in the source code and executes actions if it finds known annotations. The most common task is to generate some particular source code. The actions apt performs when finding annotations in the source code are not hard-coded into apt. Instead, one has to code particular annotation handlers (in Java). These handlers are called annotation processors. It can also be described in a simple way without the Oracle terminology: apt can be seen as a source code preprocessor framework, and annotation processors are typically code generators.

Integration of non-Java and Java code

 * — A Java class can call native, or non-Java, code that has been prepared to be called from Java. The details and procedures are specified in the JNI (Java Native Interface). Commonly, native code is written in C (or C++). The JDK tool javah helps to write the necessary C code, by generating C header files and C stub code.

Class library conflicts

 * — It can be used prior to the installation of a Java extension into the JDK or JRE environment. It checks if a particular Jar file conflicts with an already installed extension. This tool appeared first with Java 1.5.

Software security and cryptography tools
The JDK comes with a large number of tools related to the security features of Java. Usage of these tools first requires study of the particular security mechanisms. The tools are:

 * — To manage keys and certificates
 * — To generate and verify digital signatures of JARs (Java ARchives)
 * — To edit policy files
 * — To obtain Kerberos v5 tickets
 * — To manage Kerberos credential cache and key table
 * — To manage entries in a key table

The Java archiver

 * — (short for Java archiver) is a tool for creating Java archives or jar files — a file with  as the extension. A Java archive is a collection of compiled Java classes and other resources which those classes may require (such as text files, configuration files, images) at runtime. Internally, a jar file is really a .zip file.

The Java debugger

 * — (short for Java debugger) is a command-line console that provides a debugging environment for Java programs. Although you can use this command line console, IDE's normally provide easier to use debugging environments.

Documenting code with Java
As programs grow large and complex, programmers need ways to track changes and to understand the code better at each step of its evolution. For decades, programmers have been employing the use of special programming constructs called comments — regions that help declare user definitions for a code snippet within the source code. But comments are prone to be verbose and incomprehensible, let alone be difficult to read in applications having hundreds of lines of code.

 * — Java provides the user with a way to easily publish documentation about the code using a special commenting system and the javadoc tool. The javadoc tool generates documentation about the Application Programming Interface (API) of a set of user-created Java classes. javadoc reads source file comments from the  source files and generates HTML documents that are easier to read and understand without looking at the code itself.

 * — Where Javadoc provide a detailed view into the API and documentation of a Java class, the javap tool prints information regarding members (constructors, methods and variables) in a class. In other words, it lists the class' API and/or the compiled instructions of the class. javap is a formatting disassembler for Java bytecode.

The native2ascii tool
is an important, though underappreciated, tool for writing properties files — files containing configuration data — or resource bundles — files containing language translations of text.

Such files can contain only ASCII and Latin-1 characters, but international programmers need a full range of character sets. Text using these characters can appear in properties files and resource bundles only if the non-ASCII and non-Latin-^1 characters are converted into Unicode escape sequences (\uXXXX notation).

The task of writing such escape sequences is handled by. You can write the international text in an editor using the appropriate character encoding, then use  to generate the necessary ASCII text with embedded Unicode escape sequences. Despite the name,  can also convert from ASCII to native, so it is useful for converting an existing properties file or resource bundle back to some other encoding.

makes most sense when integrated into a build system to automate the conversion.

Monitoring and Management Tools / Troubleshooting Tools
With Java 1.5 a set of monitoring and management tools have been added to the JDK, in addition to a set of troubleshooting tools.

The monitoring and management tools are intended for monitoring and managing the virtual machine and the execution environment. They allow, for example, monitoring memory usage during the execution of a Java program.

The troubleshooting tools provide rather esoteric insight into aspects of the virtual machine. (Interestingly, the Java debugger is not categorized as a troubleshooting tool.)

All the monitoring and management and troubleshooting tools are currently marked as "experimental" (which does not affect jdb). So they might disappear in future JDKs.

Java class libraries (JCL)
In most modern operating systems, a large body of reusable code is provided to simplify the programmer's job. This code is typically provided as a set of dynamically loadable libraries that applications can call at runtime. Because the Java platform is not dependent on any specific operating system, applications cannot rely on any of the existing libraries. Instead, the Java platform provides a comprehensive set of standard class libraries, containing much of the same reusable functions commonly found in modern operating systems.

The Java class libraries serve three purposes within the Java platform. Like other standard code libraries, they provide the programmer with a well-known set of functions to perform common tasks, such as maintaining lists of items or performing complex string parsing. In addition, the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily dependent on the native capabilities of the platform. The Java java.net and java.io libraries implement the required native code internally, then provide a standard interface for the Java applications to perform those tasks. Finally, some underlying platforms may not support all of the features a Java application expects. In these cases, the class libraries can either emulate those features using whatever is available, or provide a consistent way to check for the presence of a specific feature.

Similar concepts
The success of the Java platform and the concepts of the write once, run anywhere principle has led to the development of similar frameworks and platforms. Most notable of these is the Microsoft's .NET framework and its open-source equivalent Mono.

The .NET framework
The .NET framework borrows many of the concepts and innovations of Java — their alternative for the JVM is called the Common Language Runtime (CLR), while their alternative for the byte-code is the Common Intermediate Language (CIL). In fact, the .NET platform had an implementation of a Java-like language called Visual J# (formerly known as J++).

J# is normally not supported with the JVM because instead of compiling it in Java byte-code, the .NET platform compiles the code into CIL, thus making J# different from the Java programming language. Furthermore, because J# implements the .NET Base Class Libraries (BCL) instead of the Java Class Libraries, J# is nothing more than a non-standard extension of the Java programming language. Due to the lack of interest from developers, Microsoft had to withdraw their support for J#, and focused on a similar programming language: C#.

Third-party compilers targeting the JVM
The word Java, by itself, usually refers to the Java programming language which was designed for use with the Java platform. Programming languages are typically outside of the scope of the phrase "platform". However, Oracle does not encourage the use of any other languages with the platform, and lists the Java programming language as a core part of the Java 2 platform. The language and runtime are therefore commonly considered a single unit.

There are cases where you might want to program using a different language (say, Python) and yet be able to generate Java byte-code (instead of the Python compiled code) to be run with the JVM. Many third-party programming language vendors provide compilers that can compile code written in their language to Java byte-code. For instance, Python developers can use Jython compilers to compile Python code to the Java byte-code format (as illustrated below).

Of late, JVM-targeted third-party programming and scripting languages have seen tremendous growth. Some of these languages are also used to extend the functionalities of the Java language itself. A few examples include the following:
 * Groovy
 * Pizza
 * GJ (Generic Java) – later officially incorporated into Java SE 5.
 * NetREXX

title: Java Programming/The Java Platform


text:
Futurology/Methods

Uncertainty Principle
At the smallest levels of our universe there is chaos. Because of the Heisenberg Uncertainty Principle we can only describe "truth" to within a certain tolerance. This doesn't mean that we can't call anything "truth," it just means that "truth" is the same as "something likely to be true" except with a smaller standard deviation.

As quantum mechanics grew in popularity over the twentieth century, a new type of mathematics developed to describe our world in terms of probability instead of absolutes. One of the most basic ingredients of this new mathematical structure is that of time evolution. Given the state and the properties of a system, time evolution quantifies how the system will change over time. In other words, it predicts the future.

By using the mathematical structure of quantum mechanics, futurologists objectify the probabilities of the future using the quantum tools that were originally established for objectifying the probabilities of the present.

Schrödinger's Cat
Schrödinger's cat is a seemingly paradoxical thought experiment devised by Erwin Schrödinger that attempts to illustrate the incompleteness of an early interpretation of quantum mechanics when going from subatomic to macroscopic systems. The experiment proposes:
 * A cat is placed in a sealed box. Attached to the box is an apparatus containing a radioactive nucleus and a canister of poison gas. This apparatus is separated from the cat in such a way that the cat can in no way interfere with it. The experiment is set up so that there is exactly a 50% chance of the nucleus decaying in one hour. If the nucleus decays, it will emit a particle that triggers the apparatus, which opens the canister and kills the cat. If the nucleus does not decay, then the cat remains alive. According to quantum mechanics, the unobserved nucleus is described as a superposition (meaning it exists partly as each simultaneously) of "decayed nucleus" and "undecayed nucleus". However, when the box is opened the experimenter sees only a "decayed nucleus/dead cat" or an "undecayed nucleus/living cat."

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

title: Futurology/Methods


text:
Handbook of Genetic Counseling/Diabetic Embryopathy

Diabetic Embryopathy

Etiology and natural history

 * Diabetic embryopathy is a clinical diagnosis based on one or more congenital anomalies or fetal/neonatal complications in a baby that are attributed to his/her mother's diabetes
 * Three main kinds of diabetes mellitus; if a mother has any of these three types, there is a significant risk for pregnancy complications and future health problems for mother and her offspring
 * Type I
 * Insulin dependent
 * Juvenile onset
 * Prone to ketosis
 * Body does not produce insulin because cells that produce insulin are attacked by immune system
 * Multifactorial causes, but those with family history are at higher risk
 * Tx: daily insulin injections
 * Type II
 * Non-insulin dependent
 * Adult onset
 * Not prone to ketosis
 * Body does not produce enough insulin or cells cannot use insulin properly
 * Inherited as an incompletely penetrating AR trait, but is definitely multifactorial
 * Tx: diet, exercise, and sometimes medication
 * Type III (Gestational diabetes)
 * Onset during pregnancy
 * Multifactorial causes, but those with family history of any diabetes are at higher risk
 * Tx: consistent monitoring of blood sugar level, diet and exercise; occasionally, insulin is required
 * Occurs in 1-4% of all pregnancies (higher in African American and Hispanic populations)
 * 20-50% of women who develop gestational diabetes will develop type II diabetes in the next 5-10 years.
 * High blood sugar levels and ketones (substances that in large amounts are poisonous to the body) pass through the placenta to the baby, increasing the chance of birth defects
 * When extra sugar is in a mother's blood during pregnancy, the baby is "fed" extra sugar, too, leading to a bigger baby that is harder to deliver
 * It is not well-understood if the administration of insulin has teratogenic effects on the fetus; however, outcomes are definitely better when insulin is used to treat insulin-dependent maternal diabetes than when not

Clinical features

 * All maternal and fetal features noted here are more severe and/or common when diabetic control is poor during pregnancy; nevertheless, even with good diabetic control, these features are observed
 * Maternal morbidity factors in diabetic pregnancies which can increase a baby's risk for birth defects:
 * Ketoacidosis
 * Polyhydramnios
 * Preeclampsia/chronic hypertension
 * Preterm labor
 * Cesarean section
 * Fetal complications and birth defects associated with maternal diabetes
 * Cardiac anomalies: most commonly VSD or TGV
 * DiGeorge anomaly: due to abnormal neural crest cell migration; affects normal fetal development of the heart, thymus, and parathyroid glands
 * NTD's: thought to be due to maternal diabetic factors causing improper embryonic folding; most commonly spina bifida and anencephaly
 * Macrosomia: occurs in ~ 1/3 of all diabetic pregnancies; can cause life-long obesity for child
 * IUGR: thought to be due to nutrient limitation associated with maternal hypertension.
 * SAB: debated somewhat, but appears to be increased in pregnancies with poor diabetic control
 * Caudal regression: agenesis of sacrum and lumbar spine, hypoplasia of lower extremities; thought to be due to improper embryonic folding caused by maternal diabetic factors
 * Abnormal postnatal neurologic development: thought to be due to effects of ketosis
 * Perinatal and neonatal complications associated with maternal diabetes
 * Fetal asphyxia: can cause cerebral palsy as well as affecting many other systems such as pulmonary, GI, and cardiovascular
 * Preterm birth: can lead to respiratory distress syndrome; occurs in ~ 30% of diabetic pregnancies, even when diabetic control has been meticulous
 * Hypoglycemia: can cause seizures, coma, and brain damage if not recognized and treated quickly
 * Hypocalcemia and hypomagnesemia: thought to be caused primarily by premature birth and its affects on parathyroid function
 * Hyperbilirubinemia: thought to be caused primarily by premature birth
 * Cardiomyopathy and/or cardiomegaly: most commonly seen in macrosomic infants of poorly controlled diabetic mothers

Surveillance and Treatment

 * Preconceptionally
 * Counseling recommended for all women with overt diabetes or a history of gestational diabetes
 * Severity of woman's disease should be considered
 * Woman should be apprised of possible complications to herself and her child
 * During pregnancy
 * Should be handled by a team of healthcare workers including: perinatologist, endocrinologist, dietician, and social worker
 * Patient should be seen every 4-8 weeks, and should be considered "high risk"
 * Mother should be closely monitored for diabetic control so that adjustments can be made for insulin, diet, and exercise
 * Insulin therapy can be altered in many ways, including continuous subcutaneous infusion if necessary
 * Must be careful to not over-insulinize mother and cause hypoglycemia
 * Surveillance for health risks to mother should be closely monitored, including: cardiovascular health, renal function, blood pressure, weight gain
 * Maternal serum screening should be done at 16 weeks
 * Fetus should be monitored regularly via level II ultrasound for detection of macrosomia, IUGR, cardiac anomalies, NTDs, and any other associated conditions
 * At birth
 * Delaying delivery until term is often contraindicated when baby is macrosomic or when mother is preeclampsic
 * Cesarean section rate is about 30-50% in diabetic pregnancies
 * Delivery should occur at facility prepared to deal with fetal and maternal complications associated with diabetic pregnancy
 * Postpartum management
 * Infant should be closely monitored for associated conditions; EKG and serum tests should be run
 * Mother's insulin should be closely monitored; many women need less insulin directly following delivery

Psychosocial issues

 * Guilt on mother's part for risks and complications to her baby
 * Anxiety about own health due to having a high risk pregnancy
 * Financial concerns over costly prenatal and postnatal care
 * Fear about possible outcomes of pregnancy


text:
Handbook of Genetic Counseling/Down Syndrome - Trisomy 21-1

Down Syndrome - Trisomy 21

Introduction

 * What have you been told about why you were referred to Genetics?
 * Was a prenatal diagnosis of Down Syndrome made?
 * Were chromosome studies performed?
 * What do you already know about Down Syndrome?
 * What are your main concerns? What would you like to gain from this session?

Intake and Family History

 * Explain that all of their concerns will be addressed later in the session, but that I would like to take a medical history and family history first.
 * The history may help us to explain your concerns better.
 * The questions I ask are all standard questions we ask to everyone and does not necessarily mean that any thing you did during pregnancy is responsible for causing a problem with your child.
 * A pedigree helps us identify any health problems that seem to "run in the family". This may include things that may not be directly related to Down Syndrome.
 * While taking the pedigree ask about any family members who have had miscarriages, birth defects, intellectual disability, learning difficulties, or health problems
 * Obtain as much psychosocial history as possible throughout the session and address any other questions near the end when available resources are provided and when psychosocial issues or concerns are ascertained and addressed.

Physical Characteristics

 * Children with Down Syndrome are all unique individuals in personality and appearance.
 * They do however have certain physical characteristics in common with other children with Down Syndrome. These Include:
 * Muscle hypotonia (low muscle tone)
 * Flattened midface due to underdevelopment
 * somewhat depressed nasal bridge and small nose
 * Oblique palpebral fissures (an upward slant to the eyes)
 * Epicanthal folds (small skin folds on the inner corner of the eyes)
 * Dysplastic ear, small, low-set, lopped pinnae
 * Simian crease (60%) A single deep crease across the center of the palm
 * Hyperextensible joints
 * Clinodactyly (Dysplastic middle phalanx) of the fifth finger, fifth finger has one flexion furrow instead of two (single interdigital crease)
 * Brachydactyly (shortened fingers)
 * Excessive space between large and second toe (sandal toe)
 * Small mouth, protruding tongue
 * brushfield spots (white fluffy spots on iris)

 * It is important to note that these children generally look much more like their parents than other Down syndrome patients.

Alternative Diagnosis

 * Down Syndrome is common and distinctive and is not often confused with other syndromes.
 * Confusion most common in "normal neonates with one or more of the common signs or minor anomalies, but absence of other common signs and the facial gestalt should avoid the error."
 * Smith Magenis syndrome has some overlapping features including:
 * brachycephaly, round face, upslanting palpebral fissures, midface hypoplasia, small wide nose, Wolfflin-Kruckmann iris spots that may be confulsed with Brushfield spots
 * other signs of Down Syndrome are absent
 * Zellweger syndrome, a peroxisomal disorder which shares findings including:
 * hypotonia, sarge fontanels, flat occiput and face, anteverted nares, epicanthal folds, Brushfield spots, cataracts, abnormal helices, single palmar crease, cardiac septal defects
 * distinguishing signs include: severe early developmental delay, seizures, a high forehead, shallow orbits, hepatomegaly, joint contractures, confirmed by finding elevated plasma very-long -chain fatty acids

Developmental Issues

 * Mental challenges
 * occurs in most patients with Down Syndrome. With the advent of early intervention and inclusive educational models, there are more individuals with Down syndrome who test within normal IQ range than was previously seen.
 * usually mild - moderate mean IQ is 45-48 and upper limit about 70 (mental age equivalent for mean is 5.5 years and ranges from 1-9 years) but IQ is poor measure of the spectrum of abilities that may be highly variable.
 * no way to predict the severity, but can get a better idea of the degree of mental retardation around the age of two
 * "Children with Down syndrome learn to sit, walk, talk, play, toilet train and do most other activities - only somewhat later than their peers without Down syndrome."
 * "Early intervention services, which begin shortly after birth, help children with Down syndrome develop to their full potential."
 * Most will continue to require some level of day-to-day supervision throughout life, however every year there are more individuals who live independent lives.
 * Some individuals with Down syndrome are able to drive, and it is becoming more common in several countries.

Life Expectancy and Special Health Concerns

 * 80% live to age 55 and many live even longer
 * mortality rates remain high during the first 5 years because of congenital heart defects, infection, pneumonia, leukemia
 * Congenital heart disease in approximately 40-50% of patients
 * VSD or ASD are most common types
 * AV canal defects and other heart anomalies are also found
 * (all newborns should be seen by cardiologist for an echocardiogram)
 * Pulmonary hypertension
 * common and can mask a heart defect by making a murmur difficult to hear
 * GI anomalies in 10-15 %
 * Duodenal atresia
 * Tracheoesophageal fistula
 * imperforate anus
 * Hirschsprung disease
 * constipation common during infancy
 * Hearing
 * (have hearing checked at birth via auditory brainstem response test (ABR) and every 6 months until 3 years old via behavioral audiology once developmental age of 7-8 months is reached)
 * Frequent ear infections
 * sinusitis
 * conductive hearing loss
 * Opthalmologic
 * Refer for screening by 6 months of age and yearly or for any of the following if suspected:
 * Congenital cataracts
 * Estropia
 * Glaucoma
 * Strabismus
 * Obstructive sleep apnea of some degree in over 60% due to small oropharynx with relatively large tongue.
 * Manifest by loud snoring, stop breathing, waking up a lot throughout the night
 * Hypothyroidism in 10-15% (should screen at 6 months and yearly)
 * Atlanto-axial instability
 * x-ray findings of cervical spine instability in 10%
 * only 1-2% develop spinal compression
 * (x-ray should be scheduled between 3-5 years of age or as needed for special olympics)
 * Hematologic
 * Increased risk of leukemia (15-20 times greater than general population)
 * Majority of cases occur in first 3 years of life with high cure rate
 * Transient form can be seen in newborn and disappear during first 2 - 3 months of life
 * Alzheimer disease
 * Increased risk of about 25% compared to 6% among general population
 * onset in 40's or 50's
 * Most females are fertile, but have reproduction problems (irregular ovulation, miscarriage, preterm labor, etc.)
 * Almost all males are infertile due to defective spermatogenesis

0 = 0

Recurrence Risk for next pregnancy

 * 1% if nondisjunction or maternal age-adjusted risk if that is greater (this represents an increased risk for patients under age 30 and we're unsure why)
 * recurrence risk for familial 14/21 translocation varies according to which parent is affected by balanced Robertsonian translocation (3-5% males 10-15% females)
 * 100% if parent has 21/21 translocation (rare)
 * no increased risk if child has a de novo translocation

Prenatal Diagnosis

 * Screening tests
 * Triple screen can often indicate an increased risk but not diagnostic (70% ascertainment and 5% false positive)
 * Level II ultrasound can pick up signs seen in Downs syndrome, but not diagnostic about 60-66% of fetuses with Down Syndrome are detected
 * Diagnostic testing
 * chorionic villus sampling usually performed at around 10-12 weeks LMP
 * amniocentesis usually performed 15-20 weeks after LMP

Psychosocial Issues

 * Get a feel for how well they have adjusted to and accepted the idea of having a child with Down Syndrome. "How are you feeling about having a child with Down Syndrome?"
 * Normalize any feelings of grief that they might be experiencing "Many people feel sad and feel like they have lost something when they find out that something might be wrong with their child."
 * Explain that feelings of guilt and blame can be common too, but stress that nothing they could have done would have caused or prevented this.
 * How have other family members and friends reacted? How much support are your receiving? (perhaps if they have other children see who helps take care of them)
 * Alternative placement could be discussed - explain that adoptive homes are available through Down Syndrome Association (waiting list)

Resources

 * Provide with written materials
 * Arrange Individualized Family service Plan (IFSP) children birth to 3 and Individualized educational Plan (IEP) from age 4 until end of formal schooling
 * Early Intervention Programs via County Board of MR/DD probably not available for Kentucky residents (Infant program which involves weekly visits at home by a therapist)
 * Financial assistance (Supplemental Security Income? SSI)
 * Follow up letter


text:
Embedded Systems/Interrupts

Interrupt
Sometimes things will happen in a system when the processor is simply not ready. In fact, sometimes things change that require immediate attention. Can you imagine, sitting at your PC, that you were to hit buttons on the keyboard, and nothing happens on your computer?  Maybe the processor was busy, and it just didn't check to see if you were hitting any buttons at that time. The solution to this problem is something called an "Interrupt." Interrupts are events that cause the microprocessor to stop what it is doing, and handle a high-priority task first. After the interrupt is handled, the microprocessor goes back to whatever it was doing before. In this way, we can be assured that high-priority inputs are never ignored.

Hardware and Software
There are two types of interrupts: Hardware and Software. Software interrupts are called from software, using a specified command. Hardware interrupts are triggered by peripheral devices outside the micro-controller. For instance, your embedded system may contain a timer that sends a pulse to the controller every second. Your micro-controller would wait until this pulse is received, and when the pulse comes, an interrupt would be triggered that would handle the signal.

Interrupt Service Routines
Interrupt Service Routines (ISR) are the portions of the program code that handle the interrupt requests. When an Interrupt is triggered (either a hardware or software interrupt), the processor breaks away from the current task, moves the instruction pointer to the ISR, and then continues operation. When the ISR has completed, the processor returns execution to the previous location.

Many embedded systems are called interrupt driven systems, because most of the processing occurs in ISRs, and the embedded system spends most of its time in a low-power mode.

Some people split an ISR into two parts: top-half (fast interrupt handler, First-Level Interrupt Handler (FLIH)) and bottom-half (slow interrupt handler, Second-Level Interrupt Handlers (SLIH)). Top-half is a faster part of ISR which should quickly store minimal information about interrupt and schedule slower bottom-half at a later time.

We discuss two-level interrupt handling and other ways of writing interrupt handlers in interrupt architecture.

Interrupt Vector Table
The "Interrupt Vector Table" is a list of every interrupt service routine. It is located at a fixed location in program memory.  (Some processors expect the interrupt vector table to be a series of "call" instructions, each one followed by the address of the ISR. Other processors expect the interrupt vector table to hold just the ISR addresses alone.)

You must make sure that every entry in the interrupt vector table is filled with the address of some actual ISR, even if it means making most of them point to the "do nothing and return from interrupt" ISR.

Interrupt flags
The PIC18 and PIC16 series of processors have a single interrupt handler, a single global interrupt enable bit, and a whole array of bits in the interrupt hardware. Each possible source of interrupts has a pair of bits in the interrupt hardware—a "flag" bit that is set whenever some piece of hardware wants attention, as if it's waving a flag trying to attract attention, and an "enable" bit that controls whether the processor will ignore that flag, or stop everything and run the interrupt handler. (Confusingly, some people refer to both bits as "flags"—in this section, we refer to the "request attention" bits as flag bits, and the "ignore or not" bits as enable bits).

When an interrupt occurs on an 8-bit PICmicro (PIC18 or PIC16), the hardware clears the global interrupt enable bit, then starts running the one and only interrupt handler. The interrupt handler software must somehow check all the things that could have possibly caused the interrupt—typically by checking each interrupt flag one by one—and handle each one (if necessary).

The 680x0 and x86 and dsPIC and PIC24 and many other processors have many interrupt vectors. When some piece of hardware requests attention on such a processor, the hardware vectors to and runs the specific interrupt handler for that particular bit of hardware.

Writing interrupt routines
Many people write interrupt routines in C. A programmer who uses declares an interrupt handler very similar to declaring a normal function, something like this:

Alas, there is no standard way to write interrupt handlers in portable C. Every C compiler seems to use its own keywords incompatible with the keywords for any other C compiler. Even with gcc, the favored interrupt declaration varies from one processor to another.

Other programmers use C compilers that do not support writing interrupt handlers directly in C. They are forced to write the interrupt handler in assembly language, doing by hand the things the compiler does for the previous group of people:

An interrupt routine typically begins with a bunch of boilerplate code that pushes the status register and other stuff to the stack, and ends with another bunch of boilerplate code to restore all that stuff so whatever code was interrupted can continue from exactly where it left off. That boilerplate code is very different from one processor family to another—and has some key differences from the normal calling convention prologue and epilogue.

The compiler (or an assembly language programmer) writes in the interrupt vector table a pointer to that interrupt handler.

One extremely common problem is trying to do "too much" in an interrupt routine. Alas, often the symptoms only occur when two different interrupt routines are triggered more-or-less simultaneously, leading to difficult-to-debug intermittent errors and a lot of finger-pointing. Unfortunately, the person who wrote one interrupt routine points out that his routine works fine when run alone, and the person who wrote the other interrupt routine points out that his routine works fine when run alone, and all too often they each blame the other person for the problems that occur when both interrupts occur. One common symptom of an interrupt routine (possibly the UART interrupt handler, but often some other seemingly unrelated interrupt routine) taking "too long" is losing some, but not all of the characters in a stream of characters coming in over the UART.

Because it is difficult to calculate how much time an interrupt handler will take, it is common to directly measure how long interrupt handlers actually take. One popular debugging technique is to write interrupt handlers such that the interrupt handler sets a test pin high at the beginning of every interrupt routine, and the interrupt handler clears the test pin low at the end of every interrupt routine. An o'scope attached to that pin shows the actual execution time of that interrupt handler.

title: Embedded Systems/Interrupts


text:
Handbook of Genetic Counseling/Down Syndrome - Trisomy 21-2

Down Syndrome - Trisomy 21

Genetics

 * 3 possible etiologies:
 * Full trisomy 21 (95% of the cases)
 * Due to nondisjunction during meiosis
 * Usually maternal nondisjunction (90-95% of these cases)
 * 75% of maternal nondisjunction occurs during meiosis 1
 * 1% recurrence risk, unless the mother's age related risk is higher than 1%, in which case the age-related risk is quoted
 * Unbalanced translocation (3-4% of cases)
 * 50% of cases a parent carries a balanced translocation
 * 50% of the unbalanced translocations are de novo and occur during fertilization
 * Recurrence risk is 100% for a parental 21:21 translocation
 * For a 21:14 translocation, recurrence is 16% if in the mother and 5% if in the father
 * Mosaicism (1-2% of cases)
 * Due to nondisjunction during mitosis, early in embryonic development
 * Only cells that descend from that specific cell where nondisjunction occurred will be trisomy 21
 * Usually associated with a less severe phenotype
 * Molecular Genetics
 * Ongoing effort to define Chromosome 21 critical region
 * Narrowed to 21q22
 * DSCR1 is a candidate gene suspected to be involved in the pathogenesis of DS

Incidence
Clinical Features
 * One in every 650-1,000 children is born with down syndrome
 * Intelligence
 * Mild to moderate mental retardation seen in most individuals (ranges from ~40-80)
 * Language delays
 * Cardiac
 * >40% are born with congenital heart defects
 * Av canal and VSD are common
 * Gastrointestinal
 * Duodenal atresia is the most common
 * Duodenal web (partial obstruction)
 * Tracheoesophageal fistula
 * Pyloric stenosis
 * Omphalocele
 * Hirschprung's disease
 * Imperforate anus
 * Annular pancreas
 * Celiac disease
 * Associations with vomiting, diarrhea, constipation, and feeding difficulties may be associated
 * Auditory
 * Recurrent otitis media
 * Some degree of hearing loss is present in ~90% of patients
 * Conductive hearing loss due to fluid accumulation
 * Sensorineural hearing loss is also seen
 * Craniofacial
 * Macroglossia (60%)
 * May cause feeding difficulty
 * Dental malocclusions (100%)
 * Constellation of characteristic facial features
 * Brachycephaly
 * Low nasal root, flat nasal bridge
 * Epicanthic folds
 * Small and occasionally overfolded ears
 * Short neck sometime seen with redundant skin at the nape
 * Brushfield spots
 * Skeletal
 * 14% have increased mobility of the cervical spine at the level of the 1st and 2nd vertebrae (atlantoaxial instability)
 * other
 * Respiratory problems can be due to midfacial hypoplasia which results in narrow airways
 * Infections (recurrent croup due to narrow trachea)
 * Obstructive airway disease
 * Sleep apnea
 * Leukemia
 * Risk of developing leukemia is 15-30 times higher in Down syndrome patients than in the general population
 * Hypothyroidism (15%)
 * Common during adolescence
 * Yearly monitoring of TSH and T(subscript)4 levels recommended
 * Alzheimer's Disease
 * 15% of adults with average age of onset ~50 yrs
 * Eye problems
 * Strabismus
 * cataracts
 * Seizures (5-10%)
 * Correlation between age and prevalence
 * Peaks at infancy and 4th-5th decade of life
 * Short stature (average at 3rd percentile)
 * Obesity
 * Wide gap between first and second toes
 * Hypotonia
 * Clinodactyly of the 5th fingers

Natural History/Prognosis

 * Life expectancy has significantly increased
 * No congenital heart defects: >60 yrs old
 * Congenital heart defects: 30-35 yrs old
 * Causes of death
 * Leukemia (malignancy)
 * Infections

Treatment and Management

 * Echocardiograms, EKG, chest X-rays to monitor heart defects
 * Surgery may be required
 * Ophthalmology exams
 * Hearing exams
 * Abdominal X-rays, barium swallow or enema to follow digestive problems
 * TSH levels to detect hypothyroidism
 * Early intervention for MR and developmental delays
 * Physical therapy for gross and fine motor skills
 * Speech therapy


text:
Handbook of Genetic Counseling/Duchenne Muscular Dystrophy-1

Duchenne Muscular Dystrophy

Contracting

 * Discuss the reason for referral
 * Express sympathy for the recent loss of son and brother
 * Who is the referring physician?
 * Obtain written consent to use son/brother's records for session and for testing
 * From mother
 * Tell me about your son/brother
 * Elicit prior knowledge about MD carrier testing
 * CK testing ever done? = creatine phosphokinase
 * Did anyone else ever address carrier status with them?
 * What is the perceived risk of being a carrier?
 * Assess concerns
 * What will she do with the information?
 * Discuss pros and cons of knowing carrier status
 * Reproductive decisions, planning for the future, prenatal diagnosis options
 * Stress, anxiety, fear
 * Set goals for the session
 * Provide overview of topics for counseling session
 * Review personal and family history
 * Discuss inheritance pattern
 * Risk of being a carrier
 * Testing process and delivery of results
 * Decide if you would like testing today
 * Emphasize that it is VOLUNTARY

Intake & Family History

 * Pedigree
 * Any other affected family members?
 * Psychosocial assessment
 * Who have you told about the appointment?
 * Who will you tell about the results?
 * Do you have a serious boyfriend?
 * How would the results affect your future reproductive plans?
 * What was it like growing up with a brother who had DMD?

General Information

 * Dystrophinopathies
 * Characterized by a spectrum of muscle disease that ranges from mild to severe
 * Duchenne/Becker muscular dystrophy is severe
 * Skeletal muscle is primarily affected in both
 * DMD is rapidly progressive and presents in early childhood.
 * Patients are often wheelchair-bound by age 12
 * Becker is characterized by later-onset skeletal muscle weakness
 * Patients remain ambulatory into their 20s
 * Dystrophin gene
 * Xp21.2
 * Encodes protein dystrophin
 * Often deletions or duplications involving exons of this gene
 * Molecular genetic testing is available clinically
 * Prevalence
 * 1 in 5,600 live male births
 * 1/3 of patients are new mutations and the mother is not a carrier

Diagnosis

 * Clinical
 * Family history
 * Compatible with X-linked recessive inheritance
 * Creatine Phosphokinase (CK) concentration
 * Evaluated by blood test
 * Elevated serum CK concentration results from progressive elimination of dystrophic muscle fibers.
 * Can also result from strenuous exercise
 * CK concentration gradually decreases with advancing age due to the progressive elimination of these muscle fibers.
 * 100% of males with DMD have a serum CK concentration >10x normal
 * ~50% of female carriers have a concentration 2-10x normal
 * Some investigations have shown a wide variability in DMD carriers
 * Many have levels within the normal range, so other tests are necessary
 * CPK is not completely reliable
 * Muscle biopsy
 * Histology
 * Shows non-specific dystrophic changes
 * Western blot and immunohistochemistry
 * Dystrophin protein is often completely or almost completely absent
 * Clinical findings
 * Progressive symmetrical muscle weakness, proximal greater than distal
 * Symptoms before age 5 years
 * Wheelchair dependency before age 13 years
 * Molecular genetic testing
 * Deletions involving one or more exons of the DMD gene
 * ~65% of males with DMD have deletions
 * Most deletions occur in two hotspots clustered around the first 20 exons and around exons 45 to 55.
 * Testing is done by PCR or southern blot
 * Available on a clinical basis
 * Duplications of one or more exons of the DMD gene
 * ~6% of males with DMD have a duplication
 * Testing is done by southern blot or quantitative PCR
 * Available on a clinical basis
 * Other mutations in the DMD gene
 * ~30% of males with DMD have other mutations including small deletions or insertions, single base changes, or splicing mutations
 * Analysis is available on a research basis only
 * Carrier testing may be performed but requires quantitative analysis for gene dosage which can be difficult to perform and interpret
 * Prenatal testing is available

Clinical Description

 * Males
 * DMD usually presents in early childhood with delayed milestones
 * This included delays in sitting and standing
 * First symptoms are typically:
 * General motor delay
 * Gait problems including persistent toe-walking and flat-footedness
 * Delay in walking
 * Mean age of walking is about 18 months
 * Learning difficulties
 * Speech problems
 * Mean age of diagnosis without a family history is about 4 years
 * Range of diagnosis is 16 months to 8 years
 * DMD is rapidly progressive
 * Proximal weakness causes a waddling gait and difficulty climbing
 * Boys use the Gower maneuver to rise from a supine position, using the arms to supplement weak pelvic girdle muscles
 * The calf muscles are hypertrophic and firm to palpation
 * Occasionally there is calf pain
 * Affected children are wheelchair-bound by age 12
 * Mean age of death is 17 or 18 years of age
 * Cardiomyopathy
 * Incidence increases steadily in the teenage years
 * 1/3 of patients are affected by age 14
 * ½ by age 18
 * All patients are affected after age 18
 * Few affected males survive beyond the third decade
 * Respiratory complications and cardiomyopathy are common causes of death
 * Cognitive impairment
 * Some degree of nonprogressive impairment is common
 * Affects the verbal ability more than nonverbal performance
 * Phenotype correlates with the degree of expression of dystrophin
 * Expression is largely determine by the reading frame of the spliced message
 * Females
 * Occasionally have DMD clinical features as the result of X chromosome rearrangements involving the DMD locus (Xp21.2)
 * Carriers can have DMD because of Turner syndrome of nonrandom X chromosome inactivation
 * 76% of DMD carriers have no signs or symptoms
 * Management
 * There is no treatment for DMD
 * Prednisone therapy is controversial due to side effects
 * Some report improvement in strength and function which begins within 10 days and plateaus after 3 months
 * Long term benefit has not been demonstrated
 * Appropriate management can prolong survival and improve quality of life
 * Physical therapy to promote mobility
 * Range-of-motion exercises
 * Braces to delay the onset of contractures
 * Monitoring and surgical intervention for orthopedic complications
 * Scoliosis, kyphosis, or lordosis
 * Routine monitoring for evidence of cardiomyopathy
 * All carriers should have a complete cardiac evaluation at least once

Differential Diagnosis

 * Limb-girdle muscular dystrophy
 * A group of disorders clinically similar to DMD
 * Occurs in both sexes
 * Caused by mutations in genes that encode sarcoglycans and other proteins that interact with dystrophin
 * Emery-Dreifuss muscular dystrophy
 * Associated with limb contractures and cardiac arrhythmia
 * X-linked recessive, autosomal dominant, and autosomal recessive forms
 * Caused by mutations in the LMNA gene
 * Spinal muscular atrophy
 * Caused by mutations in the SMN gene
 * Characterized by:
 * Poor muscle tone
 * Symmetric muscle weakness that spares the face and ocular muscles
 * Evidence of anterior horn cell involvement
 * Includes fasciculations of the tongue and absence of deep tendon reflexes
 * Dilated cardiomyopathy
 * Can be sporadic or familial
 * No other phenotypes are associated with mutations in the DMD gene

Inheritance

 * X-linked recessive
 * Carrier females have a 50% chance of transmitting the DMD mutation in each pregnancy
 * With each pregnancy, a carrier has a 25% chance of having an affected child
 * Risk to family members
 * A woman with an affected son and one other affected relative in the maternal line is an obligate heterozygote
 * A woman with more than one affected son and no other family history can have:
 * A germline mutation
 * DMD disease-causing mutation present in every cell
 * Germline mosaicism
 * Mosaicism for a DMD disease-causing mutation which includes the germline
 * The frequency of germline mosaicism in DMD is estimated at 12% to 20%
 * If proband is only affected family member, must determine if mother and other females are carriers
 * The proband may have a de novo DMD disease-causing mutation
 * The mutation could have occurred in the egg at the time of conception
 * The mutation could have occurred after conception and therefore is present in some but not all cells of the proband's body.
 * The likelihood that the mother is a carrier is low
 * The proband's mother may have a de novo mutation
 * 2/3 of mothers of sporadically occurring males with DMD are carriers
 * Could have occurred if:
 * Mutation occurred in the egg or sperm at the time of her conception and is present in every cell of her body (germline mutation)
 * Mutation is present in some but not all cells of her body (somatic mosaicism)
 * Mutation is present only in her egg cells (germline mosaicism) and is not detected in a blood sample.
 * The proband's mother may have inherited a DMD mutation from her mother who is a carrier, her mother or father who has somatic mosaicism, or her mother or father who has germline mosaicism.

Risk Assessment

 * Sporadic versus inherited
 * If inherited, sister has 50% chance of being a carrier
 * Bayes analysis takes into account 3 unaffected male siblings
 * Sister has a 1/18 or 5.5% chance of being a carrier
 * 1/3 of cases are due to sporadic mutation

Ordering the test

 * Patient must sign consent form for DNA analysis
 * Use blue ink so it is obvious which is the original
 * Give the patient a copy
 * Put the original in the chart
 * Use special specimen processing request form
 * Make a copy for the chart
 * Give a copy to Lori Martineek at E352
 * Blood is drawn at Test Referral Center
 * Pt must have consent form, 2-ply specimen processing request form, and DNA analysis requisition
 * Tell pt to make sure her name is on the tube of blood
 * TRC will FedEx to Dr. Prior's lab
 * Contact Dr. Thomas W. Prior to inform him that you are sending the sample
 * Prior-1@medctr.osu.edu
 * Give him clinical history and lab report # from prior testing

Arrange for Follow-up

 * How do you want to receive the test results?
 * Results may take 2-3 weeks
 * We will only be able to give the results to the person tested, not to mother
 * Give potential risk figures if positive and emphasize that she can come back for more information at any time
 * Some people may wait for years until they are thinking of starting a family
 * Send a clinic letter after the results are back

Resources

 * Muscular Dystrophy Association
 * 800-572-1717
 * www.mdausa.org
 * Gale Encyclopedia of Medicine
 * Muscular Dystrophy by Richard Robinson (1999)
 * From the CHMC Health Reference Center


text:
Handbook of Genetic Counseling/Duchenne Muscular Dystrophy-2

Duchenne's Muscular Dystrophy

Medical hx

 * Have you ever had muscle weakness
 * Difficulty going up/down stairs?
 * Muscle cramps easily?
 * Ever had your heart monitored by EKG? Result?
 * Ever had a CPK test (blood test)
 * Ever had a muscle biopsy?
 * Muscle weakness?
 * Difficulty going up and down stairs?
 * Muscle cramps easily?
 * Ever had a heart EKG? Result?
 * Ever had a CPK test?
 * Ever had a muscle biopsy test?
 * Ever had a CPK test?
 * Ever had a muscle biopsy test?

Why we are talking about this stuff? DMD - the basics

 * What do you know about DMD?
 * Prevalence = 1/5600
 * Characteristics
 * Delays in motor milestones (sitting, standing, walking 20%)
 * Progressive symmetrical muscle weakness (proximal greater than distal)
 * Calf hypertrophy
 * Onset before age of 5 (dx age is usually 4 years 10 months)
 * Wheelchair dependency by 13
 * Serum CK levels are >10X the normal range
 * Cardiomyopathy 100% by age 18
 * Death by 30's by respiratory/cardiomyopathy
 * Cause
 * Change in a gene (DMD) Xp21.3-p21.2 that produces dystrophin, which is a protein in muscle cells, and neurons and holds them in the right place to do their functions. Without it, or with decreased levels of it, the muscle complex is not properly formed.
 * Based on family hx (assuming no other affected in upper generations), obligate carrier, germline mutation or germline mosaicism in Pam's mother
 * Inheritance - what it means for you!!!
 * X linked recessive
 * means that since her brothers were affected, we know that Pam has a 50% risk of being a carrier.
 * Means that if Pam is a carrier, Sarah has a 50% risk of being a carrier.
 * If Sarah is a carrier, she has a 50% chance of passing it on = an affected son or carrier daughter.

So, what do we do when we suspect a person has DMD/is a carrier? = Testing options

 * Ideally we would test an affected individuals (Pam's brothers)
 * Clinical exam
 * Family hx
 * CPK test
 * muscle biopsy
 * DNA test
 * 70% of males with DMD can be diagnosed by running PCR looking for deletions of the exons in the DMD gene. (will find 98% of the deletions identifiable by cDNA hybridization) - clinical
 * Small changes in the gene can only be found on research basis only.
 * Testing carriers
 * Serum creatine phosphokinase concentration levels
 * noninvasive blood test
 * CK is an enzyme that is present in muscle cells and helps to give our body energy. When muscle degeneration occurs, muscle cells burst open and the CK is released into the blood. So, the test looks at the blood serum (without cells) and measures the levels of CK present. the more there is, the more likely muscle is being broken down.
 * 50% of female DMD carriers are found to have 2-10 X normal levels
 * Normal range is 22-198 U/L (units per liter)
 * Hints: do not exercise 24 hours before the test.
 * Muscle biopsy
 * Invasive test of removing a piece of skeletal muscle.
 * Results of carriers will show a mosaic pattern of normal levels of dystrophin and non-normal levels.
 * Using linkage studies when affected individuals are willing to participate in testing. Linkage - If we had access to both boy's tissue blocks we could run an informative test.
 * Direct DNA testing
 * difficult technically because of the presence of two x chromosomes.
 * 600-700 dollars (billed to insurance)
 * We do testing at Baylor Medical Center
 * turn around time = 2-3 weeks (say about 4 weeks)
 * Prenatal testing
 * CVS/amniocentesis to determine the sex of the baby
 * if a boy, there is a 50% chance he is affected
 * If familial mutation is identified, they can determine the presence of the gene.
 * Muscle biopsy for fetus
 * VERY specialized - could not be done in Cincinnati

Questions to consider before testing

 * Why is this information important to you?
 * What will you do if the result is uninformative?
 * How will knowing you are a carrier affect you?
 * THIS IS AN OPTION!!! NOT A REQUIREMENT!!!
 * Have you considered how this may affect your reproductive decisions?
 * There are a variety of ways to be tested and different levels of complexity, invasiveness and accuracy.
 * DNA testing can bring up issues of paternity revelation
 * Consent
 * the test is >99% accurate but there may be error in the lab
 * We will be testing only for those mutations that are recognized as important based on family history
 * DNA may be used for research purposes.
 * How do you want your results given to you?

Important management for DMD carriers

 * Although 76% of carriers show no signs at all
 * 8% have a risk of dilated cardiomyopathy and should be worked up at least once if carrier status is suspected or proven
 * 19% left ventricle dilation.

Resources for parents

 * Muscular Dystrophy Association - USA
 * National headquarters
 * 3300 E. Sunset Drive
 * Tucson, AZ 85718
 * (800) 572-1717
 * http://www.mdausa.org

Other issues

 * preconceptional health
 * folic acid
 * CF


text: Template:Formal Logic/Recent Additions

title: Template:Formal Logic/Recent Additions


text:
Ada Programming/Containers

What follows is a simple demo of some of the container types. It does not cover everything, but should get you started.

First Example: Maps
The program below prints greetings to the world in a number of human languages. The greetings are stored in a table, or hashed map. The map associates every greeting (a value) with a language code (a key). That is, you can use language codes as keys to find greeting values in the table.

The elements in the map are constant strings of international characters, or really, pointers to such constant strings. A package Regional is used to set up both the language IDs and an instance of.

;  Ada.Containers; Regional Language_ID (DE, EL, EN, ES, FR, NL); Hello_Text   Wide_String; ID_Hashed (id: Language_ID) Hash_Type; Phrases  Ada.Containers.Hashed_Maps (Key_Type => Language_ID,      Element_Type => Hello_Text,       Hash => ID_Hashed,       Equivalent_Keys => "="); Regional;

Here is the program, details will be explained later.

Regional; Regional; ; Ada; Hello_World_Extended greetings: Phrases.Map; Phrases.Insert(greetings,                  Key => EN,                   New_Item =>  Wide_String'("Hello, World!")); greetings.Insert(DE, Wide_String'("Hallo, Welt!")); greetings.Insert(NL, Wide_String'("Hallo, Wereld!")); greetings.Insert(ES, Wide_String'("¡Hola mundo!")); greetings.Insert(FR, Wide_String'("Bonjour, Monde!")); greetings.Insert(EL, Wide_String'("Γεια σου κόσμε")); Phrases; speaker: Cursor := First(greetings); Has_Element(speaker) Wide_Text_IO.Put_Line( Element(speaker). ); Next(speaker); ;   ;  Hello_World_Extended;

The first of the Insert statements is written in an Ada 95 style:

Phrases.Insert(greetings,                 Key => EN,                  New_Item =>  Wide_String'("Hello, World!"));

The next insertions use so called distinguished receiver notation which you can use in Ada 2005. (It's O-O parlance. While the Insert call involves all of: a Container object (greetings), a Key object (EN), and a New_Item object ( Wide_String'("Hello, World!")), the Container object is distinguished from the others in that the Insert call provides it (and only it) with the other objects. In this case the Container object will be modified by the call, using arguments named Key and New_Item for the modification.)

greetings.Insert(ES, Wide_String'("¡Hola mundo!"));

After the table is set up, the program goes on to print all the greetings contained in the table. It does so employing a cursor that runs along the elements in the table in some order. The typical scheme is to obtain a cursor, here using First, and then to iterate the following calls:

 * 1) Has_Element, for checking whether the cursor is at an element
 * 2) Element, to get the element and
 * 3) Next, to move the cursor to another element

When there is no more element left, the cursor will have the special value No_Element. Actually, this is an iteration scheme that can be used with all containers in child packages of.

A slight variation: picking an element
The next program shows how to pick a value from the map, given a key. Actually, you will provide the key. The program is like the previous one, except that it doesn't just print all the elements in the map, but picks one based on a Language_ID value that it reads from standard input.

Regional; Regional; Ada.Wide_Text_IO; Ada; Hello_World_Pick ... as before ... Phrases; Lang_IO  Wide_Text_IO.Enumeration_IO(Language_ID); lang: Language_ID; Lang_IO.Get(lang); Wide_Text_IO.Put_Line( greetings.Element(lang). ); ; Hello_World_Pick;

This time the Element function consumes a Key (lang) not a Cursor. Actually, it consumes two values, the other value being <tt>greetings</tt>, in distinguished receiver notation.

Second Example: Vectors and Maps
Let's take bean counting literally. Red beans, green beans, and white beans. (Yes, white beans really do exist.) Your job will be to collect a number of beans, weigh them, and then determine the average weight of red, green, and white beans, respectively. Here is one approach.

Again, we need a package, this time for storing vegetable related information. Introducing the <tt>Beans</tt> package (the Grams type doesn't belong in a vegetable package, but it's there to keep things simple):

Beans Bean_Color R G W     Grams   001  7 Bean kind Bean_Color weight Grams Bean_Count Positive  1  1_000 Bean_Vecs  AdaContainersVectors Element_Type => Bean Index_Type => Bean_Count Beans

The <tt>Vectors</tt> instance offers a data structure similar to an array that can change its size at run time. It is called <tt>Vector</tt>. Each bean that is read will be appended to a <tt>Bean_Vecs.Vector</tt> object.

The following program first calls <tt>read_input</tt> to fill a buffer with beans. Next, it calls a function that computes the average weight of beans having the same color. This function:

Beans   Beans average_weight buffer Bean_VecsVector desired_color Bean_Color Grams

Then the average value is printed for beans of each color and the program stops.

Beans average_weight bean_counting Beans Ada buffer Bean_VecsVector read_inputbuf  Bean_VecsVector read_inputbuffer kind Bean_Color Wide_Text_IOPut_Line Bean_ColorWide_Imagekind " ø =" GramsWide_Image average_weightbuffer kind bean_counting

All container operations take place in function <tt>average_weight</tt>. To find the mean weight of beans of the same color, the function is looking at all beans in order. If a bean has the right color, <tt>average_weight</tt> adds its weight to the total weight, and increases the number of beans counted by 1.

The computation visits all beans. The iteration that is necessary for going from one bean to the next and then performing the above steps is best left to the <tt>Iterate</tt> procedure which is part of all container packages. To do so, wrap the above steps inside some procedure and pass this procedure to <tt>Iterate</tt>. The effect is that <tt>Iterate</tt> calls your procedure for each element in the vector, passing a cursor value to your procedure, one for each element.

Having the container machinery do the iteration can also be faster than moving and checking the cursor yourself, as was done in the <tt>Hello_World_Extended</tt> example.

Beans  BeansBean_Vecs average_weight buffer Bean_VecsVector desired_color Bean_Color Grams total Grams := 00 number Natural := 0 accumulatec Cursor Elementckind = desired_color number := number 1 total := total Elementcweight accumulate Iteratebuffer accumulateAccess number 0 total number 00 average_weight

This approach is straightforward. However, imagine larger vectors. <tt>average_weight</tt> will visit all elements repeatedly for each color. If there are M colors and N beans, <tt>average_weight</tt> will be called M * N times, and with each new color, N more calls are necessary. A possible alternative is to collect all information about a bean once it is visited. However, this will likely need more variables, and you will have to find a way to return more than one result (one average for each color), etc. Try it!

A different approach might be better. One is to copy beans of different colors to separate vector objects. (Remembering Cinderella.) Then <tt>average_weight</tt> must visit each element only one time. The following procedure does this, using a new type from <tt>Beans</tt>, called <tt>Bean_Pots</tt>.

...    Bean_Pots  Bean_Color  Bean_VecsVector ...

Note how this plain array associates colors with Vectors. The procedure for getting the beans into the right bowls uses the bean color as array index for finding the right bowl (vector).

gather_into_potsbuffer Bean_VecsVector pots  Bean_Pots Bean_Vecs put_into_right_potc Cursor AppendpotsElementckind Elementc put_into_right_pot Iteratebuffer put_into_right_potAccess gather_into_pots

Everything is in place now.

Beans average_weight gather_into_pots AdaWide_Text_IO bean_counting Beans Ada buffer Bean_VecsVector bowls Bean_Pots read_inputbuf  Bean_VecsVector read_inputbuffer gather_into_potsbuffer bowls color Bean_Color Wide_Text_IOPut_Line Bean_ColorWide_Imagecolor & " ø =" & GramsWide_Imageaverage_weightbowlscolor color bean_counting

As a side effect of having chosen one vector per color, we can determine the number of beans in each vector by calling the <tt>Length</tt> function. But <tt>average_weight</tt>, too, computes the number of elements in the vector. Hence, a summing function might replace <tt>average_weight</tt> here.

All In Just One Map!
The following program first calls <tt>read_input</tt> to fill a buffer with beans. Then, information about these beans is stored in a table, mapping bean properties to numbers of occurrence. The processing that starts at <tt>Iterate</tt> uses chained procedure calls typical of the iteration mechanism.

The Beans package in this example instantiates another generic library unit,. Where the require a hashing function, require a comparison function. We provide one, <tt>"<"</tt>, which sorts beans first by color, then by weight. It will automatically be associated with the corresponding generic formal function, as its name, <tt>"<"</tt>, matches that of the generic formal function, <tt>"<"</tt>.

...    "<"a b Bean  Boolean Bean_Statistics AdaContainersOrdered_Maps Element_Type => Natural Key_Type => Bean ...

Where the previous examples have ed subprograms, this variation on <tt>bean_counting</tt> packs them all as local subprograms.

Beans AdaWide_Text_IO bean_counting Beans Ada buffer Bean_VecsVector stats_cw Bean_StatisticsMap read_inputbuf  Bean_VecsVector add_bean_infospecimen Bean add_bean_infospecimen Bean one_moreb Bean n   Natural n := n 1 one_more c Bean_StatisticsCursor inserted Boolean stats_cwInsertspecimen 0 c inserted Bean_StatisticsUpdate_Elementc one_moreAccess add_bean_info read_inputbuffer Bean_Vecs count_beanc Cursor add_bean_infoElementc count_bean Iteratebuffer count_beanAccess Bean_Statistics q_sum Grams q_count Natural q_statslo hi Cursor q_statslo hi Cursor k Cursor := lo         q_count := 0 q_sum := 00 k = hi            q_count := q_count  Elementk q_sum := q_sum Keykweight  Elementk Nextk q_stats assert Is_Emptystats_cw "container is empty" lower upper Cursor := Firststats_cw Wide_Text_IOPut_Line"Summary:" color Bean_Color lower := upper color = Bean_ColorLast upper := No_Element upper := Ceilingstats_cw BeanBean_ColorSucccolor 00 q_statslower upper q_count 0 Wide_Text_IOPut_Line Bean_ColorWide_Imagecolor & " group:" & " ø =" & GramsWide_Imageq_sum  q_count & ", # =" & NaturalWide_Imageq_count & ", Σ =" & GramsWide_Imageq_sum bean_counting

Like in the greetings example, you can pick values from the table. This time the values tell the number of occurrences of beans with certain properties. The <tt>stats_cw</tt> table is ordered by key, that is by bean properties. Given particular properties, you can use the <tt>Floor</tt> and <tt>Ceiling</tt> functions to approximate the bean in the table that most closely matches the desired properties.

It is now easy to print a histogram showing the frequency with which each kind of bean has occurred. If N is the number of beans of a kind, then print N characters on a line, or draw a graphical bar of length N, etc. A histogram showing the number of beans per color can be drawn after computing the sum of beans of this color, using groups like in the previous example. You can delete beans of a color from the table using the same technique.

Finally, think of marshalling the beans in order starting at the least frequently occurring kind. That is, construct a vector appending first beans that have occurred just once, followed by beans that have occurred twice, if any, and so on. Starting from the table is possible, but be sure to have a look at the sorting functions of.

Wikibook

 * Ada Programming
 * Ada Programming/Libraries/Ada.Containers

Ada 2005 Reference Manual

|Containers

title: Ada Programming/Containers


text: User talk:4.38.52.26

title: User talk:4.38.52.26


text:
User talk:87.248.167.247

Please stop adding nonsense to Wikibooks. It is considered vandalism. If you would like to experiment, use the sandbox. Thank you.

title: User talk:87.248.167.247


text:
Italian/Introduction/Italian culture

Range
Italian, a romance language, is spoken mainly in Italy, where it is the main official language. It is also official language in the Republic of San Marino, and the Ticino canton of Switzerland. It is also the second official language of Vatican City, after Latin. It is also spoken by some minorities in Slovenia and coastal Croatia.

Languages and dialects
Italian language is characterized by its numerous varieties. There is at least one dialect for each region, named after the region or the main town of the region. Even when speaking Italian, most Italians have a regional accent. It is actually normal to hear many different ways of saying the same phrase while merely moving through Italy from region to region.

Italian dialects are actually very different from standard Italian, and hardly understandable even by Italians from other regions of Italy. Many of these dialects are considered to be languages in English but the Italian government recognises only one official Romance language: Italian. An exception is Tuscany, the motherland of Italian. The Tuscan dialect is very similar to Italian, so that all Italians can understand it.

Italian dialects must not be confused with all the recognized minority languages, including Sardo (Sardu) in Sardinia, German in Trentino-Südtirol and Friulano and Slovene in Friuli-Venezia Giulia.

History
Standard Italian is a literary language, originated as the vulgar written language of Tuscany in XII century. It became a national literary language thanks to the great literary works of Francis of Assisi, Dante, Petrarca, Boccaccio, and others.

For centuries, it was used only for written texts and operas. Even theater plays were in dialect.

When Italy became a united nation, in 1861, Italian was chosen as the official language, but only 4% of the population was able to speak it.

The diffusion of Italian among the population was caused first by the national military conscription, then by internal migrations, and at last by cinema and television. Actually, the most standard Italian is the one used to dub foreign films.

Until World War II, internal migrations were mainly from the countryside to the big towns, and in particular toward Rome. Therefore, in big towns the common language became a mix of the languages of surrounding regions.

After World War II, internal migrations were mainly from the impoverished south to the industrialized north, mainly Turin and Milan. Therefore, Turin and Milan became the Italian towns where the Italian language is spoken more, as it is the only common language among the various people living there, while in other towns and in the countryside dialects were used more than Italian until few years ago.

Nowadays, the fact that young Italians are exposed more to cinema and television than to their parents speeches is causing a fading out of dialects.

Features
Most Italian names come from the singular Latin ablative case; for example, the Italian for "wolf" is "lupo", ablative case of "lupus". Also the names of ancient Romans come from their Latin ablative case; for example, the Italian for emperor "Nero" is "Nerone".

Almost all Italian words longer than three letters end with a letter "a", "e", "i", or "o".

In every Italian word, except the very long ones, exactly one syllable is stressed; it may be the last, the last but one, that is the most common case, the last but two, or, in very rare cases, the last but four. Every time a word with two or more syllables has the last syllable stressed, the last letter is marked by an accent, in written Italian. There are six possible accented letters: "à", "è", "é", "ì", "ò", "ù". Notice that the "e" letter may has two kinds of accents, named "grave" (or "open") and "acute" (or "closed"). Sometimes to disambiguate pronunciation and meaning, accents are used also for inner letters of a word; for example, "légami" (that means "tie me") and "legàmi" (that means "links", "bonds") have different stress and consequently different meaning. Accents on monosyllabic words are used to distinguish words; for example "e" (that means "and") from "è" (that means "is"), or "la" (that means "the" for singular feminine names) from "là" (that means "over there").

Some cities, regions, and countries
The list below shows just a few places (regions, cities, and countries) whose name differs between English and Italian:

 * Italia: Italy
 * Toscana: Tuscany
 * Piemonte: Piedmont
 * Lombardia: Lombardy
 * Lazio: Latium
 * Puglia: Apulia
 * Sardegna: Sardinia
 * Sicilia: Sicily
 * Roma: Rome
 * Milano: Milan
 * Torino: Turin
 * Firenze: Florence
 * Genova: Genoa
 * Napoli: Naples
 * Siracusa: Syracuse
 * Padova: Padua
 * Venezia: Venice

 * Londra: London
 * Dublino: Dublin
 * Parigi: Paris
 * Mosca: Moscow
 * Praga: Prague
 * Svizzera: Switzerland
 * Stati Uniti d'America: United States of America
 * Gran Bretagna: Great Britain
 * Inghilterra: England
 * Irlanda: Ireland
 * Scozia: Scotland
 * Galles: Wales
 * Germania: Germany
 * Francia: France
 * Monaco (di Baviera): Munich / München

Holidays in Italy
Italià/Cultura italiana Italiano/Cultura italiana

title: Italian/Introduction/Italian culture


text:
User talk:Artur Nowak

Copyright problem with Image:6 ic send from stacked.gif
--Derbeth talk 23:51, 22 November 2005 (UTC)

Images
As you can see at the top of this page, "All unlicensed images uploaded to wikibooks before November 1, 2006 will soon be deleted." You have uploaded images and some of them are untagged. You can see them Nowak&grouped= here. Please review them and add appropriate tags. If you have any questions, feel free to ask me. --Think Fast 04:34, 13 November 2006 (UTC)

Good job on Reaktor
Well done updating the Reaktor book to current naming convention and adding the torrents of content in recent days. --Swift 10:12, 21 November 2006 (UTC)

title: User talk:Artur Nowak


text:
Italian/Lessons/Lesson2

Dialogues
Languages need verbs and people need to communicate. Every language needs action words and "state of being" words. They tell us what is going on. Sometimes we just need more information, too. In this lesson you will learn the formation of questions and several verbs (with conjugations) plus a few more useful phrases.

Dialogue one / Dialogo uno
The setting: Paola and Marco are having breakfast at a bar.

 *  Paola : Salve, vorrei un cornetto e un cappuccino, per favore.
 *  Marco : Per me invece un espresso, grazie.
 *  Barman : Volete altro?
 *  Marco : No, grazie.
 *  Paola : Quanto viene?
 *  Barman : Sono 3 euro e 10.

Dialogue two / Dialogo due
The setting: Daniele asks for directions to the Leaning Tower in Pisa.

 *  Daniele : Scusi, dove devo andare per arrivare alla Torre Pendente?
 *  Helper : Allora, vada sempre diritto, poi giri a destra.
 *  Daniele : Grazie.
 *  Helper : Si figuri.

How to formulate a sentence in Italian
There is not a rigid schema to follow for formulating sentences in Italian. There is actually no difference between questions, answers and affirmations, except for the different spoken pronunciation of questions (indicated by the "?" symbol), but it does not differ particularly from English.

What is different, and often hard to understand, however, is the possible absence of the subject. In these cases, the subject is said to be implied ("sottinteso" in Italian) and is usually understandable by the different form of the verb, that is directly associated to the subject itself. See the auxiliary verbs below for a real example, and keep them in mind, because they are used more often than you would think.

Auxiliary verbs (present form)
The auxiliary verbs are two, essere (to be) and avere (to have). They are both irregular ones, and are used for both their actual meaning and for construction of all other non-auxiliary verbs in forms other than the present. Note that the pronouns egli, ella and essi are rarely used in spoken Italian nowadays. Also note that the formal singular you is spelt Lei, with a capital L to differentiate it from lei used for 'she'.

Interrogative form
Form 1 (with phrase inversion)

Form 2 (without phrase inversion)

Some Important Verbs
Verbs are actually the kernel of a language; without them, it would be impossible to build relevant phrases and talk to a native speaker. Italian has two auxiliary verbs, essere (to be) and avere (to have). In addition to that, the language permits also the use of a number of verbi servili (modal verbs), some auxiliary verbs that may be used in particular cases, and need to be accomplished with another verb in order to have an actual meaning. These verbs are dovere (to have to), potere (to be able), and volere (to want).

Other verbs seen before are:
 * andare (to go)
 * venire (to come)
 * arrivare (to arrive)
 * girare (to turn)
 * stare (to stay, to stand)
 * vedere (to see)
 * chiamare (to call)
 * sapere (to know (an information))
 * conoscere (to know (a person or a place))

About how to conjugate these verbs, you should take a look at the dedicated section; of course, there are some verbs which do not fit on these rules: they are called verbi irregolari (irregular verbs). Andare, venire and sapere, for example, are irregular verbs.

See also
 * Italian/Vocabulary/Basic Words and Phrases
 * Italian/Vocabulary/Common phrases

Italià/Lliçó2 Italiano/Lección2

title: Italian/Lessons/Lesson2


text:
Java Programming/Compilation

In Java, programs are not compiled into executable files; they are compiled into bytecode (as discussed earlier), which the JVM (Java Virtual Machine) then executes at runtime. Java source code is compiled into bytecode when we use the  compiler. The bytecode gets saved on the disk with the file extension. When the program is to be run, the bytecode is converted, using the just-in-time (JIT) compiler. The result is machine code which is then fed to the memory and is executed.

Java code needs to be compiled twice in order to be executed:
 * 1) Java programs need to be compiled to bytecode.
 * 2) When the bytecode is run, it needs to be converted to machine code.

The Java classes/bytecode are compiled to machine code and loaded into memory by the JVM when needed the first time. This is different from other languages like C/C++ where programs are to be compiled to machine code and linked to create an executable file before it can be executed.

Quick compilation procedure
To execute your first Java program, follow the instructions below:

 * Ask for help if the program did not execute properly in the Discussion page for this chapter.

Automatic Compilation of Dependent Classes
In Java, if you have used any reference to any other java object, then the class for that object will be automatically compiled, if that was not compiled already. These automatic compilations are nested, and this continues until all classes are compiled that are needed to run the program. So it is usually enough to compile only the high level class, since all the dependent classes will be automatically compiled.

However, you can't rely on this feature if your program is using reflection to create objects, or you are compiling for servlets or for a "jar", package. In these cases you should list these classes for explicit compilation.

Packages, Subdirectories, and Resources
Each Java top level class belongs to a package (covered in the chapter about Packages). This may be declared in a  statement at the beginning of the file; if that is missing, the class belongs to the unnamed package.

For compilation, the file must be in the right directory structure. A file containing a class in the unnamed package must be in the current/root directory; if the class belongs to a package, it must be in a directory with the same name as the package.

The convention is that package names and directory names corresponding to the package consist of only lower case letters.

Top level package
A class with this package declaration

has to be in a directory named.

Subpackages
A class with this package declaration

has to be in a directory named  which has to be a sub-directory of   which in turn has to be a sub-directory of   resulting in   on Linux or   on Windows.

Java programs often contain non-code files such as images and properties files. These are referred to generally as resources and stored in directories local to the classes in which they're used. For example, if the class  uses the   file, this file could be stored as. These resources present a problem when a program is compiled, because  does not copy them to wherever the   files are being compiled to (see above); it is up to the programmer to move the resource files and directories.

Filename Case
The Java source file name must be the same as the public class name that the file contains. There can be only one public class defined per file. The Java class name is case sensitive, as is the source file name.

The naming convention for the class name is for it to start with a capital letter.

Debugging and Symbolic Information
To debug into Java system classes such as String and ArrayList, you need a special version of the JRE which is compiled with "debug information". The JRE included inside the JDK provides this info, but the regular JRE does not. Regular JRE does not include this info to ensure better performance.

Modern compilers do a pretty good job converting your high-level code, with its nicely indented and nested control structures and arbitrarily typed variables into a big pile of bits called machine code (or bytecode in case of Java), the sole purpose of which is to run as fast as possible on the target CPU (virtual CPU of your JVM). Java code gets converted into several machine code instructions. Variables are shoved all over the place – into the stack, into registers, or completely optimized away. Structures and objects don’t even exist in the resulting code – they’re merely an abstraction that gets translated to hard-coded offsets into memory buffers.

So how does a debugger know where to stop when you ask it to break at the entry to some function? How does it manage to find what to show you when you ask it for the value of a variable? The answer is – debugging information.

Debugging information is generated by the compiler together with the machine code. It is a representation of the relationship between the executable program and the original source code. This information is encoded into a pre-defined format and stored alongside the machine code. Many such formats were invented over the years for different platforms and executable files.

Symbolic Information : Symbolic resolution is done at class loading time at linking resolution step. It is the process of replacing symbolic references from the type with direct references. It is done by searching into method area to locate the referenced entity

The JIT compiler
The Just-In-Time (JIT) compiler is the compiler that converts the byte-code to machine code. It compiles byte-code once and the compiled machine code is re-used again and again, to speed up execution. Early Java compilers compiled the byte-code to machine code each time it was used, but more modern compilers cache this machine code for reuse on the machine. Even then, java's JIT compiling was still faster than an "interpreter-language", where code is compiled from high level language, instead of from byte-code each time it was used.

The standard JIT compiler runs on demand. When a method is called repeatedly, the JIT compiler analyzes the bytecode and produces highly efficient machine code, which runs very fast. The JIT compiler is smart enough to recognize when the code has already been compiled, so as the application runs, compilation happens only as needed. As Java applications run, they tend to become faster and faster, because the JIT can perform runtime profiling and optimization to the code to meet the execution environment. Methods or code blocks which do not run often receive less optimization; those which run often (so called hotspots) receive more profiling and optimization.

title: Java Programming/Compilation


text:
Maple/Getting Started

Before You Begin
All the commands given to Maple are in the areas marked with >. These are the input areas. Press enter to execute the command.

> sample code;

The lines of code must end with either a semicolon or a colon. Note the difference between them:

> p - ln( p ); $$p-\ln \left( p \right) $$

> p - ln (p ):

If the line of code ends with a semicolon, the order is validated and the software displays the answer in the output area. If the line of code ends with a colon, the order is validated, but the answer is not displayed.

Simple computations with Maple
> (1-1/7)*(1+2/3)^2; $${\frac {50}{21}}$$ > (25)^(1/2); $$5\,$$ > factorial(15); $$1307674368000\,$$ > 15!; $$1307674368000\,$$  > sqrt(81); $$9\,$$ > sqrt(56.81); $$7.537240874\,$$ > %^2; $$56.81\,$$

Using variables with Maple
Like any other programming language, Maple allows us to assign values to named variables. This often makes programs more readable and it allows us to save results for use later in the calculation. Here, 2.14 is assigned to the variable p. We can then compute $$p-\ln \left( p \right) $$ so that p is evaluated (replaced by)  2.14: > p:=2.14; $$p:=2.14\,$$ > p - ln(p); $$1.379194171\,$$ You can also use more than one variable in a single expression: > x := 2*a-p; $$x:=2\,a- 2.14$$ > x-sqrt(a*p); $$2\,a- 2.14- 1.462873884\,\sqrt {a}$$ > expr := a*x^2 + b*x + c = 0; $$expr:={a{x}} ^{2}+bx+c=0\,$$

Commands to manipulate expressions in Maple
Maple has a wide range of commands to help you manipulate expressions: > f := (a+b)^6; $$f:=\left (a+b\right )^{6}$$ > expand(f); $${a}^{6}+6\,{a}^{5}b+15\,{a}^{4}{b}^{2}+20\,{a}^{3}{b}^{3}+15\,{a}^{2}{b}^{4}+6\,a{b}^{5}+{b}^{6}$$ > factor(%); $$\left (a+b\right )^{6}$$ > %%; $${a}^{6}+6\,{a}^{5}b+15\,{a}^{4}{b}^{2}+20\,{a}^{3}{b}^{3}+15\,{a}^{2}{b}^{4}+6\,a{b}^{5}+{b}^{6}$$ > sin(x)^2+cos(x)^2; $$\left (\sin(x)\right )^{2}+\left (\cos(x)\right )^{2}$$ > simplify(%); $$1\,$$ Here, the % symbol recalls the last computation made by Maple. %% means you recalls the computation made two steps back. %%% will recall the answer to the computation make three steps back. If you wish to recall answers father back, you will have to have assigned them to a variable.

You can also substitute values for the variables in an expression with the commands subs and two-argument eval: > subs( x=2, x^2+x+1 ); $$7\,$$ > eval( x^2+x+1,x=2 ); $$7\,$$ The command subs makes syntactic substitution, > subs( y=0, sin(y) ); $$\sin(0)\,$$ while eval performs substitution followed by evaluation > eval( sin(y), y=0 ); $$0\,$$ > eval(f, a=c); $$\left (c+b\right )^{6}$$ > eval(f, [a=2, b=4/5]); $$\frac{7529536}{15625}$$

The command subs substitutes bound (dummy) variables while eval does not:

> subs(x=u,int(f(x),x=0..1) ); $$\int _{0}^{1}\!f \left( u \right) {du}$$

> eval(int(f(x),x=0..1),x=u );

$$\int _{0}^{1}\!f \left( x \right) {dx} $$ The command eval does simultaneous substitution while the command subs does sequential substitution:

> subs( x=y, y=x, [x,y] ); $$[x, x]\, $$

> eval([x,y], {x=y, y=x}); $$[y, x] \,$$

The following are equivalent:

Simultaneous substitution > subs( [x=y, y=x], [x,y] ); $$[y, x]\, $$

> eval([x,y], {x=y, y=x}); $$[y, x] \,$$

and

Sequential substitution > subs( x=y, y=x, [x,y] ); $$[x, x] \,$$

> eval(eval([x,y], x=y), y=x); $$[x, x] \,$$

The command evalf calculates a floating point (numeric) approximation of an expression. You may also specify the desired precision. > evalf(sqrt(3)); $$1.732050808\,$$ > evalf(sqrt(3), 50); $$1.7320508075688772935274463415058723669428052538104\,$$ > evalf[50](sqrt(3)); $$1.7320508075688772935274463415058723669428052538104\,$$

print, lprint and printf are commands used to display a mathematical expression. print displays the expression using the current pretty-printing method. lprint displays the expression in 1D format (no pretty-printing), as one would type as input to Maple. printf is the same function used in C or C++ language, where you can display variables using formats: %d represents an integer variable, %f a floating number and \n breaks a line of text: > f:=a-3/a+1/(a*a+1); $$f:=a-\frac{3}{a}+\frac{1}{{a}^{2}+1}$$ > print(f); $$a-\frac{3}{a}+\frac{1}{{a}^{2}+1}$$ > lprint(f); a-3/a+1/(a^2+1) > printf("%d %f \n",123,1234/567); 123 2.176367

Defining a function with Maple
The simplest form to define a function uses the arrow (map) operator ->

> f := t -> sin(t) - t; $$f:=t\rightarrow \sin(t)-t$$ > f(3*x + 2); $$\sin(3\,x+2)-3\,x-2$$

Note:

> f := x->2*x+2;

defines f as a function, i.e.

> f(u);

$$2u+2\,$$

> f(x):=2*x+2;

defines f as a procedure with a "remember table" that is assigned only for the argument x'':

> f(u);

$$\mathrm{f}(u)\,$$

and

> f(x)=2*x+2; is an equation.

Calculus with Maple
Derivatives of expressions can be taken with the diff command: > diff(f(t), t); Multiple partial derivatives can be given as a list. To take the derivative of g with respect to u then v: > diff(g(u,v,w), [u,v]);

Maple can also take the derivative of functions using the D operator > D(f); If a function has more than one variable, the variable can be specified as an index: > D[1](g);

Notice the difference between diff and D: diff operates on an expression, and returns an expression while D operates on a function and returns another function.

Maple can be used to find a primitive, indefinite integral or anti-derivative of an expression. For example, to get indefinite integrals of the function f(t) according to t and the function g(u,v,w) according to v, the following commands can be entered: > Int(f(t), t) = int(f(t), t); $$\int \left(\sin(t)-t\right)\,dt=-\cos(t)-\frac{1}{2}\,{t}^{2}$$ > Int(g(u,v,w), v) = int(g(u,v,w), v); $$\int \left( \frac{1}{u}+e^{u+v}+(u-v+w)^{2}\right)\,{dv}=\frac{v}{u}+ {e^{u+v}}-\frac{1}{3}(u-v+w)^{3}$$

Note the difference between the commands Int and int. The former is the inert form, it just displays the integral. The latter is the active form and computes its value.

Maple can also compute definite integrals: > Int(f(t),t=0..Pi)=int(f(t),t=0..Pi); $$\int^{\pi}_{0}\left(\sin(t)-t\right)\,dt=2-\frac{1}{2}\pi^2$$ To evalue an inert integral, one can use the command value: > value(Int(f(t), t)); $$-\cos(t)-\frac{1}{2}\,{t}^{2}$$ The other use of this inert form is the numerical approximation of definite integrals: > evalf(Int(f(t),t=0..Pi)); $$1.57079633$$ This should give the same answer as evalf(int(f(t), t=0..Pi)) but it is computed differently. When the inert form of the integral is used Maple computes an approximation of the area under the curve using the definition of definite integration. When then int form is used, and exact value for the definite integral is computed, and then that value is numerically approximated. Using the inert form to compute the approximation directly can be much faster for large problems.

Limits, sums and products with Maple
You can also find numeric and symbolic values of sums, limits and products using respectively the functions sum, limit and product: > limit((2*t-3)/(3*t+4),t=infinity); $$\frac{2}{3}$$ > limit((2*t-3)/(3*t+4),t=-4/3,right); #right-bound of the limit $$-\infty$$ > Sum(i^2,i=1..10)=sum(i^2,i=1..10); $$\sum_{i=1}^{10}i^2=385$$ > Product(1/i,i=1..10)=product(1/i,i=1..10); $$\prod_{i=1}^{10}\frac{1}{i}=\frac{1}{3628800}$$ The commands Sum and Product are inert, they do not actually compute the sum or the product.

Solving equations with Maple
The solve(eqn,x) function tries to find the value of x in eqn. You can also use more variables or more equations using ''solve({eqn1,eqn2,...},{x,y,...}): > solve(2*t+3=-t+6*sqrt(2)); $$-1+2\sqrt{2}$$ > solve(t-15/4*u=5/2*(u-t)+3,u); $$\frac{14}{25}t-{12}{25}$$ > solve({a-b=2,a+3*b=7},{a,b}); $$\left\{a=\frac{13}{4},b=\frac{5}{4}\right\}$$ Sometimes, the exact solution of an equation might not be found. You can then use the fsolve to get a numerical approximation: > fsolve(cos(t)=t); $$0.7390851332$$ > fsolve({t^3+u=1,u-(t-1)^3=t},{t,u}); $$\{t=0.6941457205, u=0.6655340191\}$$

Giving names to solutions
The solution can be stored in a variable, as any other expression > solution := solve({a-b = x, a+b = 1/x}, {a, b}); $$ solution := \left\{ b = -\frac{1}{2} \frac{x^2-1}{x}, ~a = \frac {1}{2} \frac {x^2+1}{x} \right\} $$ In the example, variable solution is assigned value, than can be used in following calculations. Sometimes, it worth to keep parts of the solution in independent variables. It can be done with appropriate substitution. For the ability to reproduce each step of calculus, it is better not to replace variables (a,b) used to write the original equaitons, but create the new names, for example, ''solutiona" and "solutionb": > solutiona := eval(a, solution) $$ solutiona := \frac {1}{2} \frac {x^2+1}{x} $$ > solutionb := eval(b, solution) $$ solutionb := -\frac{1}{2} \frac{x^2-1}{x} $$ Then, these expressions can be accessed through their identifiers in some plots or future calculation.

Plotting functions with Maple
To plot a function f(x), use the command plot(f(x),x): > plot(sin(t)/t,t=-20..20,title="function t ---> sin t / t"); > plot3d(x*exp(-x^2-y^2),x=-2..2,y=-2..2,color=x,orientation=[120,75]);

title: Maple/Getting Started


text:
Cookbook talk:International Food Terms

Is it reasonable to add a Canadian English column to this table, seeing as there is an Australian one? Like Australian English, it borrows terms from British and American English, so some of the American or British terms aren't understood when reading a recipe in Canada.Webber b 02:29, 23 November 2005 (UTC)

title: Cookbook talk:International Food Terms


text:
User:Jesushaces~enwikibooks

Hello

title: User:Jesushaces~enwikibooks