text:
C++ Programming/Code/IO

I/O
Also commonly referenced as the C++ I/O of the C++ Standard Library, since the library also includes the C Standard library and its I/O implementation, as seen before in the Standard C I/O Section.

Input and output are essential for any computer software, as these are the only means by which the program can communicate with the user. The simplest form of input/output is pure textual, i.e. the application displays in console form, using simple ASCII characters to prompt the user for inputs, which are supplied using the keyboard.

There are many ways for a program to gain input and output, including
 * File i/o, that is, reading and writing to files
 * Console i/o, reading and writing to a console window, such as a terminal in UNIX-based operating systems or a DOS prompt in Windows.
 * Network i/o, reading and writing from a network device
 * String i/o, reading and writing treating a string as if it were the input or output device

While these may seem unrelated, they work very similarly. In fact, operating systems that follow the POSIX specification deal with files, devices, network sockets, consoles, and many other things all with one type of handle, a file descriptor. However, low-level interfaces provided by the operating system tend to be difficult to use, so C++, like other languages, provide an abstraction to make programming easier. This abstraction is the stream.

Streams
A stream is a type of object from which we can take values, or to which we can pass values. This is done transparently in terms of the underlying code that demonstrates the use of the std::cout stream, known as the standard output stream.

Almost all input and output one ever does can be modeled very effectively as a stream. Having one common model means that one only has to learn it once. If you understand streams, you know the basics of how to output to files, the screen, sockets, pipes, and anything else that may come up.

A stream is an object that allows one to push data in or out of a medium, in order. Usually a stream can only output or can only input. It is possible to have a stream that does both, but this is rare. One can think of a stream as a car driving along a one-way street of information. An output stream can insert data and move on. It (usually) cannot go back and adjust something it has already written. Similarly, an input stream can read the next bit of data and then wait for the one that comes after it. It does not skip data or rewind and see what it had read five minutes ago.

The semantics of what a stream's read and write operations do depend on the type of stream. In the case of a file, an input file stream reads the file's contents in order without rewinding, and an output file stream writes to the file in order. For a console stream, output means displaying text, and input means getting input from the user via the console. If the user has not inputted anything, then the program blocks, or waits, for the user to enter in something.

iostream
  is a header file used for input/output. It is part of the C++ standard library. The name stands for Input/Output Stream. In C++ there is no special syntax for streaming data input or output. Instead, these are combined as a library of functions. Like we have seen with the C Standard Library use of  header,   provides basic OOP services for I/O.

The  automatically defines and uses a few standard objects: for sending data to and from the standard streams input, output, error (unbuffered), and error (buffered) respectively. As part of the C++ standard library, these objects are a part of the std namespace.
 *  , an object of the istream class that reads data from the standard input device.
 *  , an object of the ostream class, which displays data to the standard output device.
 *  , another object of the ostream class that writes unbuffered output to the standard error device.
 *  , like cerr, but uses buffered output.

