text:
Analytical Forensic Pharmacology/Introduction

Forensic pharmacology and toxicology, it is seen throughout pop culture in shows such as CSI, Law and Order SVU, Forensic Files, Quincey, Six Feet Under and more. The success of this entertainment genre may be a recent phenomenon, but the history of this science can be dated back to ancient times.

While the techniques practiced today by analytical chemists and forensic scientists are based on a modern understanding of our world, the basis for forensic investigation is anything but modern. In the ancient world, one of the most feared crimes (and most difficult to solve) was poisoning. Around 330B.C. the Romans had publicly forced many individuals accused of poisoning their spouses to eat and drink their own concoctions. (Bell 2) Today’s term forensic is tied to these proceedings. The Latin word forum, where the business and legal proceedings took place. In both business and law, it was hoped that all parties would always tell the truth.

For most people, they may be aware of drug testing as part of employee screening. To others, they may know of it just from television. However, this is where the knowledge of those tests ends. To average-Joe sixpack, it may seem as foreign to him as the ancient civilizations that started our understanding of science. The processes involved in these tests may go unknown to many, but the methods in which drugs can be tested are numerous and diverse. This paper will address the various methods that exist for the screening of drugs of abuse in both for the purposes of drug screening and forensic analysis.

=Concepts for Analytical and Forensic Analysis=

Before jumping into the types of tests which may be at the arsenal of investigators, it is important to understand the general idea of how tests should be conducted for investigational research. The array of tests performed on evidence can be thought of like a funnel. (FIGURE-1)  To identify drugs, various testing can be conducted so that the possibilities of drugs is narrowed until a drug is identified. The methods for complex analysis are determined based on the results of initial tests often based on straightforward color

For the purpose of efficacy, all substances must be treated as a general unknowns, even if a researcher has a general idea as to what the substance might be. For the earliest of these tests, or presumptive tests, the scientific analysis may be simpler than one would expect.

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


text:
Analytical Forensic Pharmacology/Visual Observation

Visual observation on the part of scientific investigators is the first step in the analysis of drugs. Visual analysis of drugs includes observed color, crystal structure and all supporting evidence which links drugs to the scene of a crime. Accurate visual evidence can eliminate the possibility of certain drugs (and the associated cost to labs). If a green substance thought to be drugs is brought into the lab, there would be little point in investigating for cocaine or heroin in the initial test.

Table INSERT - Identification of drugs based on visual observation.

Visual observation of drugs can also be supplemented by manuals such as the PDR and the Drug Enforcement Agency’s (DEA) guide to logo identification. LSD, methamphetamine and 3,4-methylenedioxymethamphetamine (MDMA, ecstacy) are often marketed emblazoned with logos or cartoons. By comparing images and logos of recently obtained unknowns with an index of seized drugs (such as the one found at http://www.ecstasydata.org/) a presumptive judgement can be made as to where the type of pill came from, the active ingredients and what adulterants are likely to be found in the pill.


text:
Analytical Forensic Pharmacology/Microscopic Observation

The visual analysis of unknown substances including drugs may be further analyzed by microscopy. The microscope has gone hand in hand with forensics ever since the time of the fictional Sherlock Holmes. Today the microscope made familiar by Sherlock Holmes takes many different forms and they may be optical or electromagnetic.

=Compound Optical Microscope= The most common form of the microscope is still the optical compound type that mostly everyone is familiar with.

Forensic scientists still use optical compound microscopes for analysis of substances, yet other technologies exist as well, – electron microscope (scanning and/or tunneling), phase contrast, and microscopes with polarimeter filters which can be utilized to observe certain frequencies of light.

One of the simplest uses of visual observation for the detection of materials of forensic interest is in the analysis of the marijuana leaf. Marijuana leaves exhibit bear claw shapes called cystolithic hairs on the dorsal leaf surface.(Bell 304)(Figure-2) This visual observation is specific enough to narrow down the genera of the marijuana plant, but not specific enough to tell whether or not it is Cannibus sativa with a high level of the active ingredient Δ9-THC.

=Fluorescent Microscopy= Fluorescent microscopy is most commonly used in a series of assays known as immunocytochemistry which will be discussed later on page 21. However, Fluorescent Microscopy is also useful in the identification of LSD. LSD when isolated can be detected in 1ppm by fluorescence. Using filters specific for certain wavelengths, forensic scientist can look for light at the 400 nm wavelength which is indicative of LSD presence. (Fanga et al, 2002)

=Scanning Electron Microscopy=

Scanning electron microscopy (SEM) can be used to obtain the same results found with phase contrast microscopes. However it is more often used in the presumptive analyses associated with the identification of unique crystal structures. SEM is often paired with other technologies such as x-ray crystallography sources. The most modern techniques of this type work use the SEM and energy-dispersive X-ray analysis (EDXRA) to allow the microscope analyze components of samples.


text:
Analytical Forensic Pharmacology/UV-VIS Spectroscopy

Spectroscopy is an extension of microscopy which in itself encompasses the microscopy that was previous discussed. In short, spectroscopy is the use of electromagnetic energy to study matter and to interpret results. Microscopy can be viewed as spectroscopy of the visible portions of light where as spectroscopy is said to encompass the entirety of the electromagnetic spectrum. Spectroscopy is useful since only a very small quantity of sample is needed for analysis. In addition, samples may be reused after analysis with IR, NMR or UV spectroscopy.

=Absorbance Spectroscopy – UV/VIS spectrophotometry= One of the simplest types of spectroscopy is UV/VIS spectrophotometry. This paper has already mentioned how color can be used to analyze an unknown for preliminary tests. UV/VIS Spectrophotometry takes this principle and applies the principles of electromagnetic absorption of energy to it. Chemical structures can absorb energy and reflect energy. In most cases related to forensic pharmacology, color is due to the absorption of light by conjugated pi systems of two nearby elements of a molecule (in other substances such as metals, color is due to unique absorption that is characteristic of that the element(s) present).

A spectrophotometer takes the absorption information of a substance diluted into a liquid sample in order to obtain an output of absorption using Beers’ Law.

In Spectrophotometry Cell length is controlled for. The Coefficient and Concentration for unknowns is not usually known in forensic analysis, therefore this method is not utilized often for dealing with unknowns.

Although this method is more precise than the visual analysis of color, it is used far less in presumptive tests. The reasons for this are primarily due to the similarities in many UV/VIS spectra and the need to have a pure analyte for analysis.


text:
Analytical Forensic Pharmacology/Glossary of Terms

Aldehyde-Group of organic compounds that contains the group –CHO.

Alkaloid-A naturally-occurring amine produced by a plant

Amine-Organic compound with nitrogen as a key element and is structurally similar to ammonia.

amu–abbreviation for atomic mass

Analyte-A substance being tested for analysis

Assay-A scientific test.

Chromophore-A grouping of that causes coloration. Chromophores are generally groups of atoms that have dissociated or conjugated electrons.

Formaldehyde-The Simplest aldehyde. Chemical structure – HCHO. Also called methanal.

FTIR-Abbreviation for Fourrier Transform Infrared Spectroscopy

GC-Abbreviation for Gas Chromatography

Provenance-The origin from of something. For forensic science. In forensic drug analysis, this includes the area where a drug could be grown / made and the chemicals used for its preparation.

Quantitative Property-A characteristic of a substance that exists in a range of magnitudes, and can therefore be measured. Measurements of any particular quantitative property are expressed as a specific quantity, referred to as a unit, multiplied by a number. Examples of physical quantities are distance, mass, and time.

Racemic-Equal mixture of optical isomers Spectra-A reading or printout from a spectrometer.

Spot Test-Forensic Chemistry Term for a presumptive test that changes color. TLC-Abbreviation for Thin Layer Chromatography


text:
Analytical Forensic Pharmacology/Polarimetry

Polarimetry is very useful in the analysis of drugs of abuse. Illicit drugs such as methamphetamine can be prepared in a variety of ways (As will be discussed later in Appendix I). Different steps in the synthesis of drugs often lead to structural differences known as enantiomers. In enantiomers, structures are said to be chiral. These structures may have the same molecular mass and an identical number of the same particles but they are put together in mirror images – much like a person’s left and right hand. The key to chirality is that structures that are enantiomers cannot be superimposed. (note - that in the example still using your hand, it is easy to think that hands can be superimposed by placing each hand palm to palm. However if you are looking at each hand from the same perspective with both palms and fingers oriented in the same direction, the thumbs will point in different directions.  The same is true for organic molecules).

Polarimetry is one way to designate between these mirror images. Each chiral structure rotates light in one way or the other. To identify whether a compound rotates light one way or another it can be placed in a diffraction grid matrix assembly (Figure 4) which can be set up to measure optical rotation. Polarimeters can be purchased commercially, and these analyses can be conducted quite simply. However the assembly of instrumentation that measures optical rotation is also quite simple and the section that follows will make it easier to understand the processes involved in polarimetry based on the construction of a polarimeter.

The two main parts of a polarimeter are a light source with a single wavelength and a diffraction grating. If using regular light as your source, a light polarizer is also needed. For this simple experiment however a helium-neon laser was utilized as the monochromatic light source with a wavelength of 632.8 nm.

When light would pass through the diffraction grating, a pattern like that seen in Figure 4 is observed.

In a diffraction grid matrix like the one seen on the left, the points of light are marked on a piece of graph paper on which the laser is projecting for calibration.

By knowing these properties of light, the angles of the original set up, and the original position of light it can be calculated how much any object placed in the path of the light would rotate the pattern shown in Figure 4 by using the following formula.

Huygens’ principle. mλ=dsinө where m=any integer λ=the wavelength d=Distance and ө=angle

Once again, it is important to note the control for λ. If white light was used for a polarimeter, the results would not be able to be measured since the different frequencies of light would produce different angles at the gradient as is seen in (FIGURE -5).

Similarly, if a green laser were put through a gradient at the same time as a red laser at the same distance and angle, the positioning of the grid would be tighter with green due to the shorter wavelength.


text:
Analytical Forensic Pharmacology/Melting Point

The melting point (MP) of a substance is the temperature at which it changes state from solid to liquid. Melting points are often used to classify organic compounds and to obtain an understanding of the purity of an analyte. A large database of MPs are available for use by analytical chemists and forensic scientists. The more impurity is present, the lower the melting point. Eventually, a minimum melting point will be reached. The mixing ratio that results in the lowest possible melting point is known as the eutectic point.


text:
User:SBJohnny/monobook.css

h1.firstHeading {font-color:blue;} /* This one affects the whole h1 heading */ h1.firstHeading span {font-size: 0.5em;} /* This one affects only the span inside the heading (the subchapter) */ p.booktitle {font-color:green;} /* This one affects only the small booktitle where there is also a chapter/subchap*/

title: User:SBJohnny/monobook.css


text:
Korean/RWP/Lesson 3

Welcome back! This is the third lesson of "Learn to read, write and pronounce Korean". In the previous two lessons, you already learned a total of 8 letters.

In this lesson, you will learn 4 additional basic letters and many new Korean words. You will even use your knowledge to write some Korean words, rather than just reading them.

The vowel ㅗ (o)
The first new letter is the vowel ㅗ (o):

The vowel ㅗ (o) is pronounced like the ow in the American English pronunciation of row or the a in the Australian English pronunciation of ball (IPA: [o]). Since this vowel is much wider than it is tall (unlike the vowels you have learned so far), it would be difficult to fit it beside a consonant in a little square box. Instead, it is written below the initial consonant:

Even when ㅗ (o) is already below the consonant, it is still possible to add another consonant below to make the syllable end in a consonant:

Exercise
Try to read the following Korean words that contain the letter ㅗ (o). Click "▼" to check your answers, as usual.

Final ㅇ (ieung)
The consonant ㅇ (ieung) can appear at the end of a syllable. When ㅇ (ieung) comes at the beginning of a syllable, it is just a placeholder enabling the syllable to start with a vowel, but when it comes at the end of a syllable, it is pronounced like the ng in ring and is transliterated as ng.

Exercise
Practise reading these words now:

The consonant ㄷ (digeut)
Time to learn the consonant ㄷ (digeut):

The letter ㄷ (digeut) is pronounced similar to the t in stop or strain. It is not aspirated, so it does not sound like the t in try or today. Many English speakers liken it more to the d sound. It is transliterated as d or t.

Exercise
Practice reading by guessing the meaning of the following Korean words:

Check your answers by clicking "▼", as usual.

The consonant ㅅ (siot)
Meet ㅅ (siot):

The letter ㅅ (siot) is usually pronounced like the s in sand and is transliterated as s. When the following vowel is ㅣ (i), though, ㅅ sounds a little different because the body of the tongue is raised toward the palate to make the [i] sound. So, the syllable 소 (IPA: [so]) sounds like the English word "so", but the syllable 시 (IPA: [ɕi]) is somewhere between the English "see" and "she".

Exercise
Practise reading:

The vowel ᅳ (eu)
The last letter for this lesson is ᅳ (eu):

The vowel ᅳ (eu) looks just like an ordinary horizontal line. It is much wider than tall, so it is also written below the preceding consonant rather than next to it. Its pronunciation is a bit strange for English speakers, somewhat like the oo of boot but without rounding the lips. In words of foreign origin, it is often an in-between neutral vowel sound used to make consonant clusters more pronounceable for the Koreans. In such words (and otherwise when unstressed), it often is pronounced similar to the u of the Southern American English pronunciation of nut, and the guttural "e" sound in French.

Exercise
Words for practise:

Exercise: Writing practice
Since you now can read Korean words with these jamo, try some writing practice:

End of lesson 3
If you learned the letters in this lesson, you are ready to go on to lesson 4, where you will learn the rest of the simple letters and continue practising your writing skills.

title: Korean/RWP/Lesson 3


text:
Talk:Reconstruction

I think either the name of the whole book or the name of the third section should be changed. A book about reconstruction shouldnt have a section named reconstruction. -Andrew

title: Talk:Reconstruction


text: User talk:84.9.236.8

title: User talk:84.9.236.8


text:
Adventist Youth Honors Answer Book/Health and Science/First Aid, Basic

Note: The red oval on the patch designates “basic” level.

If residing in the United States or another country where Red Cross instruction is given, satisfactorily pass the Red Cross Examination in Basic First Aid and receive your certificate. In British countries pass the examination in St. John Ambulance and receive certificate for the same. Or complete the following requirements:

2. Know the proper steps for rescue breathing.
'''The following is in addition to the information above for review purposes. This teaches students how to handle live situations they may come upon.'''

In the next revision of the first aid honors the first aider needs to know what to do when they come across an accident of any type. They will need to know the correct procedures in their correct order. This is not currently addressed anywhere in any of the Basic, Standard, Advanced First Aid Honors.

It is important to check for a pulse before anyone attempts to carry out CPR. If the heart is beating you do not perform CPR. CPR is to maintain the blood flow in place of the beating heart in order to carry the air you are breathing into the victim to the victim's brain. Usually if the heart is not beating there is no breathing, but it is possible for breathing to stop while the heart is still beating.

Whenever an accident or emergency occurs and you are the first person to arrive at the scene, there is one important technique to follow first: Check Call Care (see below). Then use DRABC to care for the victim.

Oh No! There's been an accident! What do I do first?

Check Call Care

 * Check: To Check for danger, you must first survey the scene to ensure your own safety; then, do a primary survey.

 * Call: After checking the victim, call an ambulance, giving them a description of the emergency situation as well as the location of the scene.

 * Care: After calling the ambulance, provide appropriate care based on your primary survey of the victim until an ambulance or other advance medical personnel arrives and takes over.

DRABC

Before you try to help the victim, you must determine if the scene is safe. If anything dangerous is present, such as a live wire, a vicious animal, deep water, or fire, you cannot endanger your own life to try to help the victim. Summon trained medical personnel immediately, and they will handle the situation. If you get hurt at the scene, you end up as just another victim for the ambulance to treat. Once you have called for help, you have done all you can in such a situation.
 * Danger:

If the scene is safe, try to determine what may have happened or what caused the accident. Never move the victim to give treatment unless immediate life-threatening danger exists, such as a fire or an unstable structure ready to collapse.

After determining that the scene is safe, you must check for a response in the victim. You will look, listen and feel to determine if the victim:
 * Response:
 * 1) Is conscious
 * 2) Has an open, unobstructed airway
 * 3) Is breathing
 * 4) Has a heartbeat
 * 5) Is not bleeding severely

