text:
ZZT-OOP/Syntax

ZZT-OOP has a very simple syntax, as demonstrated by the following example:

@Fred 'Objects run their programs right away; 'the following command will temporarily 'halt program execution.
 * end
 * touch

$This is an object named Fred! !move;Tell Fred to move around.
 * end
 * move

/rndp rndne/rndp rndne ?n?n?n?n?s?s?s?s FRED: I moved around!

The first character of each statement determines how the rest of the line is treated. For example, the first line begins with the "at" symbol (@), which makes it a name; the second line begins with an apostrophe, which makes it a comment, etc... Our discussion of ZZT-OOP syntax continues with a list of all the possible starting characters and their effects.

' (Comment)
This is a comment, it does nothing but inform you or whoever looks at your code what a function does. If you have a very large file (>320KB), get rid of any of these you may have (not including ones used as zapped labels). Also: this statement isn't a comment in fact, but a pre-zapped label (that means you can jump to it only after you restored it)

(Text), $(Text)
This prints a line of text at the bottom of the screen, or if there is more than one line, print a scroll. Using  prints text in a scroll centred and in white.

:(Label)
This is a label. You can jump to labels. Yes. You can also make other programs jump to labels.

!(Label);(Text)
This prints a line of text in a scroll in white with a pink arrow as a bulletpoint. This is an option. Selecting it will call the label given.

@ (Object Name)
The "@" character indicates that the rest of the line is the object's name. In the example above, the line  gives the object the name "Fred." The only limit on object names is that they must be stated on the first line of the program; "@" statements elsewhere in the file are ignored.

If a named object opens a text box, the object's name appears at the top of the textbox, replacing the generic title "Interaction." It is not necessary to give an object a name.

# (Generic Command)
The "#" character indicates a command, or a jump to a label. For example, the example program uses the command  to stop program execution. Many other commands exist; they will be discussed in detail in the next couple of chapters. For now, it is good enough to know what they look like.

/ and ? (Movement)
The "/" character instructs the object to move. The direction that the object moves is indicated by the text that follows; for example,  causes the object to move one space to the north (move up one space). When "/" is used and the object cannot move in the specified direction, the object will simply wait until it can move in that direction; this results in the object waiting forever if it is facing something that does not move, such as a wall. The "?" character works like "/", but with one difference: "?" movement commands will be ignored if the object cannot move in the specified direction.

Both "?" and "/" are unique because they can be "stacked"; this means that a movement instruction can be followed by another statement. For instance, in the example program, you saw the code. When this code runs, the movement instructions will be followed from left to right; the object will try to move four spaces upward, then four spaces downward. Types of statement can be mixed; for example, it is perfectly alright to say  or even. However, you cannot stack a statement onto a non-movement statement. That is to say,  is valid ZZT-OOP, but   is not.

title: ZZT-OOP/Syntax


text:
US Income Tax/Capital Gains and Losses

Gains and losses from the sale or exchange of capital assets receive separate treatment from "ordinary" gains and losses. Capital gains are taxed before income, at a significantly lower rate than ordinary gains. Capital losses, on the other hand, are only useful to offset capital gains and a small amount of personal income. As a result, tax planners often attempt to maximize capital gains while minimizing capital losses (i.e. reworking them into ordinary losses).

Capital assets
In the context of capital gains and losses, the word "capital" has a different meaning than it has in other areas of law. Capital assets are not necessarily those that are "capitalized" by businesses, for instance. The Code does not define "capital assets," but instead states that capital assets are not the following:

 * Business inventory (assets bought and sold in the regular course of business).
 * Business supplies.
 * Accounts.
 * Depreciable trade or business assets held for one year or less (including business real estate).
 * Copyrights and creative works created by or gifted to the taxpayer.
 * Government publications.
 * Hedging transactions.
 * Commodities derivatives held by brokers.

Any other asset is considered a capital asset.

Net capital gain
Most capital gains and losses are taxed as net capital gain. Net capital gain is taxed at 15% for taxpayers in the 25% tax bracket or above, and 5% for other taxpayers (unless they are below the minimum tax bracket, in which case they are not taxed).

The Code defines net capital gain as the excess of net long-term capital gain over net short-term capital loss. These two figures are reached by adding up the various long-term and short-term capital gains and losses realized in the taxable year. Gains and losses from assets held for over one year are considered long-term capital gains and losses, while gains and losses from assets held for one year or less are considered short-term capital gains and losses.

The calculation might look like this:

Because there is no excess, there is no net capital gain. The net capital loss is $10,000.

Because there is an excess of net long-term capital gain over net short-term capital loss, the excess $7,500 is taxable at the 5% or 15% rate. Which rate is used depends on which bracket the taxpayer is in.

Net capital losses
Net capital losses are used for offsetting.

Individuals can use up to $3,000 of capital losses to offset their income ($1,500 for a married person filing separately). In the above example, the taxpayer would be able to apply $3,000 of his or her net capital loss to reduce his or her taxable income by $3,000, leaving $7,000 in unused net capital loss.

Capital losses can also be carried over. If net long-term capital loss exceeds net short-term capital gain, the excess becomes long-term capital loss in the following year. If net short-term capital loss exceeds net long-term capital gain, the excess becomes short-term capital loss in the following year.

Corporations follow different rules. Their capital losses must first be carried back to each of the three preceding years, if possible. Any capital losses that cannot be applied against capital gains from the three previous years can then be applied against capital gains in the 5 succeeding tax years.

For example, assume that X Corporation has $50,000 in net capital losses in 2005. Their capital gains for the last three years are:

The net capital losses cannot be carried back to 2002 because there is no net capital gain to offset. $23,000 can be used to offset the capital gains in 2003, leaving $27,000. Another $11,000 can be used to offset the capital gains in 2004, leaving $16,000. This $16,000 can be used to offset any net capital gains that arise in the next five years.

Section 1231 assets
Many assets held for use in a trade or business receive separate treatment under Section 1231. These assets include those that are:

 * sold or exchanged, and
 * held for more than one year and
 * used for a trade or business and
 * depreciable and
 * not inventory or intellectual property, OR
 * converted (i.e. destroyed/stolen/condemned), and
 * used for a trade or business OR
 * held for more than one year and
 * held in connection with a trade or business or venture for profit.

Any gains and losses allowed under Section 1231 are added up. If gains exceed losses, the net gain is treated as long-term capital gain for that year. But if losses exceed gains, the net loss is treated as ordinary loss. This seems to give taxpayers the "best of both worlds" in a sense: they can receive the favorable capital gains rate for 1231 gains, and can treat 1231 losses as ordinary losses directly against their income.

There is one qualification that destroys much of this attractiveness: recapture. Under Section 1231(c), 1231 gains are treated as ordinary income to the extent of net 1231 losses over the past five years. This means that 1231 losses may only provide a temporary advantage: if there are 1231 gains within the next five years, they will be treated as ordinary income to the extent that they offset the prior loss.

Section 1245 recapture
The capital gain system is also tempered by Section 1245, which provides for recapture of prior depreciation deductions on personal property. When 1245 property is sold, depreciation is added to the adjusted basis to find the recomputed basis of the property. If the recomputed basis and the amount realized both exceed adjusted basis, the excess is treated as ordinary income, not capital gain. Any amount realized over the recomputed basis can be 1231 gain or capital gain.

For instance, assume a machine is purchased for $100, depreciated by $40 and sold. Its adjusted basis is $60: adding depreciation back in, its recomputed basis is $100, which exceeds adjusted basis. If the machine sells for $65, the amount realized also exceeds adjusted basis, and the $5 gain is treated as ordinary income. If the machine sells for $110, the first $40 gain is treated as ordinary income, and the remaining $10 may be capital gain or 1231 gain.

Section 1245 applies generally to depreciable personal property, but not to real property.

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

title: US Income Tax/Capital Gains and Losses


text:
User:Fiddle~enwikibooks/WinCVS

This page describes the WinCVS 2.0 Python API. WinCVS can be downloaded from the WinCVS Home page. See also here for Copyright info.

=WinCVS Python API=

cvsgui.Macro module
This module defines the Macro class, which is used to extend the capabilities of cvsgui. The user can add new macros by subclassing the Macro class. Here is a trivial example:

import cvsgui.Macro class ThisIsATrivialUserMacro( Macro ): def __init__( self ): cvsgui.Macro.Macro.__init__( self, 'MyItem', MACRO_SELECTION, 0, 'MySubMenu' ) def Run( self ): print 'MyMacro has been called' ThisIsATrivialUserMacro Registering this macro adds a submenu 'MySubMenu' to the 'Macros' menu (if the submenu doesn't exist already), and in it creates one new item 'MyItem', with trivial action. See below for more details.
 * 1) Register the new macro by executing the class

Variables
Constants used by the Macro class: MACRO_SELECTION = "SELECTION" MACRO_ADMIN 	= "ADMIN"

Functions
none

Class: Macro
This class needs to be subclassed to implement a user macro. Executing the new subclass adds the macro to the cvsgui macro registry (this is done by a call to Macro.__init__). You can overwrite the methods of the Macro class and add your own methods. See method descriptions below for details.

Methods:
Since Macro is usually subclassed, the self argument has been retained in the following descriptions. To implement your own macro override each of the following methods

 * __init__(self) : This method should always be overridden. It should always start with a call to: Macro.__init__(self, title, group, isCheck=0, subgroup="", xpmicon="") to register the macro in the registry with the appropriate arguments:Title is the text that will appear on the menu entry; appending a tab(\t) and a combination of either CTRL or ALT, or both, and a letter will register that as the menu accelerator(e.g. "MenuTitle\tCTRL+ALT+M"). Group needs to be MACRO_SELECTION or MACRO_ADMIN; if it is not macro registration will fail. MACRO_SELECTION macros appear in the 'Macros' menu, MACRO_ADMIN macros appear in the 'Admin>>Macro' menu item.IsCheck specifies whether the menu item can have a checkmark in front. Default = 0 (no check mark) . If the macro menu item should appear in a subfolder, specify the subfolder name in subgroup; default is "" (no subfolder).Xpmicon specifies an optional icon that appears in front of the item; default is "" (no icon). Xpmicon uses a special string format .After this call add initilisation your macro may require.

 * OnCmdUI( self, cmdui ) : This method is called from the Python interface (_cvsgui) for the macro to define its state (enabled/disabled). This call occurs whenthe users clicks on the 'Macros' or the 'Admin>>Macro' menu. The 'cmdui' argument passed by the interface is the CmdUI object corresponding to the selected macro. For a MACRO_SELECTION macro, default behavior is that the menu item is only enabled when there is a (non-zero) selection active. Default for MACRO_ADMIN macros is to be enabled them on this call. Override this method to change the default behavior.

 * Run(self) : This Method is called from the interface when the macro is selected. Default is to do nothing. Override to add an action to the macro.