The most common streams one uses are cout, cin, and cerr (pronounced "c out", "c in", and "c err(or)", respectively). They are defined in the header  . Usually, these streams read and write from a console or terminal. In UNIX-based operating systems, such as Linux and Mac OS X, the user can redirect them to other files, or even other programs, for logging or other purposes. They are analogous to stdout, stdin, and stderr found in C. <tt>cout</tt> is used for generic output, <tt>cin</tt> is used for input, and <tt>cerr</tt> is used for printing errors. (<tt>cerr</tt> typically goes to the same place as <tt>cout</tt>, unless one or both is redirected, but it is not buffered and allows the user to fine-tune which parts of the program's output is redirected where.)
 * Standard input, output, and error

Output
The standard syntax for outputting to a stream, in this case, <tt>cout</tt>, is

Example

Result of Execution Hello, World! 1

To add a line break, send a newline character, <tt>\n</tt>. Using  also outputs a newline character, but it also calls os.flush.

Example

Execution Hello, World! 1

It is always a good idea to end your output with a blank line, so as to not mess up with user's terminals.

As seen in the "Hello, World!" program, we direct the output to. This means that it is a member of the standard library. For now, don't worry about what this means; we will cover the library and namespaces in later chapters.

What you do need to remember is that, in order to use the output stream, you must include a reference to the standard IO library, as shown here:

This opens up a number of streams, functions and other programming devices that we can now use. For this section, we are interested in two of these;  and.

Once we have referenced the standard IO library, we can use the output stream very simply. To use a stream, give its name, then pipe something in or out of it, as shown:

The <tt> << </tt> operator feeds everything to the right of it into the stream. We have essentially fed a text object into the stream. That's as far as our work goes; the stream now decides what to do with that object. In the case of the output stream, it's printed on-screen.

We're not limited to only sending a single object type to the stream, nor indeed are we limited to one object a time. Consider the examples below:

As can be seen, we feed in various values, separated by a pipe character. The result comes out something like:

Hello, Joe The answer to life, the universe and everything is 42

You will have noticed the use of <tt>std::endl</tt> throughout some of the examples so far. This is a special manipulator, which not only outputs a newline character but also calls os.flush.

Input
What would be the use of an application that only ever outputted information, but didn't care about what its users wanted? Minimal to none. Fortunately, inputting is as easy as outputting when you're using the stream.

The standard input stream is called <tt>std::cin</tt> and is used very similarly to the output stream. Once again, we instantiate the standard IO library:

This gives us access to <tt>std::cin</tt> (and the rest of that class). Now, we give the name of the stream as usual, and pipe output from it into a variable. A number of things have to happen here, demonstrated in the example below:

We instantiate the standard IO library as usual, and call our main function in the normal way. Now we need to consider where the user's input goes. This calls for a variable (discussed in a later chapter) that we declare as being called <tt>a</tt>.

Next, we send some output, asking the user for their age. The real input happens now; everything the user types until they hit Enter is going to be stored in the input stream. We pull this out of the input stream and save it in our variable.

Finally, we output the user's age, piping the contents of our variable into the output stream.

Note: You will notice that, if anything other than a whole number is entered, the program will crash. This is due to the way in which we set up our variable. Don't worry about this for now; we will cover variables later on.

A Program Using User Input
The following program inputs two numbers from the user and prints their sum:

Just like <tt>std::cout</tt> that represents the standard output stream, the C++ library provides (and the <tt>iostream</tt> header declares) the object <tt>std::cin</tt> representing standard input, which usually gets input from the keyboard. The statement:

uses the extraction operator (<tt>>></tt>) to get an integer input from the user. When used to input integers, any leading whitespace is skipped, a sequence of valid digits optionally preceded by a <tt>+</tt> or <tt>-</tt> sign is read and the value stored in the variable. Any remaining characters in the user input are not consumed. These would be considered next time some input operation is performed.

If you want the program to use a function from a specific namespace, normally you must specify which namespace the function is in. The above example calls to <tt>cout</tt>, which is a member of the <tt>std</tt> namespace (hence <tt>std::cout</tt>). If you want a program to specifically use the std namespace for an identifier, which essentially removes the need for all future scope resolution (e.g. <tt>std::</tt>), you could write the above program like this:

Please note that 'std' namespace is the namespace defined by standard C++ library.

Manipulators
A manipulator is a function that can be passed as an argument to a stream in different circumstances. For example, the manipulator 'hex' will cause the stream object to format subsequent integer input to the stream in hexadecimal instead of decimal. Likewise, 'oct' results in integers displaying in octal, and 'dec' reverts back to decimal.

Example

Execution 16 10 20 12 10 a

There are many manipulators that can be used in conjunction with streams to simplify the formatting of input. For example, 'setw' sets the field width of the data item next displayed. Used in conjunction with 'left' and 'right'(that set the justification of the data), 'setw' can easily be used to create columns of data.

Example

Execution 90  Help! 45       Hi!

The data in the top row display at the right of the columns created by 'setw', while in the next row, the data is left justified in the column. Please note the inclusion of a new library 'iomanip'. Most formatting manipulators require this library.

Here are some other manipulators and their uses:

Buffers
Most stream objects, including 'cout' and 'cin', have an area in memory where the information they are transferring sits until it is asked for. This is called a 'buffer'. Understanding the function of buffers is essential to mastering streams and their use.

 Example

 Execution 1  >74 >27 Number1: 74 Number2: 27

The inputs are given separately, with a hard return between them. '>' denotes user input.

 Execution 2  >74 27 Number1: 74 Number2: 27

The inputs are entered on the same line. They both go into the 'cin' stream buffer, where they are stored until needed. As 'cin' statements are executed, the contents of the buffer are read into the appropriate variables.

 Execution 3  >74 27 56 Number1: 74 Number2: 27

In this example, 'cin' received more input than it asked for. The third number it read in, 56, was never inserted into a variable. It would have stayed in the buffer until 'cin' was called again. The use of buffers can explain many strange behaviors that streams can exhibit.

 Example

 Execution  >45 89 37 Number1: 45 Number2: 89 Number3: 37

Notice how all three numbers were entered at the same time in one line, but the stream only pulled them out of the buffer when they were asked for. This can cause unexpected output, since the user might accidentally put an extra space into his input. A well written program will test for this type of unexpected input and handle it gracefully.

ios
ios is a header file in the C++ standard library that defines several types and functions basic to the operation of iostreams. This header is typically included automatically by other iostream headers. Programmers rarely include it directly.

fstream
With <tt>cout</tt> and <tt>cin</tt>, we can do basic communication with the user. For more complex io, we would like to read from and write to files. This is done with file stream classes, defined in the header <tt> </tt>. <tt>ofstream</tt> is an output file stream, and <tt>ifstream</tt> is an input file stream.

To open a file, one can either call <tt>open</tt> on the file stream or, more commonly, use the constructor. One can also supply an open mode to further control the file stream. Open modes include
 * Files
 * ios::app Leaves the file's original contents and appends new data to the end.
 * ios::out Outputs new data in the file, removing the old contents. (default for ofstream)
 * ios::in Reads data from the file. (default for ifstream)

Example

The call to  can be omitted, if you do not care about the return value (whether it succeeded); the destructors will call close when the object goes out of scope.

If an operation (e.g. opening a file) was unsuccessful, a flag is set in the stream object. You can check the flags' status using the  or   member functions, which return a boolean value. The stream object doesn't throw any exceptions in such a situation; hence manual status check is required. See reference for details on  and.

Text input until EOF/error/invalid input
Input from the stream <tt>infile</tt> to a variable <tt>data</tt> until one of the following:
 * EOF reached on <tt>infile</tt>.
 * An error occurs while reading from <tt>infile</tt> (e.g., connection closed while reading from a remote file).
 * The input item is invalid, e.g. non-numeric characters, when <tt>data</tt> is of type <tt>int</tt>.

Note that the following is not correct:

This will cause the last item in the input file to be processed twice, because <tt>eof</tt> does not return true until input fails due to EOF.

ostream
It is often useful to have your own classes' instances compatible with the stream framework. For instance, if you defined the class Foo like this:
 * Classes and output streams

You will not be able to pass its instance to cout directly using the '<<' operator, because it is not defined for these two objects (Foo and ostream). What needs to be done is to define this operator and thus bind the user-defined class with the stream class.

Now this is possible:

The operator function needs to have 'ostream&' as its return type, so chaining output works as usual between the stream and objects of type Foo:

This is because (cout << my1) is of type ostream&, so the next argument (my2) can be appended to it in the same expression, which again gives an ostream& so my3 can be appended and so on.

If you decided to restrict access to the member variables  and   (that is probably a good idea) within the class Foo, i.e.:

you will have trouble, because << function doesn't have access to the private variables of its second argument. There are two possible solutions to this problem:

1. Within the class Foo, declare the << function as the classes' friend that grants it access to private members, i.e. add the following line to the class declaration:

Then define the operator<< function as you normally would (note that the declared function is not a member of Foo, just its friend, so don't try defining it as Foo::operator<<).

2. Add public-available functions for accessing the member variables and make the << function use these instead:

Rounding number example
This is a small example that rounds a number to a string, a function called. Figures may have trailing zeros, those that would be expected to disappear using a number format.

The constant class contains repeating constants that should exist only once in the code so that to avoid inadvertent changes. (If the one constant is changed inadvertently, it is most likely to be seen, as it is used at several locations.)

The code was first cross-compiled by the JAVA TO C++ CONVERTER of Tangible Software Solutions. Parts may have a copyright notice requirement that prevents inclusion in this work you can get yourself the code for the  at that location.

Here is the relevant code and its call. You are invited to write a shorter version that gives the same result.

The  class is an enhancement to the   library and contains the rounding calculations.

Using precompiled headers requires the StdAfx files:

The  class was added by the JAVA TO C++ CONVERTER during the crosscompilation:

Extensive testing of a software is crucial for qualitative code. To say that the code is tested does not give much information. The question is what is tested. Not in this case, but often it is also important to know where (in which environment) it was tested, and how - i.e. the test succession. Here is the code used to test the  class.

The results of your better code should comply with the result I got:

Maths::RoundToString(5, '.', 0.00000000000000000) = 0.00000 Maths::RoundToString(5, '.', -1.40129846432482020e-045) = -1.4012e-45 Maths::RoundToString(5, '.', 1.40129846432482020e-045) = 1.4013e-45 Maths::RoundToString(5, '.', -1.99999975700000000e-005) = -1.9998e-5 Maths::RoundToString(5, '.', 1.99999975700000000e-005) = 2.0000e-5 Maths::RoundToString(5, '.', -0.00019999997570000) = -0.00019999 Maths::RoundToString(5, '.', 0.00019999997570000) = 0.00020000 Maths::RoundToString(5, '.', -0.00064058900000000) = -0.00064058 Maths::RoundToString(5, '.', 0.00064058900000000) = 0.00064059 Maths::RoundToString(5, '.', -0.00199999975700000) = -0.0019999 Maths::RoundToString(5, '.', 0.00199999975700000) = 0.0020000 Maths::RoundToString(5, '.', -0.33968999981880188) = -0.33967 Maths::RoundToString(5, '.', 0.33968999981880188) = 0.33968 Maths::RoundToString(5, '.', -0.34000000000000002) = -0.33999 Maths::RoundToString(5, '.', 0.34000000000000002) = 0.34000 Maths::RoundToString(5, '.', -7.07000000000000030) = -7.0699 Maths::RoundToString(5, '.', 7.07000000000000030) = 7.0700 Maths::RoundToString(5, '.', -118.18800000000000000) = -118.18 Maths::RoundToString(5, '.', 118.18800000000000000) = 118.19 Maths::RoundToString(5, '.', -118.20000000000000000) = -118.19 Maths::RoundToString(5, '.', 118.20000000000000000) = 118.20 Maths::RoundToString(5, '.', -123.40500900000001000) = -123.40 Maths::RoundToString(5, '.', 123.40500900000001000) = 123.41 Maths::RoundToString(5, '.', -30.76994323730469100) = -30.768 Maths::RoundToString(5, '.', 30.76994323730469100) = 30.770 Maths::RoundToString(5, '.', -130.76994323730469000) = -130.75 Maths::RoundToString(5, '.', 130.76994323730469000) = 130.77 Maths::RoundToString(5, '.', -540.00000000000000000) = -539.99 Maths::RoundToString(5, '.', 540.00000000000000000) = 540.00 Maths::RoundToString(5, '.', -12345.00000000000000000) = -12344 Maths::RoundToString(5, '.', 12345.00000000000000000) = 12345 Maths::RoundToString(5, '.', -123456.00000000000000000) = -123450 Maths::RoundToString(5, '.', 123456.00000000000000000) = 123460 Maths::RoundToString(5, '.', -540911.00000000000000000) = -540900 Maths::RoundToString(5, '.', 540911.00000000000000000) = 540910 Maths::RoundToString(5, '.', -9.22337203685477560e+056) = -9.2232e56 Maths::RoundToString(5, '.', 9.22337203685477560e+056) = 9.2234e56

If you are interested in a comparison of C++ with C#, take a look at C# programming rounding number example. If you want to compare C++ with Java, compare it to the rounding code at Java Programming rounding number example.

|I

title: C++ Programming/Code/IO


text:
Introduction to Sociology/Politics and Government

Politics is the process by which decisions are made for a given society. The method of making decisions for groups varies, but the act of decision making is the key component that characterises politics. Although it is generally applied to governments, politics is also observed in all human group interactions, including corporate, academic, and religious institutions.

Political science is the study of political behavior and examines the acquisition and application of power, i.e. the ability to impose one's will on another.

One theorist, Harold Lasswell, has defined politics as "who gets what, when, and how."

Another definition of 'politics' is: "how power is distributed within a group or system".

A natural state
In 1651, Thomas Hobbes published his most famous work, Leviathan, in which he proposed a model of early human development to justify the creation of human associations. Hobbes described an ideal state of nature wherein every person had equal right to every resource in nature and was free to use any means to acquire those resources. Noting that such an arrangement created a “war of all against all” (bellum omnium contra omnes). Further, he noted that men would enter into a social contract and would give up absolute rights for certain protections.

While it appears that social cooperation and dominance hierarchies predate human societies, Hobbes’s model illustrates a rationale for the creation of societies (polities).

Early history
V.G. Childe describes the transformation of human society that took place around 6000 BCE as an urban revolution. Among the features of this new type of civilization were the institutionalization of social stratification, non-agricultural specialised crafts (including priests and lawyers), taxation, and writing. All of which require densely populated settlements - cities.

The word "Politics" is derived from the Greek word for city-state, "Polis". Corporate, religious, academic and every other polity, especially those constrained by limited resources, contain dominance hierarchy and therefore politics. Politics is most often studied in relation to the administration of governments.

The oldest form of government was tribal organization. Rule by elders was supplanted by monarchy, and a system of Feudalism as an arrangement where a single family dominated the political affairs of a community. Monarchies have existed in one form or another for the past 5000 years of human history.

Definitions

 * Power is the ability to impose one's will on another. It implies a capacity for force, i.e violence.
 * Authority is the power to enforce laws, to exact obedience, to command, to determine, or to judge.
 * Legitimacy is an attribute of government gained through the acquisition and application of power in accordance with recognized or accepted standards or principles.
 * A government is the body that has the authority to make and enforce rules or laws.

Political power
Samuel Gompers’ maxim,"Reward your friends and punish your enemies," hints at two of the five types of power recognized by social psychologists: incentive power (the power to reward) and coercive power (the power to punish). Arguably the other three grow out of these two.

Legitimate power, the power of the policeman or the referee, is the power given to an individual by a recognized authority to enforce standards of behavior. Legitimate power is similar to coercive power in that unacceptable behavior is punished by fine or penalty.

Referent power is bestowed upon individuals by virtue of accomplishment or attitude. Fulfillment of the desire to feel similar to a celebrity or a hero is the reward for obedience.

Expert power springs from education or experience. Following the lead of an experienced coach is often rewarded with success. Expert power is conditional to the circumstances. A brain surgeon is no help when your pipes are leaking.

Authority and legitimacy
Max Weber identified three sources of legitimacy for authority known as (tripartite classification of authority). He proposed three reasons why people followed the orders of those who gave them:

Traditional
Traditional authorities receive loyalty because they continue and support the preservation of existing values, the status quo. Traditional authority has the longest history. Patriarchal (and more rarely Matriarchal) societies gave rise to hereditary monarchies where authority was given to descendants of previous leaders. Followers submit to this authority because "we've always done it that way." Examples of traditional authoritarians include kings and queens.

Charismatic
Charismatic authority grows out of the personal charm or the strength of an individual personality (see cult of personality for the most extreme version). Charismatic regimes are often short lived, seldom outliving the charismatic figure that leads them. Examples include Hitler, Napoleon, and Mao. Charismatic authority is also frequently seen as the catalyzing force of social movements, such as in Jesus Christ, Mohandas Gandhi, or Martin Luther King, Jr. Weber was interested in what happens to the authority embodied in these charismatic leaders once they died. He argued that the authority structure would be transmitted to one of the other two types. One possibility is that an heir of some kind (offspring or an influential follower) would take over, leading towards a form of traditional authority. Or, the charisma of the leader would be rationalized and placed into a bureaucratic or rule-oriented power authority structure (i.e legal-rational authority).

Legal-rational
Legal-Rational authorities receive their ability to compel behavior by virtue of the office that they hold. It is the authority that demands obedience to the office rather than the office holder. Modern democracies are examples of legal-rational regimes.

Definitions
One approach is to define government as the dominant(on top) better decision-making arm of the state, and define the latter on the basis of the control it has over violence and the use of force within its territory. Specifically, the state (and by extension the government) has been considered by some to be the entity that holds a monopoly on the legitimate use of force within a territory. This view has been taken by the political economist Max Weber and subsequent political philosophers. The exact meaning of it depends on what is understood by “legitimate”. If we use the term in an ethical sense, then this definition would suggest that an organisation might be considered a state by its supporters but not by its detractors. An alternative definition is to take "legitimate" violence to be simply that which has active or tacit acceptance by the vast majority of the population. In this view, the presence of insurrection or civil war against an entity would jeopardise its claim to be a state, provided the insurrection enjoyed significant popular support. Similarly, an entity that shared military or police power with independent militias and bandits could be considered to have a monopoly on “legitimate” violence but to be failing to enforce it, reducing its claim to statehood. In practice, such situations are often described as "failed states".

Government can also be defined as the political means of creating and enforcing laws; typically via a bureaucratic hierarchy. Under this definition, a purely despotic organization which controls a territory without defining laws would not be considered a government.

Another alternative is to define a government as an organisation that attempts to maintain control of a territory, where "control" involves activities such as collecting taxes, controlling entry and exit to the state, preventing encroachment of territory by neighbouring states and preventing the establishment of alternative governments within the country.

In Commonwealth English, the word "Government" can also be used to refer only to the executive branch, in this context being a synonym for the word "administration" in American English (e.g. the Blair Government, the Bush Administration). In countries using the Westminster system, the Government (or party in Government) will also usually control the legislature. The French use of the word gouvernement covers both meanings, whereas Canadian French generally uses it to mean the executive branch. The German word Regierung refers only to government as the executive branch; the wider meaning of the word, government as a system, can be translated as Staatsgewalt.

Forms of government
Various forms of government have been implemented. A government in a developed state is likely to have various sub-organisations known as offices, departments, or agencies, which are headed by politically appointed officials, often called ministers or secretaries. Ministers may in theory act as advisors to the head of state, but in practice have a certain amount of direct power in specific areas. In most modern democracies, the elected legislative assembly has the power to dismiss the government, but in those states that have a separate head of government and head of state, the head of state generally has great latitude in appointing a new one.

Theories
There are a wide range of theories about the reasons for establishing governments. The four major ones are briefly described below. Note that they do not always fully oppose each other - it is possible for a person to subscribe to a combination of ideas from two or more of these theories.

Greed and oppression
Many political philosophies that are opposed to the existence of a government (such as Anarchism, and to a lesser extent Marxism), as well as others, emphasize the historical roots of governments - the fact that governments, along with private property, originated from the authority of warlords and petty despots who took, by force, certain patches of land as their own (and began exercising authority over the people living on that land). Thus, it is argued that governments exist to enforce the will of the strong and oppress the weak.

Order and tradition
The various forms of conservatism, by contrast, generally see the government as a positive force that brings order out of chaos, establishes laws to end the "war of all against all", encourages moral virtue while punishing vice, and respects tradition. Sometimes, in this view, the government is seen as something ordained by a higher power, as in the divine right of kings, which human beings have a duty to obey.

Natural rights
Natural rights are the basis for the theory of government shared by most branches of liberalism (including libertarianism). In this view, human beings are born with certain natural rights, and governments are established strictly for the purpose of protecting those rights. What the natural rights actually are is a matter of dispute among liberals; indeed, each branch of liberalism has its own set of rights that it considers to be natural, and these rights are sometimes mutually exclusive with the rights supported by other liberals.

Social contract
One of the most influential theories of government in the past two hundred years has been the social contract, on which modern democracy and most forms of socialism are founded. The social contract theory holds that governments are created by the people in order to provide for collective needs (such as safety from crime) that cannot be properly satisfied using purely individual means. Governments thus exist for the purpose of serving the needs and wishes of the people, and their relationship with the people is clearly stipulated in a "social contract" (a constitution and a set of laws) which both the government and the people must abide by. If a majority is unhappy, it may change the social contract. If a minority is unhappy, it may persuade the majority to change the contract, or it may opt out of it by emigration or secession.

Operations
Governments concern themselves with regulating and administering many areas of human activity, such as trade, education, medicine, entertainment, and war.

Enforcement of power
Governments use a variety of methods to maintain the established order, such as police and military forces, (particularly under despotism, see also police state), making agreements with other states, and maintaining support within the state. Typical methods of maintaining support and legitimacy include providing the infrastructure for administration, justice, transport, communication, social welfare etc., claiming support from deities, providing benefits to elites, holding elections for important posts within the state, limiting the power of the state through laws and constitutions (see also Bill of Rights) and appealing to nationalism. Different political ideologies hold different ideas on what the government should or should not do.

Territory
The modern standard unit of territory is a country. In addition to the meaning used above, the word state can refer either to a government or to its territory. Within a territory, subnational entities may have local governments which do not have the full power of a national government (for example, they will generally lack the authority to declare war or carry out diplomatic negotiations).

Scale of government
The scale to which government should exist and operate in the world is a matter of debate. Government spending in developed countries varies considerally but generally makes up between about 30% and 70% of their GDP.

Politics is the study of power relations. Power is all pervasive. All of us organise our relations with others through the manipulation of power. Government is a form of organising the power relations in a society. In the ancient societies we had clan groups, caste groups, elders, village council, etc to regulate the relationships that exist in a society. In the modern society, there emerged a new form of regulating the relationship called government.

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


text:
A-level Physics/Electrons, Waves and Photons/Electric current

Electricity is useful because we can easily transform electrical energy to other forms of energy such as light, sound and heat. Electricity is transferred from place to place by wires as an electric current.

Current and Charge
Electric current is the flow of charged particles, usually electrons, around a circuit. Metals are good conductors of electricity because they have free electrons that can move around easily.

Current is measured in amperes.

Charged particles have a charge which is either positive or negative. The strength of a charge can be found using the formula:

 * $$Q = I \times t$$

where Q is the quantity of charge in coulombs, I is the current in amps, and t is the time in seconds

We can use this formula to define the coulomb:

One coulomb is the amount of charge which flows past a point when a current of 1 ampere flows for 1 second

Electron flow
When you attach a battery to a small bulb with wires, you would say that the current is flowing from the positive terminal of the battery to the negative one. This is called conventional current. The electrons, however, flow from the negative terminal to the positive. This electron flow is in the opposite direction to the conventional current, and care must be taken to not confuse the two. When we just say current it is assumed that we are talking about conventional current.

The reason for this is that the direction of conventional current was chosen before people knew what was happening inside a conductor when a current flows.

In A-level, charge in coulombs is the product of current in amperes by the time in seconds.

Resistance
Any component with electrical resistance opposes the flow of an electrical current.

Electrical Resistance
In an electrical circuit, current flows around it. Each component in the circuit has a resistance, which resists the flow of the current.

The voltage that you get from the power supply can be simply described as the "push" given to the electrons to go around the circuit.

It would then make sense to say that the greater the voltage, the greater the current, and the greater the resistance, the lower the current. The current flowing around the circuit could then be written as the equation:

 * $$I=\frac {V}{R}$$.

For example, if you were to connect a 9 volt power supply to a 3 Ω (read as 3 ohm) resistor, you could use the formula above to find the current. $$I=\frac {9}{3}$$, so $$I=3A$$.

A particular arrangement of this formula is used to define resistance and the ohm.

 * $$R=\frac {V}{I}$$.

This says that the resistance of a component is the voltage across it for every unit of current flowing through it. More formally this can be written as:

The resistance of a component in a circuit is the ratio of the voltage across that component to the current in it.

The unit of resistance, the ohm (Ω), is defined so that one ohm is the resistance of a component that has a voltage of 1 volt across it for every amp of current flowing through it. In other words, one ohm is one volt per amp.

Ohm's Law
In many components, the voltage across it is proportional to the current flowing through it. You can make this observation on a circuit with a resistor of a known resistance, a voltmeter, an ammeter, and a power supply with a variable voltage. As you increase the voltage, the current will also increase. You will come to the conclusion that $$V \propto I$$, with the constant of proportionality equal to $$R$$. This gives us $$V = IR$$, an arrangement of the familiar formula.

Components where $$V \propto I$$, are known as ohmic conductors, and have a constant resistance. They are said to follow Ohm's law, which states that: If the source voltage remains constant, the flow of current is inversely proportional to resistance. OR If the temperature remains constant, the current flowing through a conductor is directly proportional to the potential difference across it.

Note that not all components are ohmic conductors, and can have varying values of resistance. You will have to use the formula $$R = \frac {V}{I}$$ to find the resistance for specific values of $$V$$ and $$I$$.

Below you can see 3 graphs with current on the vertical axis, and voltage on the horizontal axis. Where the graph is a straight line, the voltage is proportional to the current. Therefore, only the metallic conductor is an ohmic conductor.

A diode and a filament lamp are two examples of non-ohmic conductors. The diode is designed to only allow current through in one direction, hence the use of negative values on its graph. The filament lamp doesn't have a constant temperature, which according to Ohm's law is required for a component to be an ohmic conductor. Instead, it heats up as a current passes through it, which has an effect on the resistance.

Resistivity
The resistivity of a material is the property that determines its resistance for a unit length and unit cross sectional area of that material. Copper, for example, is a better conductor than lead, in other words lead has a higher resistivity than copper. You can compare different materials in this way.

Resistivity, ρ (the Greek letter rho), is defined by the equation:

 * $$\rho = \frac{RA}{l}$$

Where ρ is resistivity, R is the resistance, A is the cross sectional area of the material, and l is the length of the material.

The units of resistivity are Ohm-meters, Ωm.

If we rearrange the above equation so that:

 * $$R = \frac{\rho l}{A}$$

You can see that as the length of a wire is increased, its resistance will increase, and as the cross sectional area of a wire is increased, its resistance will decrease. This is true provided that the temperature is constant, and that the same materials are always used, to make sure that the resistivity stays the same.

Voltage and Energy
Earlier, we simply said that a voltage is the "push" given to electrons, or units of charge. Now, we will take a look at voltage in terms of energy, and find a more accurate definition of the volt.

Potential Difference
When you attach a voltmeter across a component, the voltage you are measuring is a potential difference (PD). Electrical energy is being used up by the component, and so we can say that a potential difference is a voltage where the charge is losing energy. Potential difference has the symbol V.

By definition, the potential difference is the energy converted from electrical energy to other forms of energy in moving a unit of electrical charge from one point to another. So, if the PD of a resistor is say, 2V then if 3 coulomb of charges pass through it, then the energy used up is 6 Joules.

Potential difference is the energy lost per unit charge, and can be written as the following formula:

 * $$V=\frac{W}{Q}$$

Electromotive Force
A battery provides a certain voltage to the circuit, and the electrons are gaining energy from the battery as they flow past. This voltage where the charge gains energy is called an electromotive force (EMF) and is measured in volts (V). Its symbol is ε.

EMF. is the energy gained per unit charge, and can be written as the following formula:

 * $$E=\frac{W}{Q}$$

Both the PD and EMF are measured in volts, and one volt is equivalent to one joule per coulomb.

Electrical Energy and Power
Power is the rate at which energy is transferred, written as the formula:

 * $$P=\frac{W}{t}$$

To find a formula for electrical power, we take the following formula for voltage and make W the subject:

 * $$V=\frac{W}{Q}$$

 * $$W=QV$$

Then we need to divide both sides by t to get power:

 * $$\frac{W}{t}=\frac {QV}{t}$$

Recall that charge divided by time is current, we now have:

 * $$P=I \times V$$

From the formula above, you can see that the electrical power is simply the product of current and voltage. You can combine this with $$V=IR$$ to give two further equations:

 * $$P=I^2R$$

 * $$P=\frac{V^2}{R}$$

One last formula is for energy and is derived from the formula for power:

 * $$P=\frac{W}{t}=IV$$

 * $$W=IVt$$


text:
User:1983/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.8em; border-bottom: 1px solid silver; text-align: right; 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; }

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; }

