text:
Developing A Universal Religion/Determining Moral Behaviours/Genetic Manipulation

Under our new system of belief, all avenues of research would likely be inherently “good” and “right” because Life uses knowledge to gain control of needed resources, and control opens new avenues of development and leads to evolutionary enhancements. Of course, new knowledge carries with it the potential for doing wrong, just as every iota of understanding has always done. But it also carries with it an equal and opposite potential for doing right.

Genes control almost everything in nature, from behaviour (fidelity, for instance, has been transferred from prairie voles to mice by gene manipulations at Emory University), to longevity (the average lifespan of a fruit fly has been doubled, from 37 to 70 days, with no apparent diminishment of life quality, by rearranging genes). Since many genes that perform basic functions are identical across different species (including between plants and animals) it will not be long before scientists will be able to manipulate human genes towards progeny exhibiting almost any trait desired.

Governments are grappling with where to draw the line when it comes to conducting genetic research. Some state that, for example, organs such as replacement ears or hearts may be grown from embryonic stem cells otherwise destined never to develop; others decry this. Most are inclined to say that embryonic cells should not be deliberately grown to obtain stem cells, presumably because they do not want to be forced to decide exactly when human life begins, or to reopen debates related to abortion.<ref.Politicians seldom like to discuss ethical or moral matters. This may be because they cannot predict how expressing possibly contentious views might turn voters’ opinions in the next election. Querying the universal purpose definition should advise us how to proceed.

Almost all countries, at the moment, seem to contend that cloning humans is wrong, but I do not understand why. We have never hesitated to clone other animals and plants; how, precisely, are humans different? The desire to support the attainment of a universal purpose should help societies determine the most appropriate standpoint to take. And, as has been pointed out earlier, if a single global law is needed to simplify enforcement, then our best chance of defining one that might be respected has to be through the development of a supported universal purpose.

Xenotransplantation (i.e., transferring cells or tissues from one species to another) will probably be considered dangerous for many years to come, on practical rather than moral grounds. Viral fragments from one species can combine with genes in another and have devastating consequences. For example, tissues preserved in Alaskan permafrost of a woman who died from the Spanish flu epidemic (which killed over forty million people in 1918-19) showed when analyzed that the flu was a virus formed when sections of two genes, one normally occurring in humans, the other normally occurring only in pigs, somehow became spliced together.

Another issue that currently presents moral challenges is gene patenting. Universities and organizations conducting biological research have been patenting gene-altered plants and animals for decades. Clearly, private investors and venture capitalists would generally not fund research if there were no prospects of financial gain. Sales of any resulting products or technologies return funds to investors, pay for past and future research, buy needed equipment, etc., but only while patents protect a company’s proprietary rights. This money comes from those who can afford to buy the product, and therein lies the rub. Drugs that help AIDS sufferers, for example, are expensive to create, and this effectively restricts their distribution and use to wealthy countries. This places two organizing systems, an economic one and a moral one, in direct conflict.

The world’s economic decisions are made to realize economic goals; the world’s moral decisions are made to realize religious goals. This dichotomy prompts demonstrations of protest when monetary policy conferences or the like are held. Much discord and conflict would be avoided if the two value systems could be integrated.

Economic goals are simple to understand and usually simple to compute—the bottom line says it all. Religious goals, on the other hand, are many, complex and varied. They also fight each other, vying for precedence. If our various religious objectives could be united to present one overarching goal (perhaps under the banner of a universal religion), then its priority versus the priority of an economic goal might be more readily assessed. Clearly no unification of moral and economic goals can be achieved while the current situation prevails.

 * Return to Determining Moral Behaviours, Introduction
 * ../Summary/


text:
Developing A Universal Religion/Determining Moral Behaviours/Summary

Please keep in mind that my thoughts have been sketched here simply to demonstrate how a value system might be later deduced from the desire to support Life’s continued evolution. Let me be the first to say that the logic I display above is likely weak, and probably non-productively biased by personal constructs. Such deliberations should properly be carried out by experts, wise representatives of a variety of disciplines and communities, not just a single neophyte like myself.

Early theologians spent much time thinking about moral problems and formulating faith-based solutions. These satisfied the needs of the less-rational societies that existed in times past. Computer-driven cultures (that are beginning to dominate the world) crave a more logical moral code.

Developing a rational moral code of behaviour is clearly very difficult, but it is not impossible. Development can begin just as soon as a single supreme universal purpose has been defined and adopted.

I do not expect widespread acceptance of, nor even interest in, the idea that the world is ripe for a different kind of religion. But I do anticipate some level of interest, because discussions of a number of matters related to the theme of this book are common throughout the media today. My hope is that a few individuals, a small but critical mass, will act or react in a way that benefits civilization.

A few ways they might do so are discussed in the next chapter.

 * Return to Determining Moral Behaviours, Introduction
 * A Universal Religion, Introduction

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


text:
Developing A Universal Religion/A Universal Religion

From meta-purpose, to universal purpose, to a universal religion: what a train of thought!

Our meta-purpose remains just an undefined vision of what Life might eventually become. “Supporting Life’s journey to become oB” may well be an emotionally appealing activity worth adopting when considering behavioural alternatives. However, it will not serve as the guiding purpose the world needs to craft legislation of use in international courts of law. For that a well-defined “universal purpose” is needed.

A universal purpose is also required if a nation-guiding moral code is to be developed. Such a code would provide the moral authority international bodies need if they are to serve humanity well as we move into a very uncertain future.

This chapter suggests steps that might be taken to build a universal religion from the yet-to-be-developed universal purpose. Some might consider that a powerfully worded and valued purpose should suffice to guide collective global decision making, but this is not how the mind operates. As we saw in Constructs, the mental Construct that a belief develops can preclude alternative ways of thinking, thus all true believers of any doctrine will always claim that the commandments of their faith override any national or international law. Something labelled a “universal religion” may come to be regarded as worthy of being equally obeyed. The hope is that some day members of all religions might take the time to consider what was being said, if it were being expressed by a sufficient number of well-respected and influential people all claiming to follow a “universal religion.”

Again, the “universal religion” being proposed here is not something to be force fed to anyone. It should be seen as a companion to other religions, concerned about and dealing with the welfare of community and life, but having nothing to say about any individual after-life beliefs. Eventually, however, the rationality of the proposed universal religion will lead it to replace the less objective religions that we have inherited, because humankind is itself becoming more rational. Perhaps this transition will occur sometime in the future, however, not in this century, most likely.

 * 1) /Characteristics Of A Universal Religion/
 * 2) /Developing A Universal Religion/
 * /Summary/


text:
Developing A Universal Religion/A Universal Religion/Characteristics Of A Universal Religion

In order to help solve problems of the kind noted earlier, our new religion must possess certain features.

The religion has to be suited to our times. Real and relevant issues must be recognized and addressed in a practical manner.

The religion must be rationally based. Modern-day living is founded upon knowledge discovered by rational thinking; to begin irrational speculation when developing a religion would simply not be sensible. In crafting our definition of a universal purpose to guide development of a new religion, the definition must assume as little as possible, be as logical as possible, and be based upon the best of current knowledge.

Our choice of religious purpose must satisfy the same criteria that all religious purposes must fulfill—universality and timelessness. To have ubiquitous appeal it must be universally meaningful and applicable. To survive and guide our way into the future it must be soundly based and have longevity. It must, in effect, apply to and connect not just humanity, but all organisms living at any time and in any galaxy, just as some existing religions intimate their ideologies apply.

Our new religion must embrace and support our emotional needs as well as our rational needs. We are creatures of both worlds, responding to feelings and concepts of spirituality that our body’s emotions generate, as well as to the logic upon which our minds operate and thrive. Our religion’s vision needs aspects of both dimensions—music, art, feelings, emotions, awe and wonder must heighten and colour, and coexist with, rational truth.

The guidelines and teachings of the new religion must be logically derivable from its purpose. If, to guide our moral decision making, a universal purpose is indeed formulated from Life’s “meta-purpose,” then the guidelines we later develop must all emanate from the desire to achieve this purpose. Thus, we cannot, for example, simply proclaim an unfounded “it-is-wrong-to-xxxxx” commandment. An analysis of the links between the consequences of any particular action and the religion’s overall purpose must clearly and logically show why each behaviour is deemed “wrong” or “right.” We are developing an abstract environment which increasingly rational minds in the future will explore to its limits; if not rationally built, then this environment will collapse.