To check for consciousness, gently tap the victim and ask, "Are you okay?" If the victim can speak or cry, he or she is conscious, breathing, and has a pulse. If the victim is unresponsive, he or she may be unconscious, indicating a possibly life-threatening condition. An unconscious person's tongue relaxes and may fall back to block the airway, stopping breathing and eventually the heartbeat.

Next, if the victim is unconscious, kneel next to the victim's head and check for the ABC's: Airway, Breathing and Circulation.

 * Airway:

To open the airway of an unconscious victim, tilt the head back and lift the chin.

 * Breathing:

To check for breathing, you must look, listen and feel. Place your face above the victim's mouth and nose, so that you can listen and feel for air being exhaled while watching the victim's chest for a gentle rise and fall that occurs when breathing. If the victim is not breathing, you must give 2 slow breaths. This is called rescue breathing. If the breaths do not go in, retilt the head and try again. If the breaths still do not go in, the victim has an obstructed airway, and you may try to clear the airway with a blow between the shoulder blades in the back, or with abdominal thrusts. If the breaths do go in, then continue with your DRABC.

 * Circulation:

To check for circulation, you must check the victim's pulse at one of the carotid arteries, located in the neck on either side of the Adam's apple. Using your index and middle finger (Never use your thumb—it has its own pulse and you may mistake it for that of the victim!) find the Adam's apple and then slide your fingers toward the side of the neck facing you into the groove in the side of the neck. Take at least 5 to 10 seconds to feel for the pulse. If the victim is an infant, locate the pulse in the brachial artery, on the inside of the upper arm in between the elbow and the shoulder. If the victim has a pulse but is not breathing, you must go immediately do Rescue Breathing. If the victim is not breathing and does not have a pulse, go immediately to CPR (if you have been trained). Check the body for signs of any severe external bleeding (bleeding is severe when blood spurts from a wound, and it is life-threatening).

7. Demonstrate the proper procedure in splinting various broken bones in the body.
Splints

Forearm

Upper Arm

Kneecap

Ankle

14. Know how to prevent infection.
Although infection may occur in any wound, it is a particular danger in wounds that do not bleed freely; in wounds in which torn tissue or skin falls back into place and prevents the entrance of air; and in wounds that involve the crushing of tissues. Incisions, in which there is a free flow of blood and relatively little crushing of tissues, are the least likely to become infected.

There are two types of bacteria commonly causing infection in wounds—aerobic and anaerobic. The former bacterial live and multiply in the presence of air or free oxygen, while the latter are bacterial that live and multiply only in the absence of air.

The principal aerobic bacteria that cause infection, inflammation, and blood poisoning are streptococci and staphylococci, some varieties of which destroy  red blood  cells. The staphylococci and streptococci may be introduced at the time of infliction, or they may be  introduced  to  the  wound later, at the time of first aid treatment or in the hospital if nonsterile instruments  or dressings are employed.

Wash minor wounds immediately with soap and clean water; then dry and paint them with a mild, nonirritating antiseptic. Apply a dressing if necessary. In the first aid environment, do not attempt to wash or clean a large wound, and do not apply an antiseptic to it since it must be cleaned thoroughly at a medical treatment facility. Simply protect it with a large compress or dressing and transport the victim to a medical treatment facility. After an initial soap and water cleanup, puncture wounds must also be directed to  a  medical  treatment  facility  for  evaluation.

15. What is the proper treatment for a snake bite?
Seek medical attention as quickly as possible. Apply first aid treatment: Remove any jewelry or watches, as these could cut into the skin if swelling occurs. Keep the area of the bite below the level of the heart in order to slow the spread of venom through the bloodstream. Remain still and calm. Moving around will make venom spread faster through the body. Cover the bite with a clean, loose-fitting, dry bandage. The main goal is to administer the correct antivenom as soon as possible. Knowing the size, color and shape of the snake can help determine the best treatment for a particular bite. Antivenoms are made by immunizing a horse or sheep with the venom of a particular snake, then processing the animal's blood serum (the watery part of the blood), which will contain antibodies capable of neutralizing the effects of venom.