title: User:1983/myskin.css


text:
Trigonometry/Graphs of Other Trigonometric Functions

A graph of $$\tan(x)$$. $$\tan(x)$$ is defined as $$\frac{\sin(x)}{\cos(x)}$$.

A graph of $$\csc(x)$$. $$\csc(x)$$ is defined as $$\frac{1}{\sin(x)}$$.

A graph of $$\sec(x)$$. $$\sec(x)$$ is defined as $$\frac{1}{\cos(x)}$$.

A graph of $$\cot(x)$$. $$\cot(x)$$ is defined as $$\frac{1}{\tan(x)}$$ or $$\frac{\cos(x)}{\sin(x)}$$.

Note that $$\tan(x)$$, $$\sec(x)$$ , and $$\csc(x)$$ are unbounded, positive or negative. While $$\tan(x)$$ (and $$\cot(x)$$) can take any value, $$\sec(x)$$ and $$\csc(x)$$ can never lie between -1 and 1.

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


text:
Rebol Programming/Language Features/VID

VID
VID stands for Visual Interface Dialect and is the most commonly used method for designing graphical user interfaces with Rebol/View. It works very well for interfaces that use a lot of graphics, e.g. images, animation.

One of the strong points of VID is that you can create a user interface very quickly, using only a couple of lines of code to make a button do something.