Class: TclMacro
Subclass of Macro: This class wraps Tcl macros
 * TclMacro( title, group, file ) : Create a Tcl Macro from file.

Methods:

 * Run : Called from the interface when the macro is selected

Class: MenuSeparator( subclass of Macro)
This class is a convenient way to insert a menu separator
 * MenuSeparator( group, subgroup="" ) :

cvsgui.App module
Provides interaction with the cvsgui application.

Functions

 * cvs_out( s ) [deprecated] : Print text in the application console. This is for backward compatibility only, you can use sys.stdout directly

 * cvs_err( s ) [deprecated] : Print text in the application console. This is for backward compatibility only, you can use sys.stderr directly

 * GetSelection : Return a list of the CvsEntry, or CvsEntries, that is/are currently selected in the file or folder browser. Each element in the list is a CvsEntry class.

 * PromptMessage( msg, title="Message", default="OK", cncl="Cancel" ) : Pops up a message box with a message. Returns 1 (OK button pressed, default) or 0 (cancel).

 * PromptEditMessage( msg, value, title="Message", default="OK", cncl="Cancel" ) : Pops up a message box with message string 'msg', and an edit box in which the user can verify or edit 'value'. Returns a list with two entries 1 + (updated) value when the user presses OK (default) or 0 (cancel). Note: the value of the title parameter is not passed and always shows up as "Title". This is a bug in the Cvsgui source code (not in the python interface).

 * LaunchBrowser( url ) : Launch a web browser with the URL

cvsgui.CmdUI module
CmdUI class, set the state of an object in the interface

Variables
TRUE FALSE

Class: CmdUI
This class is a wrapper around Windows CmdUI objects defined in the WinCVS interface. It defines the UI element associated with a command and lets you manipulate its state. The instances of this class are always created by the interface _cvsgui (and the corresponding Windows object is placed in an internal variable) <need check this - but I haven't found any place where CmdUI is called>. When passed back to Python, they usually show up as argument to a OnCmdUI call, where the user can set attributes: en-/dis-abled, set text, checkmarks etc.

Methods:

 * Enable( state ) : Enable (state=1)/Disable (state=0) the object (i.e. menu entry, icon...).

 * SetCheck( state ) : Check(state=1)/uncheck(state=0) the object (i.e. menu entry, icon...)

 * SetText( text ) : Rename the object (i.e. menu entry, icon...)

cvsgui.ColorConsole module
ColorConsole class, provides *some* coloring in the console window

Variables
kNormal, kBrown, kGreen, kMagenta, kRed, kBlue,	kBold, kItalic, kUnderline, kNL

Class: ColorConsole

 * ColorConsole : ColorConsole class, provides *some* coloring in the console window

Methods:

 * out( stringOrStyle ) : Print text in the application console

 * Operator << : Print text in the application console, e.g.: <tt>ColorConsole << kRed << "This is red"</tt>.

cvsgui.Cvs module
Defines Cvs class, which launches cvs

Variables
None

Functions
None

Class: Cvs

 * Cvs( quiet = 0, exitOnError = 1 ) : Initialize and optionally set the exitOnError flag; if true, cvs will throw an exception on an error (default is true). The quiet flag tells if stderr and stdout of the cvs process are reported into the client console (default is false)

Methods:

 * Run( *args ) : Launch a cvs process with some arguments, return the error code, stdout and stderr of the process. Throws if an error occur if exitOnError is true

cvsgui.CvsEntry module
CvsEntry class, information for an entry of CVS/Entries

Variables
none

Functions
none

Class: CvsEntry

 * CvsEntry( entry ) : Create instance of CvsEntry class for entry

Methods:

 * GetName : Return the name of the entry (file/folder) without its path

 * GetFullName : Return the full qualified name of the entry (file or folder)

 * GetPath : Return the full qualified name of the parent folder, i.e. the folder the entry is in

 * GetVersion : Return the revision number of the file

 * GetUTC : Return the modification time (in UTC) of the repository file which was used to update the file for the last time

 * GetKeyword : Return the substitution keyword for the file

 * GetTag : Return the name of the tag (or the branch) where the file is checked out

 * IsFile : Return true for a file, false for a folder

 * IsModified : Return true if the file is modified locally

 * IsMissing : Return true if the file/folder is missing locally

 * IsUnknown : Return true if the file/folder is not part of cvs (i.e. needs to be added)

 * IsIgnored : Return true if the file/folder is ignored because of the presence of a .cvsignore file (either in the same folder or in the home folder)

 * IsReadOnly : Return true if the file is read only on the file system

 * IsRemoved : Return true if the file is scheduled for removing

 * IsAdded : Return true if the file is scheduled for adding

 * GetDesc : Return a literal description of the state of the file

 * GetConflict : Return the conflict information for the file (if any) or an empty string

 * GetCvsEntriesList( path ) : Return a list of CvsEntries for the directory

 * GetCvsEntriesDict( path ) : Return a dictionary of CvsEntries for the directory (filename -> CvsEntry)

 * GetFileModTime( path ) : Return the UTC modification time for a file. Corrects for DST bug.

cvsgui.CvsLog module
CvsLog class, return the history of the file

Functions

 * GetHistoryAsXML( filename ) : Return the cvs history of the file in an xml format, it returns the result in a temporay file you can erase or rename afterwards.

cvsgui.MenuMgr module
Menu manager class, manipulates the menu bar of the cvsgui client

Variables
none

Functions
none

Class: Menu

 * Menu( menu ): Menu class, let you extend the menu entries

Methods:

 * AddPulldown( widid, name ) : Add a pulldown to the top menu. If top is NULL, then add it to the main menu bar

 * AddToggle( widid, name, cmd, pixmap = "" ) : Add a check box to the top menu.

 * AddButton( widid, name, cmd, pixmap = "" ) : Add a regular text entry to the top menu.

 * AddSeparator( widid ) : Add a separator to the top menu.

 * Delete( afterIndex ) : Remove a menu entry after an index (all of them).

 * DeleteByCmd( cmd ) : Remove a menu entry by command id.

 * Count : Return the number of menu entries in the top menu.

 * GetNewCmdID: Return a new command ID to use for a menu entry. The ID values are incremented by one on each call. By default they start at 10000; for Windows the first ID is 34000, for the Darwin OS or macOS the first ID is 3200.

 * GetTopMacroSelectionMenu : Return the default pulldown for the macro selection menu

 * GetTopMacroAdminMenu : Return the default pulldown for the macro admin menu

 * GetMainMenuWidget : Return the id of the default menu controller (pseudo widget)

cvsgui.Persistent module
Persistent class, allows to store persistent values on disk, i.e. values that are kept after the application restarts

Variables
none

Functions
none

Class: Persistent

 * Persistent( token, defvalue="", addToSettings=0 ): Create/access a persistent value, the token is used to identify the persistent value

Methods:

 * GetValue : Return the current value

 * SetValue( value ) :	Set to Value

 * Operator << :	Same as SetValue, e.g.: Persistent << 'value'

 * __str__: Return the current value

cvsgui.MacroRegistry module
Macro registry class, place to register and manipulate macros This module is called by WinCVS at startup; it loads the Python API and the macro script file in the $(CVS_HOME)/Macros folder.

Variables

 * gMacroRegistry : contains the CVSgui macro registry

Functions
none

Class: MacroRegistry
Class which retains the active macros
 * MacroRegistry : Create a new MacroRegistry instance.

Methods:

 * AddMacro( macro ) : Add a instance of Macro class to the registry. Will generate an error if the macro has not been created with group <tt>MACRO_SELECTION</tt> or <tt>MACRO_ADMIN</tt>.

 * CreateMenusForGroup( top, group ) : <Add help here>

 * CreateMenus : Called by the cvsgui client to create the macros menus

 * AddTclMacro( filename ) : Adds macro from Tcl file. Requires the Tcl file to have a header on the first line as follows: <tt>#!CVSGUI1.0 [--admin|--selection] --name "The name which appears in the menu"</tt> If either this header line or <tt>--name</tt> attribute are missing the method does nothing.

 * LoadMacrosRecurs( dir ) : Recursively loads all macro file in folder dir

 * LoadMacros( dir ) : Iterate thru a folder and evaluate each python file

 * DeleteMenus : Delete the menus used by the macros

 * ReloadMacros : Reload the macros, re-create the menus

 * DoCmdUI( cmdui, cmdid ) : Triggered by the interface when a menu entry needs to update its state

 * DoCmd( cmdid ) : Triggered by the interface when a menu entry is selected

cvsgui.MyPyShellWindow module
Creates new shell if called from __main__

Variables
New style numbers: _stdout_style = 15,_stderr_style = 16, _trace_style = 17 shell - contains the global shell in a MyPyShellWindow.

Functions
None

Class: MyPyShellWindow
Parent class is: InteractiveInterpreter
 * MyPyShellWindow( locals=None, banner=None ) : Create new window with PythonInterpreter

Methods:

 * _write( text, style=_stdout_style ): used for writing to stdout, etc.

 * writeTrace( text ): used for writing to stdout, etc. <Add help here>

Following are overloaded methods from InteractiveInterpreter:
 * runsource( source ) : <Add text here>

 * showsyntaxerror( filename=None ) : <Add text here>

 * showtraceback : <Add text here>

Class: FauxFile

 * FauxFile( psw, style ) : <Add text here>

Methods:

 * write( text ) : <Add text here>

 * writelines( lst ) : <Add text here>

 * flush : <Add text here>

_cvsgui module
Built-in module that provides the low level Python interface to the Cvsgui application. Do not call directly; instead use the cvgui.* submodules.