Monospecific antivenoms treat the bite of a specific type of snake, while polyspecific antivenoms can treat bites from a number of snakes found in a particular geographic region.

The following is a list of DO NOTs:

Do not pick up the snake or try to wrap it up or kill it, as this will increase the chance of getting another bite. Even a dead snake is able to bite. Do not apply a tourniquet. Do not cut across the site of the bite marks. Do not try to suck out the venom. Do not apply ice. Do not immerse the wounded area in water. Do not drink alcohol. Do not drink beverages with caffeine.

17. What is the proper treatment for insect and spider bites?
Insect Bites

Spider Bites

20. What are the basic fire prevention principles for the home?

 * If your home lacks smoke detectors, install them
 * Replace the batteries and test your smoke detectors on a regular basis (when adjusting your clocks for daylight savings time, for example).
 * Do not smoke or allow anyone else to smoke in your home.
 * Never overload circuits or extension cords. Do not place cords and wires under rugs, over nails or in high traffic areas. Immediately shut off and unplug appliances that sputter, spark or emit an unusual smell. Have them professionally repaired or replaced.
 * When using appliances follow the manufacturer's safety precautions. Overheating, unusual smells, shorts and sparks are all warning signs that appliances need to be shut off, then replaced or repaired. Unplug appliances when not in use. Use safety caps to cover all unused outlets, especially if there are small children in the home.
 * Portable heaters need their space. Keep anything combustible at least three feet away.
 * Keep fire in the fireplace. Use fire screens and have your chimney cleaned annually. The creosote buildup can ignite a chimney fire that could easily spread.
 * Kerosene heaters should be used only where approved by authorities. Never use gasoline or camp-stove fuel. Refuel outside and only after the heater has cooled.
 * Practice an escape plan from every room in the house. Caution everyone to stay low to the floor when escaping from fire and never to open doors that are hot. Select a location where everyone can meet after escaping the house. Get out then call for help.

21. What are the basic water safety principles?

 * Learn to swim.
 * Swim in areas where a lifeguard is on duty
 * Young children and weak swimmers should wear a personal floatation device (PFD) when they are around water.
 * Set limits for inexperienced swimmers, such as not allowing them to enter water that is more than chest-deep.
 * Inspect swimming areas for hazards such as underwater trees, holes, and swift currents.
 * Swim parallel to the shore if caught in a rip tide.
 * Get out of the water if there is a risk of a lightning strike.

23. What are the basic electrical safety principles?

 * Do not overload circuits or extension cords.
 * Only use an extension cord that is rated to handle the current an appliance will use. An appliance's amperage is listed on the outside of the appliance.
 * Shut off the power before working on a circuit.
 * Unplug an appliance before servicing it.
 * Water and electricity do not mix. Do not use an electric appliance when standing in a puddle of water or while in a bathtub or shower.
 * Do not use a land-line telephone or touch any "wired" appliance during an electrical storm.
 * Do not insert anything into an electrical socket other than an electrical plug which is in good condition or an outlet safety cover.
 * Replace broken or frayed electrical cords.

24. How can you prevent food poisoning?
Food poisoning is causes by eating food which is contaminated with any infectious or toxic agent such as bacteria or parasites. The two main ways food becomes contaminated is by improper storage, or by coming into contact with contaminated food (cross-contamination).

Food Storage
The basic rule for storing food is to pay attention to the temperature. Keep hot foods hot, and keep cold foods cold. Most bacteria will not grow in food that is hotter than 140 °F (60 °C), and bacterial growth is greatly slowed at temperatures below 40 °F (4 °C). It is unsafe to store foods susceptible to bacteria growth between these temperatures.

Food poisoning is often caused by eating left-overs that were not promptly refrigerated. As soon as the food temperature falls below 140 °F (60 °C), it should be refrigerated. The longer food is left in the "danger zone", the more bacteria will multiply in it. If it contains enough bacteria, it will overwhelm the body's immune system and sickness will result.

Be careful about refrigerating large quantities of hot food. For instance, the potato salad in the center of a two-gallon container can remain warm for hours after refrigeration - providing ample time for bacteria to multiply. Divide large quantities of food into smaller containers prior to refrigeration so that the food can cool throughout.

Cross Contamination
Cross contamination usually happens during food preparation. Raw meat and raw eggs should always be treated as if they were contaminated. Cooking them kills the bacteria and makes them safe to eat. Do not allow other food to come into contact with raw meat or eggs, or that food will become contaminated. Do not use the same utensils to handle raw meat and food that is ready to eat.

Wash your hands before you eat or cook, and always wash your hands after handling raw meat or eggs - before handling any other food.

Do not allow pets to walk on food preparation surfaces (i.e., don't let the cat walk on the counter top or dining table). Animals pick up many types of bacteria on their feet, and this is easily transferred to food. If you do catch your pet walking on the countertop, be sure to disinfect it before using it as a food preparation surface.


text: User:Netsnipe

title: User:Netsnipe


text: User talk:Netsnipe

title: User talk:Netsnipe


text:
A-level Mathematics/MEI/FP1

 * /Matrices/
 * /Complex Numbers/
 * /Graphs and Inequalities/
 * /Algebraic Identities and Roots of Equations/
 * /Induction and Series/

title: A-level Mathematics/MEI/FP1


text:
User:PIrish~enwikibooks

I'm a twenty-year-old girl from Evansville, Indiana who just jumped to Wikibooks from Wikipedia. Hopefully I begin to use this site just as much as I do the other.

title: User:PIrish~enwikibooks


text:
User talk:Mperkins~enwikibooks

I fixed the broken link for you. External links don't need to be put into [brackets]. --Whiteknight (talk) (projects) 20:10, 31 August 2006 (UTC)

Images
Images are resized by making them "thumb", and giving a width, in pixels. I shrank the picture of the vein to 100px wide, you can see the code I used in your page. I wasn't sure what other image you were talking about, so I didnt alter any other images. --Whiteknight (talk) (projects) 21:35, 5 September 2006 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Mperkins. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Mperkins~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:29, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 05:16, 19 April 2015 (UTC)

title: User talk:Mperkins~enwikibooks


text:
Emergency Communities

In Emergency Communities we capture our experience getting into disaster zones—the footprints of hurricane, earthquakes, wars, etc.—and building community centers and soup kitchens within the wreckage, feeding people, and bringing together the victims of disaster and the volunteers who have come to help.

Several authors are from Emergency Communities, a non-profit organization specializing in first response to disasters and the rapid construction of emergency communities.

Contents

 * 1) /Introduction/
 * 2) /Emergency Site Selection/
 * 3) /Emergency Plumbing/
 * 4) /Emergency Lighting/
 * 5) /Emergency Enclosures/
 * 6) /Emergency Decor/
 * 7) /Emergency Food Supply/
 * 8) /Emergency Government Relations/
 * 9) /Emergency Volunteer Management/

title: Emergency Communities


text:
MATLAB Programming/Error Messages

As far as I've seen there is little help out there to help people decipher MATLAB's error messages. Most of the syntax errors are not difficult to fix once you know what is causing them so this is intended to be a guide to identifying and fixing errors in MATLAB code.

Warnings are also shown here as these often lead to errors later.

Arithmetic errors
Usually these are self-explanatory. As a reminder, here are some common functions that cannot be performed and what MATLAB returns (along with a warning for each one):

a/0 = Inf if a > 0, -Inf if a < 0, and NaN if a = 0. log(0) = -Inf MATLAB defines 0^0 to be 1.

NaN will very often result in errors or useless results unless measures are taken to avoid propagating them. ???Error using ==> minus Matrix dimensions must agree.

So check the dimensions of all the terms in your expression. Often it is an indexing mistake that causes the terms to be of different size. If you are using power function you might add a single dot after the parameter. i.e. y=x.^2 instead of y=x^2

Matrix multiplication requires the number of columns in the first matrix to equal the number of rows in the second. Otherwise, you get the message:

??? Error using ==> mtimes Inner matrix dimensions must agree.

Note the difference between this error and the previous one. This error often occurs because of indexing issues OR because you meant to use componentwise multiplication but forgot the dot.

Attempting to take the inverse of a singular matrix will result in a warning and a matrix of Infs. It is wise to calculate the determinant before attempting to take the inverse or, better, to use a method that does not require you to take the inverse since its not numerically stable.

Attempting to take a power of a nonsquare matrix results in the error

??? Error using ==> mpower Matrix must be square.

This is usually because you meant to use componentwise exponentiation and forgot the dot.

Array Indexing errors
Array indexing is a key component of MATLAB. One feature is that the names of variables and functions are case sensitive, and that one can alias builtin or user-written functions with variables of the same name. So, if you make an array called abs and you try to call the function abs(1), MATLAB will return the first value in the array abs instead of the value 1. MATLAB will not return an error for this as it is not possible to know for certain that the aliasing of the function wasn't intentional. Hence, never ever name your variables the same as an existing MATLAB function. Unfortunately, there are so many supplied functions in the base product plus installed toolboxes, remembering all of them is impossible so use which proposedname if you have any doubt the name might be in use previously before defining a new array or function. Later versions of MATLAB with the command completion feature will show the short help information after the opening parenthesis or tab-completion options, using which will aid in avoiding such errors before they arise later in execution by not creating the alias.

Some things are rather obvious but take some practice in avoiding:

You cannot try to access part of an array that does not exist yet.

>> A = [1,3]; >> A(3) ??? Index exceeds matrix dimensions.

Unfortunately, MATLAB doesn't tell you which variable you exceeded the dimensions on if there's more than one so you'll have to check that. This often occurs if, for example, you are using a loop to change which part of an array is accessed, but the loop doesn't stop before you reach the end of the array. This also happens if you end up with an empty matrix as a result of some operation and then try to access an element inside it.

You cannot try to access a negative, complex, noninteger, or zero part of an array; if you do you get this message:

>> A(-1) >> A(i) >> A(1.5) >> A(0) ??? Subscript indices must either be real positive integers or logicals.