The GUI itself is platform independent, which means it looks the same whether you run your program on Windows, MacOSX, Linux or other platforms.

The most important thing to know about VID is that it is, as the name suggests, a dialect or sub-language of Rebol. Code written in VID does not evaluate as Rebol code, but has to be translated first into Rebol code prior to execution. In essence, a code generator called layout creates the Rebol code that is then executed by the Rebol View engine. Words used in the visual interface dialect may share the same spelling as normal Rebol functions, but are used completely differently.

view lo: layout [ button "Press Me" return button "Press Me Too!" ]

Here, layout takes a block of words written in the visual interface dialect. You can see the word return used here, but in this context, it has a totally different meaning. It is not used to return a value, but tells the layout engine to place the next button to the left of the screen, and on the next line. This different meaning of return also illustrates the context sensitive nature of Rebol programming.

layout returns a block of Rebol code, and in this example, it is assigned to the variable lo. If you were then to look at what code has been generated by

probe lo

you will see screens and screens of code flashing before you.

Showcase
Here are a few examples of what can be done with VID.

Need more examples

Faces
Each graphical element in a VID layout is called a face, which basically is a tree structure of objects. A face can contain other faces.

The full mechanics of faces and the face object will be explained in the next chapter.

Example Notes
The examples only show the layout code block, which means the block used for creating the layout. All examples should be written as:

view layout [button "Hello World!"]

while we only show:

button "Hello World!"

This makes it a bit easier to write the examples.

Buttons
There are two kinds of buttons: BTN and BUTTON

btn "Hello World!"

This button is the standard type, and the easiest to use. It scales automatically with the text, but you can for example set a width for the button:

btn 150 "Hello World!" btn 150 "This is Rebol"

It's also easy to provide different colors and sizes for BTN:

btn 150x40 red "Big Red Button!" btn 200x20 yellow "Wide Yellow Button!"

BUTTON is different because it offers more customization in terms of coloring, edge size and gradients.

button "Hello World!"

Button Actions
In order to do something with the button, you can specify an action block. This is simply a block of code that is evaluated when the button is pressed, e.g. on left mouse button press. This block can be specified like so:

button "Hello World!" [print "Hello World!"]

When running this program, the console will print "Hello World!", every time you click the button.

Toggles
A toggle is a button which has two states. There are two kinds of toggles: TOG and TOGGLE.

tog "Activated"

toggle "Activated"

Like BUTTON, TOGGLE is customizable.

http://en.wikibooks.org/wiki/REBOL_Programming

Choice
A choice is a button which has many states. It takes several strings to create the selection. Here is an example:

choice "Excellent" "Good" "Ok" "Lacking" "Dismal"

We can extend this example by providing code within a block. The state of the choice is held in c/data/1

c: choice "Excellent" "Good" "Ok" "Lacking" "Dismal" [print c/data/1]

Using this, we can trigger events based on a certain selection by using SWITCH:

c: choice "Excellent" "Good" "OK" "Lacking" "Dismal" [ switch c/data/1 [ "Excellent" [alert "Yeah!!!!!!"] "Good" [alert "Thank you!"] "OK" [alert "eh"] "Lacking" [alert "Come on!"] "Dismal" [alert "You can do better than that!"] ] ]

Simple Lists
Simple lists are single column lists, which can be created with TEXT-LIST. The advantage is that it's very simple to access and is very useful in multi-list layouts, where multiple lists need to interact.

A simple list:

>> view layout [text-list data ["Hello World!" Rebol is Cool!]]

Complex Lists
Complex lists provide a lot more functionality, but take more time to setup. With a complex list, you can use:

 * Multiple Columns
 * Varying font and color schemes

For a typical complex list, you use LIST:

l: list [ ... GUI code ... ] supply [ ... DATA code ... ]

List Code
The GUI code is a simple layout that represents one entry in the list. The layout can be as flexible as any other layout in VID and thus you can produce both vertical and horizontal layouts with text, graphics or images. Certain rules should be followed.

Example:

l: list 300x100 [across text text text] supply []

will produce an empty list of iterated faces.

List Data
The DATA code is the code to supply the list with data, and is a function that is iterated through out each single face in the list. Two variables index and count can be used directly to automatically iterate through your data in the function. The index value is used by each column of the list, while count specifies each row. For a list with 3 columns, the sequence will be:

ROW1 COLUMN1 ROW1 COLUMN2 ROW1 COLUMN3 ROW2 COLUMN1 ROW2 COLUMN2 ROW2 COLUMN3 ROW3 COLUMN1 ROW3 COLUMN2 . ..

For the list, the scroller is separate and should also be managed manually. It can also be placed where you want.

Selecting Values
Events in the list layout can be used to select or display an over color when you hover the mouse over a list entry.

Complete Example
A complete example:

l: list 300x200 [ across text 200 bold text 50 red text 50 blue ] supply [ (complete this) ]

Manipulating Iterated Faces
The supply function can manipulate the list layout as you are iterating down through the list. This is nice when you want to make the text style, background color or other face attribute data dependent.

Alternating Background Colors Example
l: list 300x200 [ across space 0 text 200 bold text 50 red text 50 blue ] supply [ (complete this) ]

Layout functions
VID provides various functions for ordering your faces in a specific layout.

Resizing
Using VID with resizing windows is a bit hard, but still possible: You need to detect when the window is resized and then redraw your GUI according to this new size.

Adhering to resizable layouts
To use VID with resizable faces, you need to know about the dimensions of your GUI.

VID has no direct functions for "attaching" faces to a specific size-dependent location of a GUI, so we need to carry out those calculations ourselves.

Panels
Panels are groups of VID faces. This has many advantages:

 * Faces in a panel can be moved together
 * Textfields in a panel can be updated together

Updating Panel Faces
When you have a form, that needs to be automatically filled, you can either fill out each field, one at a time, or group them in a panel, and update all fields at once using SET-FACE:

person: panel [ field field field ]

And updating all fields:

set-face person ["This" "is" "Cool"]

Not only strings can be used:

set-face person [25$ now http://www.rebol.com]

If you have other faces than fields, they can be skipped by inserting a NONE in the block:

person: panel [ field field box field ]

set-face person ["This" "is" none "Cool"]

TODO: Please check which faces, SET-FACE works on

Multiple Windows
In REBOL there is no real concept of a "main window", except for the console. If you close the console, you'll close all windows and quit the running program. If you have a script that is run from a double clicked script icon in Windows XP, you will be able to run your program without the console window and hence no main window.

It's possible to open as many windows as you want and they are equal in capability to each other and can control each other fully.

VID windows are really groups of faces, stored in another face object. This gives you the flexibility to present your GUI in a window or as part of a group of a larger GUI.

Windows
To open a single window, you normally use VIEW:

view layout [btn "Hello World"]

To open additional windows from this window, add an action to the BTN:

view layout [ btn "Hello World" [view/new layout [h1 "New Window"]] ]

VIEW/NEW is also useful, if you want to set variables or run other code, before capturing events from the created window.

Write something about DO-EVENTS.

Alerts
Alerts are useful if you quickly want to display a dialog box with a message and a few buttons. It's a fast way to get user feedback. ALERT is the simplest one:

alert "This is an Alert Window"

will give the following:

REQUEST offers more flexibility with various button arrangements.

request "Do you want to Rock and REBOL?"

Styles
Styles are useful if you want more control over the visual appearance over a large section of faces. Let's say you want all buttons to be red? You can do that with stylize. You can produce a new kind of button that behaves differently from standard buttons. All parts of a face can be altered in your customized style. Styles are the easiest way to produce a customized, but uniform GUI look and behaviour.

Think of it as the style palette of a word processor. You can define a variety of styles, use them in your GUI and change them in a similar way to all the section headlines of your document. The concept is also similar to that of Cascading Style Sheets used with webpages and HTML.

There are two ways of using styles:

'Style
The 'style word is used within a layout:

view layout [ style my-btn btn red my-btn "Customized Button" ]

Stylize
If you want a larger separate section of styles, you can define that as a block:

my-styles: stylize [ my-btn: btn red ] view layout [ styles my-styles my-btn "Customized Button" my-btn "Another Button" ]

Events
This should probably be moved to View, as it's a more basic function than VID.

All faces share the same event system, which means the way to handle events for a face is the same for all faces. (true?)

To control events for a face, you use the FEEL keyword.

Images
Images can be loaded into a VID GUI.

title: Rebol Programming/Language Features/VID


text:
Talk:Blender 3D: Noob to Pro/Simple Vehicle

Err I thought this was about path modelling, so why using mesh? On the other hand why would anybody want to model a vehicle using paths, except for creating a spline cage or better blueprints? To cut it short, what should go here?

new way
I think this was no taking any progress, so ive changed it fro a line modeling to a general design tutorial, just do no know how to change the place it takes in the general diagram.

Reptiles extintos 19:51, 21 April 2006 (UTC)

Revision
The above suggestion was taken, and the page was moved to the Mesh section. Hopefully this will reduce confusion.

Averie Zen 11:39, 26 November 2006 (UTC)

Inconsistent sequence of pages
The sequence of pages is inconsistent around this page. On the TOC of this wikibook only Simple_Vehicle shows.
 * On Model_a_Silver_Goblet the next page is Simple_Vehicle_Part_I.
 * On Simple_Vehicle_Part_I the previous page is Model_a_Silver_Goblet and the next is Simple_Vehicle:_Wheel.
 * On Simple_Vehicle:_Wheel the previous page is Simple_Vehicle.
 * On Simple_Vehicle the previous page is Model_a_Silver_Goblet and the next is Simple_Vehicle:_Wheel.


text:
Radiation Oncology/Thyroid

 * /Workup/
 * /Staging/
 * Official Guidelines
 * Papillary and follicular
 * Medullary
 * Hurthle cell
 * Anaplastic

See also:
 * Thyroid Lymphoma

title: Radiation Oncology/Thyroid


text: Subject:Software reverse engineering

title: Subject:Software reverse engineering


text:
Radiation Oncology/Head & Neck/Sinonasal/Maxillary sinus

Epidemiology

 * 3% of aerodigestive tract malignancies
 * Peak incidence in age 50-59
 * M:F 3:1
 * 70-80% of tumors of the paranasal sinuses originate in maxillary sinus.

Risk Factors

 * Medical/occupational exposure (thorotrast, nickel, chromium,hydrocarbons, nitrogen mustard)
 * Woodworkers have 500 times greater risk than general population of having carcinoma of maxillary sinus

Anatomy

 * The paranasal sinuses include the frontal, ethmoid, sphenoid, and maxillary sinuses.

Borders of Maxillary Sinus
 * Medial border - nasal cavity
 * Superior border - orbit
 * Anterolateral border - facial bone
 * Posteromedial border - infratemporal fossa

Ohngren's line is the oblique plane joining medial canthus of the eye with the angle of the mandible. It divides the maxilla into the infrastructure and superstructure. This line was originally described in the 1930's by Dr. Ohngren to delineate the limits of resectability of a tumor in the maxillary sinus. Tumors that extended into the superstructure (superoposterior to Ohngren's line) were more likely to involve the orbit, ethmoids, and pterygopalatine fossa. This line became the basis of original staging systems.

Nodal drainage of Paranasal sinuses Clinically involved nodes occur in approximately 15% of pts overall, but has been reported as >20% for SCC histology.
 * Retropharyngeal nodes 1st echelon
 * Periparotid nodes
 * Submandibular nodes

Staging
see Staging

Treatment
NCCN Radiation Therapy Guidelines:
 * Radiation therapy alone can be used as a primary modality for T1-T2 N0 patients, inoperable patients.
 * Indications for adjuvant radiation therapy include: T1N0 patients with positive margins, perineural invasion, T3 or T4; consider for T2N0. For any N+, radiation to the neck
 * Contraindications of surgery include intracranial invasion, carotid involvement, bilateral cavernous sinus involvement, and distant metastases
 * Definitive xrt for primary and gross adenopathy: >66 Gy
 * Treatment of undissected neck: 50 Gy
 * Adjuvant xrt for primary tumor bed: >60 Gy
 * Adjuvant xrt to dissected neck (high risk nodal stations): >60 Gy
 * Adjuvant xrt to dissected neck (low risk nodal stations): >50 Gy

Surgical Management

 * Subtotal Maxillectomy - 2 walls of maxilla removed. Generally indicated only for early (T1-2 lesions) of infrastructure.

 * Radical Maxillectomy - The entire maxilla is removed. This is the standard operation for locally advanced carcinoma of maxilla.  Resection includes the maxilla, nasal bone, ethmoid sinus, and sometimes the pterygoid plates.  The surgery spares the zygoma, orbital periosteum, and palatal mucosa.

 * Craniofacial Resection This surgery is indicated when tumor involves the roof of the ethmoid sinus. The posterior line of resection is foramen ovale, foramen rotundum and internal carotid.  The inferior line of resection is similar to craniofacial frontoethmoidectomy and radical maxillectomy.

 * Orbital Exenteration This surgery was practiced commonly in the 50's and 60's, but has fallen out of favor.  It is generally indicated when orbital fat invasion is seen or orbital contents grossly involved.

Adjuvant Radiation Therapy

 * UT Southwestern, 2002 (1980-97) PMID 12439163 -- "Paranasal sinus malignancies: an 18-year single institution experience." (Myers LL et al, Laryngoscope. 2002 Nov;112(11):1964-9.)
 * 141 pts w/ paranasal sinus malignancy, 88% w/ locally advanced dz, 70% maxillary sinus, 26% ethmoid sinus
 * 62% underwent surgery as part of multimodality tx approach.
 * 5yr DSS 52%, 10yr DSS 35%
 * Local recurrence rate 56%

 * The Netherlands, 2000 (1977-1996) PMID 10924968 -- "Does the combination of radiotherapy and debulking surgery favor survival in paranasal sinus carcinoma?" (Jansen EP et al, Int J Radiat Oncol Biol Phys. 2000 Aug 1;48(1):27-35.)
 * 73 pts w/ paranasal sinus carcinoma tx'd w/ either combination therapy (surg + RT) or monotherapy (surg, RT alone)
 * 5yr local control 65% w/ combination surg + xrt, 47% w/ xrt alone
 * Orbital invasion associated w/ poor local control.

 * MDACC, 1991 (1969-85) PMID 1924855 -- "Maxillary sinus carcinomas: natural history and results of postoperative radiotherapy." (Jiang GL et al, Radiother Oncol 1991 Jul;21(3):193-200.)
 * 73 pts w/ maxillary sinus CA tx'd w/ surgery and postop xrt (dose of 50-60 Gy via wedged pair or 3-field technique)
 * 5yr local control was 78%
 * 5yr relapse free survival was 51%
 * Overall nodal recurrence rate w/o elective nodal irradiation was 38% for SCC or undifferentiated, 5% for adenoid cystic.

Elective Nodal Irradiation

 * Stanford, 2000 (1959-96) PMID 10701732 -- "Lymph node metastasis in maxillary sinus carcinoma." (Le QT, Int J Radiat Oncol Biol Phys. 2000 Feb 1;46(3):541-9.)
 * 97 pts w/ maxillary sinus carcinoma (61 receiving surgery + xrt, 36 pts xrt alone)
 * 5yr actuarial survival 34%, 10 yr 31%
 * Most common sites of nodal recurrence were levels I and II; 12% nodal relapse at 5yrs; 5yr actuarial risk of nodal relapse was 20% w/o ENI, 0% w/ ENI.
 * 5yr actuarial risk of distant relapse 29% w/ neck control, and 81% if neck failure.

Combined Modality Approach

 * Tennessee, 2004 PMID 15313865 -- "Intra-arterial cisplatin and concomitant radiation therapy followed by surgery for advanced paranasal sinus cancer." (Samant S, Arch Otolaryngol Head Neck Surg 2004 Aug;130(8):948-55.)
 * 18 pts tx'd w/ preop high dose intra-arterial cisplatin + IV thiosulfate w/ concurrent xrt (50 Gy). 84% T4 lesions.  Planned surgery 8 wks post xrt (organ sparing, if possible).
 * 2 yr OS 68%, 5 yr OS 53%

Radiation Techniques and Treatment Planning

 * Also please see H&N proton therapy

 * Duke, 1999 PMID 10435816 -- "Conformal radiation therapy treatment planning reduces the dose to the optic structures for patients with tumors of the paranasal sinuses." (Brizel, Radiother Oncol. 1999 Jun;51(3):215-8.)
 * Comparison of 2D and 3D treatment plans, using Dmax, NTCP and V80
 * Conformal plan better: ipsilateral optic nerve 13% NTCP reduction (SS), ipsilateral eye 3% (SS), optic chiasm 0.5% (SS) driven by decreased Dmax and V80


text:
Wikibooks:Linux software howtos bookshelf

 For more books about Linux, visit the Computer software bookshelf.

Table of Contents
Desktops
 * Enlightenment
 * GNOME
 * KDE
 * Xfce
 * Sugar

Office Software
 * AbiWord
 * GnuCash
 * Koffice
 * OpenOffice.org
 * Scribus

Multimedia Software

 * Amarok
 * Audacity
 * Mplayer
 * Rosegarden
 * Xine

Graphics Software
 * The GIMP
 * Inkscape (Needs work)
 * Xpdf
 * XSane
 * Krita

Programming Software
 * Kate
 * Quanta
 * Eclipse
 * Kdevelop
 * Emacs
 * Anjuta

Installers / Package Managers, etc
 * RPM
 * smart
 * apt-get
 * yum
 * Loki Game Installer
 * Compiling Code
 * Autopackage

Games
 * Freeciv
 * Battle for Wesnoth
 * Scorched 3D
 * Bzflag
 * Gnome / KDE Games

Virtualisation and emulation
 * QEMU


text:
MPlayer

MPlayer is a multi-platform media player. It handles many file formats, and can play CDs, VCDs and DVDs. MPlayer also includes Mencoder which is a powerful video conversion program. Both MPlayer and Mencoder can be used from the command line (shell). MPlayer has one official graphical interface (GMplayer), however there are several third party graphic interfaces that allow access to some of Mencoder's functionality.

Installing MPlayer
There are three components to MPlayer: MPlayer itself, GMplayer (the graphical interface), and Mencoder (the video conversion utility). You may need to install each individually if they are not packaged together.

Something else that you may find necessary are external codecs for video file formats not natively supported by MPlayer.

MPlayer packages can be obtained through your linux distributions software manager (RPM DEB etc) or from the MPlayer website http://www.mplayerhq.hu/ which also contains versions for other operating systems (Windows, Apple, Amiga) as well as extra codecs you may require.

Functionality of MPlayer in Windows is very similar to Linux.

Starting MPlayer & Playing Files
At its simplest, MPlayer can be started from the command line; executable followed by the video file you wish to view: You may find, if your MPlayer executable is not in your path, you'll have to specify its location: or as an example.

GUI:

When you start GMplayer, two windows will open: To play a file, right-click in the viewing window, click on 'Open', and then 'Play file'. A file choosing dialog should then open. It is important to note that the file format filter at the bottom of the dialog is, by default, set to 'Video files'. This means that if you want to play an audio (sound) file, it will not be displayed in the dialog. To view audio files, click on the down arrow on the left hand side of the file format filter box, and choose 'All files'. Select a file, and click on OK. The file should start playing immediately.
 * A viewing window - this is where videos / dvds will play.
 * A control window - this is where you can use the most common commands in MPlayer.

Windows command line (no GUI):

Easiest way is to get the basic MPlayer package and codecs from the main MPlayer site (nothing with GUI in the name). Extract all the required files to a directory of your choosing. From there, right click on the video you'd like to watch, and choose 'Open with' and choose other. Browse for your new mplayer directory you created and check "Always use this program" to make it work via double-click.

If you experience problems, just launch mplayer via Windows CMD to get good feedback as to what the trouble is. Dragging and dropping files into a windows command line will print the name, to avoid having to type names/directories. This works with every functionality of mplayer.

(adjust content locations and continue cleanup from here -- kokushibyou).

This shows a file that starts properly; there are some errors (no subtitle fonts, which is easily fixed if required) and other interesting feedback you might be interested in.

(and movie launches in its own window, with the cmd window in the background).

Playing CDs, DVDs and VCDs
GMplayer's menus allow access to your CD/DVD drive for playing most on disk video files. On the command prompt you can simply refer to the DVD:// device or if you have an image of a disk on your hard drive you can use the BIN:// or ISO:// devices. A win32 example is mplayer -dvd-device e: dvd://1 (for title 1).

If the disk does not play, then the system may not have a CDDA extractor such as cdparanoia, or MPlayer was not compiled from source with the correct option enabled. The CDDA extractor is only needed at compile time.

Codecs
In most cases mplayer will automatically recognize the video's format and the environment it is running in. It will then show the video as best it can. If you are running a graphical interface (XWindow, MS Windows) you may wish to start MPlayer's GUI. This can also be started at a command line or from your desktop's "Run file" option or via its menu system. In all cases above the command is; gmplayer.

If you start running into issues with trying to determine why video/sound isn't working, try a few of the following things:
 * Try running mplayer command-line only - your prompt will usually output good information about errors.
 * Be sure you have the full codec pack from http://www.mplayerhq.hu ; or any other codec packs that aren't included there (pretty much everything you'd ever need is already available on their site).

While Watching
Keyboard shortcuts for MPlayer include:
 * q = quit
 * r = sub position -
 * t = sub position +y
 * T = enable/disable stay on top mode
 * y = sub delay reset to 0
 * o/O = toggle on-screen display (enabled, disabled, time lapsed, time lapsed/remaining)
 * p = play/pause
 * [ = speed -10%
 * ] = speed +10%
 * { = speed x 1/2
 * } = speed x 2
 * a = sub alignment
 * d = toggle framedropping (on, hard, off)
 * f = toggle full-screen
 * j = toggle subtitle (off, language 1, language 2, etc...)
 * l = load file to playlist (GUI only)
 * z = sub delay -
 * x = sub delay +
 * c = skin browser
 * v = enable/disable subtitles
 * b = toggle subtitle (off, language 1, language 2, etc...)
 * m = mute on/off
 * / = volume down,
 * 0 = play
 * . = frame advance
 * 1 = contrast -
 * 2 = contrast +
 * 3 = brightness -
 * 4 = brightness +
 * 5 = tint - (green)
 * 6 = tint + (red)
 * 7 = color -
 * 8 = color +
 * / = volume -
 * * = volume +
 * - = audio-video delay -
 * + = audio-video delay +
 * up = forward 1 minute
 * down = back 1 minute
 * left = rewind
 * right = fast forward
 * home = beginning
 * end = end
 * pg up = forward 10 mins
 * pg dn = back 10 mins
 * # = toggle audio

OSD Menu
Mplayer has a freely configurable OSD menu. Unfortunately it is not well documented (or rather, not at all...). The following is an example menu.conf (to be put in ~/.mplayer on GNU/Linux systems): To enable it you must include something like the following keybinding in the 'input.conf' file in the same directory as 'menu.conf':

'm' can be any key (or mouse button (i.e MOUSE_BTN2)). Then start mplayer with the -menu switch (alternatively you can put  in the 'config' file.

Mencoder
MEncoder is a command line video decoding, encoding and filtering tool that is included with most MPlayer packages. It is a close sibling to MPlayer and can convert all the formats that MPlayer understands into a variety of compressed and uncompressed formats using different codecs.

Capabilities
As it is built from the same code as MPlayer, it can read from every source which MPlayer can read, decode all media which MPlayer can decode and it supports all filters which MPlayer can use. MPlayer can also be used to view the output of most of the filters (or of a whole pipeline of filters) before running MEncoder. If the system is not able to process this in realtime, audio can be disabled using -nosound to allow a smooth review of the video filtering results.

It is also possible to copy audio and/or video unmodified into the output file to avoid quality loss because of re-encoding for example, to only modify the audio or video, or to simply put the audio/video data unmodified into a different container format.

Since it uses the same code as MPlayer, it also features the same huge number of highly-configurable video and audio filters to transform the video and audio stream: Filters include Cropping, Scaling, Vertical Flipping, horizontal mirroring, expanding to create letterboxes, rotating, brightness/contrast, changing the aspect ratio of a video, colorspace conversion, hue/saturation, color-specific Gamma correction, filters for reducting the visibility of compression artifacts caused by MPEG compression (deblocking, deringing), automatic brightness/contrast enhancement (autolevel), sharpness/blur, denoising filters, several different ways of de-interlacing, and reversing telecine.

Frame rate conversions and slow-motion
Also, changing the frame rate is possible using the -ofps or -speed options and, in addition, by using the framestep filter for skipping frames. Reducing the frame rate can be used to create fast-motion "speed" effects which are sometimes seen in films.

Doubling the frame rate of interlaced footage without duplicating or morphing frames is possible using the tfields filter to create two different frames from each of the two fields in one frame of interlaced video. This allows playback on progressive displays, while preserving the full resolution and framerate of interlaced video, unlike any de-interlacing method. It also makes the footage more usable for framerate conversion, and creating slow-motion scenes from footage taken at standard video/TV frame rates, e.g. using cheap consumer camcorders. If the filter gets wrong information about the top/bottom field order, the resulting output video will have juddering motion, because the two frames created would be displayed in the wrong order.

Create an animation from a series of static images
To combine all png images in a directory to create an avi movie do this:

mencoder mf://*.png -mf w=400:h=400 -ovc lavc -lavcopts vcodec=xvid -of avi -o output.avi

Split a video in a series of static images
To split up an input movie into a subdir "dirname" with a special quality.

mplayer input.avi -vo jpeg:outdir=dirname:quality=80

Join/Merge multiple videos
To join two or more video files into one, do this:

mencoder -oac copy -ovc copy -idx -o whole.avi part1.avi part2.avi ...

This will only work if the video contained in the files have the same resolution and use the same codec. Of course, this works for any file format that MPlayer can play, not just AVI files. If your files are not AVI files you have to specify the output format -of. Otherwise your joined mpeg movies will reside in an AVI container. This is because AVI is the default output format. (To see the available output formats, type .)

Rip DVD to raw video
mplayer can make quite accurate "raw stream" DVD rips, ex (saves DVD track 1 to file dvdout.mpg):

mplayer -dumpstream dvdnav://1 -nocache -dvd-device d: -dumpfile dvdout.mpg

If you're on windows, you may need to replace "mplayer", above, with something like "C:\Program Files (x86)\MPlayer for WindowsUI\mplayer\mplayer.exe" to get it to work. (In this example, running from an installation of Mulder's Mplayer for Windows). Your paths may be different.

If you're on mac, and have downloaded something like mplayerx and installed it to your Applications folder, then "mplayer" above might look something like "/Applications/MPlayerX.app/Contents/Resources/binaries/m32/mplayer" or the like. Or if you installed mplayer via macports then /opt/local/bin/mplayer

Mencoder can also rip raw video streams from dvd

mencoder dvdnav://2 -nocache -oac copy -ovc copy -of mpeg -o dvdout.mpg

Though mencoder seems to have a bug that it sometimes will leave off say 20 minutes at the end of the title.

Another option might be dvd://2 instead of dvdnav://2 -nocache, though dvdnav -nocache is said to compatible with more DVD's.

NB that the mpeg is a real "raw" rip which means that its indexes might be messed up, if it comes from a DVD that resets the MPEG TS timestamps half-way through (many do, typically at about the hour mark). You can run mencoder -idx on the file to fix them up. If they're broken then seeking may behave oddly for absolute seeking/EDL's.

Rip DVD into quality compressed avi
To perform a two-pass encode of the second title on a DVD to an MPEG-4 AVI while copying the audio track, execute these two commands in this order:

mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o /dev/null mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 -oac copy -o output.avi

The first pass creates some temporary files (having names ending with .log) with a size of few megabytes. Do not delete these temporary files between the two passes. In the second pass, the output file is created using the bitrate data from the temporary file. The resulting file will have much better image quality than a one-pass encoding would produce, since the extra step allows for more bitrate for those moments that need it and less for those that don't in order to keep a stable quality level as opposed to having a stable bitrate, and while still keeping the desired average bitrate.

For subtitles, use the -slang (for example, to have English subtitles along with the video do -slang en) or -sid (eg. -sid 0) switch. When more than one language is used for dialogue subtitles may appear for all dialogue including the primary language. −forcedsubsonly may, depending on how the DVD was authored, because only dialogue that is not in the primary language to be subtitled. e.g. In a movie with both english and german dialogue with the primary language being english, using -forcedsubsonly may stop english dialogue being subtitled as well as german.

For changing the audio (such is the case in Canada where videos are often available in French and English) specify the -alang or -switch (eg. -alang en)

You may also want to use dvdnav:// -nocache for newer dvd's

Split/sub-section videos
You can use the -ss and -endpos parameters to specify start and end point, but it can only start on the nearest keyframe. So, depending on how frequently keyframes were placed into the video, the actual start time may be as much as 10 seconds off (mp4) or 0.5s off (MPEG-2 [dvd's] an i-frame occurs at least every 15 frames, or 0.5 seconds). The stop time will be relative to the adjusted start time

Example: note the mb suffix in the -endpos switch: mencoder -ovc copy -oac copy -ss 0 -endpos 700mb -o movie_part1.avi movie.avi

Suppose you want to split video_input.avi such that you skip "approximately" the first 3.2 seconds and will take the next 2 seconds of video (until "approximately" second 5.2)

mencoder -ss 3.2 -endpos 2 -oac copy -ovc copy video_input.avi -o video_output.avi

In general

mencoder -ovc copy -oac copy -ss hh:mm:ss -endpos hh:mm:ss video_input.avi -o video_output.avi

This copy part of video_input.avi to video_output.avi. Part start from -ss time and stops to -endpos time. Those time could also be megabytes with mb-postfix.

If your audio/video codecs support exact positioning (e.g. a full-frame codec like MJPEG, huffyuv, regular PCM for audio, etc.), mencoder is able to losslessly cut an audio/video container into segments.

You could also first re-encode your stream with a "keyint" setting of 1, which would make every frame an i-frame, and thus make it subsequently support exact positioning.

If your stream supports exact positioning, the following command could then be used for losslessly cutting a video in 1-minute segments:

mencoder -ss 0 -endpos 59.999 -oac copy -ovc copy video_input.avi -o video_output-001.avi mencoder -ss 60 -endpos 59.999 -oac copy -ovc copy video_input.avi -o video_output-002.avi mencoder -ss 120 - endpos 59.999 ...

Also note that the -hr-edl-seek option might help it be more accurate with certain streams, see http://betterlogic.com/roger/2011/06/mplayer-hr-edl-seek.

Convert FLV to AVI
You can use mencoder to convert FLV files from sites like YouTube and Google Video to AVI with mencoder.

mencoder input.flv -ovc lavc -oac mp3lame -o output.avi

Increase or decrease gamma, contrast, brightness, saturation
mencoder -oac copy -ovc lavc input.flv -vf eq2=gamma:contrast:brightness:saturation -o output.avi

where gamma 0.1 - 10 (default 1.0), contrast   -2 − 2 (default 1.0), brightness -1 - 1 (default 0.0), saturation  0 − 3 (default 1.0),

title: MPlayer


text:
User talk:WhirlWind

Welcome! Thanks for your contributions. If you have any questions at all don't hesitate to ask. :-) MShonle 20:17, 6 September 2005 (UTC)

Cool. Thanks! WhirlWind 20:43, 6 September 2005 (UTC)
 * I also made some changes to Chapter 2, in the spirit of your edits. You can look them over again if you want. Perhaps by now you've added these modules to your watch list? :-) MShonle 03:46, 7 September 2005 (UTC) (Oh yeah, and it also bugged me how it was spelled Big-Oh instead of Big-O. MShonle)
 * I will try to keep going through the chapters when I have time. I'm learning a bit, but I like to reword things that I have trouble understanding.  Thanks for your comments.

title: User talk:WhirlWind


text:
Radiation Oncology/Thyroid/Papillary and follicular

Clinical features

 * Papillary
 * most common (75%),
 * palpable adenopathy in 33%; 35-50% chance of positive lymph nodes
 * extrathyroidal extension 15%
 * distant mets in 1-7% at diagnosis
 * better 10-year survival (74-93%)
 * Follicular
 * less common (10%), 10% chance of lymph node involvement (may actually be 1% for pure follicular carcinomas)
 * 10-year survival somewhat lower (43-94%)

Risk of distant mets - about 1-2% (papillary) or 2-5% (follicular) at time of diagnosis

Anatomy
Lymph node groups:
 * ATA Consensus Statement (2009): PMID 19860578 PDF — "Consensus statement on the terminology and classification of central neck dissection for thyroid cancer." (Carty SE, Thyroid. 2009 Nov;19(11):1153-8.)

Pathology

 * U Connecticut PMID 15944425 -- Independent clonal origins of distinct tumor foci in multifocal papillary thyroid carcinoma. (2005 Shattuck TM, N Engl J Med. 2005 Jun 9;352(23):2406-12.)
 * 10 patient samples analyzed, 5 independent clonal origin, 5 either shared or independent clonal origin
 * Conclusion : "Individual tumor foci in patients with multifocal papillary thyroid cancer often arise as independent tumors. This provides theoretical support for bilateral thyroidectomy and radioablation of remaining tissue."

Prognostic indices
AMES (age, metastases, extent of primary cancer, tumor size)
 * High risk features:
 * Age: males > 41, females > 51
 * Metastases: distant metastases
 * Extent: papillary with extrathryoidal spread or follicular with major capsule invasion
 * Size: >= 5 cm
 * Risk groups:
 * Low risk - not high risk
 * High risk - 1) any patient with metastases, or 2) high risk age and either high risk extent or size
 * Overall survival:
 * Low risk 98% (95% DFS). High risk - 54% (45% DFS)

DAMES - modification of AMES with addition of DNA content measured by flow cytometry
 * Risk groups:
 * Low risk - Low risk AMES + euploid
 * Intermediate risk - Low risk AMES + aneuploid
 * High risk - High risk AMES + aneuploid
 * Disease-free survival:
 * Low risk - 92%. Intermediate 45%. High 0%.

AGES - age, tumor grade, tumor extent, tumor size (from Mayo clinic)
 * Prognostic score = 0.05 x age in years (except in pts < 40, then y=0) +1 (grade 2) or +3 (grade 3 or 4) +1 (if extrathyroidal) or +3 (distant mets) + 0.2 x tumor size in cm
 * Risk categories - 0-3.99, 4-4.99, 5-5.99, >6  (median is 2.6)
 * 20-year survival:
 * <4 (99%), 4-5 (80%), 5-6 (33%), >6 (13%)

MACIS - metastasis, age, completeness of resection, invasion, size
 * Prognostic score = 3.1 (age < 39 yrs) or 0.08 x age (if >40) + 0.3 x tumor size in cm + 1 (if incompletely resected) +1 (if locally invasive) +3 (if distant mets)
 * Risk categories - 0-5.99, 6-6.99, 7-7.99, >8
 * 20-year survival:
 * <6 (99%), 6-7 (89%), 7-8 (56%), >8 (24%)

Comparison of staging systems:
 * 1997: Princess Margaret PMID 9191532 -- "A comparison of different staging systems predictability of patient outcome. Thyroid carcinoma as an example." (Brierley JD, Cancer. 1997 Jun 15;79(12):2414-23.)

Prognosis

 * National Thyroid Cancer Treatment Cooperative Study (NTCTCS) Registry (1987-95)
 * 1998 PMID 9731906 -- "Prospective multicenter study of thyroid carcinoma treatment: initial analysis of staging and outcome. National Thyroid Cancer Treatment Cooperative Study Registry Group." (Sherman SI, Cancer. 1998 Sep 1;83(5):1012-21.)
 * 1607 pts. Staged according to NTCTCS system. Papillary carcinoma = 80%, follicular carcinoma = 13% (including oxyphilic / Hurthle), medullary = 4%, anaplastic = 1%. High risk disease (Stages III-IV) was found in 22% of pts with papillary carcinoma and 61% with follicular. For papillary, 49% Stage I, 27% II, 19% III, 4% IV. For follicular, 31% I, 13% II, 44% III, 13% IV.
 * Median f/u 40 months. Disease-specific mortality in 1.6% of papillary, 10.3% of follicular, and 12.9% Hurthle. 5-yr DSS was 99.9% for low risk, 87.5% for high risk. Pts alive without relapse at last follow-up, 93.6% for low risk and 70.5% for high risk.

Iodine-131
For papillary and follicular. Some Hurthle cell cancers may respond.

Total ablation achieved with either 30 mCi or 100 mCi dose in >80% of the pts who have a complete surgery. For less complete surgery, 30 mCi dose is effective in only 66%. Dose required for total ablation is 300 (Unit ??) to the residual thyroid. I-131 scan postoperatively: 1-5 mCi.

Role for post-operative I-131:
 * 1) Ablate residual normal thyroid - increases sensitivity of subsequent I-131 whole body scans and allows measurement of thyroglobulin levels to reflect recurrence disease
 * 2) Destroy occult carcinoma - decrease recurrence rate
 * 3) Allows post-treatment I-131 whole body scan to detect persistent disease