Module variables/Functions
Here's a list of symbols defined in _cvsgui. I have tentatively added some brackets where I think the functions are but I have to check this...
 * CCmdUI
 * CColorConsole
 * CCvsEntry
 * CMenuMgr
 * CPersistent
 * CVSGUI_VERSION
 * GetCvsEntries
 * GetFileModTime
 * GetHistoryAsXML <Appears to crash WinCVS on my Win98SE>
 * GetMainMenuWidget
 * GetSelection
 * GetTopMacroAdminMenu
 * GetTopMacroSelectionMenu
 * LaunchBrowser
 * LaunchTclMacro
 * PromptEditMessage
 * PromptMessage
 * RunCvs
 * __doc__
 * __name__
 * error
 * kBlue, kBold, kBrown, kGreen, kItalic, kMagenta, kNL, kNormal, kRed, kUnderline
 * write

=Support Modules= The following modules are written by Oliver Giesen

Variables
None

Functions

 * prepareTargets(entries, args, doChDir = 1) : Given a CvsEntries list, calculates a common basedir and a corresponding list of targets. This is necessary in order to ensure correct behaviour when working on flat view selections. See macros cvs2cl.py or TagAndUpdate.py for examples of usage.

 * purgeTree(path) : shutil.rmtree cannot delete read-only files, so we need to do it manually by changing the attributes on each file to r/w before deleting.

Classes
None

cvsgui.SafeTk module
When using Tkinter, the module FixTk is imported which creates an environment variable TCL_LIBRARY and points it at the TCL libraries within the Python installation. This has the unfortunate effect that TCL macros running from a separate installation of TCL will now try to locate packages within the Python directories instead of the TCL ones, which usually fails because the directories within the Python installation are named differently. This module employs a fix to this by removing said environment variable and only temporarily enabling it for the lifetime of a Tkinter-based Tk instance.

Variables
TCL_LIB = 'TCL_LIBRARY' tcllib : set with value of 'TCL_LIBRARY' environment variable when module is loaded.

Functions

 * prepTk : Ensure that TCL_LIBRARY points to the path determined in the FixTk module

 * resetTk : Delete the TCL_LIBRARY environment variable, so TCL has to go searching for extension packages on its own instead of depending on the Python search path. Make a backup of the value determined in the FixTk module so we could write it back again later.

Class: SafeTkRoot

 * SafeTkRoot( Tk ) : A replacement for the Tk class which ensures the TCL_LIBRARY variable lives only as long as the Tk-instance does.

 * SafeTkRoot( obj ) : set basename to obj

Methods:

 * destroy : <Add text here>

 * checkTk : Checks whether Tk could be invoked without exceptions. The check is only performed once. Later calls simply return the previous result.

Known Issues

 * It is currently possible to select invalid combinations of flags, e.g. -kbo.

Variables
none

Functions
none