Note that MATLAB arrays are 1-based, not 0-based and are fixed lower dimension, not variable. MATLAB may be able to tell you which index is not real or logical depending on context.

>> y=3*A(-1) Attempted to access A(-1); index must be a positive integer or logical.

The latter being an expression is parsed differently and so has the actual array available in the error message.

Also note that if 0 were a logical 0 (false) then the statement A(0) would not be an indexing error but a logical subscripting expression. In this case the return would be the empty [] array as there are no subscripts matching false in the defined set of [1 2] as A has been defined above. A more useful expression would be something like

>> A(A==3)

Attempting to use non-standard MATLAB syntax in your indexing will often result in the error:

>> A(2::, 2) ??? A(2::, 2) | Error: Unexpected MATLAB operator.

The above could be an example of someone trying to access all rows of A after the first one and the second column, in which case you should use the "end" syntax, as in:

>> A(2:end, 2) ans = 3

Assignment errors
Ah, assignment, that is using the = sign to give a variable, or certain elements of an array, a particular value.

Let's start with a classic mistake:

>> a = 2; >> if a = 3 ??? if a = 3 | Error: The expression to the left of the equals sign is not a valid target for an assignment.

This error occurs because you meant to see if "a" equaled 3, but instead you told MATLAB to assign "a" a value of 3. You cannot do that on the same line that the if/while statement is on. The correct syntax is

>> if a == 3 >> end

This creates no errors (and you can put anything inside the conditional you want).

You cannot have a normal array with two different classes of data inside it. For example,

>> A = @(T) (1+T) A = @(T) (1+T) >> A(2) = 3 ??? Conversion to function_handle from double is not possible.

For such a purpose you should use cell arrays or struct arrays.

Here's the tricky one. Take a look at the following code:

>> A = [1,2,3;4,5,6;7,8,9]; >> A(2,:) = [3,5]; ??? Subscripted assignment dimension mismatch. >> A(2,:) = [1,4,5,6]; ??? Subscripted assignment dimension mismatch. >> A(1:2, 1:2) = [1,2,3,4]; ??? Subscripted assignment dimension mismatch.

What is happening here? In all three cases, take a look at the dimensions of the left and the right hand sides. In the first example, the left hand side is a 1x3 array but the right side is a 1x2 array. In the second, the left hand side is 1x3 while the right is 1x4. Finally, in the third, the left hand side is 2x2 while the right is 1x4. In all three cases, the dimensions do not match. They must match if you want to replace a specific portion of an existing variable. It doesn't matter if they have the same number of data points or not (as the third example shows); the dimensions must also be the same, with the exception that if you have a 1xn array on one side and an nx1 on the other MATLAB will automatically transpose and replace for you:

>> A(2,:) = [1;2;3] A =  1     2     3 1    2     3       7     8     9

If you do not want this be aware of it!

Struct array errors
Struct arrays are rather complex, and they have a rigid set of rules of what you can and can not do with them. Let us first deal with indexing within struct arrays. Suppose you define the variable "cube" and want to store the volume and the length of one side of two different cubes in a struct array. This can be done as follows:

>> cube(1).side = 1; >> cube(1).volume = 1; >> cube(2).side = 2; >> cube(2).volume = 8;

This seems like a good way of storing data and it is for some purposes. However, suppose you wanted to abstract the volumes from the struct and store them in one array. You cannot do it this way:

>> volumes = cube.volume ??? Illegal right hand side in assignment. Too many elements.

You'll notice that if you tell MATLAB to display cube.volume, it will display both values, but reassign the variable ans each time, because it is treated as two separate variables. In order to avoid the error, you must format 'cube.volume' as an array upon assignment.

>> volumes = {cube.volume}

You can also write in a separate assignment for each cube but this is more adaptable to larger numbers of cubes.

Just like extracting data, you must input the data one at a time, even if it is the same for all instances of the root (cube).

>> cube.volForm = @(S) (S^3) ??? Incorrect number of right hand side elements in dot name assignment. Missing [] around left hand side is a likely cause. >> cube.volForm = @(S) (S^3) ??? Insufficient outputs from right hand side to satisfy comma separated list expansion on left hand side. Missing [] are the most likely cause.

Unfortunately missing [] is not the cause, since adding them causes more errors. The cause is that you cannot assign the same value to all fields of the same name at once, you must do it one at a time, as in the following code:

>> for ii = 1:2 >>  cube(ii).volForm = @(S) (S^3); >> end >> cube ans = 1x2 struct array with fields: volume side volForm

The same volume formula is then found in both cubes. This problem can be alleviated if you do not split the root, which is highly recommended. For example, you can use a struct like this:

>> shapes.cubeVol = @(S) (S^3); >> shapes.cube(1).vol = 1; >> shapes.cube(2).vol = 8;

This avoids having to use a loop to put in the formula common to all cubes.

Parenthesis errors
Unlike in C++, you are not required to terminate every line with anything but a line break of some sort. However, there are still syntax rules you have to follow. In MATLAB you have to be especially careful with where you put your parenthesis so that MATLAB will do what you want it to.

A very common error is illustrated in the following: >> A(1 ??? A(1 | Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.

This error is simple enough, it means you're missing a parenthesis, or you have too many. Another closely related error is the following:

>> A(1)) ??? A(1)) | Error: Unbalanced or misused parentheses or brackets.

MATLAB tries to tell you where the missing parenthesis should go but it isn't always right. Thus for a complex expression you have to go through it very carefully to find your typo. A useful trick is to try to set a breakpoint a line after the offending line. It won't turn red until the error is corrected, so keep trying to correct it and saving the file until that breakpoint turns red. Of course, after this you have to make sure the parenthesis placement makes sense, otherwise you'll probably get another error related to invalid indecies or invalid function calls.

String errors
There are two ways that you can create a string; use the ' string ' syntax, or type two words separated by only whitespace (not including line breaks), as in

>> save file.txt variable

In this line, file.txt and variable are passed to the save function as strings. It is an occasional mistake to forget a parenthesis and accidentally try to pass a string to a function that does not accept strings as input:

>> eye 5 ??? Error using ==> eye Only input must be numeric or a valid numeric class name.

These should not be hard to spot because the string is color-coded purple. Things like this occur if you uncomment a line of text and forget to change it.

Forgetting the closing ' in the other syntax for a string results in an obvious error:

>> A = 'hi ??? A = 'hi        | Error: A MATLAB string constant is not terminated properly.

The unterminated string is color-coded red to let you know that it is not terminated, since it's otherwise easy to forget.

A common mistake with strings is to try to compare them using the '==' operator. This does not work if the strings are not the same length, because strings are arrays of characters, and to compare arrays with '==' they must be the same size. To compare two strings you must use the strcmp function:

>> 'AA' == 'AaA' ??? Error using ==> eq Matrix dimensions must agree. >> strcmp('AA', 'AaA') ans = 0 >> strcmp('A', 'a') ans = 0 >> strcmp('AA', 'AA') ans = 1

Note that MATLAB strings are case sensitive, 'A' and 'a' are not the same string.

Also beware that the ' character for beginning and ending strings is the same character indicating transposition. So if you close a string and don't begin it, you will most likely end up with an error about an undefined variable (if you're trying to transpose an undefined variable) or just get really weird results because you transposed something you didn't intend to.

Other miscellaneous errors
You cannot leave trailing functions, and if you do MATLAB gives you an error that is similar but not exactly the same as that for a missing parenthesis, since it doesn't want to venture a guess:

>> A = 1+3+ ??? A = 1+3+ | Error: Expression or statement is incomplete or incorrect.

These usually are not hard to spot, and often result from forgetting the "..." necessary to split a line.

The double colon is not the only "unexpected MATLAB operator", there is also "..", "....", and several other typos that generate this error.

If you accidentally type the ` character you get the error:

>> ??? `       | Error: The input character is not valid in MATLAB statements or expressions.

This usually occurs because you intended to put a "1" in the equation but missed the key. Another possibility is that you named your m-file with unusual letters for computers. Like in Germany "ä, ü or ö". Be sure to name your m-files only with usual letters and no capital letters.

Function Calling errors
It is quite possible to try to call a function that doesn't exist, such as:

>> samplemat = [1 2; 1 4] >> A = eigen(samplemat); ??? Undefined command/function 'eigen'.

This can happen because you do not know the name of the function that performs the operation intended (for example, if you wanted to compute the eigenvalues of matrix "samplemat", you would want to call eig, not eigen). It is often useful to pull up MATLAB's help (go to help -> product help  or type doc into the command prompt) and do a search for the operation you want.

If you're trying to call a function you created and you get this error, there are several possible reasons:

 * 1) The m-file must be in one of the paths listed under file -> set path, or must be in your current directory
 * 2) The m-file must have the same name as the name in the function declaration. You must be aware of this especially if you change the name of your functions, you must also change the name of the file or MATLAB will not find the right function!

If MATLAB finds the function, it will attempt to run it. However, there are several potential pitfalls to avoid in calling functions. It is necessary to know the nature of the input and output arguments of a given function in order to call it. For MATLAB's built-in functions, this information is found in the documentation, or by typing

>> help functionname

It is a good idea to set up some comments so that the help function can read them in your own code as well, so you can keep track of how all your functions work and what they do at a quick reference. To do this, note that the help function reads only the block of comments directly under the function declaration, so for example, if you write a function like this:

function outvars = myfunc(invars) % function outvars = myfunc(invars) % Outputs outvars % All of this is outputted when you type >> help myfunc % But this wouldn't be

save the function as "myfunc.m", and type

>> help myfunc

it will output:

>> function outvars = myfunc(invars) Outputs outvars All of this is outputted when you type >> help myfunc

Most functions (not all however) require at least one input argument, and calling it with too few will result in an error:

>> A = ode45 ??? Error using ==> ode45 Not enough input arguments. See ODE45.

You cannot call a function with too many input arguments either:

>> A = plus(1,2,3) ??? Error using ==> plus Too many input arguments.

Input arguments must be in a format expected by the function. This will be very function-specific, so see the documentation or help for details on what they expect. For example, the first argument to ODE45 and other ODE solvers has to be the function handle; if you pass arguments in the wrong order you will be given an error to that effect.

