Showing posts with label history. Show all posts
Showing posts with label history. Show all posts

Monday, July 2, 2012

About The drug Amphetamine

Amphetamines are a class of compounds increasingly abused in regions of the world such as the western United States, Australasia, and Europe. Synthetic amphetamine compounds commonly are produced in clandestine laboratories and vary in purity and potency. Other potentials for amphetamine abuse include prescription medications and various over-the-counter diet pills.
Clinical effects of amphetamine abuse are significant and commonly observed in EDs. The ED physician's ability to recognize and treat amphetamine intoxication is very important.
The phenylethylamine structure of amphetamine (see the image below) is similar to catecholaminergic, dopaminergic, and serotonergic agonists (biogenic amines), which may explain their actions.
Amphetamine and epinephrine. Amphetamine and epinephrine.
The relative activities that amphetamines have to stimulate the receptors of these biogenic amines are dependent on the chemical substituents on the amphetamine molecule; thus, the clinical presentation is dependent on the type of amphetamine used. For example, methamphetamine lacks much of the peripheral stimulant properties of amphetamine while still offering euphoric and hallucinogenic properties. These actions are similar to those of cocaine; however, while effects of cocaine last for 10-20 minutes, duration of amphetamine action is much longer, lasting as long as 10-12 hours.
The routes of amphetamine administration may be oral (ingestion), inhalation (smoke), or injection (intravenous). Oral use is associated with an approximate 1-hour lag time before onset of symptoms, whereas inhaled and intravenous methods yield effects within a few minutes. Peak plasma concentrations occur in 5 minutes with intravenous use, 30 minutes with nasal or intramuscular use, and 2-3 hours postingestion.
Use appears to vary with gender and race. Recent work has found correlations between personality traits (risk taking and reward sensitivity) and responses to amphetamine use

Monday, September 20, 2010

Using CSS when working with images

Applying CSS borders to images
Alternatively, you could set borders to be on by default, and override them in specific
areas of the website via a rule using grouped contextual selectors:
img {
border: 1px solid #000000;
}
#masthead img, #footer img, #sidebar img {
border: 0;
}
Finally, you could override a global border setting by creating a noBorder class and then
assigning it to relevant images. In CSS, you’d write the following:
.noBorder {
border: 0;
}
And in HTML, you’d add the noBorder class to any image that you didn’t want to have a
border:
<img class="noBorder" src="sunset.jpg" height="200" width="400"
å alt="A photo of a sunset" />
Clearly, this could be reversed (turning off borders by default and overriding this with, say,
an addBorder style that could be used to add borders to specific images). Obviously, you
should go for whichever system provides you with the greatest flexibility when it comes to
rapidly updating styles across the site and keeping things consistent when any changes
occur. Generally, the contextual method is superior for achieving this.
Although it’s most common to apply borders using the shorthand shown earlier, it’s possible
to define borders on a per-side basis, as demonstrated in the “Using classes and CSS
overrides to create an alternate pull quote” exercise in Chapter 3. If you wanted to style a
specific image to resemble a Polaroid photograph, you could set equal borders on the top,
left, and right, and a larger one on the bottom. In HTML, you would add a class attribute
to the relevant image:
<img class="photo" src="sunset.jpg" height="300" width="300"
å alt="Sunset photo" />
In CSS, you would write the following:
.photo {
border-width: 8px 8px 20px;
border-style: solid;
border-color: #ffffff;
}The results of this are shown in the image to the
right. (Obviously, the white border only shows if
you have a contrasting background—you wouldn’t
see a white border on a white background!)
Should you want to, you can also reduce the declaration’s
size by amalgamating the border-style
and border-color definitions:
.photo {
border: solid #ffffff;
border-width : 8px 8px 20px;
}

You may have noticed earlier that I didn’t mention the border attribute when working
through the img element. This is because the border attribute is deprecated; adding borders
to images is best achieved and controlled by using CSS. (Also, because of the flexibility
of CSS, this means that if you only want a simple surrounding border composed of flat
color, you no longer have to add borders directly to your image files.) Should you want to
add a border to every image on your website, you could do so with the following CSS:
img {
border: 1px solid #000000;
}
In this case, a 1-pixel solid border, colored black (#000000 in hex), would surround every
image on the site. Using contextual selectors, this can be further refined. For instance,
should you only want the images within a content area (marked up as a div with an id
value of content) to be displayed with a border, you could write the following CSS:
div#content img {
border: 1px solid #000000;
}