Class: CvsSubstModeMenu

 * CvsSubstModeMenu( Menu ) : ADD HELP. Will only be created if Tk is available (check with checkTk.

Methods:

 * update(text) : <Add text here>

 * createWidgets( oldenc ) : <Add text here>

 * clear : <Add text here>

Class: CvsSubstModeUI

 * class CvsSubstModeUI( Frame ) : <Add text here>

 * CvsSubstModeUI( master, var ) : Will only be created if Tk is available. <Add text here>

Methods:

 * get_mnu : <Add text here>

 * popup(event=None) : <Add text here>

 * createWidgets : <Add text here>

 * updateMnu(event) : <Add text here>

 * setFlags : <Add text here>

 * CvsSubstModeUI.updateLabel(flags) : <Add text here>

Copyright
This page describes the functions in WinCVS 2.0 Python API, which is part of WinCVS (download here). WinCVS is distributed under the GNU GPL.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

title: User:Fiddle~enwikibooks/WinCVS


text:
Drugs:Fact and Fiction/Ritalin

Generic For: Methylphenidate

Dose

 * Light: 5-15 mg
 * Common: 20-40 mg
 * Strong: 50+ mg

Ritalin comes in 5, 10, 15, and 20 Mg doses. May come in an instant release but is more commonly found in XR (Extended Release) form.

From an XR capsule

 * Come up: 1/2-1 hour
 * Peak: 1 & 4 hours
 * Come down/ After effects: Up to 24 hours

From an instant release pill

 * Come up: 20-40 Minutes
 * Peak: 1-3 hours
 * Come down/ After effects: Up to 24 hours

title: Drugs:Fact and Fiction/Ritalin


text:
Drugs:Fact and Fiction/Meth

The effects of methamphetamine depend on the method of intake. If taken intravenously the effects are an extremely intense burning feeling throughout the body for approximately 15 minutes. These effects can come about from very small doses.

title: Drugs:Fact and Fiction/Meth


text:
Rueda de Casino/Enchufa

This seems to vary in name from enchufa, enchufe and enchufla to even enshufta.

The leader turns the follower to her left, and at the same time moves around so that when she has finished her turn she is facing him. It's about 140 degrees around, depending on the dancers and the size of the rueda. The leader normally then moves to the right of the follower, and moves on to the next follower, doing a Dile Que No. If the enchufa is in the middle of another move, this moving on doesn't happen, i.e., enchufa is often used to mean a follower's left turn.

title: Rueda de Casino/Enchufa


text:
US Income Tax/Tax Liability

Who pays tax, and how much they pay, is dependent on the type of entity paying the tax.

Married taxpayers
If a taxpayer is married, they can either file a joint return with their spouse, or file separately.

One commonly-debated point of income tax law is the marriage penalty. Married taxpayers are taxed at different rates than single taxpayers whether they file jointly or separately. The "marriage penalty" is most pronounced when spouses have equal incomes, and becomes less detrimental as the spouses' incomes diverge. When one spouse has much more income than the other, the couple's tax liability is actually lower than it would be if they were both single. For instance, under the Code's rates unadjusted for inflation, a married couple with taxable income of $100,000 would pay $23,529 in taxes. If the couple were unmarried and both had taxable income of $50,000, they would pay $11,127 each, or a total of $22,254. But a single person with taxable income of $100,000 would pay $26,522. As a result, marriage is beneficial, tax-wise, when one spouse works and the other does not; it is often detrimental when both spouses work.

There has been, as of yet, no truly equitable solution posed to the marriage dilemma: every conceivable system would offer marriage bonuses in some cases and marriage penalties in others.

Head of household
Under Section 1(b), an unmarried taxpayer with one or more dependents in their household may file taxes as a head of household. Heads of household pay less tax than equivalent single taxpayers, but they pay more tax than an equivalent married couple filing jointly.

Dependents
Anyone with income is liable for taxes on that income, even if they are listed as a dependent on someone else's tax return.

Minor children are always taxed independently on their income under Section 73, regardless of whether they are emancipated and regardless of whether they actually receive the income.

If children under 14 have unearned income (e.g. income from returns on investments), their income is taxed at the marginal rates of their parents under Section 1(g). The assumption behind this rule is that parents may be tempted to place assets in their children's names to avoid tax liability.

Corporations
Corporate taxes are levied by the schedule in Section 11. Most large corporations and all public corporations are classified as C corporations and are subject to corporate taxes. Smaller private companies can qualify as S corporations, which exempts them from corporate tax liability. However, all corporate distributions to shareholders are taxed regardless of whether the corporation has C or S status. In the case of C corporations, this means that profits passed on to shareholders are taxed twice: once as corporate income, and once as personal income. This double taxation problem is a major issue to investors when deciding how to structure a business.

Partnerships and LLCs
Partnerships are not taxed. Instead, their partners pay tax on their proportion of the profits of the entity, regardless of whether those profits are distributed or reinvested. This is known as pass-through or flow-through taxation. Limited liability companies (LLCs) with more than one member usually follow a similar tax structure; single-member LLCs are taxed as an extension of the owner.

The IRS offers check-the-box taxation for such entities, which allows the managers to decide whether to have their LLC taxed as a corporation or partnership by checking boxes on a form. By default, such entities are taxed as partnerships; in some situations, however, it is beneficial to have an entity taxed as a corporation.

title: US Income Tax/Tax Liability


text:
Financial Modelling in Microsoft Excel/Building for safety

The more you work with spreadsheets, the more you will see how inventive people can be in making mistakes, or in misunderstanding what was intended. You have to assume that if it can be read the wrong way, someone will read it wrong.

The guidelines below are all aimed at making it harder to make mistakes.

Inputs and Data

 * Separate inputs & assumptions from calculations (this is crucial)
 * Label & colour input cells clearly
 * Protect & constrain inputs with data validation or user controls
 * If you are importing data, keep it separate from the calculations
 * Give important variables range names, and use them in formulae
 * Treat constants (e.g. tax rates) as (unchangeable) inputs – never hard code them into formulae as numbers
 * Clearly explain anything that may be unfamiliar or confusing

Formulae & Calculations

 * Protect calculations – on a separate sheet, or protect the sheet
 * Flow calculations from left to right, top to bottom, to echo Excel's calculation sequence, and also the way people will "read" the spreadsheet
 * Highlight any cells with inconsistent formulae (i.e. different to neighbours) – preferably don’t do this at all because these anomalies can be very hard to find and may be overwritten if someone else makes a change and copies it down a whole column!
 * Use colours carefully – keep bright colours for warnings
 * Use a consistent layout & design between sheets
 * Use consistent magnitudes/time intervals (e.g. months or years)
 * Show sources (references, links to source documents, extracts)
 * Include anomaly checks and self-tests (e.g. cross-totals) so that the model checks itself as much as possible
 * Don’t be clever! e.g. don’t use obscure functions that no-one else understands
 * Don’t create incredibly long formulae – rather use more columns
 * Don’t distract or confuse the checker

Results

 * Set results out clearly and unambiguously
 * State all key assumptions, especially in printable results
 * Put date (and version number if any) on printouts


text: File:Reviersheet.GIF

title: File:Reviersheet.GIF


text: File:Docx.JPG

title: File:Docx.JPG


text:
Financial Modelling in Microsoft Excel/Testing

The most important thing to remember is that you are the last line of defence. You aren’t just there to look for typos, and anything you miss could cost a lot of money or embarrassment, so be careful and don’t rush.

In the notes that follow, we’ll assume we are checking a model which is important enough to spend a day or two checking, and that we definitely want no errors. We’ll also consider what can be done to make a model easier to check.

We’ll use the words “check”, “test” & “review” a lot below. They all have the same objective – ensuring the model is correct, or close enough to correct

Before you start
We’ll start with some basic questions before getting into the checking itself.

1. Are you the right person to check the model?

 * Do you understand the business issues behind the model? This is important because you need to ensure that nothing has been left out, e.g. tax considerations. If you don’t know much about the business, then you probably shouldn’t be checking the model.
 * Do you understand enough about the technicalities of the model to check it? If it is written in VBA and you can’t read it, then it’s going to be tough.
 * Have you built models yourself? Are you experienced in what can go wrong?

2. Do you have all the documentation for the model?

This should include all relevant correspondence or documents, and anything that will help you understand the business which is being modelled.

3. Do you have enough time and budget to do the job properly?

Getting ready
Make a copy of the spreadsheet, rename it, and add a sheet called ‘Review’, which will hold all of your comments. Don’t work off the original spreadsheet.

The Review sheet should have some columns like the following:

In practice, most checkers in business work with the original spreadsheet, making corrections or changes and then giving it back to the builder to check.

This is OK for most small spreadsheets, but it does confuse the role of builder and checker and you should avoid doing this for important or complex models. If you use a Review sheet, you should not make any changes to the original – the builder should do this after looking at your comments, and then give the model back to you for rechecking. Your job is to check, not to build.

Checking the functionality
The first thing to check, of course, is whether the model does what it is supposed to. You need to find out who wants it and what they asked for, and whether the model is adequate.

In our example of an annuity model, the specification is pretty clear about what is needed, so it should be quite easy to see if it appears to provide everything that was required.

Checking the logic
This is a crucial step, because research shows that logic errors and omissions are hard to pick up. This means you need to be extra careful.

Then you need to check the business logic in the model, before getting into the detail of sheets and cells. Hopefully, the model builder has documented the logic clearly to make it easier to check. This means not only setting out the logic itself, but providing a link to, or an extract of, original documentation, to show where it came from. If this is not the case, you should request that this be done.

The extract below is from an actual spreadsheet which calculates a profitability formula using a previous report, an extract of which is included on the right. This makes it easy for a checker to review the logic.

You can see that this is much better than if the model builder simply began using a mysterious formula like =1-1/(G6+(1-G6)/0.85), without explanation.

As far as possible, you should write out your own logic before looking at the model, because it is easy to be influenced by what you see, and think “That looks OK”, whereas if you’d done it yourself first, you might have spotted something missing.

Identifying the risk factors
Now you understand what the model is supposed to do, and you have worked out the business logic, you should think about what could go wrong, and how serious that could be.

For example,
 * some of the inputs might be dangerous, because users might put in incorrect values by mistake or through ignorance
 * there may be combinations of inputs which require different treatment
 * some assumptions (e.g. tax rate) may have a significant effect on results
 * which inputs or calculations have most effect on the results?
 * formulae may not have been copied correctly across rows or columns

At this stage, you should also think about how you can check the model for reasonableness.

Checking the inputs
Your inputs will normally include some or all of

Data: e.g. employee records, or transaction records. You need to check where the data came from, and that it is correct, and that it has not been altered. Ideally, it should be kept completely separate from the rest of the model (e.g. in a separate worksheet or datafile), to avoid contamination.

As with everything else, the data needs to be clear. If, for example, there are confusing or mysterious headings, there should be notes to explain them.

Assumptions: these are the assumptions underlying the model, which are set by the builder and not by users. For example, the model may include a set of the current income tax rates, which obviously don’t need to be input by users because they are the same for everyone.

The assumptions should be set out clearly in one place, clearly labelled and with explanations, and if they are date-sensitive (e.g. tax limits which are changed every year), the effective date should be shown. The cells containing values should be colour-coded to pick them out.

The assumptions need to be documented and justified, because they can have such an effect on the results. If you don’t feel that you could explain the reasons for the assumptions to another actuary, you haven’t done enough work.

If it hasn’t been done already, figure out the limits for assumptions, for example, salary growth may be shown as 4%, but you may decide that it may vary between 0% and 8% in a year. This is important in checking that the model can deal with extreme inputs, and also in checking any sensitivity testing.

User inputs: this generally only applies where there are going to be users other than the model builder. User inputs can be very dangerous, because users can be very imaginative in what they enter. For example, if asked for an interest rate, they could put in any of 0.7, 7% or 7. The model has to deal with this.

For this reason, user inputs should be “controlled”, by constraining them to valid inputs. Excel’s data validation is the most powerful way to do this, because it will prevent users entering inputs that don’t fall in ranges you specify, or typing in text that isn’t on a list you specify, etc.

An alternative is to use the “controls” that Excel provides, e.g. dropdowns & checkboxes.

As a checker, you should look at the way the inputs have been modelled, and think about what users could do to break the model. How strict you need to be will differ for each model, of course.

You should also check that the user inputs are explained well enough for an average user to understand them.

Checking the calculations
The calculations are where the inputs meet the business logic. This is where it is most important to lay the calculations out clearly and in detail, to make it easier to check them.

The most obvious approach is to follow the layout of the calculations and check the way in which the data, assumptions, inputs and logic have been combined to produce the eventual results.

Most commonly, the data is in rows, and formulae are in columns.

Formulae should run from left to right, top to bottom, both because this is how we read, and because Excel calculates in this order. Inputs should be at the top left, or on their own sheet.

Things to look for:
 * formulae unexpectedly changing in the middle of a table - this will be easiest to spot if you change the font to a monospace font, e.g. Courier, and then, with a click of the Show Formulas button in the toolbar, reveal all the formulae on the sheet
 * hard coded numbers (e.g. tax rates) in formulae – these should be taken out and included with the assumptions, even if they are unlikely ever to change
 * circularity – should be avoided if at all possible

Running tests
The next step is to run some tests on the inputs. A simple technique is to set all the inputs to 0 or 1 (or whatever) so that the results are very simple indeed and any anomalies jump out immediately. For example, a financial projection with the investment rate and indexation set to nil should just produce a list of unadjusted cashflows, making it easier to see if they are correct. Another technique is to use “corner” inputs, i.e. put in the highest and lowest values for inputs and see if the model works correctly. You should think about what will happen if you do all your tests and find an error, and then you have to redo all the tests again when the error is fixed. This could get a bit tedious! Depending on the effort involved, you could set up an automated set of tests.

If the model is for internal use, you should try to include your tests in the model itself, so that anyone using it can see exactly what was tested, and perhaps even retest it.

If you can write code, it may be a good idea to set up a set of inputs and use VBA to run through them automatically. This can greatly speed up testing.

Where the business logic is written in VBA (i.e. VBA is doing most of the hard work), it may be difficult to test. You may be able to dump partial results to a sheet for testing.

Reasonableness tests
You should look for ways to test the reasonableness of the model. For example, there may be figures that were done a year ago which should be similar to the results of the model, or there may be other models which can be used to produce test results for at least part of the current model.

You can also ask the builder to include cross-checks (e.g. totals for columns and rows should match) which help in testing the model.

Sensitivity testing, i.e. changing one of the inputs and seeing what happens, is another way to test for reasonableness, especially if you have some idea of what to expect.

An extension of sensitivity testing is to find out how accurate the model needs to be, then estimate the possible errors in setting the assumptions and inputs (for example, an investment assumption of 7% might be out by 2% either way), and test the impact on the results. This gives a rough idea of how far out the results might be (because the user can’t possibly get all the assumptions absolutely correct), and whether the overall error is acceptable.

Test in chunks
If possible, test the model in chunks, so you can sign it off one part at a time. This makes checking more manageable and it should make finding errors much easier.

Spreadsheet testing tools
There are several spreadsheet testing tools which can help in checking complex spreadsheets. They look for things like inconsistent formulae, & orphan (unused) calculation cells.

Is it usable?
Put yourself in the shoes of the user, or, even better, find someone else to try using it. Is it clear, or is it confusing?

Can users accidentally change formulae, or put in ridiculous figures?

Remember that users will often not read instructions, and will use the model without thinking. The less expert the user, the more effort needs to go into protecting the model – and especially the inputs – from incorrect use.


text:
Drugs:Fact and Fiction/Depressants/Zolpidem (Ambien)

One of the most popular prescription sedative-hypnotics, zolpidem, commonly known as Ambien is used as a sleep aid. At prescribed doses, the patient will notice drowsiness within 20-60 minutes within consumption of dose.

Prescription doses of zolpidem include:

Ambien
 * 5 mg
 * 10 mg

Ambien CR (Time-Release version) '''
 * 6.25 mg
 * 12.5 mg

How Zolpidem Works

Zolpidem works by binding preferentially to the omega-1 (BZ-1) receptor subtype of the GABAA receptor complex. This subtype is thought to be the one most closely associated with sleep.

In contrast, benzodiazepines do not have a receptor preference, so they bind to—and activate—all omega (BZ) receptor subtypes. Other omega (BZ) receptor subtypes are associated with anxiolytic, myorelaxant, and anticonvulsant activity.

As Described on Ambien.com


text:
User:Tom Foolery~enwikibooks

See Wikipedia:User:Tom Foolery

title: User:Tom Foolery~enwikibooks


text:
Drugs:Fact and Fiction/DXM

What Is DXM?
DXM is the active ingredient found in over the counter cough and cold medications. When taken in recommended doses, these medications are safe and effective.

Health and Safety
In very large quantities, DXM can cause effects similar to those of /ketamine/ and /PCP/ because these drugs affect similar sites in the brain. These effects can include impaired motor function, numbness, nausea/vomiting, and increased heart rate and blood pressure. On rare occasions, hypoxic brain damage—caused by severe respiratory depression and a lack of oxygen to the brain—has occurred due to the combination of DXM with decongestants often found in the medication.

NOTE! Abuse of cough medicine has more serious side effects then those listed here. The amount of cough syrup which contains "recreational" dose of DXM can have a fatal dosage of its other active ingrediates.

title: Drugs:Fact and Fiction/DXM


text:
US Income Tax/Introduction

Who's who in the tax system
Income taxes in the United States are levied by the federal government and by state and local governments. The federal income tax, upon which this text focuses, is collected by the Internal Revenue Service (IRS), part of the Department of the Treasury. The rules for collecting income taxes are set in the Internal Revenue Code (IRC), Title 26 of the United States Code. The IRC is a statute written and regularly revised by Congress. Treasury Regulations are more detailed rules written by the IRS to effectuate the implementation of the IRC. Code provisions, which are statutory, always trump contrary regulatory provisions. Regulations can be of two types: legislative and interpretive. With legislative regulations, Congress says, for example, that depreciation will be an allowable expense "in accordance with regulations to be established by the IRS." It gives the IRS the power to make the rules. Interpretive regulations are those in which the IRS says how it will interpret and apply a given statute.

Disputes over tax rules are generally heard in the United States Tax Court before the tax is paid, or in a United States District Court or United States Court of Federal Claims after the tax is paid. Appeals from the Tax Court go to the United States Court of Appeals for the circuit in which the taxpayer resides, or was domiciled when the tax return in controversy was originally filed. From the Court of Appeals the taxpayer may file a writ of certiorari with the Supreme Court, which may or may not be granted. The IRS also periodically issues Revenue Rulings when taxpayers have questions about how to declare certain transactions. These rulings are only opinions, and are trumped by court rulings or contrary legislation. Revenue Rulings should not be confused with Private Letter Rulings. A Private Letter Ruling is a request by a specific taxpayer to the IRS to rule on the tax consequences of a specific transaction before the action is taken. A Private Letter Ruling is directed only towards the requesting taxpayer, and therefore can not be relied upon by other taxpayers considering the exact action. Private Letter Rulings are released every Friday by the IRS

How tax is calculated
The actual computation of tax is a straightforward process that can be performed by hand using IRS worksheets, or by computer using special tax software. The basic steps are as follows:

 * 1) The taxpayer computes their gross income, including ordinary gains and losses.
 * 2) The taxpayer subtracts capital gains which are taxed separately from other income.
 * 3) The taxpayer subtracts business deductions and other above the line deductions to find their adjusted gross income.
 * 4) The taxpayer subtracts their personal exemption.
 * 5) The taxpayer adds up itemized deductions, and either subtracts that sum or their standard deduction, whichever is greater, to find their taxable income.
 * 6) The taxpayer multiplies their taxable income by various percentages to compute their tentative tax liability.
 * 7) The taxpayer subtracts tax credits to find their final tax liability.

Accounting
Accounting is important to discussions of tax law, because it determines when a receipt becomes taxable income and when a payment becomes deductible. Individuals and corporations generally compute their taxable income on a cash method or an accrual method and it is on this taxable income that the tax liability is based.

The cash method
The cash method is primarily used by individuals and small businesses. Under a cash system, generally, transactions count as income in the year of actual receipt, and count as deductions in the year of actual payment. There are some exceptions:

 * Some transactions are counted as income before they are actually received because of the doctrine of prior constructive receipt.
 * Amortized capital expenditures, deductions on certain business assets, are not deducted immediately.
 * Interest is deductible when paid, but prepaid interest is not.

The accrual method
The accrual method is primarily used by large businesses which want to keep their income statements and their actual cash flow separate. Goods inventories are generally tracked using the accrual method, so any retail business is likely to use accrual accounting, and many businesses selling goods ancillary to their services may have to use accrual accounting as well.

In addition to the foregoing two methods there are also "Special methods of accounting for certain items of income and expenses" and "Combination (hybrid) methods using elements of two or more of the foregoing." For a non-authoritative but more extensive discussion of all these methods, including when they may and may not be used, and who may and may not use them, see IRS Publication 538, Accounting Periods and Methods. It should be noted that this discussion of the various methods is for the purpose of income taxes and not for the purpose of preparing financial statements in accordance with generally accepted accounting principles (GAAP).

Income
An accrual-based taxpayer has income when:

 * 1) all events have occurred that fix the right to the income and
 * 2) the amount of the income can be determined with reasonable accuracy.

Charles Schwab Corp. v. Commr., 107 T.C. 282 (1996), dealt with this question in the context of securities brokerage, where parties become bound to a transaction on the "trade date" but do not actually perform the transaction until a "settlement date" a few days later. Schwab and the IRS disputed whether the "all events" test was satisfied on the trade date. The court ruled that Schwab had to accrue its income on the trade date, because the execution of the trade was a condition precedent fixing Schwab's right to receive its commission on the settlement date.

Under the claim of right doctrine, a taxpayer has income whenever they receive an amount under a claim of right and without restriction to its use. This means that in some transactions, where an accrual-based taxpayer receives a payment before their right to the payment has been fixed (a "pre-payment"), they recognize income when they actually receive the payment. The main exception to this rule is for security deposits, which are generally not received under a claim of right. Another exception is for non-profit membership organizations such as AAA, which receive prepayments for services: under Section 456, they are allowed to defer their income across the period of liability to perform the services.

Deductions
An accrual-based taxpayer has a deduction when:

 * 1) all events have occurred that fix the liability for the deduction and
 * 2) the amount of the deduction can be determined with reasonable accuracy and
 * 3) economic performance has occurred with respect to the liability.

One well-known contest regarding the "all events" test was Mooney Aircraft v. U.S., 420 F.2d 400 (1969). Mooney sold each of its aircraft with a "Mooney Bond" promising to pay the bearer $1,000 when the aircraft was retired from service. Mooney tried to deduct the value of each bond in the year of issue; the IRS argued that the value of a bond could only be deducted when the aircraft was retired. The court sided with the IRS, noting that "the longer the time the less probable it becomes that the liability, though incurred, will ever in fact be paid... the very purpose of the 'all events' test is to make sure that the taxpayer will not deduct expenses that might never occur."

The "economic performance" requirement applies to deductions, but not to income. The rationale of the requirement, which was added in 1984, is that many business liabilities do not require actual payment until a distant point in the future, and many such liabilities can be easily overstated to reduce (or eliminate) tax liability. Under Section 461, economic performance occurs when property or services are provided or used, or when payments are made in the case of workers' compensation and tort claims.

Annual accounting
Regardless of whether they use a cash or accrual method, all taxpayers follow a system of annual accounting. Income taxes are always levied on a year-by-year basis, and each year is "compartmentalized" from the previous year and the next year. This means that if a taxpayer loses money in year 1 but has a higher income in year 2, they must still pay taxes on their income in year 2 even if the income is only enough to offset their previous loss. This is a general rule, and like most general rules, it has many exceptions.

Tax benefit doctrine
When a taxpayer has an expense, takes a deduction for that expense, but then recovers the expense later, they have income in the year they recover the expense. This principle is known as the tax benefit doctrine. A corollary to the tax benefit doctrine is Section 111, which establishes that recovery of an expense is not income if the taxpayer did not get a tax benefit from the expense.

Income under semblance of unrestricted right
What if a taxpayer receives something and believes they have a right to it, but later has to pay it back? In some situations, Section 1341 allows the taxpayer to deduct their previous income when it was received with a "semblance" of an unrestricted right.

Net operating losses
Businesses also have an option to "carry back" and "carry over" their net operating losses for the year. Under Section 172, carrybacks are available to the two years preceding the loss year, and carryovers are available to the next twenty years. This allows operating losses to offset income in other years, "flattening" the business's tax liability. Generally, the losses must be applied against income in the earliest year possible (i.e. the earliest year where there is income), but a business can elect to waive its carryback and save losses for carryover only.

title: US Income Tax/Introduction


text:
Drugs:Fact and Fiction/Kratom

Effects List

POSITIVE

* Simultaneous stimulation & sedation * Feelings of empathy * Feelings of euphoria * Aphrodisiac qualities for some people * Vivid waking dreams * Useful with physical labor * Analgesia

NEUTRAL

* Relatively short duration * Change in ability to focus eyes

NEGATIVE

* Very bitter taste * Dizziness, nausea and/or vomiting at higher doses * Mild depression during and/or after * Increase in (perceived?) body temperature. (feel hot and sweaty) * Hangover similar to alcohol

The effects of Mitragyna speciosa are described as being a combination of both stimulation and sedation. The stimulatory effects may be shorter in duration than the sedation effect, coming on faster and fading sooner.

See Kratomplant pictures on this site Kratomplant pictures

title: Drugs:Fact and Fiction/Kratom


text:
User:H i-c h-a M~enwikibooks

Welcome
Hello & Welcome Everybody, or "Assalam alikom" like we say in Arabic. I'd like to welcome everyone who'd reached my space no matter what.

Other Wikis
You can find me in the following projects also:

 * [[image:Wiki-commons.png|32px|]] Wikimedia Commons
 * [[image:Wikipedia.png|32px|]] Arabic Wikipedia
 * [[image:Wikipedia.png|32px|]] English Wikipedia
 * [[image:Wikipedia.png|32px|]] French Wikipedia

ar:مستخدم:H_i-c_h-a_M

title: User:H i-c h-a M~enwikibooks


text:
User talk:H i-c h-a M~enwikibooks

Hello & Welcome
Comments - if any - can goes under this page :)
 * --H i-c h-a M 07:02, 19 December 2005 (UTC)

Your account will be renamed
Hello,

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

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

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

Sorry for the inconvenience.

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

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

title: User talk:H i-c h-a M~enwikibooks


text:
A-level Mathematics/OCR/D2

Please post all questions to A-level Mathematics/Discussion.

Contents

 * 1) /Game Theory/
 * 2) /Flows in a Network/
 * 3) /Matching and Allocation Problems/
 * 4) /Critical Path Analysis/
 * 5) /Dynamic Programming/

title: A-level Mathematics/OCR/D2


text: Template:US Income Tax

title: Template:US Income Tax


text:
Immunology/Introduction

Immunology is the study of the organs, cells, and chemical components of the immune system. The immune system creates both innate and adaptive immune responses. The innate response exists in many lower species, all the way up the evolutionary ladder to humans, and it acts through relatively crude means against large classes of pathogens. The adaptive response is unique to vertebrates, reacting to foreign invaders with specificity and selectivity.hb

The immune system must maintain a delicate balance, with potent defensive responses capable of destroying large numbers of foreign cells and viruses while refraining from undue destruction of the host's body. When the immune system cannot mount a sufficient defense of the host, there is an immune deficiency; this is seen in HIV infection and SCID. If, on the other hand, the immune system acts too vigorously and begins to attack the host, we have autoimmunity. This is a defiance of the integral immune system property of self/nonself recognition. That is, the immune system begins attacking or forming antibodies against the host's own body tissues. Examples of autoimmune diseases include Graves' disease, Hashimoto's thyroiditis, myaesthenia gravis and type I diabetes mellitus.

The History of Immunology
The human immune system recognizes non-self entities and mounts an effector response to neutralize the organism. A faster and stronger memory response may occur upon later exposure. The memory response has been used throughout history to confer immunity upon several populations, even previous to our understanding of the physiological basis for such a response. Thucydides wrote in his History of the Peloponnesian War that persons who had been exposed to plague previously could care for the sick without danger. In the 19th century, variolation was commonplace; this was the removal of smallpox (variola virus) skin pustules which were subsequently put into small cuts in the skin of healthy people. This was itself a crude form of vaccination, with the crusty dry pustules acting as an incubator of attenuated virus. Edward Jenner would later use the cowpox virus to vaccinate (from vacca, Latin for "cow") patients against smallpox, and Louis Pasteur attenuated rabies and injected it into a small boy, naming this substance a vaccine in honor of Jenner's earlier studies in the science of immunology.

As immunology progressed, many people began to question how these vaccines worked. Why should exposure to plague in Thucycides' time confer protection only against plague and not all disease? Why should cowpox, a similar disease to smallpox but clearly a less severe virus, give milk maids sufficient immunity to resist full smallpox infection? In short, what has caused this memory response to be relatively (yet not absolutely) specific as well as selective?

The Basics
First, some vocabulary: Note: Often, antibody and immunoglobulin are used interchangeably. antigen and immunogen are used interchangeably(but to be precise, they are not the same)
 * Serum—liquid, noncellular component of blood after coagulation has occurred (and thus devoid of clotting factors).
 * Immunoglobulin—a serum fraction (aka gamma globulin) that has antitoxin, precipitin, and agglutin factors (abbreviation: Ig)
 * Antigen--"Antibody Generator"; a foreign organism or molecule that generates a humoral immune response, causing the release of antibodies (abbreviation: Ag)
 * Epitope—the molecular sidechain of an antigen that each antibody attaches to; there can be many epitopes on a single antigen
 * Antibody—refined, Y-shaped proteins that make up the immunoglobulin fraction of serum; antibodies are specific to certain foreign bodies; antibodies can be membrane-bound or free in the serum (abbreviation: Ab)

There have been several competing theories of the immune response mechanism. The instructional theory of antigen interaction postulated that the antigen itself caused antibodies to fold around the antigen in a certain way; this theory was later disproven. The selection theory states that the body creates many different sidechains on antibodies, and the antigen "selects" the correct antibody; in other words, the body creates every possible permutation of chemical sidechain-specific antibodies, and when an antigen enters the body, it is matched up with antibodies that correspond to its epitopes. The current theory of immune response is known as the clonal selection theory, which states that an individual lymphocyte (specifically, a B cell) expresses receptors specific to the distinct antigen, determined before the antibody ever encounters the antigen. Binding of Ag to a cell activates the cell, causing a proliferation of clone daughter cells.

Innate Immunity
Innate immunity is basic and nonspecific. It includes: antigen-presenting cells (APCs))
 * Phagocytic cells (macrophages, neutrophils; more generally,
 * Barriers (e.g. skin)
 * Antimicrobial compounds
 * Inflammation

Phagocytic Cells
Certain cells "eat up" foreign invaders; this is termed phagocytosis. Many of these cells are known as Antigen-Presenting Cells (APCs) because they break apart the ingested pathogen and display certain epitopes of the antigen on their surface. In this way, they localize the presentation of antigen, forming a vital link between the innate response and the adaptive response. Lymphocytes (such as B cells and T-helper cells) will have antigen presented to them, initiating the adaptive response. Monocyte-derived cells are common APCs, and they include tissue macrophages and monocytes within the blood; eutrophils are also APCs. APCs are discussed further below, in the section on cells of the immune system.

Barriers
The skin contains epidermis and dermis. The epidermis contains tightly packed epithelial (cytokeratin positive) cells with keratin waterproofing. The dermis contains connective tissue, blood vessels, hair follicles, sweat glands, and sebaceous glands. Sebaceous glands secrete sebum; this contains fatty acids and lactic acid, lowering skin pH to 3–5, and sometimes causing acne.

Mucous membranes contain normal flora, mucus, and cilia. Mucous membranes are found in the nose, eyes, mouth, urogenital, and anal regions of the body. Flora refers to bacteria that inhabit the human body in a relative steady-state; the gastro-intestinal tract contains a large number of these bacteria, and different areas of the world contain different flora. It is for this reason that people contract Traveler's Diarrhea: in short, flora from one region of the world are more dangerous because the body has not acclimated to their presence. Mucus contains certain mucin proteins, inorganic salts, and water; it is secreted from goblet cells. Cilia acts to sway back and forth during two phases, known as the power stroke and the recovery stroke; this allows mucus to be swept out of the body, either proximodistally from the lungs up the respiratory tract, or down the GI tract through the intestines, culminating in defecation. The enteric nervous system causes contractions of the gut, moving foodstuffs, waste, and bacteria/toxins down the digestive tract. This is just one example of disparate systems of the body working together with the immune system proper. Other examples are skeletal muscles, which squeeze blood along the veins, and lymph along the lymph vessels, or the nervous system, which supports a rise in body temperature in response to infection.

Some bacteria can attach to mucous membranes via fimbriae or pili, which attach to special glycoproteins/glycolipids on the epithelial cells of mucous membranes.

Antimicrobial Compounds
Several antimicrobial compounds mediate the innate response. peptidoglycan in bacterial cell walls cells (it is a paracrine factor), inducing a generalized antiviral state pathogen cell membranes their lipid membranes or agglutinating them via pattern recognition to certain classes of molecules; TLR4, for example, recognizes lipopolysaccharide (LPS) on gram-negative bacteria
 * Lysozyme--hydrolytic enzyme in tears and mucous; cleaves
 * Interferon--produced by virus-infected cells; binds to nearby
 * Complement--inactive circulating serum proteins that act on
 * Collectins--surfactant materials; kills bacteria by disrupting
 * Toll-Like Receptors---(TLRs) membrane-bound receptors that react

Inflammation
Classical biology puts several characteristics together as an inflammatory response. These included redness (erythema, rubor), heat (calor), swelling (edema, tumor), pain (dolor), and loss of function (functio laesa). The physiological processes that bring about these symptoms are central to the innate immune response.

Erythema results from constriction of post-capillary venules in tissue beds and vasodilation in pre-capillary arterioles/metarterioles. This results in an increase of hydrostatic pressure in the capillary bed, overcoming the osmotic pressure of the interstitial fluid and causing exudate (high-protein fluid with acute-phase proteins like C-reactive protein and macrophages) to flow into the interstitial tissue. This flowing of exudate also allows the factors of the clotting cascade to enter areas of tissue damage, forming clots and, eventually, scars. Certain inflammatory factors also cause phagocytic cells to enter the damaged tissue. The now-permeable capillaries are traversed by these phagocytes in response to chemotaxis, the release of factors that lure the cells to the site of injury. The cells first approach the side of a capillary (margination), move through the spaces between capillary endothelial cells (diapedesis), and then enter the tissue itself. Histamine helps to mediate this response, and certain factors (such as bradykinin and possibly prostaglandins) stimulate skin pain receptors. Thus, blood flows into the tissue, causing redness, warmer steady-state temperature, swelling, and pain; loss of function is a secondary effect of these four states.

Adaptive Immunity
Adaptive immunity occurs in response to antigen exposure. It is specific, and it shows memory. As long as an antigen is made of the normal chemical elements we experience in biological systems (e.g. Carbon, Nitrogen, Sulfur, Hydrogen, Oxygen), we can form an adaptive response to it. This is how we fight off new diseases, and it has even been shown that we can create antigens in the laboratory that have never before existed on Earth, only to have animals mount competent immune reactions to them. As stated earlier, the adaptive immune system's specificity is tempered with an ability to differentiate between self and non-self antigen; simply put, the body doesn't attack its own cells, unless they have been invaded by virus and ask to be sacrificed for the sake of the host. When the immune system does attack the body, this is a disease state: autoimmunity.

The primary response takes 5–6 days, but the memory (secondary) response will be swifter and deadlier. It includes:
 * Lymphocytes
 * Antibodies

Lymphocytes
Blood cells are made in the bone marrow of adults. Leukocytes are white blood cells (WBCs). This includes monocytes (which become myriad cell types in the body, most importantly macrophages), granulocytes (neutrophils, basophils, eosinophils), and lymphocytes. Of all the leukocytes, the lymphocyte class are the most preeminent in the adaptive immune response. On a peripheral blood smear, lymphocytes are approximately the size of erythrocytes (red blood cells, RBCs), although they can be larger if activated and have a characteristic "clock-face" nucleus if they are B cells. Lymphocytes are so named because fewer than 1% are present in the circulating blood; the rest lie in the lymph nodes, spleen and other lymphoid organs. T lymphocytes leave the bone marrow, travelling to the thymus gland, where they mature and gain their specificity for the diverse antigens the body might come into contact with; additionally, any T cells that react against the body's own epitopes are selected against (killed) in the thymus, in an effort to stop any possible autoimmunity. A similar process occurs in the bone marrow in the case of B lymphocytes. B cells are conveniently named ("B for bone marrow"), but this is just a coincidence; it turns out that they are named B cells after the Bursa of Fabricius, a small pouch in the cloaca (lower large intestine, cloaca Latin for "sewer") of birds.

B cells leave the bone marrow with their specific membrane bound Ig (antibody) already specified. The Ig itself is made up of two medial heavy chains (both identical) with two lateral light chains (also identical) attached to the "top" of the heavy chains, which form a Y shape. Before they encounter antigen, B cells are known as "naive." Once they encounter antigen, the naive B cells will undergo clonal expansion; an activated B cell will form some daughter memory B cells and some plasma cells. The memory cells will lie in wait for a second encounter with the antigen, while the plasma cells will begin a massive secretion of antibody (Ig). '''B cells can bind to antigen when it is free and unprocessed in the body, much like APCs can.'''

Before moving on to T lymphocytes, it should be noted that certain cell surface molecules distinguish each person's unique immune system profile. The Major Histocompatibility Complex (MHC, or HLA) is a type of protein expressed on the surface of host cells that interacts with T-cell receptors (TCRs) of T cells. Virtually all the body's cells, including APCs, express class I MHC (MHC-I) on their surface. Only APCs express class II MHC (MHC-II). Thus, most body cells express MHC-I, while APCs express both MHC-I and MHC-II. When antigen enters a body cell and is broken down, the products of this breakdown are sent to the surface of the cell coupled with MHC-I. This forms the MHC-I/Ag complex, and usually occurs when a virus or bacterium enter a cell and are broken down by intracellular defenses. This can also occur in APCs, but APCs additionally process the antigen that they phagocytose, presenting it as an MHC-II/Ag complex on the surface of their cells.

T cells can be subdivided into two broad types: T helper cells and T cytotoxic cells. T helper cells express a T-Cell Receptor (TCR) that will interact with APC surfaces. Specifically, they interact with the MHC-II/Ag complex on the surface of APCs, and the TCR is stabilized in its binding by a CD4 receptor. CD stands for "cluster of differentiation," and is simply a class of cell receptor which occurs predominantly on T cells. T helper cells contain CD4 receptors and T cytotoxic cells contain CD8 receptors. Upon binding, T helper cells release cytokines, which act as chemotactic agents to call for more T helper cells, T cytotoxic cells, APCs, and B cells.

T cytotoxic cells encounter body cells that have been invaded and are presenting MHC-I/Ag on their surface. Tc cells extend their TCR to the MHC-I/Ag complex and stabilize this interaction with their CD8 receptor arms. Upon binding, the CD8+ cells differentiate, much like naive B cells, into memory T cells and cytotoxic T lymphocytes (CTLs), effector cells that cause the MHC-I/Ag-presenting cell (the "altered self cell") to die (apoptose). CTLs trigger apoptosis by secreting a perforin that allows the entry of a serine protease (Granzyme B) which activates intracellular executioner caspases. It should be noted that cancer cells can also become altered self cells, and CTLs are very important in the destruction of cancerous cells. 'T cells can interact with antigen only'' after it has been processed, either by a normal body cell (MHC-I) or by an APC (MHC-II).'''

Difference between the two types of T cells: presented on MHC-II, via binding with TCR and CD4. proteins), broken down by lysosomes in many types of body cells, presented on MHC-I, via binding with TCR and CD8.
 * T helper cells react to exogenous antigen, phagocytosed by APCs,
 * T cytotoxic cells react to endogenous antigen (such as viral or cancer

Note that it is both the antigen and the MHC that is presented to T cells; each person has a unique MHC. This is why we must type for bone marrow transplants—we don't want people producing tons of new immune cells in bone marrow that think every MHC in the body is actually just antigen; when this does occur, it is called '''graft-vs.-host disease'''. Not only would the new bone marrow make cells that attacked every body cell's MHC, but when the body did present Ag on MHC, the lymphocytes from the transplant would not be able to recognize this MHC-I/Ag complex (although the MHC-II complex cells would be made in the new bone marrow, and thus APCs could, in some cases, still present). Unfortunately, these APCs would be very busy presenting the host's own body cells; clearly MHC typing (also known as HLA typing) for bone marrow transplants is a necessary result of the elegant self-nonself recognition of the human immune system. It is also worth noting that we are only as good as our presenting molecules. Some people have MHC genes that are not as good at presenting antigen, and thus some people have more vigorous immune respones than others.

Antibodies
The cellular and humoral responses of the adaptive immune system are linked via the T helper cell-B cell interaction. The T helper cell secretes cytokine factors to encourage chemotaxis of B cells to the site of infection as well as B cell differentiation and growth. B cells themselves, in their effector plasma B cell form, release antibodies into the blood. Antigens, or foreign substances that enter the body,are very harmful to the Immune System. But when specific antibodies are produced to bind with an antigen, the foreign substance becomes harmless and is delivered to the lymph. Antibodies are also very important in the complement system; this is an example of the vertebral adaptive immune response making good use of the relatively primitive innate immune response. Antibodies to the body's own cells are a very real danger. Type I diabetes may be caused by an autoimmune response, where the body makes antibodies to its own Beta cells in the pancreatic Islets of Langerhans. Graves' disease is a condition where the body produces antibodies to receptors in the follicular cells of the thyroid; these Ab keep the cells constantly activated, giving the patient hyperthyroidism and increasing their metabolism, to adverse effect. The interesting counterpoint to this is Hashimoto's thyroiditis; here the body makes antibodies to thyroid follicular cells' receptors, but in this case the cells are shut down by the Ab, and the patient endures hypothyroidism.

Autoimmunity due to antibody overreaction (hypersensitivity) is a huge problem, and it is a much greater problem in women than in men. Women tend to have a higher titer of immunoglobulin (antibody), and thus they exert a stronger (and sometimes overwhelming) immune response. For example, for every one man who gets Graves' disease, 8 women will contract it.

Antibodies are often given to produce a short-lived humoral immunity in emergency situations. Many antivenoms are actually horse immunoglobulin, produced in order to bind the venom until it can be cleared from the body.

Theory Meets Function
It should be noted that all of the above-mentioned immune responses result in the destruction or agglutination of foreign pathogen. The goal of the immune response is three-fold:
 * 1) Destroy foreign antigen via innate or humoral responses such as complement fixation or endocytosis by macrophages.
 * 2) Attract immune cells to the site of infection so they can engulf, process and present the antigen to T cells
 * 3) Move the antigen to the site of differentiation (e.g. lymph nodes, thymus) via the lymphatic system, so that it can interact with naive B cell. This process creates new effector and memory cells which can return to the site of infection and destroy the foreign cells in a highly effective fashion via the adaptive response.

The immune responses listed above show the intimate interaction between the innate and adaptive immune systems, as well as the subclasses of adaptive responses. The clonal selection theory of immune response, introduced above, is clear in the action of lymphocytes. Clonal selection simply means that antigen is presented to many circulating naive B and (via MHC) T cells, and the lymphocytes that match the antigen are "selected" to form clones of themselves, both memory and effector. This mass production of daughter cells is termed clonal expansion, and it is essential in the understanding of the theoretical basis of immunology. Not only this; clonal selection is used negatively in the lymphoid organs. Here, the body's own epitopes are presented to the infant lymphocytes; those that react are recognized as traitors and destroyed before they (and their future cloned daughters) can leave and wreak havoc in the body.

Back to Immunology || Next Chapter: Organs of the Immune System

title: Immunology/Introduction


text:
Immunology/Organs of the Immune System

The organs of the immune system are positioned throughout the body. They are called lymphoid organs because they are home to lymphocytes, small white bloodcells that are the key players in the immune system. There are two groups of immune system organs.
 * Primary (central)--organs where immature lymphocytes develop
 * Thymus
 * Bone marrow
 * Secondary (peripheral)--tissues where antigen is localized so that it can be effectively exposed to mature lymphocytes
 * Lymph nodes
 * Appendix
 * Peyer's Patches (of GI tract)
 * Tonsils
 * Adenoids
 * Spleen
 * MALT (Mucosal-Associated Lymphoid Tissue)
 * GALT (Gut-Associated Lymphoid Tissue)
 * BALT (Bronchial/Tracheal-Associated Lymphoid Tissue)
 * NALT (Nose-Associated Lymphoid Tissue)
 * VALT (Vulvovaginal-Associated Lymphoid Tissue)

Note: Some sources place the vermiform appendix, small intestine Peyer's Patches, tonsils, and adenoids within the GALT.

Thymus
The thymus (from θυμος, thumos, Greek for warty outgrowth) is the site of T cell maturation. T cells become immunocompetent here; that is, they develop their ability to mount an effective immune response against foreign invaders without attacking the host's own tissues. The thymus lies just above the heart in the mediastinum. It is largest in childhood, and it begins to shrink significantly as a person ages. The organ itself contains two lobes, and each lobe contains numerous lobules, separated from each other by connective tissue septa known as trabeculae. Each lobule is separated into an inner medulla (with few immature thymocytes) and an outer cortex (with large numbers of immature thymocytes). In the thymus, the many different T cells (produced via somatic genetic mutation, discussed below) are exposed to MHC/Ag and MHC/self-Ag. If they do not react to MHC/Ag, they are destroyed due to their ineffectiveness (positive selection). On the other hand, if they do react to MHC/self-AG, they are destroyed in order to stop them from becoming traitorous autoimmune responses against the body's own tissue(negative selection). Only 1 out of 20 immature thymocytes will pass successfully through this vetting process and become functional T cells. Dendritic cells, macrophages, and epithelial cells are interspersed throughout both the medulla and cortex; special epithelial nurse cells surround clusters of thymocytes in the cortex.

Myasthenia gravis is an autoimmune disease where the body creates antibodies against acetylcholine receptors at post-synaptic neuromuscular junctions. In up to 25% of MG cases, there is a tumor of the thymus present (thymoma); the exact reasons for this tumor development is unknown. Additionally, removal of the thymoma will halt the disease's progress; this deserves further study as antibodies are released from plasma B cells rather than T cells, yet T helper cells may mediate the autoimmunity.

DiGeorge's Syndrome is a congenital lack of a thymus, and causes in increase in infections and a depressed immune system (especially the cell-mediated response is retarded by the lack of a thymus).

Bone Marrow
Bone marrow (medulla ossea) is the site of B cell maturation in mice and humans. B cells undergo both positive and negative selection, similar to T cell maturation in the thymus. Bone marrow is also the site of hematopoiesis, the development of the myriad blood cells from progenitor cells. The site of B cell maturation in birds is the bursa of Fabricius, after which B cells are named. The tissue of bone marrow where leukocytes, red blood cells, and platelets develop (i.e., the site of hematopoiesis) is known as myeloid tissue.

Leukemia is a cancer of the bone marrow that causes abnormal production of leukocytes (WBCs).
 * Acute leukemia is the biggest killer of children in the US; it results from the overgrowth of immature leukocytes in the bone marrow, retarding the production of functional WBCs, RBCs, and platelets.
 * Chronic leukemia is the overgrowth of relatively mature (but abnormal) leukocytes in the bone marrow.
 * Lymphocytic leukemia is the overgrowth of lymphoid cells (T cells, B cells, Natural Killer Cells, dendritic cells).
 * Myeloid leukemia is the overgrowth of myeloid cells (all blood cell types that are not lymphocytic are produced from myeloid progenitor stem cells).

Lymph Nodes
Extracellular fluid flows from capillary beds into tissue; from this tissue it enters lymphatic capillaries that are "pumped" along with the movement of skeletal muscle towards lymph nodes. The paracortical areas of the nodes contain T cells, and the central areas contain germinal centers, where B cells are contained. APCs and antigen are sent from the tissue into the lymphatics, eventually reaching the lymph nodes where they can be exposed to the T and B cell populations. This allows a faster response, as the many combinations of T and B cell specificities are able to reside in several locations throughout the body (the lymph nodes) rather than relying on random meetings of antigen and lymphocytes throughout the tissues themselves.

Spleen
The spleen acts as a site of hematopoiesis during the second and third trimesters of development, before the long bones have fully developed. In the adult, the spleen acts as a site for breakdown of dying red blood cells (lifespan 120 days). For this reason, enlargement of the spleen (splenomegaly) can occur in sickle cell anemia or in certain infections. White pulp, near the arteriolar entry points into the spleen, is where lymphocytes reside and are degraded. The central red pulp is the site of RBCs breakdown. The white pulp region has a central part, with the T cells residing in the PALS, or PeriArteriolar Lymphoid Sheath and a B cell ring (or corona) surrounding the PALS.

Back to Immunology || Previous Chapter: Introduction || Next Chapter: Cells of the Immune System

title: Immunology/Organs of the Immune System


text:
Immunology/Cells of the Immune System

Hematopoiesis
Stem cells, like the stem of a plant, are cells that branch off into other cell types (hence the name). Hematopoiesis is the generation of blood cells in the bone marrow. Hematopoietic Stem Cells (HSCs) are cells within the bone marrow that maintain their own population through cell division while branching off some daughter cells to form subspecialized sets of cell-types.

During the embryonic stage however, humans do not yet have long bones but are still able to accomplish hematopoesis. The yolk sac acts as the site of hematopoiesis for the first several months of gestation, and in the second and third trimesters the fetal liver and spleen take over hematopoietic duties. Gradually, during the final trimester, the hematopoetic duties are handed over to the long bones of the fetus.

By parturition, hematopoiesis has become localized to the bone marrow itself. Most cells can multiply via division into cells like themselves, and thus are known to be unipotent. If a cell can differentiate into any cell type, it is called totipotent; a zygote's first dividing cells, and some embryonic stem cells (ES cells) are totipotent. HSCs are known as pluripotent or multipotent, meaning they can reproduce themselves (creating a store of unending stem cells) while having other cell-types branch off of their foundation stem, becoming several other types of cells.

The following is a list of the final differentiated types of cells that HSCs can become:

All of these cell types are created in the bone marrow. Throughout the body's tissues, monocytes and B cells can specialize further. B cells will become Monocytes can become any of the following vimentin+ cells:
 * Hematopoietic Stem Cell (HSCs renew their stocks)
 * Lymphoid Progenitor Cell
 * Natural Killer Cell (NK Cell)
 * Dendritic Cell
 * Monocyte-derived dendritic cell
 * Plasmacytoid dendritic cell
 * T Cell Progenitor
 * CD4+ T Helper Cell
 * CD8+ T Cytotoxic Cell
 * B Cell Progenitor
 * Myeloid Progenitor Cell
 * Mast Cell
 * Dendritic Cell
 * Granulocyte-Monocyte Progenitor Cell
 * Monocyte
 * Neutrophil (leukocytosis is high neutrophils and is used clinically to indicate infection; also known as polys, segs, and PMNs, Polymorphonucleophages)
 * Eosinophil Progenitor Cell
 * Eosinophil
 * Basophil Progenitor Cell
 * Basophil
 * Megakaryocyte
 * Platelets
 * Erythoid Progenitor Cell
 * Erythrocyte (RBC)
 * plasma cells (effector B cells)
 * memory B cells
 * circulating blood monocytes
 * cardiac failure cells (in alveoli)
 * alveolar macrophages
 * epithelial macrophages
 * Mesangial Cells (in the kidney glomerulus)
 * Kupffer Cells (in liver)
 * Ito Cells (in liver)
 * histiocytes (in connective tissue)
 * Microglial cells (in brain)
 * Osteoclasts (in lamellar bone)

NK1-T cells are a special set of rapid-response cells that have TCRs but interact with CD1 rather than MHC-I or MHC-II. These cells are a sort of NK cell/T cell hybrid. When activated, NK1-T cells recruit both cytotoxic T cells and B cells.

Returning to the bone marrow itself, certain growth factors and cytokines must be present in cell microenvironments in order for these cells to go down one differentiation pathway or another. Much like the stroma (supportive tissue) of an organ, the stromal cells of the bone marrow assist in hematopoiesis both by creating a scaffolding upon which the stem cells grow and differentiate while also secreting factors that influence and encourage growth.

Apoptosis
Apoptosis is programmed cell death via disintegration of the cell into membrane-bound pieces which are then phagocytized. The purpose of apoptosis is to destroy cells in an ordered way without releasing the possibly toxic intracellular chemicals and components into the extracellular tissue. Necrosis is death of a cell based on injury or disease and does not employ similar safeguards. Several genes act to influence apoptosis. They include:
 * Apoptosis Inhibitors
 * bcl-2
 * bcl-X long
 * Apoptosis Enhancers
 * bax (inhibits bcl-2)
 * bcl-X short (inhibits bcl-X long)
 * caspases
 * fas

T Cell Responses
T cells can initiate several different responses. Certain cells act to suppress a T cell-mediated response, and are known as suppressor T cells. It is unknown whether there is an actual Ts subpopulation or if Tc and Th cells simply act in a suppressor role in some cases.
 * TH1 Response--mostly inflammatory, recruits T cells and macrophages
 * TH2 Response--mostly antibody-mediated, recruits B cells

Natural Killer Cells
NK cells act to attach to IgG antibodies on the surface of cancerous or virus-infected cells. In this way, they connect the humoral (B cell) and cell-mediated responses. For this reason, NK cells are central to something known as antibody-dependent cell-mediated cytotoxicity (ADCC).

Macrophage Responses
Macrophages phagocytize foreign invaders after chemotaxic factors lure the macrophages to sites of infection. Certain factors that attach to the invading cells (e.g. antibodies) or break open the invading cells' walls (e.g. complement system) act as opsonins (from a Greek word for "tasty'). Opsonization is thus the alteration of a foreign invader to make it more palatable to the macrophage's reactions.  Macrophages release certain compounds call Reactive Oxygen Intermediates (ROIs) to kill invading cells in something known as the respiratory burst.  ROIs include H2O2 and oxygen radicals.  Melanocytes are important in the degradation of these compounds, which act to destroy invader DNA but also endanger host DNA at times; for this reason melanocytes are found in the skin, where they neutralize radicals caused by UV light; interestingly melanocytes are also found in the dark internal esophagus, where they function to destroy radicals produced by acid reflux out of the stomach.  Macrophages also release certain compounds like lysozyme, defensin peptides (which form holes in cell membranes, much like complement) and tumor necrosis factor alpha (which can kill certain cancer cells). Macrophages also secrete certain complement proteins (although the liver produces most complement proteins) and interleukins, which help in the inflammatory response.

Chronic granulomatous disease is a genetic malfunction where the body does not produce NADPH oxidase. This retards the macrophages' ability to create Reactive Oxygen and Nitrogen Intermediates (ROIs & RNIs), predisposing afflicted patients to infections.

Back to Immunology || Previous Chapter: Organs of the Immune System || Next Chapter: Antigens

title: Immunology/Cells of the Immune System


text:
Immunology/Antigens

Antigens are substances that react with naive B cells when free-floating or with T cells when processed and displayed on cell surfaces along with MHC molecules.

Both antigens and haptens (small molecules) can act as antigenic agents when faced with an active immune response in progress. But only antigens themselves can cause an immune response to begin; they are both antigenic and immunogenic. Anything that can start an immune response can react with an in-progess immune response, but some compounds cannot start an immune response (although we can make antibodies to them and an in-progress response will react with them). This is the difference between something that is immunogenic and antigenic.

What makes something immunogenic (capable of creating a full immune response)?
 * heterogeneity (different amino acids, rather than synthetic monopolymers)
 * foreigness (must be different from host's proteins)
 * size (must be relatively large, e.g. 100 kDalton)

Because of the nature of antibody molecules, proteins and polysaccharides are the most common humoral antigens. Proteins are broken down and presented with MHC molecules to produce the cell-mediated immune response, and lipids/glycolipids are similarly presented (although they are presented on CD1 at the cell surface). Leprosy and tuberculosis are presented to the T cells in this CD1/lipid manner.

Immunogens are often given deliberately, as in the case of vaccines. Often they are complexed with adjuvants, compounds that enhance the vaccine. Adjuvants can include broken-up bacterial cell walls, oil (to slow the dispersion of the vaccine into the body), and water. The addition of bacterial cell wall components induces the innate immune system to actuate, enhancing the adaptive system due to a higher concentration of MHC-II receptors on the APCs, resulting in more activated B cells.

Remember that epitopes are the parts of an antigen that elicit an immune response. It makes sense that B cell-recruiting epitopes are more likely to reside on the surface of foreign invaders, and these epitopes are likely to be hydrophilic. T cell epitopes are more likely to be larger peptides, cleaved and presented with MHC-I and MHC--II on the surface of body cells and APCs. Thus, the outer hydrophilic parts of an invader elicit B cell responses, and the relatively hydrophobic inner parts elicit T cell responses. Also, denatured proteins are less likely to create a B cell response, but T cells are used to interacting, via their CD4 and CD8 receptors and TCRs, with broken-up peptides (antigenic peptides).

Haptens must join with carrier proteins in order to produce an immune response. Drug allergies are almost always caused by drugs that are, by themselves, too small to be immunogenic. Penicillin and other drugs will bind with nucleophilic sidechains on circulating body proteins, forming a hapten-carrier conjugate. This causes antibodies (IgE) to the drug to be produced, and an allergic reaction begins when IgE-receptors on mast cells are activated. Treatment with epinephrine will reverse the anaphylactic shock, diverting blood from the periphery and dilating the airways in a classical sympathetic response. For this reason, persons with life-threatening allergies will often carry epinephrine (adrenaline) injections with them in case of exposure to the hapten.

Back to Immunology || Previous Chapter: Cells of the Immune System || Next Chapter: Antibodies

title: Immunology/Antigens