Our new religion cannot be developed by only one individual—there is too much to construct and too much at stake. Its development must be crafted by many, particularly those who possess relevant knowledge: theologians and scientists, managers and workers, people who practice many disciplines, those who tread many lands, and members of many cultures. It must begin as it must continue, involving all who want to contribute to the future welfare of the supersystem Life that supports us.

The religion’s development cannot end. Being knowledge-based and rationally structured, its tenets must continuously be amended as our knowledge base enlarges. Only our assumed meta-purpose, if properly composed, should resist the need for change. It should be a statement that lasts forever.

Ways must be found to separate religious power from legislated power, and legislated power must take precedence. The mental constructs that religions build may overrule logic in the minds of some and create fanatics; it must be made impossible for such individuals to seize control. (And legislated power should be refereed by the electorate, for it is individuals who contribute to Life’s continuation and evolution, not the state.) When disputes arise, such as the economic vs. moral dilemma that patent laws create, the populace must decide how they wish to proceed if democracy is to be preserved.

The new religion, for reasons that apply to all institutions, must incorporate defences against being exploited. Open debate and welcomed questioning, transparency, frequent internal and external audits, auditors that change every few years, leaders that are regularly replaced, and precautionary measures of many other kinds must be developed and maintained. The power commanded by a position within the hierarchy serving the needs of a universal religion will always attract some who would position personal gain over Life’s gain.

The envisaged universal religion would not replace or usurp existing religions. It is proposed as an umbrella doctrine, developed to cover gaps that existing faiths may leave open. (The religion most closely resembles a universal “Hippocratic Oath.” This oath does not prevent any one in the medical profession from being Christian, Muslim, Hindu or otherwise. It says nothing about the afterlife and little about God, but it does say much of what needs to be said about how to conduct oneself in an ethical manner.)

A universal religion would not unite the world to form one nation, just as other religions do not unite individuals to form one entity. There is as great a need for singularity among nations as there is for individuality among individuals. Life’s advancement is fostered by diversity; uniformity merely sustains life in between advances. (For this reason, any universal religion must accept the existence of other “universal religions.” But that is another story—there are no others at the moment, and the future will take care of that need, when the time arises!)

Doubtlessly our new religion could have many other characteristics, but the above list should suffice for our purposes.

 * Return to A Universal Religion, Introduction
 * ../Developing A Universal Religion/


text:
Developing A Universal Religion/A Universal Religion/Developing A Universal Religion

Some individuals are likely more ready than others to help found a new religion. Possibly those who have already drifted away from their god, but feel the loss. Or, perhaps, those who may think that a God exists or existed, but one that intends Life to fend for itself. Or people who think that no such Being exists, yet are distressed by life’s apparent meaninglessness. Or even those who think that their religion lacks the criteria they need to make some of today’s moral choices and seek something supplemental or an alternative. This section suggests how such individuals might work together to fill some of these gaps.

Again, please keep in mind that I am not trying to overthrow any existing religion. This discussion that follows is simply to explore whether people of the world see any need for the kind of religion this book is proposing. One day, perhaps in the not-too-distant future, some kind of rational religion might become appealing, but I suspect that the time may not yet be ripe. Fertilizing humanity’s mental soil in the hope that something might eventually grow is all that might occur if some of what follows were to be attempted. This alone, I think, is worth the effort.

Before continuing, let’s recall why I think a new religion may one day be needed. Significant problems periodically threaten world affairs, and current institutions seem inadequate to address them. Some likely solutions will eventually require expropriating national autonomy, subordinating it to world-wide authority, but there is currently no substantial authority of this kind. A massive blow, such as that dealt to the United States by the terrorist actions on September 11th, 2001, is needed before nations feel they have the moral authority to unite to counter further threats. This feeling soon evaporates, however, for only the recipients of the blow carry the loss constantly in their minds. And, as ../../Possible Applications/ noted, many other threats, current and potential, practical but often moral, need some degree of global consensus to be effectively countered. An international court might be given the legal authority to enforce international laws, but there are likely to be many situations (population control, embryonic stem cell use, or euthanasia, perhaps) where some degree of additional moral authority would be needed. If developed, a universal religion of the kind discussed in this book might make such moral authority permanently available, thus legitimizing the early examination of such problems and perhaps preventing them from becoming pandemic.

Keep in mind that, while the premise of this universal religion is simple, the process of developing it is certainly not. Indeed, the endeavour will be fraught with challenges, distractions and setbacks (not the least of which will come from those who oppose such a new tenet). Every stage of its development will therefore require tremendous dedication, perseverance, patience and altruism.

The remainder of this section assumes, based upon the reasoning given in earlier chapters, that acting to “support Life’s continued evolution toward becoming a god-like entity or oB” is the most appropriate meta-purpose for rational people to adopt and transform into a universal purpose. Given this, perhaps something like the following “hierarchy of action” might feasibly lead to the eventually realization of a universal religion.

Individuals: May have read this book or may already be thinking along similar lines. Want to correct problems that impact upon our future, and will probably already be in contact and working with others of like mind. May already be working in organizations to achieve related ends. Probably know other individuals active in parallel endeavours who will unite in support if one common purpose can be found. Already using websites and the internet to share ideas and to influence others.

Realize that the magnitude and number of significant world problems necessitates a proportionally large and long-term effort towards change. May be discussing the need to unite with other groups and individuals. May be drafting meta- or universal purpose statements and seeking consensus using Delphi survey methods or equivalents. May act as website masters, developing, linking and maintaining relevant sites, chat groups, bulletin boards, etc.

Working groups: Would want to educate one another. Would need to formulate sub-purposes to guide joint efforts. Would want to unite like-minded regional, national and international groups and efforts. Would need the support of people with vision, passion and ideas, as well as energy, money and influence. Would seek the co-operation of any and all organizations, particularly religions and those currently involved in formulating or promoting universally applicable moral standards or ethical principles.

Would constantly strive to educate the public and new members. Would finalize the definition of the universal purpose and draft statements of moral codes and ethical principles derived from this purpose. Would refine these statements as groups in different nations (particularly those of different cultures and faiths) seek to meld.

Would utilize the best analytic and strategic techniques. Would outline desired scenarios for years ahead as guides to develop strategies, plans and tactics; such descriptions would also convey to all a vision of the kind of future being anticipated, so inviting discussion, feedback and revision. (See ../../Multi-year Targets/,” a postscript to this chapter, for speculations about possible long-term goals.) Would attempt to foresee possible setbacks and develop contingency plans, etc. Would provide intelligent guidance to the whole movement, yet remain particularly close to the grassroots level by ensuring a steady exchange of personnel, and by limiting how long any one person may serve in any role.

Action groups: Would use their influence to educate the populace, and formulate approaches that would gain the support of organizations and governments in all of the world’s nations. Would find ways to respect and work within existing laws; would reject and help to prosecute those who harm others or damage property under the guise of participating in the larger cause. Would counter establishments’ efforts to derail this work using the meta-purpose-conjured vision to obtain popular support. Would enlist the support of like-minded organizations, and exploit the media’s need for news to gain national and international exposure, understanding, credibility, respect and active support. Would attempt to work with organizations that oppose the universal purpose’s ideals, to minimize harm done by such organizations. Would eventually have enough support to influence multinational organizations of every kind.

World directorate: Would be structured to be accountable to the world’s population, by ensuring free and unrestricted media access, and by setting up and maintaining all manner of web and internet interactions, including mechanisms that facilitate active debate of the pros and cons of the universal religion’s various statements and activities. Would have secure referendum and web-voting facilities to involve the world populace. Must have many built-in safeguards and a variety of audit mechanisms to prevent subversion by those desiring to exploit the world using this kind of organization.

Would eventually direct mechanisms able to ensure the compliance of individuals, organizations and nations, in the one area of their mandate—that is, to ensure the continued development of life (or as otherwise more comprehensively and precisely defined). Would have no power to restrict non-related human activities, such as benign global commerce or freedom of religious expression. May resemble the United Nations.

This endeavour is not intended to produce a totalitarian world. It is not intended to usurp any nation’s authority or power to govern as that nation sees fit, except in its one, world-mandated, area of responsibility. It is not intended to replace or deny any religion, nor is it intended to remove any individual’s right to freedom of thought, word or deed.