Procedure:
 * Withhold Synthroid (T4; levothyroxine) for 4-6 weeks. Cytomel (T3; liothyronine) can be substituted for 3-4 weeks, but discontinued at least 2 weeks before radioiodine studies.
 * TSH should be >25 to 30 at the time of the radioiodine study
 * Administer I-131 tracer dose
 * If high post-op uptake (>10%), should have completion surgery.
 * Others can have treatment dose of I-131.
 * Perform total body scan 4-7 days after treatment dose.
 * Administer levothyroxine suppressive therapy
 * Repeat total body scan in 6 months

Indications for Postoperative I-131
Strong indications for post-operative treatment: Probable indications: Possible indications: No post-operative treatment needed for:
 * Distant metastases
 * Incomplete resection
 * High risk pts (papillary with MACIS 6+, Stage II-III follicular or Hurthle cell)
 * Papillary/follicular in children < 16 yrs
 * Tall cell or columnar cell variant of papillary
 * Diffuse sclerosing variant of papillary
 * Bulky bilateral LN mets
 * Elevated thyroglobulin at 3 months post-op
 * Low risk pts: papillary with MACIS < 6, or Stage I follicular or Hurthle cell

Series showing I-131 Efficacy

 * U.Michigan - PMID 6502251, 1984 — "An analysis of "ablation of thyroid remnants" with I-131 in 511 patients from 1947-1984: experience at University of Michigan."
 * Retrospective. Pts given treatment doses of I-131 after positive uptake postsurgically.
 * No difference in rate of successful ablation between groups treated with 100-149 mCi, 150-174 mCi, 179-199 mCi, and 200 mCi or more.
 * Conclusion: 100-149 mCi dose is appropriate adjuvant therapy.

 * Ohio State - PMID 7977430, 1994 — "Long-term impact of initial surgical and medical therapy on papillary and follicular thyroid cancer."
 * Prospective, non-randomized. 1355 pts over 40 yrs.
 * I-131 decreases recurrence rate by 33% compared to thyroid hormone therapy alone. No difference in recurrence rate for low doses (29-50 mCi) vs high doses (51-200 mCi).

 * Ohio State - PMID 9133698, 1997 — "Thyroid remnant 131I ablation for papillary and follicular thyroid carcinoma." Mazzaferri EL et al. Thyroid. 1997 Apr;7(2):265-71.
 * Retrospective. 1004 pts. Compared I131 ablation vs thyroid hormone alone or no further treatment.
 * Decrease in recurrences by 75%, decreased rate of DM, and decreased cancer deaths after I131. Benefit restricted to those with tumors >=1.5 cm (for recurrence and DM) and for age 40 or older with tumors >=1.5 cm (for cancer deaths). No difference between low and high dose therapy.
 * I-131 treatment benefits pts with tumors >=1.5 cm.