Tuesday, September 14, 2010

Creating better-looking lists

1. Create the list. Within the HTML document’s wrapper div, add the following code:
<ul>
<li>List - 1.1
<ul>
<li>List - 2.1</li>
<li>List - 2.2
<ul>
<li>List - 3.1</li>
<li>List - 3.2</li>
<li>List - 3.3</li>
</ul>
</li>
<li>List - 2.3</li>
</ul>
</li>
</ul>
2. Amend the body rule. Add some padding to the body element so that page content
doesn’t hug the browser window edges during testing:
body {
font: 62.5%/1.5 Verdana, Arial, Helvetica, sans-serif;
padding: 20px;
}
3. Style the list elements. This kind of heavily styled list typically requires you to
define specific property values at one level and then override them if they’re not
required for subsequent levels. This is done by adding the three rules in the following
code block. For this example, the top level of the list (styled via ul) has a
star background image that doesn’t repeat (the 1px vertical value is used to nudge
the image into place so it looks better positioned), and the list-style-type value
of none removes the default bullet points of all lists on the page.
For the second level of lists (the first level of nesting), styled via ul ul, a horizontally
tiling background image is added, giving the impression that the top-level list
is casting a soft shadow. The border-left setting creates a soft boundary to the
nested list’s left, thereby enclosing the content. The padding value ensures that
there’s space around nested lists.
For the third level of lists (the second level of nesting—that is, a nested list within
a nested list), styled via ul ul ul, no specific styles are required, but to deal with
inherited styles from ul ul, background is set to none and border-left is set to 0.
If this weren’t done, third-level lists would also have the shadow background and
dotted left-hand border.
ul {
list-style-type: none;
background: url(better-list-star.gif) 0 1px no-repeat;
}
ul ul {
background: url(better-list-shadow.gif) repeat-x;
border-left: 1px dotted #aaaaaa;
padding: 10px;
}
ul ul ul {
background: none;
border-left: 0;
}
4. Style the list item elements. For the top-level list items, the li rule styles them in
uppercase, adds some padding (to ensure the items don’t sit over the background
image applied in ul), and makes the text bold and gray. For the nested list items,
the li li rule overrides the text-transform property, returning the text to sentence
case, and adds a square gray bullet as a background image. The font-weight
value is an override, and the color setting is darker than for the parent list’s list
items so that the non-bold text of the nested list items stand out. Finally, for the
third-level list items, styled using the selector li li li, a background override provides
a unique bullet point image (a hollow square).
li {
text-transform: uppercase;
padding-left: 20px;
font-weight: bold;
color: #666666;
}
li li {
text-transform: none;
background: url(better-list-square.gif) 0 2px no-repeat;
font-weight: normal;
color: #333333;
}
li li li {
background: url(better-list-hollow-square.gif) 0 2px no-repeat;
}

List style shorthand

As elsewhere in CSS, there is a shorthand property for list styles, and this is the aptly
named list-style property. An example of its use is shown in the following piece of CSS:
ul {
list-style-type: square;
list-style-position: inside;
list-style-image: url(bullet.gif);
}
which can be rewritten as follows:
ul {
list-style: square inside url(bullet.gif);
}

Working with lists in Css

Unordered lists

The unordered list, commonly referred to as a bullet point list, is the most frequently seen
type of list online. The list is composed of an unordered list element (<ul></ul>) and any
number of list items within, each of which looks like this (prior to content being added):
<li></li>. An example of an unordered list follows, and the resulting browser display is
shown to the right. As you can see, browsers typically render a single-level unordered list
with solid black bullet points.
<ul>
<li>List item one</li>
<li>List item two</li>
<li>List item 'n'</li>
</ul>

**Note : Unlike HTML, XHTML lists require end tags on all list elements. In
HTML, the </li> end tag was optional.


Ordered lists