But it is intended to curb these behaviours whenever the activities of one or some threaten to jeopardize the future of life on this planet (and, later, wherever else life is found). Managing life’s exploitive nature necessitates also developing the means to control its destructive excesses when they occur. Most nations have already developed ways to lawfully control individuals and organizations within their boundaries; we must develop lawful ways to do the same at an international level. A carefully designed universal religion would provide the rationale, moral authority and foundation for such laws to exist.

Above all, the universal religion should construct and maintain the environment that contains a new code of behaviour, a new morality, a new wisdom; one which will guide our decision making as we explore the many marvellous medical, technological, cosmological and other pathways opening up before us—routes to a life that the developers of our traditional religions never dreamed could exist.

 * Return to A Universal Religion, Introduction
 * ../Summary/


text:
Developing A Universal Religion/A Universal Religion/Summary

Our new universal religion, should one come to be, must be founded upon, and headed by, a purpose whose truth, simplicity, utility and appeal are unmistakable. It must be easy to understand, clear in intent, and suited to guide us all, collectively, to a better way of living. Should peace between nations be our sole desire, then our selection of purpose is much less critical—any that brings unification will serve. However, if we seek more, if we value a long and healthy future for our descendants and for Life, for centuries and millennia to come, then our selection of purpose becomes extremely critical. We must choose one consistent with and respectful of the reality thrust upon us by this universe, simply because we must formulate a guide to living in this universe, not to living in an afterlife. Thus, the behavioural creeds we author must be rationally constructed with this reality in mind. Our new religion must be founded upon what we know—rather than what we invent—about ourselves, our cosmos, our origins, and our future possibilities.

Only the meta-purpose we adopt must be an assumption, for the universe itself cannot be shown to be directed toward a purpose, and this actuality thus applies to all within. Once this single assumption is accepted, then only truth and logic must be used to deduce the behaviour required to attain our chosen endpoint—thus constructing exemplary commandments. Circumstances may be forcing us to repeat doctrinal steps originally taken many hundreds of years ago, however today we have a better grasp of reality, and can use confirmed facts in many places where our forefathers could only conjecture.

To become an influential factor in controlling exploitive excesses, our universal religion must become an incontrovertible part of everyone’s mind—perhaps, eventually, the mind’s most cherished Construct. A constant awareness that no act should harm Life’s continued evolution may be all that is needed. It may be enough for every child and adult to know that this responsibility is everyone’s responsibility, and that it preempts all other purposes and duties. Individual lives may come and go, but our hard-gained wisdom must continue. Our lives, and those of our ancestors, lose all meaning if our accumulated knowledge and understanding is not benefited from, built upon, and bequeathed forward.

(A postscript to this chapter titled ../../Multi-year Targets/ is to be found at the end of this part.)

 * Return to A Universal Religion, Introduction
 * ../../Conclusion to Part Four/


text:
Developing A Universal Religion/Conclusion to Part Four

Rational practical behaviour is purpose directed: religions exist so that moral behaviour may also be this way.

The world is in labour to produce a second renaissance. Like the first, this reconstruction results from a growth in knowledge and understanding about the real nature of life, the universe and ourselves. Unlike the first, this renaissance will grow very quickly, spread and fed by electronic media, sought and bought by the needs of a globalizing world. Unification of ideas, ideals, desires and, eventually, morality will inevitably force the development of a global religion of some kind.

Which course will humanity choose? Will we continue to view morality as an ordained given? Will we refuse to unify and continue to support a million or so different faiths, defend the need to have a multifaceted view of morality, carry on squabbling and never reach a collective agreement when international situations demand one? Or will we succumb to some new visionary who is revitalizing one of the old god-headed myths, and unite to create the needed global religion in this manner? Or will we choose to develop one that can be forward-looking and reality-based? All we need to set out on this journey is a single meta-purpose to act as a beacon. Used to frame a universal purpose and an associated set of behaviours, we would have laid the foundation of a religion that would be rational and practical, moral and just, timeless and universal. Our descendants would then have the right to speak with confidence, proud of their beliefs and actions, certain about the behaviours they practiced, ready, willing and able to join, with heads held high, all the other great civilizations of the universe.

None of this will come to pass in the next few generations. But equally, none seems impossible to bring about, given the will and enduring effort of many who care.

Ah! If only we might return after death, to see what has come to pass. To see heaven on Earth—what an afterlife for us to witness, and what a legacy for us to bequeath!

 * Postscript: Multi-year Targets


text:
Classroom Management and Discipline

Classroom Management

 * /Starting Out/
 * /Classroom Community/
 * /Positive Reinforcement/
 * /Handling Young Kids/
 * /Challenging Behaviors/
 * /Finding Things That Work/

Behavior Management

 * /Disruptive Behavior Defined/
 * /Time Outs/
 * /Therapeutic Holds/
 * /Post-incident Processing/

Discipline Models

 * /Restitution Model/
 * /Assertive Discipline/
 * /Logical Consequences/
 * /Transactional Analysis/
 * /Teacher Effectiveness Training/
 * /Reality Therapy/Choice Theory/
 * /Judicious Discipline/
 * /Democratic Classrooms/
 * /Jones Model/
 * /Love and Logic/

title: Classroom Management and Discipline


text:
Embedded Systems/Theory, Design and Implementation/Introduction

Embedded Technology is now in its prime and the wealth of knowledge available is mindblowing. There are many open source designs available for study and use by anyone from a hobbyist to an engineer.

Before moving into a detailed discussion on embedded systems, it is best to understand the essence of an embedded system. What can we call an embedded system and how is it different from a computer? There are many answers, each coming from experts treating these systems from different point of views. But, almost all definitions agree on a few basic characteristics of an embedded system:

 * It is a system built to perform its duty, completely or partially independent of human intervention.
 * It is specially designed to perform a few tasks in the most efficient way.
 * It interacts with physical elements in our environment, viz. controlling and driving a motor, sensing temperature, etc.

One of the most important distinguishing factors between an embedded system and a computer is the constraints on system resources. Unlike modern day computers, an embedded system is usually designed to be compact, energy efficient, and inexpensive. Another factor is that a computer is capable of performing a variety of tasks completely independent of each other. Though many advanced embedded systems exhibit multi-tasking capabilities, it is unreasonable to expect an embedded system operating a washing machine to provide the capability to play digital music.

From an implementation viewpoint, there is a major difference between a computer and an embedded system. Embedded systems are often required to provide Real-Time response. A Real-Time system is defined as a system whose correctness depends on the timeliness of its response. Examples of such systems are flight control systems of an aircraft, sensor systems in nuclear reactors and power plants. For these systems, delay in response is a fatal error. A more relaxed version of Real-Time Systems, is the one where timely response with small delays is acceptable. An example of such a system would be the Scheduling Display System on the railway platforms. In technical terminology, Real-Time Systems can be classified as:

 * Hard Real-Time Systems - systems with severe constraints on the timeliness of the response.
 * Soft Real-Time Systems - systems which tolerate small variations in response times.
 * Hybrid Real-Time Systems - systems which exhibit both hard and soft constraints on its performance.

As we go into more detail about these systems, we will learn that Real-Time constraints pose a very difficult implementation problem. Complex problems like scheduling and resource management do tend to appear like ten headed fire breathing dragons to most newcomers in this field.

In the next section, we will systematically list down the important characteristics of the different classes of embedded systems. We will also discuss another class of embedded systems, Distributed Embedded Systems.

to be continued...

Contributors: --Siddord 07:10, 30 August 2005 (UTC)


text:
A-level Physics/Forces and Motion/Scalars and vectors

Vectors and scalars are mathematical constructs which physicists employ. Some physical quantities are represented by scalars and some by vectors and corresponding operations are employed upon them while dealing with them. Vector quantities have a direction associated with them while scalars are treated like simple numbers.

The following are some examples of quantities that are represented as scalars and vectors.

Scalars
The following quantities have a magnitude, and perhaps a sign, but no direction associated with them, and are examples of scalars:

 * distance
 * speed
 * time
 * mass
 * energy
 * density
 * temperature

Normally scalar quantities follow the basic algebraic rules for any mathematical manipulation such as addition, subraction, multiplication or division (as we do with numbers).