Salivary Gland Protection

 * West China Hospital; Chengdu -- Vitamic C after 1 vs 5 vs 13 vs 25 hours after I-131
 * Randomized, 4 arms. 72 patients. Effect of sucking Vitamin C after receiving 3.7 Gbq of I-131 at Arm 1) 1 hour vs Arm 2) 5 hours vs Arm 3) 13 hours and Arm 4) 25 hours post treatment. Salivary dose calculated
 * 2010 PMID 20237029 -- "Influence of vitamin C on salivary absorbed dose of 131I in thyroid cancer patients: a prospective, randomized, single-blind, controlled trial." (Liu B, J Nucl Med. 2010 Apr;51(4):618-23. Epub 2010 Mar 17.)
 * Outcome: Parotid absorbed dose comparable. Majority (86%) of salivary activity accumulated during first 24 hours
 * Conclusion: Salivary stimulation with vitamin C after I-131 administration doesn't protect salivary glands

Reviews

 * Review, 2005 PMID 15653649 -- "The evolving role of (131)I for the treatment of differentiated thyroid carcinoma." (Robbins RJ, J Nucl Med. 2005 Jan;46 Suppl 1:28S-37S.)
 * Review, 2001 Mazzaferri et al, 2001 — "Clinical review 128: Current approaches to primary therapy for papillary and follicular thyroid cancer." Mazzaferri EL et al. J Clin Endocrinol Metab. 2001 Apr;86(4):1447-63.