You can choose how many of the output arguments you want out of those available by using the bracket notation. You can choose to save fewer outputs than the function offers, but you cannot assign more variables than the function can output:

>> A = [1,2;3,4] D = eig(A); %one output argument [V,D] = eig(A); %two output arguments [V,D,Mistake] = eig(A); ??? Error using ==> eig Too many output arguments.

All assigned output arguments must also be of the correct class if you are replacing parts of an array that already exists (see the section on assignment for more on this). If you're creating a new variable with the output, this is not an issue.

Control Flow errors
The most common one by far is if you forget the 'END', which is an issue in M-file functions. It will tell you that 'at least one END is missing' and try to tell you where the loop or conditional statement starts.

If you have too many END statements and more than one function in an M-file, MATLAB may give you a cryptic message about not formatting the functions correctly. This is because all functions in the same M-file must either end with an END statement or not. It doesn't matter which, but if you have too many END statements in one of the functions, MATLAB will think your function is ending early and will get confused when the next function in line does not have an END statement at the end of it. So if you get this confusing message, look for extra END statements and it should fix your problem. If the message is displayed when publishing, say to an HTML file, the problem may be an erratic hierarchical indentation. Try selecting all and then hitting cntrl-i for automatic indentation to fix the problem.

Having an extra END in a 'switch' statement gives a message that you used the 'case' keyword illegally, because MATLAB thinks you ended the switch statement early, and 'case' has no meaning outside a 'switch' statement.

Other errors
There are numerous types of errors that do not generate errors from the MATLAB compiler, which have to do with calling the wrong function, using the wrong operation, using the wrong variable, introducing an infinite loop, and so on. These will be the hardest to fix, but with the help of the MATLAB debugger, they will be easier to find. See Debugging M Files for details on how to use the debugger.

Detecting or planning an error
No matter how accurate the programming is, errors might happen. Using debug techniques are to great help, but planning an error or expecting an error could prove to be just as valuable. This includes making a possibly unneeded if block to decide what to do. I.e. if x 5 do something else. Also inside the big loops add an if block with modulo, like: if not ( mod ( ii, 5 ) ) % do something; end. Now the loop only does a test for every ii counter which can be divided by 5 without any remainder after the division. Some syntax errors or logical errors inside a loop happens after looping for a long time, if an error happens then the error message is displayed, explaining where it happened but not necessarily why it happened. I.e. vector x is one element shorter than element y, and x .* y could not happen. This mistake often happens on the last element in the shortest vector, and is quite difficult to discover unless measures are taken. try % do something; catch me me.getReport; then a breakpoint and even disp(me.getReport) will help in this situation. If the error is not fatal the code may even continue, but instead displaying the error as a message or it could be converted to a warning.

Included Matlab tools / functions: warning, lastwarn, disp, try catch, dbstack, rethrow, throwAsCaller and Matlab help on the above functions to discover pros and cons for each method.

title: MATLAB Programming/Error Messages


text: User:One-shot account

title: User:One-shot account


text:
User:VillorenteRG

My name is Rachel. I am a student at ODU, currently enrolled in Social and Cultural Foundations of American Education. The class assignment is to write our own text book (how overwhelming does that sound?). Anyway, I'm pretty nervous about the assignment, but I also think this is probably the most awesome assignment I've ever had. If you want to discuss the process with me or want to give me some feedback on my chapter, which I've yet to start, feel free to put something on my discussion page.

title: User:VillorenteRG


text: User:StockportLauren

title: User:StockportLauren


text:
User talk:82.42.145.158

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

 * thanks! we're vandal fighters! --82.42.145.158 23:28, 31 August 2006 (UTC)

title: User talk:82.42.145.158


text:
Cookbook:Strawberry Shortcut Cake

This strawberry shortcut cake is one of those recipes from the 1970s with lots of already-processed ingredients. It's very moist because the syrupy strawberry mixture starts on top and soaks through as the cake bakes.

Ingredients

 * 1 cup mini marshmallows
 * 2 cups (20 oz) frozen, sliced strawberries in syrup, completely thawed
 * 1 pkg (3 oz) strawberry jello powder (known as jelly outside of North America)
 * 2¼ cups flour
 * 1½ cups white granulated sugar
 * 3 tsp baking powder
 * ½ tsp salt
 * ½ cup shortening
 * 1 cup milk
 * 3 eggs
 * 1 tsp vanilla

Procedure

 * 1) Generously grease the bottom of a 13x9-inch cake pan.
 * 2) Sprinkle marshmallows evenly over bottom of pan.
 * 3) Thoroughly combine completely thawed strawberries and syrup with dry jello; set aside.
 * 4) In a large mixing bowl, combine remaining ingredients. Mix at low speed until moistened; beat 3 minutes at medium speed, scraping sides of bowl occasionally.
 * 5) Pour batter over marshmallows, and spread out. Spoon strawberry mixture evenly over batter.
 * 6) Bake at 350°F for 45–60 minutes or until golden brown and a toothpick inserted in center comes out clean.
 * 7) Serve warm or cool with ice cream or whipped cream.

fa:کتاب آشپزی/شرت‌کیک

title: Cookbook:Strawberry Shortcut Cake


text:
User talk:Linuxdude

Welcome
Hello and welcome to Wikibooks!

Here are some tips to help you get started:
 * You can sign your name on Talk and vote pages using four tildes, like this: ~~~~.
 * Remember to conduct any editing experiments in the sandbox.
 * Check out our help page if you need additional help.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Take a look at Naming policy
 * See list of templates which can save your time
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page.

Good luck! --Derbeth talk 23:56, 31 August 2006 (UTC)

title: User talk:Linuxdude


text:
Accountancy/Income Statement

The Income Statement is a financial statement that lists income, expenses, and profit for a given periods of time.

Income and Expenses can be classified into operating Income and Expenses, administration Expenses, and Financial Income and Expenses. Detailed Income statement for xxxxx retail Ltd, for year ending on 30 June, xxxx. Operating Income Sales Revenue                       x    less sales returns                  x                                        -- Net sales revenue                            x   Less Cost of sales beginning inventory                 x    add purchases                        x                                        --- cost of goods available for sale        x    less ending inventory                    x      Cost of Sales                                x                                                --- Gross Profit                                 x   add Other operating Income                    x     Discount received                           x                                                --- x Less expenses Operating Expense Sales staff salary expense      x              advertising expense              x       stores rent expense              x      stores depreciation expense      x                                       --- Total operating expense             x   Administration Expense Office staff salary expense     x       office rental expense            x      telephone expense                x      utilities expense                x       office supplies expense          x      office furniture and equipment depreciation expense  x      insurance expense                x        Total administration expense         x   Financial expense                   x     interest expense                  x        bad debts expense                 x     discount allowed expense          x                                     - total financial expense             x                                            --- x                                                --- Net profit excluding financial income           x

add Investment income                         x         add Finance income                             x Net profit before taxes                          x          taxation expense                               x  Net profit after tax                             x                                                ====

title: Accountancy/Income Statement


text:
Rueda de Casino/Jardín

From Guapea, the leader does an Enchufa, then changes hand so that he is right-to-right with the follower. He walks towards the previous leader (to his left), and raises his and the follower's right hand, then ducks underneath the right arms of the previous leader and follower, and walks around, clockwise, until the caller shouts "aurora" or "se fue" (say fway).

After "aurora" or "se fue", the leader takes hold of the right hand of the follower in front of him with his left hand, takes her hand out to the left and makes her do an Enchufa and Dile Que No.

title: Rueda de Casino/Jardín


text:
User talk:68.227.191.185

Thanks for experimenting with Wikibooks. Your test worked, and has now been removed. Please use Sandbox for any other tests you want to do, since testing material in modules will normally be removed quickly. Please see the welcome page if you would like to learn more about contributing to our project. Thanks. --Think Fast 00:41, 1 September 2006 (UTC)

title: User talk:68.227.191.185


text:
User:Panic2k4/myskin.css

@import url("/style/common.css");

body {background: white; color: black; margin: 2px; padding: 0;} h1 { margin:0; padding: 1em 0em 0; font: bold 36px Arial, sans-serif; line-height: 0.0em; text-align: center; color: #557; letter-spacing: 2px; margin-right: 135px; } h2 { border-bottom: 1px solid silver; } h3 { border-bottom: 1px dotted silver; } h2,h3,h4,h5,h6 { margin:0; padding: 0.5em 0.25em 0; font: bold Arial,sans-serif; text-align: left; color: #557; letter-spacing: 1px; } h3#siteSub { text-align: right; letter-spacing: 2px; margin-right: 135px; margin-bottom: 20px; }

 * 1) jump-to-nav { display: none; }

margin-right: 2px; margin-left: 2px; }
 * 1) globalWrapper {

text-decoration: none; color: #339; }
 * 1) globalWrapper a {

/*text-decoration: underline;*/ border-bottom: 1px dotted black; color: #00F; }
 * 1) globalWrapper a:hover {

color: #933; }
 * 1) globalWrapper a.new {

color: #F00; }
 * 1) globalWrapper a.new:hover {

border: 1px dotted silver; background-color: #F8F8F8; }
 * 1) globalWrapper pre {

clear: both; margin-top:1em; }
 * 1) contentSub {

/**********************************************************************/

position: fixed; top: 0em; right: 0; width: 120px; margin: 0; padding: 0; font-family: Arial, sans-serif; font-size: 9px; background-color: #EEE ;}
 * 1) column-one {

 * 1) column-one ul {display: none;}