Addition of scalars
Adding scalars is simple, all you need to do is to add the numbers together. For example, 5m + 3m = 8m, or 76b + 23b = 99b

Multiplication and division of scalars
Multiplying and dividing scalars is the same as multiplying and dividing normal numbers.

You should also remember to multiply and divide the units, so that you can check your answers are given in the correct units. For example, if you were finding the area of a surface: $$3m \times 3m = 9m^2$$. The unit of area is $$m^2$$, so this is correct.

Vectors
The concept of direction establishes a relationship between two points in space; that is, the "direction" from one point to another. For example, the direction from point A to point B could be designated A-to-B while the opposite direction would be in that case B-to-A. Direction is dimensionless; that is, it has no measurement units and represents only a line designating the sense of from-to (from A to B) with no sense of "how much" which is considered the "magnitude" of a measurable quantity.

"Magnitude" provides a sense of "how much" (or "how many") of a measurable quantity. The term five miles has a magnitude of five units of measure; this unit of measure is miles.

When magnitude ("five" miles) is coupled with direction (let's say north; which is the dimensionless direction from me to the North Star) we obtain "five miles north"; this is a "vector". A "vector" has both magnitude and direction. A special type of vector has a magnitude of one in a given direction and is called a “unit vector” for that direction. A quantity that has only magnitude but has no associated direction is a "scalar", as described earlier.

Two vectors that have the same direction and magnitude are equal; a vector from me that is "five miles north" is equal to a vector from you that is "five miles north"; wherever you are. However, the position obtained by moving from me to "five miles north" of me is not a vector. The vector is the "displacement" that consists of a magnitude of distance (five miles) and a direction (north). A position can be represented by a beginning reference point (you; wherever you are) and a vector (five miles north), but a vector alone is not a location; it must have a reference location to be meaningful as a position.

The following quantities have both a magnitude and a direction associated with them, and therefore are vectors:

 * Displacement (e.g., five miles north)
 * Velocity (50 metres per second, bearing 60 degrees 15 seconds)
 * Acceleration (32 feet per second per second straight up)
 * Weight (your mass straight down)
 * Force (the amount of energy in a given direction)

Vectors can be represented in any set of spatial dimensions, though typically they are expressed in 2-D or 3-D space.

Multiplication
Multiplying Vectors to Scalars When you multiply a vector by a scalar, the result is a vector. Its direction is unchanged if multiplied by a positive scalar and its direction is reversed when multiplied by a negative scalar. The vector's magnitude is simply multiplied by the scalar.

Multiplying Vectors to Vectors

There are two different kinds of multiplication when you multiply two vectors together. There is the dot product, and there is the cross product. The multiplication of two vectors is outside of the scope of an A-level physics course, but you can find out about them on Wikipedia.

Addition of vectors
Vectors can be added like scalars as long as they are facing exactly the same direction. If the vectors are in opposite directions, you must subtract one from the other, and unless stated otherwise, you should use the common conventions that:

 * up is positive, and down is negative, and
 * right is positive and left is negative.

When the vectors aren't in a straight line, you must use another method to find their sum.

Pythagoras' theorem
If the two vectors are perpendicular to each other, it is possible to find the total vector using Pythagoras' theorem, with the resultant vector being the hypotenuse of the right-angled triangle.

The direction of the resultant can be found using the formula: $$\tan \phi = \frac{b}{a}$$, where $$a$$ is one of the sides touching (adjacent to) the angle, $$b$$ is the side opposite the angle, and $$\phi$$ is the angle of the resultant vector.

Notice that vector a has no effect in the direction of vector b, and similarly, vector b has no effect in the direction of vector a. When two vectors are perpendicular to each other, it is said that they act independently of each other.

Resolving vectors into two perpendicular components

A vector can be broken down into components, which are perpendicular to each other, so that the vector sum of these two components, is equal to the original vector. (Usually, it is interesting to break down a vector into two perpendicular components, such that one is vertical and the other horizontal. However, the components do not have to be chosen to be vertical and horizontal always; they only need to be perpendicular to each other). Splitting a vector into two components is called resolving the vector. It is the reverse of using Pythagoras' theorem to add two perpendicular vectors, and so adding the two components will give you the original vector. There are many uses for vectors that have been split in this way.

Resolving a vector requires some simple trigonometry. In the diagram, the vector to be resolved is the force, $$F$$. For angle $$A$$:
 * the horizontal component of $$F$$: $$F_x = F\ \cos\ A$$, and
 * the vertical component of $$F$$: $$F_y = F\ \sin\ A$$.

Note that the two components do not have to be horizontal and vertical. The angle $$A$$ can be changed to any required direction, and both components will still be perpendicular to each other.


text:
Talk:Norwegian/Appendix 2

Untitled
Why should the average Norwegian-learner already know phonetics? They don't do IPA and phonetics in kiddie school in the USA for one. Adding sound recordings to illustrate the sounds would also be wise, as SAMPA is even less known than IPA. --Kaleissin 16:51, 24 August 2005 (UTC)

There should be a more detailed section about the different accents. I tried to learn the numbers with 3 Norwegians and each one of them spoke differently (very differently). And I still can't do the Rolling Rr's 158.36.150.170 21:55, 7 November 2006 (UTC)

V
The pronunciation of "v" is stated to be identical in English and Norwegian here, but in fact they are different.

IPA
Thanks for making this beginner's course and presenting this module with IPA. It would also be helpful to add IPA to the pronunciation notes in the main lessons too, since it is so much clearer than the informal notation used. For example, representing "liker" with two English words, as "lee--care", is not adequate because many English speakers would pronounce that as [lɩ:ə.keəɹ], which is probably far from accurate. All the best. 100.0.71.123 (discuss) 08:31, 18 November 2016 (UTC)

title: Talk:Norwegian/Appendix 2


text:
User talk:165.83.110.130

Kellen T 17:48, 24 August 2005 (UTC)
 * Please also check out the Cookbook policy page and the Cookbook talk pages.

title: User talk:165.83.110.130


text:
Talk:Wikijunior Solar System/Fact Checking and Citation

<Talk:Wikijunior_Solar_System
 * Note: someone needs to fix these links!
 * Thanks for volunteering! --SV Resolution 13:16, 2 November 2005 (UTC)

Fact Checking and Citation
I went hunting for help on this and came up with:
 * Wikipedia:Wikipedia:WikiProject_Fact_and_Reference_Check
 * Wikipedia:Wikipedia_talk:WikiProject_Fact_and_Reference_Check
 * Cite_sources

Here is what I think are the guiding principals
 * Every fact in this book needs to be checked.
 * We need to know which facts have been checked.
 * The best way to flag facts as checked is to provide the citation.
 * The citation is credible evidence that the fact was actually checked.

Based on the work they are starting on at Wikipedia, I have come to the following conclusions about a practical approach --SV Resolution 14:12, 29 August 2005 (UTC)
 * Create a reference with the template
 * Create a ==References== section to contain the references
 * Use the # to create the reference
 * Refer to the Wikipedia Fact and Reference Check WikiProject for links to examples. Especially their FAC of the week.


text:
Category:Book:Ada Programming/Unfinished module

This category is for unfinished pages of the Ada Programming book. If you know Ada and have some time on your hand then please expand the pages.

__HIDDENCAT__This category is not shown on its member pages.

/Maintenance


text:
User:Eoghanacht

I had been an occasional contributor. But no longer: I was quite perplexed why some recipies I added disappeared without even a courtesy note on my talk page.

For more about me, see my Wikipedia user page.

title: User:Eoghanacht


text:
User:Raghav~enwikibooks

this is Raghav

title: User:Raghav~enwikibooks


text:
Visual Basic/Procedures and Functions

Functions are named blocks of program code that perform a specific task and return a result. The task can be as simple as adding two numbers or as complex as launching a spacecraft. A subroutine is like a function, just that it does not return a result.

Defining procedures
An example function definition:

An example subroutine definition:

Note the following:
 * The arguments to the function are declared as ByRef which requires the compiler to make sure that only arguments of the specified type are used, in this case Double.
 * The function returns a value by assigning it to the function name as though the function were a variable. This contrasts with the use of the keyword return in many other languages.

Calling procedures
You can use or call the two procedures defined in the previous sections as follows:

Note the following:
 * The arguments (argument list) passed to a function must be enclosed in round brackets, whereas those supplied to a subroutine need not.

Procedure parts
Each function and subroutine has the following parts, some of the optional:
 * Visibility : Public, Friend or Private
 * Procedure Type : Sub, Function, Property Let, Property Get, Property Set
 * Name : A freely chosen name that starts with a letter and contains only letters, numbers and underscores.
 * Argument List : A list of the items of data that the procedure reads or writes into.
 * Return Type : For a Function or Property Get, the data type returned, such as Double or String.
 * Body : All the statements that do the work.

Only the Name and the Procedure Type are mandatory. Of course, a procedure without a body doesn't do anything.

Visibility
This seems like a very unimportant part of a procedure declaration to most people but in fact it is a very helpful feature. With it you can show that some procedures are just for use inside a module (Private), some only for use in this component (Friend) or available for the whole world (Public). You should mark procedures Private unless they will be called from outside the module. this will encourage you, and anyone who edits your program, to place related procedures in the same module which obviously makes maintenance easier.

Marking a procedure Private also means that you can have another procedure with exactly the same name in another module.

Early Termination
Use Exit Function or Exit Sub to terminate a procedure in the middle, like this:

Procedure type
All procedures are either functions that return a result as the value of the function, or subroutines that are called for their side effects. To return a value, you can use both, but with subroutine, you need to do it via an argument:

The two procedures do essentially the same thing, that is, divide a number by two. The Function version does it by assigning the new value to the name of the function while the Sub version assigns it to the name of one of the arguments. This affects how you use them.

The function version can be used in an expression as follows:

To use the subroutine to return value, you need to store the value in a variable, like this:

Generally, you use a Function when the result is a single thing (number, string, object) and a Sub when you either want to return several distinct things or nothing at all.

Properties are also a form of procedure. Property Get is a function; Property Let and Property Set are subroutines. For more discussion of Properties, see the ../Object Oriented Programming/ chapter.

Optional arguments
You can specify optional arguments and default values:

Once an argument is declared optional, all arguments at the right of it have to be declared optional as well.

Links:
 * Using Optional Arguments, Office 2000, msdn.microsoft.com

title: Visual Basic/Procedures and Functions


text:
Cookbook:Plank-Grilled Salmon

| Seafood

Salmon grilled on a cedar plank is a common method for preparing salmon, traditional to the Native Americans of the Pacific Northwest of the United States and British Columbia in Canada.

Ingredients

 * ¼ cup Worcestershire sauce
 * 6 oz beer
 * A little garlic powder
 * Lemon pepper
 * ⅓–½ lb salmon filet

Equipment

 * Cedar wood planks, soaked in water
 * Grill or BBQ pit with the charcoal spread somewhat to the back so the fish can be moved for more or less heat

Procedure

 * 1) Preheat the grill or charcoal pit.
 * 2) Combine the Worcestershire sauce, beer, garlic powder, and lemon pepper to make a marinade. Add the salmon, and marinate for 15 minutes.
 * 3) Remove the salmon from the marinade, and place on the plank skin side down. It should not hang over the edge.
 * 4) Place the plank over the grill, and cook while watching carefully. A glass of water can be used to partially douse the fire when it gets too hot. As an alternative, a squirt-bottle or mister filled with water can douse any fire that commences on the plank. Individual planks give flexibility in moving to get all done evenly. Don't turn the fish on the plank; just move the plank(s) around, rotate, etc.
 * 5) Remove the plank to onto a baking pan when the fish is cooked to the desired "doneness", and transfer to plates or a serving platter.