On occasion, list items must be stated in order, whereupon an ordered list is used. It works
in the same way as an unordered list, the only difference being the containing element,
which is <ol></ol>.
<ol>
<li>List item one</li>
<li>List item two</li>
<li>List item 'n'</li>
</ol>

Definition lists

A definition list isn’t a straightforward list of items. Instead, it’s a list of terms and explanations.
This type of list isn’t common online, but it has its uses. The list itself is enclosed in
the definition list element (<dl></dl>), and within the element are placed terms and definitions,
marked up with <dt></dt> and <dd></dd>, respectively. Generally speaking,
browsers display the definition with an indented left-hand margin, as in the following
example.

**Note :Web browsers automatically insert the item numbers when you use ordered lists. The
only way of controlling numbering directly is via the start attribute, whose value dictates
the first number of the ordered list. Note, though, that this attribute is deprecated—
use it and your web page will not validate as XHTML Strict.

Unlike HTML, XHTML lists require end tags on all list elements. In
HTML, the </li> end tag was optional.
<dl>
<dt>Cat</dt>
<dd>Four-legged, hairy animal, with an
-> inflated sense of self-importance</dd>
<dt>Dog</dt>
<dd>Four-legged, hairy animal, often with-> an inferiority complex</dd>
</dl>

Nesting lists
Lists can be nested, but designers often do so incorrectly, screwing up their layouts and
rendering web pages invalid. The most common mistake is placing the nested list outside
any list items, as shown in the following incorrect example:
<ul>
<li>List item one</li>
<ul>
<li>Nested list item one</li>
<li>Nested list item two</li>
</ul>
<li>List item two</li>
<li>List item 'n'</li>
</ul>
Nested lists must be placed inside a list item, after the relevant item that leads into the
nested list. Here’s an example:
<ul>
<li>List item one
<ul>
<li>Nested list item one</li>
<li>Nested list item two</li>
</ul>
</li>
<li>List item two</li>
<li>List item 'n'</li>
</ul>
Always ensure that the list element that contains the nested list is closed with an end tag.
Not doing so is another common mistake, and although it’s not likely to cause as many
problems as the incorrect positioning of the list, it can still affect your layout.

Using classes and CSS overrides to create an alternate pull quote

Required files pull-quote.html and pull-quote.css from the chapter 3 folder.
What you’ll learn How to use CSS classes to create alternatives to the default pull
quote. In this example, you’ll create a narrow pull quote that floats
to the right of the body copy.
Completed files pull-quote-2.html and pull-quote-2.css from the chapter 3
folder.

1. Amend the HTML. First, add a class to the blockquote element so that it can be
targeted in CSS:
<blockquote class="floatRight">
2. Position the blockquote. Create a new CSS rule that targets the blockquote from
the previous step by using the selector blockquote.floatRight. Set float and
width values to float the pull quote and define its width.
blockquote.floatRight {
float: right;
width: 150px;
}
3. Remove the quote mark background image by setting background to none. Add the
two border property/value pairs shown to visually separate the pull quote from its
surroundings, drawing the eye to its content.
blockquote.floatRight {
float: right;
width: 150px;
background: none;
border-top: 5px solid #dddddd;
border-bottom: 5px solid #dddddd;
}
4. Add padding and margins. First, add vertical padding to ensure that the pull quote’s
contents don’t hug the borders added in the previous step. Next, define margin
values, overriding those set for the default blockquote from the previous exercise.
Because this alternate pull quote is floated right, there’s no need for top and right
margins, hence them being set to 0; the bottom and left margin values are left
intact.
blockquote.floatRight {
float: right;
width: 150px;
background: none;
border-top: 5px solid #dddddd;
border-bottom: 5px solid #dddddd;
padding: 10px 0;

}
5. Override the paragraph styles. The background and padding settings for the default
blockquote style are no longer needed, so they’re set to none and 0, respectively.
Finally, text-align is set to center, which is appropriate for a narrow pull quote
such as this.
blockquote.floatRight p {
text-align: center;
background: none;
padding: 0;
}

Creating pull quotes in CSS