list-style-type: none; margin: 0; padding: 0;}
 * 1) column-one li {

display: block; text-decoration: none; padding: 2px; background: #F8F8F8; color: black; }
 * 1) column-one li a {

padding: 0 0 0 5px; line-height: 1.25em; text-decoration: none; font-weight: normal; font-size: 9px; color: black; letter-spacing: 1px; }   background-color: #EED; background: #F8F8F8; letter-spacing: 2px; color: blue; }
 * 1) column-one h5 {
 * 1) column-one h5:hover {

display: block; width: 11em; position: absolute; margin-left: -8em; margin-top: 0em; }
 * 1) column-one div.portlet:hover ul {

letter-spacing: 1px; color: blue; }
 * 1) column-one div.portlet:hover a:hover {

display: none; }
 * 1) urlexpansion {

div#catlinks { position: fixed; top: 0px; left: 0px; background: #EEE; font-size: 9px; margin-top : 0px ; margin-right: 3px; margin-left: 3px; margin-bottom: 0px; }

div#catlinks > p > a { display: none; color: black; text-decoration: none; }

div#catlinks > p { margin: 0px; }

div#catlinks > p a:first-child { display: inline; }

div#catlinks > p:hover > a { display: inline; }

/*********************************************************************/

div#footer { padding-top: 5px; padding-right: 5px; padding-left: 5px; padding-bottom: 1px; margin-right: 1em; margin-left: 1em; border: 1px dotted silver; background: #F8F8F8; }

div#footer > div#f-copyrightico { display:block; } div#footer > div#f-poweredbyico { display:block; text-align:right; width:100% margin-right:0px; } div#footer > div#f-copyrightico { display:block; margin-top:-31px; } div#footer > ul { display:block; margin-top:-3em; margin-left:60px; font-size: 9px; } div#footer li { list-style-type: none; display:block; padding-right:3em; } div#footer img { border: none; }

border: 1px solid #aaa; text-align:left; padding: 5px; font-size: 95%; }
 * toc, .toc {

margin-top: 0.7em; font-size: 94%; }
 * 1) toc #toctitle { font-size: 75%; border-bottom: none}
 * 2) toc .tocindent { margin-left: 2em; }
 * 3) toc .tocline { margin-bottom: 0px; }
 * 4) toc p { margin: 0 }
 * 5) toc .toctoggle { font-size: 94%; }
 * 6) toc .editsection {

/* make a few corners round, only supported by moz/firefox/other gecko browsers for now */ -moz-border-radius-topleft: 1em; -moz-border-radius-topright: 1em; } -moz-border-radius-topleft: 1em; -moz-border-radius-bottomleft: 1em; } div.pBody { -moz-border-radius-topright: 1em; -moz-border-radius-bottomright: 1em; }
 * 1) p-cactions ul li, #p-cactions ul li a {
 * 1) content {

title: User:Panic2k4/myskin.css


text:
Cookbook talk:Za'atar

Of course, you dip the pita in olive oil and then in the za'atar — but I came here to find out what goes in the za'atar! Ptkfgs 05:39, 1 September 2006 (UTC)

title: Cookbook talk:Za'atar


text: User talk:196.3.50.254

title: User talk:196.3.50.254


text: User talk:59.144.92.170

title: User talk:59.144.92.170


text:
Rueda de Casino/Abanico

Start with Sombrero. Pull girl clockwise using her right shoulder and right hand on 1,2,3 while walking forward. Finish with Ronde going under your right arm on 5,6,7. Switch hands on 7 into Guapea. (no Dile Que No)

title: Rueda de Casino/Abanico


text:
User talk:Sbrad017

Welcome
Hello and welcome to Wikibooks!

Here are some tips to help you get started:
 * You can sign your name on Talk and vote pages using four tildes, like this: ~~~~.
 * Remember to conduct any editing experiments in the sandbox.
 * Check out our help page if you need additional help.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Take a look at Naming policy
 * See list of templates which can save your time
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page.

Good luck! --Derbeth talk 12:23, 1 September 2006 (UTC)

title: User talk:Sbrad017


text:
User talk:Mcoen003

Welcome
Hello and welcome to Wikibooks!

Here are some tips to help you get started:
 * You can sign your name on Talk and vote pages using four tildes, like this: ~~~~.
 * Remember to conduct any editing experiments in the sandbox.
 * Check out our help page if you need additional help.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Take a look at Naming policy
 * See list of templates which can save your time
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page.

Good luck! --Derbeth talk 12:23, 1 September 2006 (UTC)

title: User talk:Mcoen003


text:
User talk:Eawkw001

Welcome
Hello and welcome to Wikibooks!

Here are some tips to help you get started:
 * You can sign your name on Talk and vote pages using four tildes, like this: ~~~~.
 * Remember to conduct any editing experiments in the sandbox.
 * Check out our help page if you need additional help.
 * Eventually, you might want to read the Manual of Style and Policies and Guidelines.
 * Take a look at Naming policy
 * See list of templates which can save your time
 * Remember to maintain a Neutral point of view.
 * Explore, be bold in editing pages, and have fun!

You will find more resources in Community Portal. If you want to ask a question, visit the Study help desk, the Staff lounge, IRC channel or ask me personally on my talk page.

Good luck! --Derbeth talk 12:23, 1 September 2006 (UTC)

title: User talk:Eawkw001


text: Template:Print unit page

title: Template:Print unit page


text:
Java Programming/Q&A

Welcome to the Java Programming questions and answers page.

Feel free to post any questions you have while learning Java Programming. If you have questions about this book, post them on the Java Programming discussion page. If you know the answer to a question, or you can improve any, go ahead and do it.

Programming code..
What is the code that one can use in java to display height in feet (int) and inches(int)?

(!)Why does this not work plz help ASAP(!)
import java.util.Random; import java.util.Scanner; class Main { public static void main (String[]args) {   Scanner scanner = new Scanner (System.in);

Random random = new Random ; {     int rock = 0; int paper = 0; int scissors = 0; int loop = 0; int no = 0;

while (loop == 0)

no = random.nextInt (3) + 1;

if (no == 1) rock = 1;

if (no == 2) paper = 1;

if (no == 3) scissors = 1; }   System.out. println ("Pick rock paper scissors\nRock = 1 Paper = 2 Scissors = 3: "); int cho = scanner.nextInt ; {     if (cho == 1 & no == 3 | cho == 2 & no == 1 | cho == 3 & no == 2) {	 System.out.println ("You Win"); loop++; }     if (cho == 1 & no == 2 | cho == 2 & no == 3 | cho == 3 & no = 1) {	 System.out. print ("You loose want to play again? Type 0 to play again or type 1 to Exit: "); loop = scanner.nextInt ; }     if (cho == 1 & no == 1 | cho == 2 & no == 2 | cho == 3 & no == 3) System.out.println ("Tie try again"); } } }

Java
Write a program that calculates the current checking account balance, based on user input.

Inputs:

Ask user for account number and name.

Ask user for opening balance.

Ask user for up to 5 debit transactions, user can stop entering by typing -1.

Ask user for up to 5 credit transactions, user can stop entering by typing -1.

Processing:

Calculate new balance.

Output:

[Account number] - [Customer first name] [Customer last name]

Original Balance: [Original balance]

Debits: [Number of debits]

Debit Total: [Debit total]

Credits: [Number of credits]

Credit Total: [Credit total]

Balance: [Current account balance]

title: Java Programming/Q&A


text:
Talk:C Programming/Q&A Archive

multiple main
Q. Can we have a multiple main in a single program? Can we create a prog without a main function?

A. Each C program has one and only one  function. There will be an unresolved link error, if the  function is omitted from a C program. So the answer to the second question is that you must have a  function defined in a C program.

Run time environment
Q. What is run time environment in C?

A. During development, the programmer needs to be concerned with two types of errors. One is called the compilation error, the other is called the run time errors. Compilation error occurs when the C source program is being compiled to native code. When the compiler catches a error in the code, it will report to the programmer to fix it. Higher the programming language the more types of errors it would catch. Not all bugs can be caught by the compiler. Run time bugs like divide by zero can not be caught by the compiler.

C language add some primitive run time error checking and exit the program with some information about the problem and its location, by giving a so called a core-dump.

This run time error checking program added to the executable is called the run time environment to the program.

Learning on a mac
Q. Can I use C on a Mac?

A. Yes, C is the most wide spread portable high level language.

fscanf
Q. How can i use the file operator "fscanf" to read a string or an array of characters from a test file?

A. You can do it with code as shown below

Why binary files?
Q1. What is the need to do file manipulations in binary format?

A1. It depends on the application. Your application may store some information in file, that it reads back in later. The easiest way is to define a 'struct', that can have both interger and character values. When you read your data back, just map to your 'struct'. If different application created the file, make sure that you are using the same 'struct' and both C program compiled on the same (32 or 64 bit) platform. Integer length are different on 32 and 64 bit platform.

Q2. If so, what data type is used in C to represent "binary data"?

A2. The binary data can contain both integer, double, and or character values. You need to know the format though, where one data value starts and ends. The best way is to create 'struct' for a record. You read in the record from the file as unsigned character string and then map to the 'struct'.

Is return type compulsory in C & why it is compulsory in C++?
Both in C and C++ the return type from a function is not compulsory. If you have a function that do not need to return a value, use the 'void' type. In that case the 'return' keyword is optional, but can be used without specifying any value.

Homework assignments
Q) Write a program that count the no. of lines and characters in file.

A) We don't do your homework here.

How to install a C Compiler
Any C compiler that can be downloaded or installed (whether the freeware versions of Turbo C, Dev-CPP, Visual Studio Express or Gcc) should either have an installer or have sufficient instructions to properly install their product.

Turbo C variable length string data elements that are delimited by "*", need parsed
Hi,

I'm trying to code (in Borland Turbo C). Have many variable length string text data elements that are delimited by "*",

Example David*Smukinhoven*123456 Main St.*HongKong*China*(888)488-6359**0* * Jon*Eva*10 Downing Street*USA*Japan*(555)654-9874*20106*17.02*yen*

I need to break up the string into different fields so I can put the data into different forms.

I have a little experience with C; I do not want to use C++.

ANY HELP will be Apprciated

function. See example bellow:

char *s1 = "David*Smukinhoven*123456 Main St.*HongKong*China*(888)488-6359**0* *Jon*Eva*10 Downing Street*USA*Japan*(555)654-9874*20106*17.02*yen*"; char *parsed = char *[100]; char *elem = strtok( s1, "*" ); int i = 0; while ( elem != null ) {   /* Strores the element */ parsed[i++] = elem; /* Get the next element */ elem = strtok( null, "*" ); }