Notes, tips, and variations

 * A microwave oven can be used to cook the salmon to greater degrees of "doneness".
 * The cedar planks should be free of any chemical treatments or coatings. The planks are soaked in water for several hours prior to grilling, to prevent burning. A baking pan of water with the planks weighted down to submerge them works well.
 * The salmon should be trimmed to fit on the planks of cedar. Whole fillets can be placed on longer planks, while shorter ones can be used for salmon steaks.
 * The salmon should be as fresh as possible. Wild salmon has the most flavor, but farm-raised salmon is also acceptable and is less expensive.

title: Cookbook:Plank-Grilled Salmon


text:
User talk:Shanii

Laura Scudder | Talk 19:30, 24 August 2005 (UTC)

title: User talk:Shanii


text:
Vibrations of Structures/Introduction to vibrations

Many times, we use the terms vibration and oscillation without knowing the difference between them. The term oscillation refers strictly to the repeating motion of a point mass or that of a rigid body while the term vibration refers to the repeating motion or deformations of an elastic structure. Thus any oscillation is a term used only in cases like the motion of a pendulum or that of a ship as a rigid body moving on the wavy seas while vibration is a term used for phenomenon exhibited by structures such as rotating fans or motors etc. Vibration involves deformation by definition while an oscillating structure does not deform.

In Structural and Mechanical engineering context, oscillation and vibration are differentiated based on the "restoring force" present in the system. For both oscillation and vibration, the mass of a system at rest (static equilibrium) need to be disturbed from its rest or equilibrium position. The mass gets excited and initiate oscillation or vibration; but only with the presence of a restoring force. If the disturbance is from an unstable or neutral equilibrium, possibility of any restoring force is lacking and the mass eventually moves away and occupies a new position. In the case of (i) stable equilibrium of a mass or (ii) mass being attached to a spring (or an elastic member), a restoring force comes into being and the mass is tended back to the original equilibrium position and as a result, periodic motion starts.

In case (i), generally, component of gravity (g) operated upon the associated mass component serves as restoring force. Thus the system undergoes no "elongations or strains" than rigid body motion, as in the case of a simple pendulum. Such "no-strain" periodic motions are referred to as oscillation.

In case (ii), spring force developed on the attached spring or elastic member serves as the restoring force. Thus the attached member undergoes "periodic elongation or strain". Thus the mass as well as attached member undergoes periodic motion. Such "strained" periodic motions are referred to as vibrations.

In the expression for natural frequency,ω, 'g' is a parameter in the case of oscillations and 'k' in the case of vibrations. For the oscillation of simple pendulum, ω = sqrt(g/l), where as for the vibration of spring-mass system, ω = sqrt(k/m); with usual notations.

Dynamic Load
We have studied how we find the response of a structure to static load. When we come to study vibrations, what we have is not static load but dynamic load. The very nature of the load means that the response of the structure i.e the displacement, stress, reactions etc. also varies with time (see, also, Seismic Fitness).

What is Dynamic load ? Dynamic load is the load which varies. The variation may be with respect to time (Ex : reciprocating engine) or with respect to space (Ex : Moving vehicle on bridge). The next question arises is at what rate it should change ? For example in a Dam the water level changes throughout the year then should we consider it as a dynamic load for designing the dam? NO, because though the load is changing with respect to time its inertial effect is very less for practical consideration.

To make it more clear, a Dynamic load (externally applied) is not only a function of time, say F(t), but also one which excites the mass of the system causing inertial effect. The physicist who deals with the problem has to decide whether the force, F(t) is a dynamic one or not based on the significance of the excitation.

It is also interesting to note that a dynamic load is not essential to produce vibration or oscillation. An initial displacement or velocity will trigger free vibration in an appropriate system (Ex : a spring-mass system like shock absorber of automobile)

Forces Involved
In any vibrating system, there are a total of four types of forces that need to be taken into account. These are listed here.
 * Inertial Force
 * Spring Force
 * Damping Force
 * Total External Force

The inertial force occurs because acceleration is present. We know if a body having mass 'm' is moving with an acceleration 'a' then the force acting on it is the inertial force given by :

$$f(accl)=m*a$$

The Spring force arises due to the elasticity of the material. It is proportional to the displacement. But actually it may vary linearly, quadratically or other proportionality law but for simplicity in modelling we assume that this force varies linearly. This assumption holds good for most of the general cases and hence accepted. If the extension in the spring is 'x' then the spring force is given by :

$$f(spr)=k*x$$

where 'k' is the proportionality constant known as stiffness of the member.

While these forces are enough to set up harmonic vibrations in a system, most systems also have intrinsic damping even if an external damper is not used. The damping force tends to oppose motion and acts against the velocity in most cases (the exception is negative damping). It generally varies with some power of the velocity though the most useful is viscous damping which varies linearly with velocity. If 'v' is the velocity then the viscous damping force is :

$$f(damp)=m*v$$