Required files styling-semantic-text-2.html, styling-semantic-text-2.css,
quote-open.gif, and quote-close.gif from the chapter 3 folder.
What you’ll learn How to create a magazine-style pull quote, which can draw the
user’s attention to a quote or highlight a portion of an article.
Completed files pull-quote.html and pull-quote.css from the chapter 3 folder.

1. Add the HTML. The required markup for a basic pull quote is simple, centering
around the blockquote element and nesting a paragraph within. Add the following
to the web page, above the code <h2>Curabitur sit amet risus</h2>:
<blockquote>
<p>This is the pull quote. It's really very exciting, so read it now!
å Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</blockquote>
2. Style the blockquote element. Create a blockquote rule and use the background
property to add the open quote image as its background. Set vertical margins that
are larger than the margins between the paragraphs (to ensure that the pull quote
stands out from the surrounding text) and the horizontal margins (to ensure that
the pull quote doesn’t span the entire column width, which also helps it visually
stand out).
blockquote {
background: url(quote-open.gif) 0 0 no-repeat;
margin: 2.4em 2em;
}
3. Style the pull quote paragraph text. Using the contextual selector blockquote p,
style the paragraph text within the blockquote element. Making the text bold and
larger than the surrounding copy helps it stand out—but to ensure it doesn’t
become too distracting, knock back its color a little.blockquote p {
color: #555555;
font-size: 1.3em;
font-weight: bold;
text-align: justify;
}4. Use the background property to add the closing quote mark, which is added to the
paragraph, since you can only add one background image to an element in CSS.
The background’s position is set to 100% 90%—far right and almost at the bottom.
Setting it at the absolute bottom would align the closing quote with the bottom of
the leading under the last line of the paragraph text; setting the vertical position
value to 90%, however, lines up the closing quote with the bottom of the text itself.
blockquote p {
color: #555555;
font-size: 1.3em;
font-weight: bold;
text-align: justify;
background: url(quote-close.gif) 100% 90% no-repeat;
}
5. Tweak the positioning. If you test the page now, you’ll see the paragraph content
appearing over the top of the background images. To avoid this, padding needs to
be applied to the quote mark to force its content inward, but still leave the background
images in place. Since the quote images are both 23 pixels wide, a horizontal
padding value of 33px provides room for the images and adds an additional 10
pixels so that the content of the paragraph doesn’t abut the quote marks. Finally,
the default margin-bottom value for paragraphs is overridden (via a 0 value), since
it’s redundant here.
blockquote p {
color: #555555;
font-size: 1.3em;
font-weight: bold;
text-align: justify;
background: url(quote-close.gif) 100% 90% no-repeat;
padding: 0 33px;
margin-bottom: 0;
}
The following image shows your pull quote page so far.
WORKING WITH TYPE
 
6. Next, credit the quotation. To add a credit to the quote, add another paragraph,
with a nested cite element, inside which is the relevant content.
<blockquote>
<p>This is the pull quote. It's really very exciting, so read it now!
å Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
<p><cite>Fred Bloggs</cite></p>
</blockquote>
7. In CSS, add the following rule:
cite {
background: none;
display: block;
text-align: right;
font-size: 1.1em;
font-weight: normal;
font-style: italic;
}
8. Some of the property values in cite are there to override the settings from blockquote
p, and to ensure that the second paragraph’s text is clearly distinguishable
from the quote itself. However, at this point, both paragraphs within the blockquote
element have the closing-quote background, so a final rule is required.
blockquote>p+p {
background: none;
}
This fairly complex rule uses both a child selector (>) and an adjacent selector (+),
and styles the paragraph that comes immediately after the paragraph that’s a child
element of the blockquote (which is the paragraph with the cite element). The
rule overrides the background value defined in step 5 for paragraphs within the
block quote). Note that this assumes the quote itself will only be a single paragraph.
If you have multi-paragraph quotes, you’ll need to apply a class to the final
paragraph and set the quote-close.gif image as a background on that, rather
than on blockquote p.
 
**Note that the advanced selector shown isn’t understood by versions of Internet
Explorer prior to 7. The best workaround for that browser is to use conditional comments
(see Chapter 9) to remove the quote graphic backgrounds.