API or function database for C?
Q) When I was learning Java, the professor showed the class an official API site (if I remember the term correctly), which showed documented all the functions that could be used listed by package, including inputs, outputs, and author(s) notes. Is there a similar site for all the functions in C?  I did some Google work and found some sites that mentioned some packages, but I was wondering if there was an official site that had everything, or at least the more important packages?

A) The main API used with the C language is known as the Standard C Library. The list of standard libraries can be found at C Programming/Standard libraries, but does not include platform specific functions or third party libraries. You will need to consult the programming documentation for your platforms as necessary.

Regarding memory allocation
Q) Where the memory will be allocated for an array declaration? —The preceding unsigned comment was added by Parthisands (talk • contribs) 2007-06-14T04:37:54.

A) For automatic declarations (such as those created on a function call), they will appear on the stack. For declarations made either statically or via malloc, they are located in the heap.

header files
Q: how can we create our own header file?
 * A: Use a text editor. --Jomegat (talk) 17:00, 29 March 2009 (UTC)

about memory management
Q) What is the output if we use free(NULL);

A) free does not ever "output" anything. It is acceptable to call free(NULL); no operation will be performed. --Spoon! (talk) 02:25, 17 May 2008 (UTC)

memory management
what is the out put of following?

int *ptr; ptr=(int *)malloc(0);//malloc(zero)

A) There's no output, you should learn a bit more man.

howto do graphics programming
How to show graphics using C ?

A) There is no direct support (since it is platform dependent), there are 3rd party libraries that provide such function, see what you get by using the terms ACE, SDL or OpenGL or DirectX on a WEB search engine. --Panic 19:06, 7 October 2007 (UTC)

ABOUT C HEADER FILE
HI, Q. WHICTH HEADER FILES ARE NEED TO INCLUDE IN C PROGRAMS AND WHICTH NOT? EXAMPLE:- MATH.H HEADER FILE IS NEED TO INCLUDE BUT STDIO.H HEADER FILE IS NOT NEED TO INCLUDE WHEN WE SAVE PROGRAM WITH .C EXTENTION.

A) The answer to your question is on the book in [here], it explains the use of the include directive you must also understand the functions you are calling to know what to include. (PS: Next time try to write in lowercase it is good etiquette, as is it seems that you are shouting, see Editing guideline for other common practices.) --Panic 19:21, 7 October 2007 (UTC)

Multiple return values?
Q: Can a C function have multiple return values?

A: Basicaly no. A C function can return only one value. However, that return value can be a pointer to the first element of an array, or a pointer to a multiple value struct. In that case anything can be returned. In addition, the function can take in additional pointer arguments, where the function "fills in" information in the locations pointed to by the pointers (which are usually variables in the caller function), thus effectively returning additional information.

reading and printing a matrix
kindly tell me the error in the following programme: int main { int m[2][3],i,j; clrscr; cout<<"enter values for matrix:"<<"\n"; for(i=0;i<2;i++) { for(j=o;j<3;j++) {   cin>>m[i][j]; } } for(i=0;i<2;i++) {  for(j=0;j<3;j++) {   cout<
 * 2) include

Are you referring to the use of the letter o instead of the number 0 in the assignment to j, or perhaps to the way the output numbers are not delimited? Are you getting a compiler error or unexpected output? Rodasmith (talk) 22:08, 31 January 2008 (UTC)

Also, this is C++ not C. --Spoon! (talk) 02:27, 17 May 2008 (UTC)

Timers in C
How can I implement timers in C? KrisVelkovski (talk) 20:13, 18 February 2008 (UTC)

More information may be needed (for what setup/OS) ANSI C for what remember ( C89 ) can only make use of hardware interrupts (asm, not portable) or needs an external library to handle something more complex. --Panic (talk) 23:21, 18 February 2008 (UTC)

 * I'm using windows and mingw. KrisVelkovski (talk) 15:19, 20 February 2008 (UTC)

 * Check the Windows Programming book, what you need is Win32 API information. --Panic (talk) 16:36, 20 February 2008 (UTC)

 * Have a look at msdn. --212.149.216.233 (talk) 15:20, 21 February 2008 (UTC)

Function to perform square root
I want to calculate the square root of any number without using of sqrt predefined function in C.

Wikipedia Has The Answers(TM). See Methods of computing square roots and specifically Methods of computing square roots where the function is probably valid in C too when you leave first few words out. --192.130.48.36 (talk) 19:08, 4 March 2008 (UTC)

bitwiseoperator
Q) Using bitwise right shift operator give and example

A) C Programming/Simple math

interrupts
What are innterrupts?
 * Interrupts are external events that cause program execution to suspend and resume at a different place. The "different place" is an interrupt service routine, or ISR.  When the ISR completes, the program resumes execution at the point where it was suspended.

they are of how many types?
 * There are two major types of interrupts: hardware and software. Hardware interrupts are generated by an event in hardware, such as the arrival of a character from a UART, a key being pressed on a keyboard, or an anomally detected by the processor (such as division by zero, or access to an illegal memory address).  A software interrupt is generated by software.  Software interrupts can be generated by a program as a method of communication.

How to use interrupts in 'c'?
 * You must consult the documentation for the operating system you are programming for. In some cases, you can raise them directly, but in other cases, you must use the functions provided by the platform.

Variables
what does static variable mean?
 * A static variable is one that has persistent storage. It is not accessible outside its scope, but it retains its value as the program exits and re-enters its scope.  There are two "scopes" to consider.  The first is when a static variable is declared in a file, but outside of a function.  Such a variable is available to all functions in the file, but not available to functions outside the file.  The second scope to consider is a static variable declared inside a function.  In this case, the variable is accessible only to that function.  When the function exits, the variable does not disappear, but retains its value, so that when the program re-enters the function, it's still there in exactly the same state as when the function was previously exited.

what is a pointer?
 * A pointer is the address of a variable. The variable can be a scalar, an array, or a structure.  It could also be a function.

what is a structure?
 * A structure is an organized blob of data. It consists of programmer-defined elements that have been grouped together.

what are the difference between structures & arrays?
 * Arrays are a group of variables all having the same type. The elements of the array can be indexed numerically (as in x[5] - that's the fifth element in the array.  Structures are similar, but do not have the restriction of requiring every element within to be of the same type.  A structure could contain (for example) an int, an array of 25 chars, and a pointer.  Each element in the structure is named, and it is accessed by its element name.

in header files whether functions are declared or defined?
 * You could do either, but if the header file is included by more than one c file, the program might not link. Exceptions to this are functions that are declared as static, and functions that are declared as inline.  However, it's not generally a good idea to define a function in a header file.  It is a good practice, however, to define the function's prototype (i.e, its interface) in a header file.  The prototype defines the number of arguments to the function, as well as the type of each argument.  It also defines the type of the function's return value.

Header files
What is the use of '#' in '#include '?

The pound symbol marks the start of a preprocessor directive; see C Programming/Compiling 66.240.31.42 (talk) 17:02, 21 November 2008 (UTC)

Memory Allocation
Q) When we use  compiler make   bytes in the data segment of the program code. When we use function   at run time the program requests the operating system to allocated the block of size bytes.  But, what does the   operator do? Does it also request the operating system?

A) The new operator does nothing in C, since C is not C++. Even if it was implemented in C,  it would allocate it on the heap provided by the operating system.

Swapping values
Q) how can we interchange the value in a program without storing the value

A) See XOR swap algorithm on Wikipedia, and not that it has problems.

Games in C
Q) We can make games using JAVA. Is it possible to do it with C and what is the basic knowledge in C is required.

A) There's plenty of third-party libraries available for C that let you do this.

How can I differ
How can I differentiate between programing in C, C+ and C++

 * C+ isn't a language. C++ uses additional features, such as classes and templates, and enforces a slightly stronger type checking. --Sigma 7 (talk) 14:56, 25 March 2009 (UTC)

ctype.h
Why do we use ctype.h header file?

 * It provides access to functions that quickly determine the nature of the character (i.e. isupper, islower, etc.) These functions are locale specific in the event you are programming in a non-English language. --Sigma 7 (talk) 14:56, 25 March 2009 (UTC)

Programs without main
Can you write a C program without using main function in c language?
 * You can write a program without using main in the C language. Aside from some platforms that require you to use a different program startpoint, C is capable of creating freestanding applications (that don't require an operating system) which require you to define the necessary startpoint yourself.  The procedure for doing this depends on the compiler you are using, as well as the target platform.  However, you probably should learn the C language before attempting this. --Sigma 7 (talk) 19:19, 5 April 2009 (UTC)

about C language
I want to learn C language.How I begin C language.

i would like ,advantage\disadvatage c programming

A. go to this site http://en.wikibooks.org/wiki/C_programming and download the PDF version.this will be the best source for learning C. for amateurs!!

learning C means learning the basics of programming..!! if u want to learn any other languages like JAVA, Basic,C++ etc ...first start with C!

main
can u give some idea about command line parameters used in main?And what is it's importance?

Answer:

The number of command line arguments (including the program itself) is found in argc. argv contains pointers to the set of command line arguments, where argv[0] is a string to the program, argv[1] to the first pointer, and so on.

Reserved keywords
Q) What is the definition of reserved keyword?

A) A reserved keyword is something that is either in use with by the C standard, or expected to be used in the near future.

about enumerated datatype
Q) What is an enumeration?

A) An enumeration is a set of values. For example:

In this example, numbers is an enumeration, and allows you to use the words "ZERO", "ONE", "TWO", and "THREE" as identifiers to represent the corresponding numbers.

Pointer bounds
Q) How can be check that a pointer may be outside its bound?

A) By keeping track of the data. If you let a pointer carelessly drift out of bounds, then you're already doing something wrong. The easiest ways to protect against this is to either use a sentry value (e.g. null terminations on strings) or to know the number of current records.

title: Talk:C Programming/Q&A Archive


text: Wikibooks:Book of the month/September 2006


text:
Wikibooks:Book of the month/October 2006 voting

The voting for the Book of the month for October 2006 was open from September 1st, 2006, and closed on October 1st, 2006, 00:00 UTC. The book of the month was featured on the main page of Wikibooks in October.

'''Closed. Any votes added will be reverted.'''

Rhetoric and Composition
(renominated with 3 votes for September)