The total External force 'f(ext)' is the remaining force that acts on the system. It is the force that causes the excitation in the first place and may or may not be present while the system vibrates.


text:
Cookbook:Iced Tea

| Beverages

Iced tea is a sweetened beverage made from tea and organic acids, and sometimes with flavouring adjuncts. It is popular in hot climates, usually served over ice. Fruit juices such as red or white cranberry, grape, orange, grapefruit and passionfruit can be added in amounts ranging from 10–25%.

Ingredients

 * 3 tea bags
 * 1 teaspoon stevia
 * 2 teaspoons citric acid crystals (or malic / tartaric / citric blends)
 * 4 teaspoons sugar

Procedure

 * 1) Fill a drip coffee maker with cold water and place the tea bags in the basket.
 * 2) Place the stevia, acid, and sugar in the pot, and place the pot in the machine.
 * 3) Let it run through its cycle, then chill the product. This is a concentrate and will make several litres of iced tea.
 * 4) Place some ice in a tall glass and fill 80–90% with cold water. Pour in some iced tea nectar. You may reduce the water and add some fruit juice if desired.

Notes, tips, and variations

 * Lemon or lime juice can be used instead of the acid crystals. This will make a cloudier finished product.  Use about 4 ounces.
 * Garnish with cherries, pineapple, lemon, or lime slices.
 * Note that this product contains virtually no sugar. While 4 teaspoons are used in the concentrate, it is diluted so much that the amount of sugar in a glass is probably less than ¼ teaspoon.
 * While stevia is fairly expensive, it goes a long way. Use only pure stevia.

Iste

title: Cookbook:Iced Tea


text:
A-level Physics/Electrons, Waves and Photons/Electromagnetic waves

Structure
Electromagnetic (EM) waves are transverse waves that carry energy. This means the light can be polarised like all other transverse waves. Depending on the amount of energy, the waves create the electromagnetic spectrum, comprising (from longest to shortest wavelengths) radio, microwave, infra-red, visible light, ultraviolet, X-ray, gamma ray. Commonly referred to as EM "Radiation," these waves have wavelengths ranging from several thousand kilometres ($$\geq 10^{5}$$ m) to sub-picometres ($$\leq 10^{-12}$$ m).

The wave is actually made up of two components which are perpendicular to the direction of the wave. EM radiation can be thought of as particles (the photon) or waves, which is commonly referred to as the "wave particle duality"

The Speed of Light
All electromagnetic waves travel at the same speed (in a vacuum), and that is the universal constant known as the "speed of light," most often abbreviated by the lower-case letter "c".

The speed of light is (exactly): c = 299 792 458 $$m/s$$ or c = 983 571 056 $$ft/s$$

Visible Light
In the middle of the electromagnetic spectrum is visible light, i.e., the range that the human eye has evolved to observe. The following is a chart of the wavelengths of visible light.

Colour                 Wavelength (m) near ultraviolet         3.0 e -7 shortest visible blue    4.0 e -7 blue                     4.6 e -7 green                    5.4 e -7 yellow                   5.9 e -7 orange                   6.1 e -7 longest visible red      7.6 e -7 near infra-red           1.0 e -6 (Table 9.1, Griffiths)

Useful Equations
To find out the energy of a particular EM wave, or its frequency one can use the several forms of the Einstein Equation.

First, to determine an EM wave frequency, $$\nu$$ from its wavelength, $$\lambda$$. The wavelength multiplied by the frequency is always a constant value: the speed of light, $$c$$. Hence,

(1) c = $$\nu \lambda$$,

so you can find the frequency from the wavelength, or vice versa from simply manipulating this relationship.

Next, to determine the energy from a smallest quantity of EM wave (photon). Here, we must introduce another universal quantity known as "Planck's Constant," most commonly abbreviated by a lower-case "h." Planck's constant is

h = 6.626068 e -34 $$m^{2} kg / s$$.

With this in place we can use the "Planck Equation," which provides a relationship between the frequency, $$\nu$$ and energy $$E$$ of a photon. The relation is as follows:

(2) E = h $$\nu$$.

Now, if we only have the wavelength with which to start, we can manipulate equation (1) to get what we need.

(1) c = $$\nu \lambda$$, $$\nu = c / \lambda$$,

(2) E = h c / $$\lambda$$.


text:
Trigonometry/Trigonometric Formula Reference

Cover the right hand side of each formula, and use the information about remembering formulae from the previous page to get the right hand side.

Principal Trig Relationships
The following identities give relationships between the trigonometric functions.
 * 1) $$\sin(x)=\cos\left(\frac{\pi}{2}-x\right)$$
 * 2) $$\cos(x)=\sin\left(\frac{\pi}{2}-x\right)$$
 * 3) $$\tan(x)=\frac{\sin(x)}{\cos(x)}$$
 * 4) $$\csc(x)=\frac{1}{\sin(x)}$$
 * 5) $$\sec(x)=\frac{1}{\cos(x)}$$

Pythagoras related

 * 1) $$\sin^2(\theta)+\cos^2(\theta)=1$$
 * 2) $$\tan^2(\theta)+1=\sec^2(\theta)$$

One formula is missing.

By dividing the $$\sin^2(\theta)+\cos^2(\theta)=1$$ by
 * $$\sin^2(\theta)$$

or by
 * $$\cos^2(\theta)$$

we can get two other formulae.

The missing formula is obtained by dividing through by $$\sin^2(\theta)$$
 * $$\frac{\sin^2(\theta)}{\sin^2(\theta)}+\frac{\cos^2(\theta)}{\sin^2(\theta)}=\frac{1}{\sin^2(\theta)}$$

The missing formula is:
 * $$1+\cot^2(\theta)=\csc^2(\theta)$$

Periodicity
Four trigonometric functions are $$\pi$$ periodic:
 * 1) $$\sin(\theta)=\sin(\theta+2\pi)$$
 * 2) $$\cos(\theta)=\cos(\theta+2\pi)$$
 * 3) $$\csc(\theta)=\csc(\theta+2\pi)$$
 * 4) $$\sec(\theta)=\sec(\theta+2\pi)$$

Two trigonometric functions are $$\pi$$ periodic:
 * 1) $$\tan(\theta)=\tan(\theta+\pi)$$
 * 2) $$\cot(\theta)=\cot(\theta+\pi)$$

Angle Sums
Formulae involving sums of angles are as follows:
 * 1) $$\sin(\alpha+\beta)=\sin(\alpha)\cos(\beta)+\cos(\alpha)\sin(\beta)$$
 * 2) $$\cos(\alpha+\beta)=\cos(\alpha)\cos(\beta)-\sin(\alpha)\sin(\beta)$$
 * 3) $$\sin(\alpha-\beta)=\sin(\alpha)\cos(\beta)-\cos(\alpha)\sin(\beta)$$
 * 4) $$\cos(\alpha-\beta)=\cos(\alpha)\cos(\beta)+\sin(\alpha)\sin(\beta)$$

Multiple Angle Formulae
Substituting $$\beta=\alpha$$ gives the double angle formulae
 * 1) $$\sin(2\alpha)=2\sin(\alpha)\cos(\alpha)$$
 * 2) $$\cos(2\alpha)=\cos^2(\alpha)-\sin^2(\alpha)$$

Substituting $$\sin^2(\alpha)+\cos^2(\alpha)=1$$ gives
 * 1) $$\cos(2\alpha)=2\cos^2(\alpha)-1$$
 * 2) $$\cos(2\alpha)=1-2\sin^2(\alpha)$$

These can be obtained by putting $$\beta=2\theta,\alpha=\theta$$ in the addition formula.
 * 1) $$\sin(3\theta)=3\sin(\theta)-4\sin^3(\theta)$$
 * 2) $$\cos(3\theta)=4\cos^3(\theta)-3\cos(\theta)$$
 * 3) $$\tan(3\theta)=\frac{3\tan(\theta)-\tan^3(\theta)}{1-3\tan^2(\theta)}$$

This can also be obtained from the angle sums formula.
 * 1) $$2\sin(A)\cos(B)=\sin(A+B)+\sin(A-B)$$

Trigonometric functions of some closely related angles
This list may duplicate some of the periodicity formulas above, but all the formulas are given for the sake of completeness. Angles are expressed in degrees rather than radians. Similar relations for cot, sec and cosec follow immediately from the definitions of these functions; just replace sin by cosec, cos by sec and tan by cot (and vice versa).