External beam radiotherapy
Controversial. Early series show no benefit or even had patients who had received radiation doing worse. Modern series appear to show benefit of a combination of RT + radioiodine in some patient populations (e.g. macroscopic residual disease in the neck).

Post-operative Radiotherapy

 * German MSDS Study (1999-2003) -- surgery + I-131 +/- adjuvant RT
 * Originally randomized, converted to prospective cohort study. 279 patients met inclusion criteria, 45 consented to randomization, 35 were randomized. T4 tumors (extending beyond capsule with/without LN involvement) treated with surgery and I-131, then Arm 1) observation vs. Arm 2) adjuvant RT. If R0 resection used 59.4/33, if R1 resection used 66.6/37. GTV1 = tumor region, ipsilateral or bilatera. GTV2 = thyroid bed, cervical LNs, infra/supraclavicular LNs, upper mediastinum.
 * Acute Toxicity; 2003 PMID 14652672 -- "Acute toxicity of adjuvant radiotherapy in locally advanced differentiated thyroid carcinoma. First results of the multicenter study differentiated thyroid carcinoma (MSDS)." (Schuck A, Strahlenther Onkol. 2003 Dec;179(12):832-9.)
 * Outcome: Grade 3+ in 9% (pharynx, larynx, and skin). Maximal late toxicity Grade 2 in 4 patients, no Grade 3 toxicity
 * Conclusion: Acute toxicity is tolerable
 * Conversion; 2003 PMID 14668957 -- "Multicenter study differentiated thyroid carcinoma (MSDS). Diminished acceptance of adjuvant external beam radiotherapy." (Biermann M, Nuklearmedizin. 2003 Dec;42(6):244-50.)
 * Study converted to prospective cohort due to low acceptance of adjuvant RT (only 14% of trial cohort actually assigned)
 * Villejuif, France - PMID 3919920 "External radiotherapy in thyroid cancers." Tubiana et al.  Cancer. 1985
 * 97 pts treated w/ external beam xrt after incomplete resection; 76 pts treated with surgery alone. Low incidence of local recurrence in pts tx'd with xrt (11% at 15 yrs vs 23% for pts treated w/ surgery alone; pts tx'd with xrt had larger/more extensive tumors).  Reasons for residual disease included laryngeal, tracheal, esophageal, mediastinal or major vessel involvement.
 * Conclusion: Radiotherapy effective means of controlling residual disease after surgery if doses >50 Gy delivered.

 * Princess Margaret Hospital, 1998 - PMID 9445196 — "The effects of surgery, radioiodine, and external radiation therapy on the clinical outcome of patients with differentiated thyroid carcinoma." Tsang RW et al. Cancer. 1998 Jan 15;82(2):375-88.
 * 382 pts w/ stage I-IV papillary or follicular thyroid CA w/ median FU of 10.8 yrs. Factors predictive of local relapse were age>60,poor differentiation,>4cm,macroscopic residual,lack of radioiodine.  10 yr OS was 93% for papillary and 86% for follicular.  Local control improved in cases of EBRT for microscopic residual disease (93% vs 78% at 10yrs).  If macroscopic residual disease, local control 62% at 5yrs if adjuvant EBRT.
 * Conclusion: microscopically +margins and macroscopic residual disease both appear to benefit from adjuvant external beam xrt.

 * Essen, 1995 - PMID 8630926 "Impact of Adjuvant EBRT in pts with Perithyroidal Infiltration"  Farahati et al.  Cancer. 1996
 * 169 pts with T4 follicular or papillary thyroid and free of mets after 2nd radioiodine tx. Cohorts got either xrt or no xrt; all got surgery, ablative I-131, levothyroxine.  Xrt comprised of 50-60 Gy to neck.  RFS benefit was seen in pts >40 y/o w/ N+ disease.
 * Conclusion: T4N+ should be considered for adjuvant xrt.

IMRT

 * MSKCC, 2005 (2001-4) - PMID 16154712 — "Intensity-modulated radiation therapy for the treatment of nonanaplastic thyroid cancer." Rosenbluth BD et al. Int J Radiat Oncol Biol Phys. 2005 Dec 1;63(5):1419-26.
 * 20 pts with non-anaplastic thyroid cancer treated with IMRT. Treated microscopic disease to 54 Gy, higher risk areas to 59.4-63 Gy, positive margins to 63-66 Gy, and gross disease to 63-70 Gy. Elective nodal volume extended from the top of level II (sometimes retropharyngeal nodes were included) to below the thoracic inlet to the level of the aortic arch. High risk area was the tumor bed and central neck lymphatics.
 * Conclusion: IMRT is feasible for treatment of thyroid cancer

Follow-up
Monitoring of thyroglobulin:
 * Consensus report; 2003 PMID 12679418 -- "A consensus report of the role of serum thyroglobulin as a monitoring method for low-risk patients with papillary thyroid carcinoma." (Mazzaferri EL, J Clin Endocrinol Metab. 2003 Apr;88(4):1433-41.)
 * Consensus report of experts, industry sponsored, not representing any official society. Recommendations apply to patients who are low-risk, s/p total or near-total thyroidectomy and I-131 ablation, with no clinical evidence of tumor, undetectable Tg levels (<1 ug/L) during THST. Most of these have tumors <4 cm, not a virulent subtype, with or without positive lymph nodes, no distant metastases. These patients are low-risk by AMES, usually have MACIS scores of <6, and are AJCC Stage I (if age <45) or Stage II (if age >=45).

Recurrent disease
Excellent prognosis for patients with locoregional recurrences, with 70-90% long-term survivors. For patients who develop distant metastasis, 50-90% die of their disease.

I-131 for ablation (if post-op scan reveals gross residual disease): 100 mCi.

I-131 for recurrent disease, post-op residual in the neck, nodal or distant metastases, or inoperable tumors: 150-250 mCi.

Re-imaging should be done 1-2 days after ablation or therapy.

Recommended maximum dose: 800-1000 mCi.

Estimation of absorbed dose is 0.1 Gy per microcurie per gram of thyroid cancer tissue.


text:
Cookbook:Hominy Bread

Ingredients

 * 2 cups cooked hominy grits
 * 1 cup cornmeal
 * 1 tablespoon baking powder
 * 1 scant teaspoon salt
 * 2 tablespoons butter
 * 2 standard eggs
 * 1 ½ cups milk
 * 3 tablespoons sugar (optional)

Procedure

 * 1) Preheat oven to 350°F (175°C).
 * 2) In a large bowl combine grits, cornmeal, baking powder, salt, butter, and sugar.
 * 3) In another bowl beat 2 eggs thoroughly, then add milk and mix together completely.
 * 4) Add egg and milk mixture to dry ingredients.
 * 5) Grease a large baking dish or 2 loaf pans. Pour mixture into pan(s).
 * 6) Bake in preheated oven for 35 minutes, until golden brown and a knife inserted in the bread comes out clean.

Notes, tips, and variations

 * This bread is best eaten warm for breakfast with butter or honey.

title: Cookbook:Hominy Bread


text:
Radiation Oncology/Thyroid/Hurthle cell

Hürthle cell carcinoma Variant of follicular carcinoma. Is relatively aggressive with prognosis worse than papillary carcinoma. Represent about 3% of thyroid cancer.

Prognostic factors

 * M.D.Anderson, 2003 (1944 - 1995) - PMID 12599224 — "Prognostic factors in patients with Hurthle cell neoplasms of the thyroid." Lopez-Penabad L et al. Cancer. 2003 Mar 1;97(5):1186-94.
 * 89 pts with Hurthle cell carcinoma, 38 with Hurthle cell adenoma.

Patterns of failure
Most recurrences are in the neck. Lung is most common site of distant mets. Recurrent disease in the neck can be treated surgically.

Cause-specific mortality approximately 30%.

Treatment
Treatment should include total thyroidectomy and unilateral central compartment neck dissection. There is no known role for adjuvant radiation therapy; however, the tumor is radiosensitive.

Only about 7% respond to I-131; however, one study (PMID 12599224; see M.D.Anderson study above) suggested a survival benefit for thyroid ablation with radioactive iodine.

Adjuvant Radiation Therapy

 * Mayo Clinic, 2003 - PMID 12829143 — "Is there a role for radiation therapy in the management of Hurthle cell carcinoma?" Foote RL et al. Int J Radiat Oncol Biol Phys. 2003 Jul 15;56(4):1067-72.

title: Radiation Oncology/Thyroid/Hurthle cell


text:
Category:Placenta recipes

Recipes involving placenta.

title: Category:Placenta recipes