Votes: Comments:
 * 1) --Aschoeke ( talk ) 15:41, 1 September 2006 (UTC)
 * 2) --Whiteknight (talk) (projects) 15:42, 1 September 2006 (UTC)
 * 3) --Masahiko ( talk )
 * 4) within focus  04:41, 14 September 2006 (UTC)

 * Winner of BOTM in October. --Derbeth talk 13:17, 1 October 2006 (UTC)

False Friends of the Slavist
(renominated with 3 votes for September)

Votes:
 * 1) Klingoncowboy4 23:32, 22 September 2006 (UTC)

Comments:


text: Wikibooks:Collaboration of the Month/September 2006


text:
Wikibooks:Collaboration of the Month/October 2006 voting

Voting Rules
The following are the rules and conditions for voting for the Collaboration of the Month:

 * 1) Only registered users with 20 or more edits to their name may vote.
 * 2) You may vote under as many nominations as you wish, however, you may only vote for each book itself once.
 * 3) Sign your vote with a number sign and four tildes, #~, after the most previous vote under the book's nomination. Unsigned votes will be removed.
 * 4) Any nomination which receives 3 or more votes in one month will automatically be renominated the next month if it is not chosen.
 * 5) If you wish to include a short comment for your vote, then you may do so. Make sure that if you leave such a comment, that you are also voting for that page.
 * 6) Do not post objection votes as these will have no effect on the final tally.
 * 7) Voting will end at 00:00 UTC on the first day of each month. In essence, when a new month begins voting ends. Any votes added after this time will be discarded.
 * 8) The nomination with most votes will be chosen as the Collaboration of the Month. In case of a tie, the older Wikibook will be chosen.

C Sharp Programming
(renominated with 3 votes for September)

Votes:
 * 1) Sblive 22:19, 1 September 2006 (UTC)
 * 2) within focus 04:42, 14 September 2006 (UTC)
 * Yurik 21:33, 21 September 2006 (UTC) less than 20 edits
 * 1) Klingoncowboy4 23:33, 22 September 2006 (UTC)

Comments:

 * C Sharp Programming wins as being older one. --Derbeth talk 13:17, 1 October 2006 (UTC)

Shaving
Votes:
 * 1) --Easyas12c 06:30, 5 September 2006 (UTC)
 * --24cell 03:19, 15 September 2006 (UTC) less than 20 edits
 * 1) Klingoncowboy4 23:33, 22 September 2006 (UTC)

Comments:
 * The book is a guide to a simple everyday task. This makes the book both usefull and editable to many. It has a clear structure which makes appending easy. The book contains already the most basic information regarding the subject, but has been lacking attention for a while. --Easyas12c 20:07, 14 June 2006 (UTC)

The GIMP
Votes:' Comments:
 * 1) Reub2000 01:15, 17 September 2006 (UTC)
 * 2) Klingoncowboy4 23:33, 22 September 2006 (UTC)
 * 3) Pluke 18:41, 26 September 2006 (UTC)


text:
Umbraco/Reference/umbraco.library/RenderMacroContent

Purpose:
Run a macro and insert the output into your XSLT.

Arguments:
RenderMacroContent(String Text, Int32 PageId)

Text: an encoded version of the template 'macro' code (see below for proper encoding)

PageId: NodeID for the node you want to use for the content for the macro

String Text Encoding Instructions:
When you are putting the code for your macro in a template it looks something like this:

<?UMBRACO_MACRO macroAlias="LatestNews" numberOfItems="3">

To encode this for the RenderMacroContent function follow these steps:

1. Change '<' to '&lt;'
 * &lt;?UMBRACO_MACRO macroAlias="LatestNews" numberOfItems="3">&lt;/?UMBRACO_MACRO>

2. Change '>' to '&gt;'
 * &lt;?UMBRACO_MACRO macroAlias="LatestNews" numberOfItems="3"&gt;&lt;/?UMBRACO_MACRO&gt;

3. Change '"' to '&quot;'
 * &lt;?UMBRACO_MACRO macroAlias=&quot;LatestNews&quot; numberOfItems=&quot;3&quot;&gt;&lt;/?UMBRACO_MACRO&gt;

4. When you put this into the XSLT, enclose the whole thing in single quotes:
 * umbraco.library:RenderMacroContent('&lt;?UMBRACO_MACRO macroAlias=&quot;LatestNews&quot; numberOfItems=&quot;3&quot;&gt;&lt;/?UMBRACO_MACRO&gt;'...

Example XSLT Usage:

This string should of course be encoded, so it would look like this:

Little Bonus: XSLT to do the encoding for you
If you want to be able to just "cut & paste" the standard template macro code into your XSLT and have it encoded properly, add this bit of code to a new XSLT:

Then use this to render the encoded XSLT to a test page in your browser (which you can then cut & paste into your XSLT code):

Version 4 Warning
Warning, Umbraco 4 macros with new templates have a different syntax however the XSLT extention still requires the old v3 one so if you copy the macro inserted into a v 4 template you need to change it to v3

i.e.

becomes

<?UMBRACO_MACRO macroAlias="Name" runat="server">

(with escaping)


text:
Understanding Noah's Classifieds

If you directly want to start, jump to 'The sourcecode'. ''Firstly: This is an open work, if you find any problem with a term or concept you can contribute to it. You are also welcome to state any preference or vision for the actual book structure, objectives or other conceptual matters, see this wikibook discussion area.  Secondly: I'm not a native. If you attach importance to the grammar, feel free to correct my sentences. If this book was written in my language and you would make a lot of mistakes, I would correct. I hope to improve my english while writing this book with lots of people.''

(Please replace the following questions with their answers)

What is "Noah's Classifieds"? Is it a computer, an algorithm, a particular software application, a programming language, a library of support code, a small fish, or what?

What do people do with "Noah's Classifieds"? Is it purely a learning tool as a toy example to help programmers learn OOP? If I'm not a programmer, is there anything useful I could do with it?

What prerequisites do I need to have before using "Noah's Classifieds"? Do I need to have PHP installed on my computer before using it? Can I use it on my MacOS, Windows, or Linux box? Will it run on my server that has no display plugged into it? Will it run on my laptop that has no internet connection?

Who currently maintains "Noah's Classifieds"?

The database
Listed in perceived order of importance;

n_user
User Accounts are stored here.

n_item
Classified Listings are in this database.

n_category
The sections shown on the front page are enumerated here.

n_settings, n_ecommsettings, n_globalstat
Various administrative settings for the page are held in these databases.

the others
Other tables hold other sorts of information to control cross referencing, cron jobs, email notifications, search and rss functionality, etc. Most of this information can be easily controlled through the Admin section of the site. To manually create a new Admin account, set isAdm to 1 for any existing user in the n_user table.

Pages that make database connections
The pages which connect to the database all reside in the gorum directory, and are; /gorum/dbinstall.php, /gorum/dbproperty.php, and /gorum/installlib.php. Additionally, /feedcreator/feedcreator.class.php makes a query to the database, and many files in the /app/ and /gorum/ folders contain calls to the executeQuery functions defined by /gorum/dbproperty.php.

$otherTamplate
If this Variable is set (uncomment the related line in constants.php to do so) Noah's uses an unusual template. A template takes only effect on the look and style of Noah's Classifieds software. The file must be stored in the root directory of Noah's and needs a number in front of the suffix (e.g. template4.php). This index is declared to the system as our variable $otherTemplate.

(Noah includes the template-file while loading include.php wether it's the default one or not - line 24.)

config.php
The config.php contains just the parameters for the database. The second - really little - task of this file is to construct the $dbHost string, addicted to whether the port is given or not.

item.php
The item.php comes in include.php into play. At first, if the variable $immediateAppear isn't set yet, the script sets it to "true". If needed or not at the moment, (I guess it's always needed) the variable item_typ is build at the beginning of that script.

object.php
Anything that communicates with the database is derived from the object class. Items (adverts), categories, users and even the global settings. Start at this class because most of its functions aren't ever overloaded.

gorum/gorum.php
This File is included in index.php and itself includes another bunch of files.

include("./gorum/constants.php"); if( $registrationType!=User_noUserFromGorum ) include("./gorum/loginlib.php"); include("./gorum/gorumlib.php"); include("./gorum/object.php"); include("./gorum/form.php"); include("./gorum/generformlib.php"); include("./gorum/roll.php"); include("./gorum/dbproperty.php"); include("./gorum/privilegeproperty.php"); include("./gorum/htmllist.php"); include("./gorum/tools.php"); include("./gorum/showdetails.php");

Furthermore it seems like it differs the type of user and loads user_simple.php or in the other case user_email.php.

gorum/roll.php
This contains the roll class. Roll is simply the class that handles link generation. It is nice because it adds a memory capability.

The classes
Unusually, this webapplication is full objective. As mentioned before, Noah's works with classes - in fact a lot. For example the ad itself is permanently handled as an object. This is useful but it needs to get used to. The most important one is the class called "Object". This is the parent one I will introduce next.

Object - the mothership
/Let's Discover gorumMain/

/Multiple Image Submission/

/Multiple Image Extension/

title: Understanding Noah's Classifieds


text:
User talk:James Shoemaker

Hello James! You've wrote the book on Unilingua in wikibooks (Unilingua). It is not 100% finished, are you planning on finishing it? Are there any activities related to Unilingua on-line? I've found no other sources on-line, do you know of any?

title: User talk:James Shoemaker


text:
Template:Algebra

 This book is part of a series on Algebra: Basic Algebra

Algebra

Intermediate Algebra

Vectors

Introductory Linear Algebra

Linear Algebra

Abstract Algebra

Intro to Rings and Algebras Associative Composition Algebra

title: Template:Algebra


text: Template:AY Stages

title: Template:AY Stages


text:
A-level Computing 2009/AQA/Advanced Systems Development/Databases

Database Concepts

Traditional File Approach

Most organisations began information processing on a small scale, buying a computer for perhaps one or two individual applications, and then computerising other departments one by one. Applications were developed independently, and files of information relevant to one particular department were created and processed by dozens or even hundreds of separate programs. This led to several problems such as:

Data redundancy - The same data was duplicated in many different files.

Data inconsistency - When the same items of data were held in several different file, the data has to be updated in each separate file when it changes.