sin(x)

 * 1) $$\sin(-x)=-\sin(x)$$
 * 2) $$\sin(90^\circ-x)=\cos(x)$$
 * 3) $$\sin(90^\circ+x)=\cos(x)$$
 * 4) $$\sin(180^\circ-x)=\sin(x)$$
 * 5) $$\sin(180^\circ+x)=-\sin(x)$$
 * 6) $$\sin(270^\circ-x)=-\cos(x)$$
 * 7) $$\sin(270^\circ+x)=-\cos(x)$$
 * 8) $$\sin(360^\circ-x)=-\sin(x)$$
 * 9) $$\sin(360^\circ+x)=\sin(x)$$

cos(x)

 * 1) $$\cos(-x)=\cos(x)$$
 * 2) $$\cos(90^\circ-x)=\sin(x)$$
 * 3) $$\cos(90^\circ+x)=-\sin(x)$$
 * 4) $$\cos(180^\circ-x)=-\cos(x)$$
 * 5) $$\cos(180^\circ+x)=-\cos(x)$$
 * 6) $$\cos(270^\circ-x)=-\sin(x)$$
 * 7) $$\cos(270^\circ+x)=\sin(x)$$
 * 8) $$\cos(360^\circ-x)=\cos(x)$$
 * 9) $$\cos(360^\circ+x)=\cos(x)$$

tan(x)

 * 1) $$\tan(-x)=-\tan(x)$$
 * 2) $$\tan(90^\circ-x)=\cot(x)$$
 * 3) $$\tan(90^\circ+x)=-\cot(x)$$
 * 4) $$\tan(180^\circ-x)=-\tan(x)$$
 * 5) $$\tan(180^\circ+x)=\tan(x)$$
 * 6) $$\tan(270^\circ-x)=\cot(x)$$
 * 7) $$\tan(270^\circ+x)=-\cot(x)$$
 * 8) $$\tan(360^\circ-x)=-\tan(x)$$
 * 9) $$\tan(360^\circ+x)=\tan(x)$$

Rewrite the above formulas using radians.

authors: יהודה שמחה ולדמן


text:
Chess Opening Theory/1. f4/1...d5

=Bird's Opening=

1...d5
From here, one possible reply is to treat the position as a Dutch Defence reversed. As in the Dutch, white can either fianchetto with 2. g3 (Leningrad Dutch) or go for the Stonewall with 2. e3, soon followed by d4 and c3.

Another possible motive is to go with a uniquely "Bird" strategy of dark-square control. The plan is to develop the King's knight to f3, to fianchetto the dark-square bishop with b3 and Bb2, and to focus in further pressure on the e5 square, sometimes with Qe1 and Qg3. Depending on the position, the white-squared bishop can go either on e2 or on b5 (with the idea to exchange it for the black knight on c6 and clear the way for the move Nf3-e5). The main problem with the arising positions is where to put the b1 knight. Sometimes c3 or d2 are good squares, but at other times, (especially if black pushes d5, c5, d4), it may be good to play a4 and put the knight on a3, with increased queenside control and flexible options.

A third strategy is simply to play for the break e4. The logical moves are d3, Nd2, and Qe1. Note that the king's bishop will go to e2 if black plays Bg4.

Theory table

 * 1.f4 d5

title: Chess Opening Theory/1. f4/1...d5


text:
C++ Programming/Programming Languages/C++/Code/Compiler/Preprocessor

The Preprocessor
The preprocessor is either a separate program invoked by the compiler or part of the compiler itself. It performs intermediate operations that modify the original source code and internal compiler options before the compiler tries to compile the resulting source code.

The instructions that the preprocessor parses are called directives and come in two forms: preprocessor and compiler directives. Preprocessor directives direct the preprocessor on how it should process the source code, and compiler directives direct the compiler on how it should modify internal compiler options. Directives are used to make writing source code easier (by making it more portable, for instance) and to make the source code more understandable. They are also the only valid way to make use of facilities (classes, functions, templates, etc.) provided by the C++ Standard Library.

All directives start with '#' at the beginning of a line. The standard directives are:

Inclusion of Header Files (#include)
The #include directive allows a programmer to include contents of one file inside another file. This is commonly used to separate information needed by more than one part of a program into its own file so that it can be included again and again without having to re-type all the source code into each file.

C++ generally requires you to declare what will be used before using it. So, files called headers usually include declarations of what will be used in order for the compiler to successfully compile source code. This is further explained in the File Organization Section of the book. The standard library (the repository of code that is available with every standards-compliant C++ compiler) and 3rd party libraries make use of headers in order to allow the inclusion of the needed declarations in your source code, allowing you to make use of features or resources that are not part of the language itself.

The first lines in any source file should usually look something like this:

The above lines cause the contents of the files iostream and other.h to be included for use in your program. Usually this is implemented by just inserting into your program the contents of iostream and other.h. When angle brackets ( <> ) are used in the directive, the preprocessor is instructed to search for the specified file in a compiler-dependent location. When double quotation marks (" ") are used, the preprocessor is expected to search in some additional, usually user-defined, locations for the header file and to fall back to the standard include paths only if it is not found in those additional locations. Commonly when this form is used, the preprocessor will also search in the same directory as the file containing the #include directive.

The iostream header contains various declarations for input/output (I/O) using an abstraction of I/O mechanisms called streams. For example, there is an output stream object called std::cout (where "cout" is short for "console output") which is used to output text to the standard output, which usually displays the text on the computer screen.

A list of standard C++ header files is listed below:

#pragma
The pragma (pragmatic information) directive is part of the standard, but the meaning of any pragma directive depends on the software implementation of the standard that is used.

Pragma directives are used within the source program.

You should check the software implementation of the C++ standard you intend to use for a list of the supported tokens.

For example, one of the most widely used preprocessor pragma directives,, when placed at the beginning of a header file, indicates that the file where it resides will be skipped if included several times by the preprocessor.

Macros
The C++ preprocessor includes facilities for defining "macros", which roughly means the ability to replace a use of a named macro with one or more tokens. This has various uses from defining simple constants (though const is more often used for this in C++), conditional compilation, code generation and more -- macros are a powerful facility, but if used carelessly can also lead to code that is hard to read and harder to debug!

#define and #undef
The #define directive is used to define values or macros that are used by the preprocessor to manipulate the program source code before it is compiled:

The #undef directive deletes a current macro definition:

It is an error to use #define to change the definition of a macro, but it is not an error to use #undef to try to undefine a macro name that is not currently defined. Therefore, if you need to override a previous macro definition, first #undef it, and then use #define to set the new definition.

\ (line continuation)
If for some reason it is needed to break a given statement into more than one line, use the \ (backslash) symbol to "escape" the line ends. For example,

will use what you write here \ and here etc...
 * 1) define MULTIPLELINEMACRO \

is equivalent to

because the preprocessor joins lines ending in a backslash ("\") to the line after them. That happens even before directives (such as #define) are processed, so it works for just about all purposes, not just for macro definitions. The backslash is sometimes said to act as an "escape" character for the newline, changing its interpretation.

In some (fairly rare) cases macros can be more readable when split across multiple lines. Good modern C++ code will use macros only sparingly, so the need for multi-line macro definitions will not arise often.

It is certainly possible to overuse this feature. It is quite legal but entirely indefensible, for example, to write

That is an abuse of the feature though: while an escaped newline can appear in the middle of a token, there should never be any reason to use it there. Do not try to write code that looks like it belongs in the International Obfuscated C Code Competition.

Warning: there is one occasional "gotcha" with using escaped newlines: if there are any invisible characters after the backslash, the lines will not be joined, and there will almost certainly be an error message produced later on, though it might not be at all obvious what caused it.

Function-like Macros
Another feature of the #define command is that it can take arguments, making it rather useful as a pseudo-function creator. Consider the following code:

Notice that in the above example, the variable "x" is always within its own set of parentheses. This way, it will be evaluated in whole, before being compared to 0 or multiplied by -1. Also, the entire macro is surrounded by parentheses, to prevent it from being contaminated by other code. If you're not careful, you run the risk of having the compiler misinterpret your code.

Macros replace each occurrence of the macro parameter used in the text with the literal contents of the macro parameter without any validation checking. Badly written macros can result in code which will not compile or creates hard to discover bugs. Because of side-effects it is considered a very bad idea to use macro functions as described above. However, as with any rule, there may be cases where macros are the most efficient means to accomplish a particular goal.

If ABSOLUTE_VALUE was a real function 'z' would now have the value of '-9', but because it was an argument in a macro z++ was expanded 3 times (in this case) and thus (in this situation) executed twice, setting z to -8, and y to 9. In similar cases it is very easy to write code which has "undefined behavior", meaning that what it does is completely unpredictable in the eyes of the C++ Standard.

and

-- the result of "a" should be "2" (b + c passed to PART -> ((b + c) / SLICES) -> result is "2")

# and ##
The # and ## operators are used with the #define macro. Using # causes the first argument after the # to be returned as a string in quotes. For example:

 * 1) define as_string( s ) # s

will make the compiler turn

std::cout << as_string( Hello World! ) << std::endl; into

std::cout << "Hello World!" << std::endl;

Using ## concatenates what's before the ## with what's after it; the result must be a well-formed preprocessing token. For example:

... int xy = 10; ... will make the compiler turn
 * 1) define concatenate( x, y ) x ## y

std::cout << concatenate( x, y ) << std::endl;

into

std::cout << xy << std::endl;

which will, of course, display 10 to standard output.

String literals cannot be concatenated using ##, but the good news is that this is not a problem: just writing two adjacent string literals is enough to make the preprocessor concatenate them.

The dangers of macros
To illustrate the dangers of macros, consider this naive macro

and the code

Take a look at this and consider what the value after execution might be. The statements are turned into

Thus, after execution i=8 and <tt>j=3</tt> instead of the expected result of <tt>i=j=8</tt>! This is why you were cautioned to use an extra set of parenthesis above, but even with these, the road is fraught with dangers. The alert reader might quickly realize that if <tt>a,b</tt> contains expressions, the definition must parenthesize every use of <tt>a,b</tt> in the macro definition, like this:

This works, provided <tt>a,b</tt> have no side effects. Indeed,

would result in <tt>k=4</tt>, <tt>i=3</tt> and <tt>j=5</tt>. This would be highly surprising to anyone expecting <tt>MAX</tt> to behave like a function.

So what is the correct solution? The solution is not to use macro at all. A global, inline function, like this has none of the pitfalls above, but will not work with all types. A template (see below) takes care of this Indeed, this is (a variation of) the definition used in STL library for std::max. This library is included with all conforming C++ compilers, so the ideal solution would be to use this. std::max(3,4);

Another danger on working with macro is that they are excluded form type checking. In the case of the MAX macro, if used with a string type variable, it will not generate a compilation error.

It is then preferable to use an inline function, which will be type checked. Permitting the compiler to generate a meaningful error message if the inline function is used as stated above.

String literal concatenation
One minor function of the preprocessor is in joining strings together, "string literal concatenation" -- turning code like

into

Apart from obscure uses, this is most often useful when writing long messages, as a normal C++ string literal is not allowed to span multiple lines in your source code (i.e., to contain a newline character inside it). The exception to this is the C++11 raw string literal, which can contain newlines, but does not interpret any escape characters. Using string literal concatenation also helps to keep program lines down to a reasonable length; we can write

function_name("This is a very long string literal, which would not fit "               "onto a single line very nicely -- but with string literal "                "concatenation, we can split it across multiple lines and "                "the preprocessor will glue the pieces together");

Note that this joining happens before compilation; the compiler sees only one string literal here, and there's no work done at runtime, i.e., your program will not run any slower at all because of this joining together of strings.

Concatenation also applies to wide string literals (which are prefixed by an L):

L"this " L"and " L"that"

is converted by the preprocessor into

L"this and that".

Conditional compilation
Conditional compilation is useful for two main purposes:
 * To allow certain functionality to be enabled/disabled when compiling a program
 * To allow functionality to be implemented in different ways, such as when compiling on different platforms

It is also used sometimes to temporarily "comment-out" code, though using a version control system is often a more effective way to do so.

statement(s) statement(s) ...  statement(s) statement(s) statement(s) statement(s) statement(s) statement(s)
 * Syntax:
 * 1) if condition
 * 1) elif condition2
 * 1) elif condition
 * 1) else
 * 1) endif
 * 1) ifdef defined-value
 * 1) else
 * 1) endif
 * 1) ifndef defined-value
 * 1) else
 * 1) endif

#if
The #if directive allows compile-time conditional checking of preprocessor values such as created with #define. If condition is non-zero the preprocessor will include all statement(s) up to the #else, #elif or #endif directive in the output for processing. Otherwise if the #if condition was false, any #elif directives will be checked in order and the first condition which is true will have its statement(s) included in the output. Finally if the condition of the #if directive and any present #elif directives are all false the statement(s) of the #else directive will be included in the output if present; otherwise, nothing gets included.

The expression used after #if can include boolean and integral constants and arithmetic operations as well as macro names. The allowable expressions are a subset of the full range of C++ expressions (with one exception), but are sufficient for many purposes. The one extra operator available to #if is the defined operator, which can be used to test whether a macro of a given name is currently defined.

#ifdef and #ifndef
The #ifdef and #ifndef directives are short forms of '#if defined(defined-value)' and '#if !defined(defined-value)' respectively. defined(identifier) is valid in any expression evaluated by the preprocessor, and returns true (in this context, equivalent to 1) if a preprocessor variable by the name identifier was defined with #define and false (in this context, equivalent to 0) otherwise. In fact, the parentheses are optional, and it is also valid to write defined identifier without them.

(Possibly the most common use of #ifndef is in creating "include guards" for header files, to ensure that the header files can safely be included multiple times. This is explained in the section on header files.)

#endif
The #endif directive ends #if, #ifdef, #ifndef, #elif and #else directives.

 * Example:

This can be used for example to provide multiple platform support or to have one common source file set for different program versions. Another example of use is using this instead of the (non-standard) #pragma once.

foo.hpp:
 * Example:

bar.hpp:

foo.cpp:

When we compile foo.cpp, only one copy of foo.hpp will be included due to the use of include guard. When the preprocessor reads the line, the content of foo.hpp will be expanded. Since this is the first time which foo.hpp is read (and assuming that there is no existing declaration of macro FOO_HPP) FOO_HPP will not yet be declared, and so the code will be included normally. When the preprocessor read the line  in foo.cpp, the content of bar.hpp will be expanded as usual, and the file foo.h will be expanded again. Owing to the previous declaration of FOO_HPP, no code in foo.hpp will be inserted. Therefore, this can achieve our goal - avoiding the content of the file being included more than one time.

Compile-time warnings and errors

 * Syntax:

#error and #warning
The #error directive causes the compiler to stop and spit out the line number and a message given when it is encountered. The #warning directive causes the compiler to spit out a warning with the line number and a message given when it is encountered. These directives are mostly used for debugging.

 * Example:

Source file names and line numbering macros
The current filename and line number where the preprocessing is being performed can be retrieved using the predefined macros __FILE__ and __LINE__. Line numbers are measured before any escaped newlines are removed. The current values of __FILE__ and __LINE__ can be overridden using the #line directive; it is very rarely appropriate to do this in hand-written code, but can be useful for code generators which create C++ code base on other input files, so that (for example) error messages will refer back to the original input files rather than to the generated C++ code.


text:
Raising Cattle

Hobby Ranching can be a very fulfilling experience. Some elderly people who in their younger days ranched for a living will hobby farm since a large herd is too much to keep up with. You do not need a huge farm/ranch to raise them though if space is insufficient your cows will become unhealthy, you may violate local by-laws, and even face animal cruelty charges. However, any facility that is suited to horses is more than sufficient for Cattle.

Getting Started

 * Why?
 * Fencing - Currently links to the Raising Chickens building a pen section.
 * /Indoor Facilities/
 * /Purchasing Cattle/

Raising Cattle

 * /Feed/
 * /Water/
 * /Space/
 * /Calves/
 * Calving

title: Raising Cattle


text:
User:Cma~enwikibooks

I am a sociology MPhil candidate at the University of Hong Kong, mainly research on the psycho-social dynamics of the Wikipedia.

My website: http://hku.hk/cathyma Skype: mapocathy MSN: mapocathy (at) hotmail.com

title: User:Cma~enwikibooks