text:
How to Write a Research Paper in History/Writing the paper

Somewhere between creating an outline and turning in your paper, you actually have to sit down and write the paper: you must turn your outline into complete sentences arranged in paragraphs.

Writing
Writing remains the greatest challenge in publishing a research paper. All the reading and note-taking in the world will not translate a mountain of data into ten or twenty or a hundred well-written pages that earn an A and see that you get your diploma on-time. There are some tricks that will get you through the rough days of writing, and produce a finished paper on time.

Determining your Pace
Many students writing a research paper for the first time greatly underestimate the amount of time necessary to complete one. A research paper of three to six pages may be assigned only a week in advance of its due date, but this is a signal that you should begin researching immediately. If you have a three week window in which to write, you should begin writing (with 80% or more of your research complete) by Wednesday of the second week. Of course, your own writing skills may argue for an earlier or later "begin writing" date than that.

Rewriting
Be sure to allow yourself time for editing and re-writing. Few people can turn out a letter-perfect research paper on their first try. Attend help sessions at your school's writing center, and ask friends to look over a completed first draft. Getting back comments, and trying to fix flaws, in an uncompleted paper may put you at risk for missing your due date or deadline. Always finish a rough draft first, so that you have something to hand in even in the event of a catastrophic loss of your paper.

Backing Up
Remember to back up your work regularly. The excuse "I'm sorry, but my computer hard drive failed this morning," will earn some sympathy, but is still a failing grade. Back up your research, back up your writing, back up your bibliography. Save both print and digital copies of the most critical pieces of your work, such as data tables, bibliographies, and chapters that you wrote in an inspired frenzy after an all-night conversation with your classmates. These things have a tendency to vanish unexpectedly.

Part of backing up is maintaining a clean and friendly workspace, so that dangerous accidents are less likely. When you are working on a research paper, put all food and drink away. You risk damage to your computer, your research materials and your final paper when you have liquids and messy solids near your work. Take pride in your labors, and avoid eating and writing at the same time. If you're hungry, take a ten-minute break, have a snack and something to drink; then put away your food, and go back to working.

Types of Paragraphs
Paragraphs in a history paper come in several types. The three most general types are Thesis, or opening paragraphs, Body paragraphs, and Conclusion paragraphs. The following is not a comprehensive list (yet) of the different types of paragraphs historians use, but each example contains a basic description of what the paragraph's purpose is, and a sample topic sentence for each type of paragraph.

The two most critical types of paragraphs are Thesis paragraphs and Concluding paragraphs.

Thesis Paragraphs
A Thesis is a statement which encapsulates the point of view which you are presenting to your reader. A thesis paragraph, therefore, is a statement of your point of view, plus the general outline in a few sentences of the research in your paper. "Napoleon's Hundred Days pushed the great powers of Europe to adopt fierce controls on their citizens which persisted until World War I." The following sentences might mention broadened police powers, the reconstruction of numerous European cities to allow fields of fire for artillery and infantry, increased state prerogatives to interfere in private affairs, and tightening of the legal structures of several European nations. (However, many would argue that this is a very broad thesis, and the amount of proof necessary to convince others would be substantial.)

Narrow and Broad Proofs
The wider and more elaborate and far-reaching your thesis statement is, the more details -- the more proof -- you will need to back it up. Most research papers concentrate on only a few years or decades at most. Ideally, a thesis should be narrow: you should not attempt to prove that a curse lay upon the Tomb of Tutanhkamun simply because Lord Caernarveron died.

Concluding Paragraphs
Concluding paragraphs represent a re-iteration of what you said in your thesis paragraph. You should not introduce new ideas, new data, or new materials in your final sentences. Instead, find a way to summarize your major themes, and re-state the thesis from your first paragraph. In essence, you are reminding your reader of what you set out to prove at the start, and (hopefully) show that you have proved it.

Body Paragraphs
Body paragraphs constitute the main core of your argument.

Descriptive Paragraphs
Descriptive paragraphs are designed to inform the reader's imagination, and give them a picture in their mind of what you, the author, see or feel about the subject. "As part of his routine to control the Russian royal family, Rasputin affected a fearsome appearance with wild hair and mesmerizing eyes." Each sentence of this paragraph should build up a picture in our eyes of what Rasputin wore and how he behaved.

Summary Paragraphs
'Summary paragraphs are designed to report a series of events in an orderly but concise way. "As Lincoln's funeral train progressed from Washington, DC to Springfield IL, ordinary Americans made numerous displays of affection for the fallen president." Each sentence in this paragraph will tell a different story from some of the stops that the train made.

Contrast Paragraphs
Contrast paragraphs are designed to emphasize differences between two things or events. "Although they were related, president Franklin Roosevelt conducted his administration quite differently than Theodore Roosevelt." Each pair of sentences in this paragraph should find ways to show that the two men behaved differently.

Comparison Paragraphs
Comparison paragraphs are designed to emphasize similarities between two distinct things or events. "The Suez Canal project and the Panama Canal project faced similar difficulties." Each sentence in this paragraph should find a point of similarity between the two engineering projects.

Narrative Paragraphs
Narrative paragraphs are designed to tell in a few sentences what a person or group might be doing. "At Yalta, Roosevelt, Churchill and Stalin worked long days to draft proposals for a working peace at the war's end." Each sentence in this paragraph should involve at least two of the men named in the topic sentence, and what they did at Yalta.

Supposition Paragraphs
Historians love to play What If games of various sorts, and Supposition paragraphs are designed to tell in a few sentences what might have happened. "Had the emperor not recalled his fleets and established barriers to overseas travel, China might have come to dominate the southwestern Pacific." The sentences following this topic sentence would deal with fictional but probable outcomes of Chinese fleets in Indonesia, Australia, and India. The use of this type of paragraph should be limited, with a rule of thumb of one such paragraph per ten pages.

Next section: ../Citing your sources/


text:
Entry Level PHP Web Application Development/Table of Contents

← Previous (Introduction) Next (What is Programming? Why Write for the Web?) →

 * 1) What is Programming?  Why Write for the Web?
 * 2) PHP Web Application Development Environments
 * 3) Our First Programs: Hello, World!
 * 4) HTML and CSS: Presentation to the User
 * 5) PHP: Performing (Relatively) Simple IO (Input-Output)

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


text:
Talk:US History/Westward Expansion and Manifest Destiny

California Revision needed
"California remained largely unpopulated until 1848, when gold was found at the mill of John Sutter, who lived in the foothills of the Sierra Nevada mountain range, 40 miles east of Sacramento. Word spread of the gold on the American River (the river on which Sutter's mill was located on), and hordes of people rushed into California to mine gold. The rush peaked in 1849, and those who came during that year were known as "forty-niners." The population of the northern California city of San Francisco exploded as a result of the immigration to the region."

Please conduct futher research on this section, since it implies that whites where the first to colonized california. This is incorrect, evidence is provided by the number of old cities with spanish names such as Monterey, San Francisco, and Los Angeles. In addition the early spanish, were preceded by earlier native communities.

John Tyler Presidency
I'm not the one to do it, but the last edit needs to be corrected.

Tyler had once been a beetles supporter but now he saddly wanted to be a Democrat, but he disliked Jackson, and he became a Whig. He was a weak supporter of states' rights, so when many of the Whig bills came to him, they were never vetoed. It turned out that Tyler would veto the entire Whig congressional agenda. The Whigs saw this as the party leader turning on his own party

Much of this doesn't even make sense.

Texas and Mexico
This section has some horrible writing. I would try to edit it but I'm not sure what it's trying to say. And what's up with the use of "white Americans"? Beamathan (talk) 00:33, 2 June 2008 (UTC)

freedom's ferment shtick
What about abolition's fellow travelers: women's movements, labor movements, socialist experiments, religious experiments, yadda yadda? Would help to loosen up the chronology a bit, because a lot of these movements have their roots in the Jacksonian era and flourish in the 1840s. Billbrock (talk) 00:29, 10 June 2008 (UTC)


text:
User:Mystic~enwikibooks

Hi... I not sure what to do on here... can someone help me

title: User:Mystic~enwikibooks


text:
Talk:How to Write a Research Paper in History

I hope my additions to this book will prove useful. -Andrew Watt 23:50, 4 June 2006 (UTC)

proposal to merge Local History Dictionary into this book
I think Local History Dictionary would make a good addition to this book, in order to help those doing research understand words that may be absent from dictionaries. --dark lama  13:48, 28 May 2007 (UTC)


text:
Entry Level PHP Web Application Development/What is Programming? Why Write for the Web?

As a user, you control application software — or programs — that are already written for you to use. Examples of this include your web browser, word processor, or Internet e-mail program. If you need something more than what has been provided for you, however, you are out of luck, unless you know how to give the computer instructions on your own. This is where the practice of programming comes into play.

As you read through this section, you will learn about what programming is, and why you might want to write Web applications. Keep in mind that term Web application throughout this book means “an application accessed through a web browser”. This could be on an intranet or on the Internet.

Programming, in General
Computer programming is simply writing a set of instructions for the computer to use to perform a certain task. In essence, you give the computer small steps of instructions, and the computer goes down the list, executing each one in order. By programming, you can “teach” the computer how to perform new tasks, or perform old tasks in new ways. As a user, you control application software — or programs — that are already written for you to use. Examples of this include your web browser, word processor, or Internet e-mail program. If you need something more than what has been provided for you, however, you are out of luck, unless you know how to give the computer instructions on your own. This is where the practice of programming comes into play. Computers, however, do not “speak” English. This means that you will have to learn how to communicate with the computer to make your instructions work. Unlike human languages, there is a best language for each purpose, so it is entirely possible that over time you will learn new languages for doing different types of tasks. This book focuses on the basics of web application programming with one of the most popular web development languages, PHP.

What is Web Programming?
Web Programming is the practice of writing applications that run on a web server, which can, in turn, be accessed by many different users. There are many applications which are suitable to be run over the web, and because of that, web applications have become extremely popular. A few examples of popular web applications are Gmail and Google Maps. These are applications in which users are able to send and receive Internet e-mail, and get maps, satellite images, and directions, respectively.

Web application programming has several advantages over methodologies such as client-server programming for applications such as e-mail and geocoding. Web applications can be made in such a way as to be portable — that is, able to run on many types of clients. Some care must be taken to achieve this, however, we will go into that later in the text. Web applications do not generally have to be compiled to be tested, and web applications can run from anywhere in relation to the user. Additionally, web applications allow users that have low-powered hardware to be able to perform computationally intensive tasks without using their own computer. For example, Google does the geocoding and the mapping for users, and then simply transmits the data back to the user. The user’s computer does not have to actually perform the computations necessary to get the data for the user.

There are some disadvantages to writing web applications that must be considered. Applications that are extremely computationally intensive, for example, may perform sluggishly with poor planning. Highly popular applications may require load balancing and such to handle a heavy user-base. Network resources can become heavily loaded if the user-base grows or is using the web application more than anticipated. Generally, all of these things can be taken care of by careful planning, however.

What is PHP?
PHP is an Open Source scripting language that is available to the public for free (both gratis and libre). It is primarily used for programs written to run on servers, over the web. More information on PHP is available on Wikipedia in the PHP article and the PHP web site, and, of course, throughout this book.

What Types of Applications are Good Web Applications?
In general, any application that:

 * Has a moderate to high number of users
 * Has consolidated, shared data storage (such as a database)
 * Has business rules that are not always easily enforced on the client side
 * Does not have high computation overhead for every user

... is a good candidate for becoming a web application. Sometimes, there are exceptions from these rules, depending on the business. Many applications that are client-server applications fall into the category of being an able candidate for being re-written as a web application.

What Types of Applications are Not Good Web Applications?
Applications that have extremely high computing overhead for a user (i.e., video conversion/recoding) generally are not good candidates for becoming web applications. Tasks that must be done on the client computer (such as burning a CD) are also not good candidates for web applications. There are applications that make advanced use of clustering technologies (where multiple servers are working together) and load-balancing (where servers are working individually, but getting only a certain percentage of the load), however, those are outside the scope of this document.

Why Write a Web Application?
There are multiple reasons to write web applications as opposed to a traditional application. There are also more varied types of applications that are unique to the web, which would be impractical as a client-server application. For example, a web site for a support organization should not be a static web site. It should actually be a web application that works with databases (perhaps even more than one) and other sources of input. It may even have a content management system that has Frequently Asked Questions for users, or How-To information, or general background/historical information.

Web applications are generally faster to develop then applications that are written in systems programming languages, such as C or C++. There are also many different environments that help you to write, test, and debug in a very fast, streamlined cycle. We will get into some of these later in this book.

Another advantage to web applications is that they also have an unusually clear line between what is called the front-end and the back-end. The user always sees the results that are displayed by the front end, while the back end is never visible. Programs written with different development models (such as client-server applications) have various degrees of separation of the front-end and back-end, and because of the nature of such applications, there is no clear line between them.

One advantage – and disadvantage – to traditional web applications is that the source code is always hidden from the user. Because the code is not running on the user’s PC in any capacity, the user is not able to view the actual code. This is something of a double-edged sword: It means that you can conceal the code, and the back-end processes, completely from the user. This makes it harder to reverse-engineer, which is good for proprietary code. However, it can be harder to manage from the standpoint of a technical user, since the source code for the web application and the processes are completely hidden from anybody that does not have access to the code on the server. This is a decision that is made before the work starts on a project, traditionally. Most people view this as an advantage.


text:
User talk:Mystic~enwikibooks

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally.

Glad to have you with us. Start by checking out the Main Page and see if there are any books that you might like to help work on writing or editing. Check over the Help pages, too. I'm working on a book on Ancient History, but I've also worked a little on a Wikijunior project as well. -Andrew Watt 00:08, 5 June 2006 (UTC)

Your account will be renamed
Hello,

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

Unfortunately, your account clashes with another account also called Mystic. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Mystic~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:30, 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:17, 19 April 2015 (UTC)

title: User talk:Mystic~enwikibooks


text:
Wooden Boats: Building and Repair/Painting and Varnishing/Brushes

= Brushes for Varnishing =

Which kind of brush to use is a matter of personal opinion and depends upon the job. For a lot of jobs, cheap foam brushes will suffice. Foam brushes should not be used for long before being replaced. The brush you use is unlikely to make that much difference to the job unless you are an experienced varnisher. The preparation work, mix of varnish and temperature probably have more of an effect on the end result than the brush. The idea of a dedicated varnish brush is that you should be able to make long uninterrupted strokes without having to refresh the brush.

If you use a brush with bristles, it is worth investing in a good quality one, if only for the reason that when cheap brushes lose their bristles they make a mess of the work. Loose bristles can be dislodged ahead of time by gently rubbing and rolling the brush against some sandpaper. Some say that a dab of varnish in the heel of the brush can help to keep the bristles in.

Foam brushes are not as well suited for larger surfaces and jobs, where it is important not to have any runs. Good china bristle brushes are better in these circumstances. Foam brushes are fine for patching in and quick jobs on small work pieces. Rebecca Wittman, the author of 'Brightwork' uses "Jen" poly-foam brushes (they do not turn to mush when used with epoxy). It is possible to buy really expensive bristle brushes, but it is not necessary to go beyond Hamilton, Epiphanes or Omega to get the best job that you are capable of. The best varnish brush is one that will hold a full load of material, without drooling and dripping from the can to the work surface and will feather the flow out evenly. Foam brushes don't offer the control needed because the varinish lays on the surface of the brush and not within the fibers that a bristle brush has. China boar bristles are best because the ends are split into flags.

Good brushes don't swell and they regain their shape quickly. Good brushes can last for a very long time, decades in fact. Don't let them soak and comb them out frequently, to stop a skin from setting around the high tide mark. A needle sharp paint comb, the sharpest one you can buy, is very good if you are a brush user, Don't forget how sharp the combs are.

How to keep a brush pristine for over 40 years
The following was posted by Jay Greer on the WoodenBoat Forum:

My own Linzer China Boar Varnish Brushes with soldered ferrells are no longer made. I have cherished and kept them pristine for use for over forty years, as follows.

All of my brushes are stored under thinner in two one gallon, wide mouth commercial salad dressing plastic jars, one for paint and one for varnish brushes. After use, the brushes are given no less than five rinses in thinner stored in three 5gallon paint buckets. The last two rinses are with fresh thinner. The brushes are then wrapped in the porous black paper used for scrap books and photo albums and placed tips down in the storage container. This manner of storage keeps the chisle edge of the brushes intact.

Once a year or when the heels get too filled with excess varnish or paint, I soak the bristles in liquid sandpaper to soften the heels and brush out the residue with a fine wire brush. This takes several soakings and several brushings. Then, while standing at a beam of light comming through a crack in the shop door, I flip the hairs of the brush until no flakes of varnish can be seen floating in the sun beam.

Sadly, brushes made today are no longer of the fine quality of the old Linzers. I treat them like they were my best friends because they still earn their keep! Jay Greer/Common Sense Boat & Tool Co.


text:
User:Deranged physicist

Hello. I am a native speaker of both Chinese and English. I can contribute by making recordings of Mandarin Chinese.

title: User:Deranged physicist


text:
Talk:Regular Expressions

About

 * Started: 2 June 2006
 * Size: 2,400 words (Oct 2008)

Depth of Book?
I'm wondering if this book is going to be simply a reference to programming using regular expressions, or if this book will cover the mathematical theory behind regular expressions. Explaining the theory behind it would require a divergance into autmata theory, state machines, etc. --Whiteknight (talk) (projects) 01:02, 5 June 2006 (UTC)

 * I think that is perfectly valid content for this book. It should probably be in a chapter devoted to advanced topics. — franl ✦ talk ✦  17:11, 5 06 2006 (UTC)

How can we differentiate this content from the Wikipedia article?
The corresponding Wikipedia article – Regular Expressions – is very detailed. How can we differentiate this book's content from that article? Perhaps this book should have a tutorial style? — franl ✦ talk ✦ 17:22, 5 06 2006 (UTC)

 * I don't know if you have any available, but there are a number of existing book references on the subject of regular expressions. You could use these existing books to prepare a book-length outline or plan for implementing this wikibook. Also, there are a number of different computer languages that utilize regular expressions (Perl, sed/awk, emacs, PHP, etc), and you could easily devote a page to regular expression implementation in each different language. Also, you could include projects using regular expressions, such as a C preprocessor module, HTML tag extractor, loader (with virtual address correction), automatic spell checker, etc. --Whiteknight (talk) (projects) 17:51, 5 June 2006 (UTC)

 * Note, I am glad to help here, will be my first contributions to this project!Eagle 101 03:24, 7 June 2006 (UTC)
 * Though I have worked on wikipedia for 5 months, I know nothing of what to do here...Eagle 101 03:27, 7 June 2006 (UTC)

Automata theory
As per my note above, I have decided to create a new wikibook on the subject of automata theory. Currently, this new book is in the planning stage, and exists only as a preliminary outline HERE on my user page. Since this is only an outline, I would appreciate any comments or suggestions on this matter. --Whiteknight (talk) (projects) 00:19, 12 June 2006 (UTC)

Beginner Mistakes?
I'd like to suggest that there be a section on trouble-shooting regex patterns. I've learned about regex in the past week and have written up two problems I had on my blog here: http://www.mind-manual.com/blog/index.php/2008/08/07/regular-expressions-how-i-hatelove-thee/. I'd do it myself but I'm not sure whether it'll fit into the context of this book. Cheers!

Renaming chapters and more
I have made edits across the book, summarized here.

In May 2011, chapter Regular Expressions/Syntaxes was split into subchapters: Today, I have renamed the subchapters to make them shallowly named and capitalized: I have made further edits: --Dan Polansky (discuss • contribs) 09:32, 15 June 2013 (UTC)
 * Regular Expressions/syntax/shell regular expression
 * Regular Expressions/syntax/simple regular expression
 * Regular Expressions/syntax/basic regular expression
 * Regular Expressions/syntax/emacs regular expression
 * Regular Expressions/syntax/non posix basic regular expression
 * Regular Expressions/syntax/perl compatible regular expression
 * Regular Expressions/syntax/posix basic regular expression
 * Regular Expressions/syntax/posix extended regular expression
 * Regular Expressions/Shell Regular Expressions
 * Regular Expressions/Simple Regular Expressions
 * Regular Expressions/Basic Regular Expressions
 * Regular Expressions/Emacs Regular Expressions
 * Regular Expressions/Non-Posix Basic Regular Expressions
 * Regular Expressions/Perl Compatible Regular Expressions
 * Regular Expressions/Posix Basic Regular Expressions
 * Regular Expressions/Posix Extended Regular Expressions
 * Rename heading "Tools using this regular expression syntax" to "Use in Tools".
 * Remove the first heading from each chapter that only repeats the chapter name.
 * Remove unneeded redlinks to some keywords, as in this edit.
 * Add section "Links" to some chapters to stand for external links.

Redundant pages
I request that the following pages added in May 2011, redundant to what the book already has, get deleted: I especially object to having a subpage per operator. --Dan Polansky (discuss • contribs) 20:18, 23 June 2013 (UTC)
 * Regular Expressions/operator
 * Regular Expressions/operator/asterisk
 * Regular Expressions/operator/backslash
 * Regular Expressions/operator/box
 * Regular Expressions/operator/careted box
 * Regular Expressions/operator/character range
 * Regular Expressions/operator/dot
 * Regular Expressions/operator/parentheses

Big caveat on subexpression resolution
As Ross Cox explains, when you run a regex with capture groups, it's not uncommon to end up with multiple valid interpretations of what to capture. Apparently there are quite a few ways to do this stuff; they agree on the fact that .* should be "greedy" (i.e. pick the longest result) prioritizing the leftmost element, but then diverge from that point on. Perl has a behavior that's difficult to put in words but easier to write in code, but POSIX came in and specified a behavior that's easy to put in words but surprisingly hard to write in code. Now despite everyone trying to implement the POSIX regex.h in their C library, they don't usually get this subexpression behavior right. We should describe this behavior and caution people to manage their expectations.

Cox also mentions that someone figured out how to do it efficiently... decades after the specification was written. At least it's possible now.

See: Artoria2e5 (discuss • contribs) 10:29, 9 February 2024 (UTC)
 * Ross Cox: https://swtch.com/~rsc/regexp/regexp2.html sections "Ambiguous Submatching", "POSIX Submatching"
 * Haskell Wiki: https://wiki.haskell.org/Regex_Posix, which describes how C library fails. It states that "The GLIBC engine has an API for its own GNU regular expression standard which differs from Posix.", which is quite intriguing -- someone should hunt down that standard.
 * POSIX spec: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html

title: Talk:Regular Expressions


text:
Entry Level PHP Web Application Development/PHP Web Application Development Environments

← Previous (What is Programming? Why Write for the Web?) Next (Our First Programs: Hello, World!) →

Development Environments
There are various development environments that are available for web development, with various ranges of quality. Whichever system you choose is going to depend on at least a couple of different factors:

 * The operating system you are using.
 * Whether or not you want an open source or proprietary IDE, or just a programmer’s editor.
 * Your style and preferences.
 * What type of workstation you have (with regard to RAM and processor).

There are many different pieces of software available for working with web applications in languages such as PHP. Some environments have support for multiple languages, and others do not. There are a number of available choices, both for programmer’s editors and IDEs.

Windows Programmer’s Editors/IDEs

 * 1) Notepad++—Editor – Features syntax highlighting for many different languages, record/playback macros, text snippets.  Freely available.
 * 2) Zeus Editor—Editor – Features syntax highlighting, CVS support.  Commercial.
 * 3) Adobe Dreamweaver—IDE – Features project management, syntax highlighting, compatibility checking, and more.  Commercial.
 * 4) PHPEclipse—IDE – Features project management, syntax highlighting, syntax-completion, built-in PHP reference, debugging.  Free (Open Source) software.
 * 5) Geany—Editor – Features syntax highlighting, syntax-completion, text snippets, external scripts, LUA scripting.  Available with most Linux-based distributions and other UNIX-like software, as well as Windows.  Free (Open Source) software.

Linux Programmer’s Editors/IDEs

 * 1) GNU Emacs—Editor – Features vary based on installation.  Can support everything from just syntax highlighting to integration with CVS or Subversion.  Available with most Linux-based distributions and other UNIX-like software.  Free (Open Source) software.
 * 2) PHPEclipse—IDE – Features project management, syntax highlighting, syntax-completion, built-in PHP reference, debugging.  Free (Open Source) software.
 * 3) Quanta Plus—DE – Features project management, syntax highlighting, pop-up function help, debugging.  Free (Open Source) software.
 * 4) Geany—Editor – Features syntax highlighting, syntax-completion, text snippets, external scripts, LUA scripting.  Available with most Linux-based distributions and other UNIX-like software, as well as Windows.  Free (Open Source) software.
 * 5) Bluefish—Editor – Features syntax highlighting, dialog-driven HTML code, built-in PHP reference, text and regular expressions snippets.  Available with most Linux-based distributions and other UNIX-like software.  Free (Open Source) software.

This document shows using GNU Emacs, and the author recommends the use of GNU Emacs. There is a book from O’Reilly on GNU Emacs, though it is a slight bit out of date. If you choose to use GNU Emacs, you may wish to take a look at nXML mode, which the author also uses for development of PHP applications.

What You Will Need
For the purposes of this text, all you really will likely need is a basic text editor. You can use Notepad on Windows, or,  , or whatever your favorite text editor is on your non-Windows system. Syntax highlighting may be beneficial if you are a visual type of person.

No matter what text editor or IDE you use, you will at the very least need to know how to create, load, and save files, as well as actually use the editor. However, you will want to be sure to only use text editors – not a word processor or “rich” text editor.

Execution Environment: Apache, PHP 5, and a Database Server
After you have selected your editor, you will need to make sure that you have an environment to run PHP applications in. It is likely that you can find some place online that hosts PHP web sites and applications that you can work with. If you are unable to do that, then you will need to install PHP on your system, probably with a database system.

Users of Linux-based distributions should be able to simply add Apache, PHP 5, and a database server to your system using your package management tools. Under Windows, there are a couple of options for easy setup and configuration of a WAMP (Windows, Apache, MySQL, PHP) system:

 * WAMPServer
 * XAMPP
 * EasyPHP

After you have set up your environment, you are ready to continue onward!


text:
Practical Electronics/Capacitors

Capacitor
Capacitor is a device that can be used to charge, discharge, or store electric energy in form of an electric field.

Capacitor's construction
A device is made from two conductive "plates" separated by a thin layer of insulation called dielectric.

Capacitance
Capacitance is defined as the capability of storing charge of a given voltage on each plate which is directly proportional to dielectric constant, the area of the plate and inversely proportional to the separation distance between two plates.
 * $$C=\frac{Q}{V}$$ = ε $$\frac{A}{l}$$

Capacitance has a symbol C measured in unit farad which has symbol F.

Capacitor and electricity

When a voltage is applied across the plates of a capacitor, charges of opposite sign will be developed across each plate until voltage across each plate equals to voltage applied, then each plate will have a charge Q and a voltage V. This process is called charging capacitor
 * Q = q1 + q2 + ... = $$\int I dt$$

The ratio of charge over voltage gives the capacitance of the capacitor.
 * $$C = \frac{Q}{V}$$

At this point, when each plate has the same voltage as the applied voltage, there is no current flow in the circuit. Each plate of the capacitor has a voltage V. Capacitor stores electric energy.

If one disconnect the capacitor from the voltage source, the capacitor still has voltage V and will cause shock if touching it. Hence care must be used when disconnecting a capacitor.

If a charged capacitor is connected to ground, current starts to flow from capacitor to the ground until voltage on the capacitor equals to zero. This process is called discharging capacitor.

Charge

 * Q = q1 + q2 + ...
 * $$Q = \int I dt$$

Capacitance

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

Voltage

 * $$V = \frac{1}{C} \int I dt$$

Current

 * $$I = C \frac{dV}{dt} $$

Reactance
Reactance is defined as the ratio of voltage over current.
 * $$X_C = \frac{\frac{1}{C} \int I dt}{I}$$
 * $$X_C = \frac{1}{\omega C}$$/_-90
 * $$X_C = \frac{1}{j \omega C}$$
 * $$X_C = \frac{1}{s C}$$

Impedance
Since all conductor has resistance the real capacitor's impedance is defined as the sum of reactance and resistance of capacitor.
 * $$Z_C = R_C + X_C$$
 * $$Z_C = \sqrt{R_C^2 + (\frac{1}{s C})^2 }$$/_ Tan-1$$\frac{1}{\omega RC}$$
 * $$Z_C= R_C+ \frac{1}{j \omega C}$$
 * $$Z_C = R_C + \frac{1}{s C}$$

Frequency respond
Capacitor is a tool depends on frequency $$\omega$$.

 * $$\omega = 0, X_C = 00$$, Capacitor Opened circuit, I = 0
 * $$\omega = 00, X_C = 0$$, Capacitor Closed circuit, I ≠ 0
 * $$\omega = \frac{1}{CR_C}$$
 * $$X_C = R_C$$ ,
 * $$Z_C = \sqrt{2}R_C$$ ,
 * $$V_C = \frac {V}{2}$$
 * $$I_C = \frac {V}{2R_C}$$

With the value of I at three frequency points ω = 0, 00, 1 / CRC I - f curve can be drawn to give a picture of current in the capacitor over time.

Phase angle
When a voltage is applied across capacitor, it will take some time before capacitor conducts current. Therefore, current on the capacitor will lags behind voltage at an angle θ.

For ideal losses capacitor which has no internal resistance, current will lage behind voltage at an angle 90°. For non-ideal lossless capacitor which has an internal resistance, current will lage behind Voltage at an angle θ.
 * $$Tan\theta = \frac{1}{2\pi f} \frac{1}{CR}$$

Phase angle relates to time frequency or time and the value of C and RC. When there is a change in phase angle time and frequency also change. For this reason RC network is used in phase shifting.
 * $$f = \frac{1}{2\pi} \frac{1}{Tan\theta} \frac{1}{CR}$$
 * t = 2π Tanθ CRC

Series connection
When n capacitor connected in series, the total capacitance:
 * $$\frac{1}{C_t} = \frac{1}{C_1} + \frac{1}{C_2} + ... + \frac{1}{C_n}$$

When there are two capacitor of the same capacitance connected in series, the total capacitance of the two capacitors is exactly halved.

Parallel Connection
When n capacitor connected in parallel, the total capacitance
 * $$C_t = C_1 + C_2 + ... + C_n$$

When there are two capacitor of the same capacitance connected in parallel, the total capacitance of the two capacitors is exactly doubled.

Voltage
Capacitors can only take a certain voltage across the plates before the dielectric breaks down, and current flows through the capacitor. When this happens, the capacitor is destroyed. This can involve explosion in some types of capacitors.

The common voltage limits for capacitors are:

 * 10V
 * 16V
 * 25V
 * 35V
 * 63V
 * 100V
 * 200V
 * 450V

This list is not exhaustive, and there are many capacitors with a voltage rating in between these values.

Temperature
Some capacitors contain liquid that must not be allowed to boil or freeze. These therefore have specific operating and storage temperature ranges which must not be exceeded if the capacitor is to kept intact. This is most important for electrolytic capacitors.

The common top temperature ranges for capacitors are:

 * 85 °C
 * 105 °C

Capacitors
Capacitor basically is a device for storing electrical energy and releasing it when it is "full". The built up usually consists of two conductors in close proximity and insulated from each other.

Types of Capacitors
There are many different types of capacitors that can be used. We are most interested in electrolytic and ceramic capacitors, as they are the commonly available ones that are suitable for our level of working. For more types, see this Wikipedia article.

Tantalum capacitors
Tantalum capacitors are useful due to their low leakage current, reliability, and their ability to keep stable capacitance over a wide range of temperatures. below is a diagram:

They have special markings. The stripe on the side indicates polarity. Usually with a store bought component, the longer lead is positive. Warning: connecting tantalum capacitors in reverse polarity can easily damage or destroy the capacitor. Generally it will have the capacitance written in µF, and the working voltage below it. In some cases (often when µF is not printed), the value (in pF) is encoded with three numbers; the first two digits being the significant figures, with the third being the multiplier (i.e. number of zeros). Tantalum capacitors are most commonly dipped and have a shiny coating, as well as vary in color, being yellow, red, and sometimes blue. Most axial tantalum capacitors look completely different.

The dark line on the SMT variety is the positive terminal. The dipped axial through-hole variety will be marked with a + or a dark line to indicate the positive terminal.

Ceramic capacitors
Ceramic capacitors are generally non-polarized and almost as common as radial electrolytic capacitors.

 * [[Image:Condensador ceramico.jpg|80px]]

Ceramic Disc
Ceramic capacitors generally take the form of a disc of ceramic with two legs protruding downwards. These capacitors are not polarised - it doesn't matter which way round they are put into a circuit. The capacitances vary from a lower limit of less than 1pF, up to about 100nF. They sometimes exhibit drifting which is where capacitance changes, due to ambient conditions. This is not usually a problem, but it is something you should be aware of.

Electrolytic

Axial electrolytic capacitors are electrolytic capacitors that have connections on both ends. These are most frequently used in devices where there is no space for vertically mounted capacitors.

The arrowed stripe indicates the polarity, with the arrows pointing towards the negative pin. Warning: connecting electrolytic capacitors in reverse polarity can easily damage or destroy the capacitor. Most large electrolytic capacitors have the voltage, capacitance, temperature ratings, and company name written on them without having any special color coding schemes. Most electrolytic capacitors in general have light blue, black, dark purple or brown colors, although some specialized ones come in yellow and other colors. If for some reason you are uncertain about the polarity, the can is always the negative connection. Most axial caps have both ends visible. The positive end has a rubber insulation and the negative side is only aluminium.

Radial electrolytic capacitors are like axial electrolytic ones, except both pins come out the same end. Usually that end (the "bottom end") is mounted flat against the PCB and the capacitor rises perpendicular to the PCB it is mounted on. This type of capacitor probably accounts for at least 70% of capacitors in consumer electronics (that don't use SMT components). See photograph above.

Like their axial counterparts, many radial electrolytic capacitors have the voltage, capacitance, temperature ratings, polarity, and company name directly written on them without having any special color coding schemes.'''

Electrolytic capacitors have very large capacitance per volume unit, which makes them good for capacitances over 1μF. They take the form of cylinders which range form a few millimetres in height to several hundred. There are two main types of packaging: axial and radial. Axial capacitors are generally rarer than radial capacitors and have a lead on each end of the cylinder. Radial capacitors have both leads on the same end.

These capacitors are polarised and must be connected the right way around. The negative terminal, or cathode, is usually marked in any of the following ways:

 * A stripe down the cathode side of the capacitor, usually with minus signs printed on it
 * A shorter lead at the anode than at the cathode (not found on axial capacitors)
 * A minus sign printed on the end of the capacitor, next to the negative lead.

Electrolytic capacitors can explode violently if they are connected incorrectly, overheat, or have too much voltage across them. Larger capacitors have vents scored into the metal ends, but they will still make a very loud noise (which can damage hearing) and spray hot electrolyte from the rupture. It also might have the possibility of shrapnel from the explosion, which is why safety glasses are a good idea while working with them, especially if it is your first time

They generally have poor tolerances, and are used mostly where precise capacitance is unimportant, such as for power supply smoothing, stiffening, etc.

Capacitor Labels
The markings on a capacitor usually identify the properties and safe usage parameters. The value of its capacitance is measured in farads, or metric divisions such as micro, nano, or picofarads. The markings are often encoded depending on the type of capacitor and vary by capacitor type based on room available for designation and intended use.

Electrolytic are written in decimal numbers and wester characters, for example 10uF means 10 microfarad, or 10x10^-6 farad.

Ceramic disk capacitors and certain others are marked in a number code based on the number of picofarad or 1x10^-12 farad. To decode, take the first two numbers of the 3 digit number code as the first two digits, then add a number of zero placeholders after it matching the third digit. This is now the capacitance in pF. So a 104 would be 100000pF, or 100nF. Some capacitors are marked similarly, but instead are coded in nanofarad. Manufacturers specifications would be necessary to distinguish. This type of capacitor varies its size by its capacitance and can be compared in value by size, provided the two in comparison are made of the same material.

Mica capacitors are not in common use in 2006, but are extremely stable and marked with a six spot color code. First find the arrow and view the package with it pointing right and read from top left, clockwise the six colors similar to resistor color code. First is the capacitor type, second and third are the significant digits, fourth (bottom right) is the multiplier (number of trailing zeros), fifth is the tolerance, and sixth (bottom left) is the class or characteristic code.

Safety
Capacitors can explode if overloaded or connected incorrectly. This can result in loud bang and possible shrapnel, which can damage hearing and eyesight, and a spray of hot (or vaporized) electrolyte which can burn skin and damage eyesight. It is not a bad idea to wear safety glasses if it is your first time using capacitors

Large capacitors, especially high voltage ones such as the ones in televisions can store a lethal charge on them. Always ensure that the capacitors are fully discharged before going near them.

It could happen

 * A polarized radial capacitor with an aluminum cover (electrolytic) that has a curved tip is generally out of service or about to be out of order.
 * A capacitor with a small black dot is usually a capacitor that has reached its breakdown voltage; that is an electric arc has passed through the dielectric and is no longer good for service.
 * By discharging a charged capacitor at high capacities, it may happen to solder a conductor.

Reference

 * Wikipedia Capacitor

title: Practical Electronics/Capacitors


text:
Entry Level PHP Web Application Development/Our First Programs: Hello, World!

← Previous (PHP Web Application Development Environments) Next (HTML and CSS) →

The Tradition of “Hello, World!”
“Hello, World!” is often the first program any student of a new language learns. It just so happens that since we are covering multiple languages and approaches in this book, you are going to see different versions of “Hello, World!” for each way of tackling the problem. Not all examples in this book will be presented form all the different methods possible. However, it is important to realize that any time you are working with development on a web application, there are always different ways to solve a single problem.

“Hello, World!” in plain HTML 4.01
The first way that “Hello, World!” can be written is as a static HTML 4.01 page. HTML itself will form the basis for nearly every single web application you will ever write, and so it is imperative to not underestimate the importance of correct HTML. This will simply display “Hello, World!” in your browser window, with “Hello, World!” as the page title.

What is the DOCTYPE?
The first line in the HTML document above is the DOCTYPE—the Document Type. The Document Type is what tells the web browser how to interpret the document that follows it. There are several document types that are valid for web applications written today. It is important that you choose the correct one for your application, and then stick with it.

The document type above tells the browser to use HTML 4.01 Strict—which is the document type that we will use throughout this entire book. There are other document types available for use:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

This is HTML 4.01 Strict. If you have used HTML in the past, such as HTML 3.2 or HTML 4 Transitional, this is probably the hardest to get used to. If you are new to HTML, it is the best thing for you to learn to start with. Either way, future versions of HTML (known as XHTML) will be most like HTML 4.01 Strict, and it is recommended for non-XHTML documents.

We use HTML 4.01 Strict in this book because as of this time (June, 2006) XHTML 1.1 is still unsupported in Microsoft Internet Explorer, which holds the plurality (if not the majority) on the browser market. Once Microsoft Internet Explorer contains support for the XHTML 1.1 standards, it would be prudent (and logical) to use XHTML 1.1 as the default document type for new web pages and applications.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

This is HTML 4.01 Transitional, which permits “old-style” HTML to be written with HTML 4. Most notably, HTML 4.01 transitional adds presentational and depreciated elements to the HTML 4.01 Strict standard. It is recommended for use by those who need to make use of elements that are included. There is a list of elements that are depreciated available on the Internet.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

This is used for frameset pages. HTML permits frameset pages, which define frames within a browser window, and then load content into those frames. The use of frames on a page is debated in general, and generally not encouraged. However, like all rules, there are exceptions.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

These are the XHTML document types. XHTML is an XML-ified version of HTML. It is better then HTML, however, full support from Microsoft Internet Explorer is still lacking (as of June 2006), which makes it nonviable at present for use outside of controlled environments.

The Content-Type of the Document
Every document served on the Internet contains a “Content-Type” header. For HTML based web applications, the correct Content-Type header that has to be passed is:

Content-Type: text/html

It is also recommended that you specify the character set that your application is using. UTF-8 is a common choice, since it contains most of the characters that anybody would use in many various languages. For an application using UTF-8, the proper Content-Type header is:

Content-Type text/html; charset=utf-8

What is “correct” HTML?
There are some basic rules that you can follow to try to make sure that you are consistently writing proper HTML:

 * If an element has a close tag, use it.
 * Do not make tag-soup—that is, do not start a paragraph with <p>, and then start a new paragraph with <p> without finishing the first one.
 * Use lowercase HTML tags when using HTML 4.01 or any version of XHTML. Versions of HTML prior to 4.0 use upper-case tags, and are depreciated.
 * Avoid in-line style attributes. Use classes and id attributes with cascading style sheets to render the effect, instead, if possible.  (Sometimes, one must use inline style information; however, the behavior is technically depreciated—content and presentation should never be mixed with each other in that way.)
 * DO NOT use XHTML-style empty tags in HTML 4.x documents. Some browsers (e.g., Microsoft Internet Explorer) choke on these tags when they are in HTML 4.x documents, and do not know how to parse them.  Results can be unpredictable.
 * Use the W3C Validation Service to validate your work as you go. If you are working on a project that is internal to an intranet, as opposed to on the public Internet, still take care to validate using the service, though you will need to paste the markup in for validation.
 * Some larger corporations (such as AT&T) may have their own internal copy of a document validator. When you have such a validator available, USE IT—it allows you to verify confidential content that cannot be transmitted across the open Internet.
 * If necessary, mirror the W3C validation service locally somehow.

What is there to learn from this example?
This is essentially a small program that instructs a web browser to display information, with a title that is useful to the user. It contains all of the proper elements of valid HTML 4.01 Strict, which means that it should render properly in any web browser that supports HTML 4.01 Strict. This is the smallest document that can be used, and contains no style information (which we will learn about later).

In this example, you have learned about document types (which are required for valid HTML documents), setting the Content-Type header with a character set (which is important to ensure that it is displayed properly, especially if it contains non-ASCII characters such as ß, ¥, ¶, ©, or ®), and you see the basic structure of an HTML document. We will build on this information as we go, including the three other examples to come below.

“Hello, World!” with PHP
In the previous example, you witnessed how HTML 4.01 can stand on its own with regular, static content. This means that when an HTML document is saved on the web server, as the one above, it will never change without human interaction. Somebody has to edit and save the file, and then upload it to the server again, for anybody else to witness the change. In this example, you can see that some of the file has changed. We have saved the file with a new extension - .php, which tells the server that it has to be handled on the server. Also, there are new items within the file. We will take a look at the components that we find in this program.

“Opening” and “Closing” PHP
PHP files are somewhat strange in the computer world—the file is actually usually only part PHP. The rest of the file is whatever the output language is; in our case, this would be HTML 4.01 Strict. For this to be possible, there has to be a way for the application writer to tell PHP where to start and stop looking for PHP code.

For this, we use the PHP open tag () to tell PHP to stop reading instructions. Everything between the start and end tags is read and acted on by PHP. Everything that is outside of the tags is passed, unobstructed. On line 1, you see the first PHP open tag, and on line 11, you see the first closing tag. Everything between them is run by PHP.

Comments in PHP
The next things that you come across in the Hello, World program above are comments. There are two different types of comments generally used in PHP. The first comment we come across is the multi-line comment, which starts on line 2, and stops on line 5. This comment starts with /* and ends with */. These types of comments are borrowed from the C computer language.

Multi-line comments are good for remarks that span multiple lines. In the example above, we used the multi-line comment for demonstration purposes. It is generally useful at the header of a file, to give a brief overview of what the file's purpose is. Some people use the header for information on copyright, license information, and other metadata that pertains to the file. Over time, you will develop your own style for how you write code, including how you structure your files within projects.

An example of a header with metadata for a file that manages database connections might look like:

 * Released under the terms of the GNU General Public License v3 */

The second comment that we see, immediately after the first one, is a single line comment. This comment starts with the // characters, and ends at the end of the line. These types of comments are good for giving short descriptions of the next few lines of code, or a reason for doing something.

The biggest thing to remember about comments is that if they were unnecessary, they would not be included in the language. It is important to understand that code that is lacking in comments, as well as code that is over-commented, can become hard to read and understand by other people—or even yourself, later on. Many programmers understand the code that they are writing at the time, however, when they return to it six months later, do not have a clue why they wrote things the way that they did. It is important to know when to comment, and when not to. Over time, you will learn when it is appropriate to place comments in your code.

PHP Functions
PHP has a large library of functions that you can use to help your code actually do things. In the example above, the PHP header function is used to send an HTTP header to the web browser. This is equivalent (and sometimes, with older browsers, more effective) then the HTML <meta> tag that was used in the first example.

PHP has an extremely large number of functions that you as a programmer can call upon. Fortunately, the PHP Manual is an extremely easy-to-use resource which classifies the available functions, as well as allowing you to search them. As a PHP application developer, the PHP Manual can be one of the most important resources you have. As you go through this book, you will find more PHP functions that we will use.

PHP Variables
Part of the big deal with web application programming, and PHP in particular, is that you want content to be dynamic—you do not want a static set of pages that will never change. Variables are the cornerstone of dynamic pages. If PHP did not have variables of any type, it would be extremely hard to make use of other features of the language to help process, store, and retrieve data.

Variables are probably the most used items in PHP, and arguably, any programming or scripting language. It is important to make sure that you understand what they are, and how they are used. Variables are containers of data, put bluntly. Each one of them has a name. In our example Hello, World script above, our first variable that we create is:

$hello_text = 'Hello, World!';

All we are doing in this line is assigning the text “Hello, World!” to the variable that we are calling $hello_text. Now, it is possible to change this variable at any time. We can make the $hello_text variable hold the text “Hello, Betsy!” or even the number 42!

We will learn more about variables a little bit later in the book. For now, it is important to realize that when you are assigning the variable, the name of the variable must be on the left, and the new contents of it must be on the right. An equal sign goes in-between them.

One more thing that we need to know immediately, is that there are two types of text strings in PHP code. You may notice that on line 9, we use the single quote, and on line 10 we use the double-quote. There is a difference between them. The single quote character (') specifies an absolute literal string. Anything that is between single-quote marks will be stored exactly as it appears.

The double-quote, however, is a little bit different. There are some neat tricks that you can perform with double-quoted strings. We see one of these tricks on line 10: we include the contents of one variable, into another. This is called variable interpolation, and is a common practice in some types of languages. This is a feature of PHP that you will grow to use quite often in your programs, and you will see it very often in other programmer’s code. Taking a look at line 10:

$page_title = "$hello_text (PHP Version)";

We can see that there is a double-quote there. Since we know (in this case) what $hello_text contains, we can look at this line, and “see” what PHP gets from it:

$page_title = 'Hello, World! (PHP Version)';

PHP replaces the reference to $hello_text with what the contents of $hello_text were at the time. We will take a closer look at this later on the book.

On Variables: camelCase or underscores?
Coding styles differ from project to project, and person to person. One major issue in coding style is how to name the variables. You have seen that we have chosen to use underscores—for example, —instead of “camelCasing” (e.g.,  ). The reason for this is experience; the author has found that using camelCasing tends to create situations in many programming languages where it is very easy to type the name of a variable incorrectly, and this can cause problems that are hard to debug and fix. One example would be if  were to accidentally be typed as   or  —a common occurrence when the <SHIFT> key is hard to press or sticks—and is not easy to spot when quickly glancing at code to see what the problem might be.

Due to the way that PHP operates, it’s easier to create correct code if camelCasing is avoided. It may take some time to initially get used to the idea of using underscores to separate words in variable names, but it is a very useful way of ensuring that there is consistency in the way that things are named. Keep in mind, though, that if you use other people’s code—say someone else’s class libraries—you may find that they have chosen to use camelCasing, and using at least a little bit of it is unavoidable.

Whatever style of casing you use, if you are creating a new Web application with PHP, it is best to describe the coding style in a file contained within the project as an easy point of reference, and remain consistent with it.

Other Variations of “Hello, World!”
There are a few other ways that we could write the Hello, World program to show you other ways of interacting with the browser and the user. However, for now, we are going to ignore them: They use yet another language called “JavaScript”—and JavaScript really is deserving of a section all its own. Remember that this is introductory material, and so we are not diving far deeper then the surface on many of the languages, topics, and concepts that you will find here.

Questions
Answer the following questions. Writing the answers down (or typing them out) after thinking about them and reviewing for the answers can help you to better remember the information for use later. After you have answered the questions, compare your answers to the ones here in the book.

 * 1) What is a variable, and what is the purpose of using one? Answer
 * 2) What is the purpose of a single-quoted string? Answer
 * 3) What is the purpose of a double-quoted string? Answer
 * 4) Re-write the Hello, World program in PHP to use another variable called $user_name .  Store your name in that variable, and make the program say "Hello yourname, welcome to the world!" Answer

Practice
We have gone over a great deal of information here. You are encouraged to do some practicing to help use some of the ideas presented within this page.

 * 1) Check out the W3 HTML validation program available on the Internet.  View your examples in the web browser, and paste the output from your browser’s “View Source” option into the validation service.  Remember this tool—it will be important to you in the future!
 * 2) View the PHP Manual and get a feel for how to get around it.  This is another important resource that you will use often in development.


text:
User talk:71.224.83.120

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally.

title: User talk:71.224.83.120


text:
Managing Groups and Teams/Creating and Maintaining Team Cohesion

Team Cohesion Defined
One definition of cohesion is “a group property with individual manifestations of feelings of belongingness or attraction to the group” (Lieberman et al., 1973: 337). It is generally accepted that group cohesion and performance are associated. “However, the issue of a cause/effect relationship between group cohesion and performance is not completely resolved. Generally, there tend to be more studies supporting a positive relationship between group cohesion and performance.”   With that in mind the following article is an effort to enhance group/team cohesion and as a result help improve group/team performance.

The Question
What is team cohesiveness and why does it matter to an organization to have cohesiveness within its teams?

How to promote team cohesion when selecting and identifying diversity within teams
In their journal article Beyond Relational Demography: Time and the Effects of Surface- and Deep-Level Diversity on Work Group Cohesion, David A. Harrison, Kenneth H. Price, and Myrtle P. Bell discuss the composition of teams and its effect on cohesiveness. They describe two different categories of diversity, namely surface level and deeper level.

Surface-Level Diversity:
Surface level attributes are “immutable [and] almost immediately observable.”  Such attributes include age, sex, and race/ethnicity. In general, the findings have been fairly inconsistent within and across studies as to how diversity in these areas affect team cohesion.

Deep-Level Diversity:
Deep-level diversity includes differences among members’ attitudes, beliefs, and values. These attributes are less apparent than surface-level differences and are “learned through extended, individualized interaction and information gathering.”  They are communicated differences which are shared through both verbal and nonverbal behavior. There has been less research done in this area with regards to teams in workplace settings, though a number of social psychological studies have been conducted. The findings consistently suggest that “attitudinal similarity [is] associated with higher group cohesiveness.”  Diversity also improves communication, reduces personal conflict, attracts friendships, and gives more satisfaction to group members.

Summary
Overall, the school of thought that is most widely accepted, in regards to team cohesion, is that “surface-level differences are less important and deep-level differences are more important for groups that had interacted more often”. Harrison, Price, and Bell’s study concluded that while homogeneous groups interacted and performed more effectively than heterogeneous groups in the beginning, with time and information, the diverse groups’ performance and processes improved more rapidly and “had grown more effective in identifying problems and generating solutions”. Overall cohesiveness was strengthened in such cases. Hence, for optimum results, teams ought to include deep-level diversity as part of the process for achieving cohesiveness.

Internal Environment Factors Needed in Team Cohesion
Internally there are several factors that must be present for cohesion to exist within a team. First good and appropriate communication is essential to creating and maintaining cohesion. Communication leads to the second factor, unity of purpose. For a team to work as a cohesive team they must share a common goal and to collectively work towards that goal. And finally, the team must have a high level of commitment understanding that what they do together as a team is better than what they do on their own.

Communication
In the article “Building Team Cohesion: Becoming “We” Instead of “Me” the authors stress the importance of not losing the “human moment” which they define as “not to lose the powerful impact of face-to-face, immediate interaction in real time and space.” Furthermore, the authors add the following:
 * “It is communication in the “human moment” that most powerfully creates team synergy – the energy that truly makes “the whole greater than the sum of its parts.” It is communication in the “human moment” that also most powerfully creates team cohesion – a strong sense of loyalty and commitment to the team vision as one’s own.”
 * “Providing communication opportunities in real time and space for forensics team members is necessary to build team cohesion. Whether a room or lounge where team members can congregate between classes and the end of the day, practice space for formal and informal coaching sessions, travel time in cars and vans, or social time to enjoy pizza and a movie, both quantity and quality of communication are necessary to build a cohesive team climate of openness and trust…According to Bormann(1990), highly cohesive groups interact in an open climate where individuals are free to ask questions and disagree with one another; even the ability to work through inevitable team conflict in such a constructive climate will only serve to strengthen team cohesion.”

In order to build cohesion within any team whether it be a sports team or work team communication is an essential ingredient. Providing opportunities for the team members to interact socially is necessary to help build trust. In addition, a safe environment in which the team can deal with conflict is critical to team cohesion.

Unity of Purpose or a Common Goal
A critical factor that must be present for groups or teams to experience cohesion is to have a common goal. In SELF-MANAGING WORK TEAMS:An Empirical Study of Group Cohesiveness in “Natural Work Groups” at a Harley-Davidson Motor Company Plant, the authors state: “that highly cohesive groups tend to perform better because they have high commitment to attaining group goals (e.g., Stogdill, 1972), and because the members are more sensitive to others in the group, they are more willing to assist each other (e.g., Schachter, Ellertson, McBride,&Gregory, 1951).”

Additional support to the importance of a common goal in building and maintaining a common goal is found in “Building Team Cohesion: Becoming “We” Instead of “Me” where the author relates the following:
 * “Since cohesion is believed to be one of the distinguishing characteristics of a high-performance team, what is this powerful team quality and how is it cre-ated? According to Bollen and Hoyle (1979), cohesion is the degree of attraction members feel toward one another and the team; "it is a feeling of deep loyalty, of esprit de corps, the degree to which each individual has made the team's goal his or her own, a sense of belonging, and a feeling of morale" (as cited in Beebe & Masterson, 2000, p. 122). Though cohesion is rooted in the feelings team mem-bers have for one another as well as a common goal, creating, shaping, and strengthening those feelings relies on the use of effective communication. Communication scholars have long agreed that group or team cohesion is as much about the relationships created as the task at hand, and success in both fos-ters the development of team cohesion. (Bormann, 1990).

Without a purpose or a common goal a team will eventually splinter into separate individuals working towards their own personal agendas and not together toward a team goal. It is important for team members to see themselves as a part of the group working towards a goal for cohesiveness to exist.

Commitment
Teams that are not committed to each other or a common goal do not experience cohesion and are much more likely to leave the team or even the organization. In the article "Commitment and the Control of Organizational Behavior and Belief" the author states the following:
 * "Commitment also derives from the relation of an employee's job to those of other in the organization. Some jobs are rather isolated and can be done independently of other jobs in the organization. It has been found that jobs which are not integrated with the work activities of others tend to be associated with less favorable attitudes. (Sheperd, 1973). Gow, Clarkand dossett (1974), for instance find that telephone operators who quit tend to be those who are not integrated into the work group. Work integration can affect commitment by the fact that integrated jobs are likely to be associated with salient demands from others in the organization. If a person has a job which affects the work of others in the organization, it is likely that those other will communicate their expectations for performance of that job. Such expectations can be committing in that the other people implicitly or explicitly hold the person accountable for what he does. Earlier we mentioned that when individuals did not know what was expected of them they tended to be less committed to the organization. One reason an individual will not know what is expected is because no one is telling him. In general, we would expect that anything which contributes to creating definite expectations for a person's behavior would enhance his felt responsibility, and hence commitment."

We learn from the above author that for commitment to exist we employees need to know what is expected of them and then to know they will be held accountable either by a manager or other co-workers. Once commitment is present team members are more likely to stay and work towards the team goal.

Role of Management in Team Cohesion
The roles that management has in a team that they oversee are extremely important. But it is also important for the management to understand the boundaries of what their roles and responsibilities are and what the roles and responsibilities of the team itself are. The manager is often placed in the management position because of their people and technical skills and experience. A team often benefits from the manager’s abilities, skills, attitudes, insights and ideas. But neither the management nor the team should ever forget that it is the team’s responsibility to perform the actual work. So what role should management play in a team that they oversee? How best can they serve the team to ensure they are successful? A critical role that management can and should have is to facilitate and encourage team cohesion.

Establish the Team Vision/Goal
The first step in creating team cohesion and where management should be involved is in the establishment of the team vision and/or goal. Management must set a clear vision to which the team can jointly work towards together. As Tommy Lasorda, former manager of the LA Dodgers, stated, “My responsibility is to get my 25 guys playing for the name on the front of their shirt and not the one on the back.” Management must “establish a common goal for [the] team – an underlying target that will bind [them] together…” The goal must be as clear as possible for each member of the team. “Goal clarity is critical for team members to have confidence in their direction and to be committed to make it happen.” A clearly defined goal articulated to the team in such a way that they all understand will inspire the team and commit them to the cause.

Once the goal has been clearly defined and clearly articulated, management must keep the vision and goal alive. Obstacles, tension, and crises may arise that can distract or discourage away from the common goal. The management must “continually reinforce and renew the team goal.”

Being that managements “primary responsibility is to ensure that the team reaches its goal,” management must also facilitate a working environment, set clear expectations and responsibilities, and lastly, let the team do their job.

Facilitate a Working Environment
Once the team vision and goal has been established, the most important contribution management can make “is to ensure a climate that enables team members to speak up and address the real issues preventing the goal from being achieved.” Such a climate includes creating an environment of trust, communication and openness with each other. As Frank Lafasto describes in his book, openness and supportiveness are “the ability to raise and resolve the real issues standing the way of a team accomplishing its goal. And to do so in a way that brings out the best thinking and attitude of everyone involved. It’s too hard for team members to contribute, much less explore the possibilities, when it is not safe for them to say what’s on their minds. They must be able to speak honestly. They must be able to deal openly with real obstacles, problems, and opportunities in a way that promotes listening, understanding of differing perspectives, and constructively working towards a solution.” The environment and climate in which the team works and operates must be facilitated by the management to ensure that trust is established, collective collaboration is demanded, and openness is welcome.

Set Clear Expectations and Responsibilities
Management responsibility is also to set clear expectations and responsibilities of the team and individual team members. Patrick Lencioni describes in his book “The Five Dysfunctions of a Team” that a team where there is ambiguity about the direction and priorities fails to commit. Whereas when the expectations, direction and priorities are clear the team is more likely to commit to the cause and each other. Management must establish clear expectations so there is no ambiguity or question of what is expected of the team, whether it is the timeline, product, requirements, etc.

Also, management must set clear responsibilities. “There are few behaviors that build confidence as well as personalized expression of belief in an individual. One of the most direct signals of such belief is trusting someone with important and meaningful responsibility.” Clear and meaningful responsibility that allows the team members to stretch enhances their trust and confidence. And, as Jack Welch, the CEO of General Electric, put it, “giving people self-confidence is by far the most important thing I can do. Because then they will act.”

Training and Staffing
According to Chansler, Swamidass, & Cammann to get a task completed, “a work team must have the resources to do the job. Specifically, the team needs trained, competent team members. Training is a planned effort by a firm to help employees learn job-related competencies (Noe, 1999). Training is used by companies to gain a competitive advantage over rivals in their respective industries. A company must provide adequate resources to an empowered team to staff and train its members adequately.” It is the responsibility of Management to provide such training. Chansler, Swamidass, & Cammann also suggest management should provide its workers with both “hard” and “soft” skills. “Hard-skills training helps them do their jobs properly so that the plant can produce a quality product cost-effectively. Soft-skills training, on the other hand, teaches the workers to get along better as part of a functioning team; this type of skills training improves interpersonal dynamics and relationships. To effectively and efficiently manufacture quality product, both types of training are needed.”  It is therefore the responsibility of management to make sure that group/ team members have the hard and soft skills to perform tasks and maintain cohesion.

Get Out of Their Way
And lastly, the manager’s role is to get out of the team’s way. Once the team knows what they are working towards, tasks have been clearly defined and delegated, expectations are clearly set and they have the means to build relationships of trust and have open communication, the manager needs to step back and let the team work. The last thing the team needs, not only to reach their goal, but also to build strong cohesion is, as Dr. Travis Bradberry described, a seagull manager; one that swoops in when problems arise “squawking and dumpling advice, only to take off and let others clean up the mess.” Management needs to let the members in the team be smart and informed about key issues and facts related to their tasks and goal. Then management must trust team members by providing sufficient autonomy, which will in turn build confidence.

Summary
Ultimately, the goal and role of management should be to add value to the team’s effort. This can be done by defining a clear vision and goal, facilitate a working environment, set clear expectations and responsibilities, and provide the team enough autonomy where they can work and do their jobs with full commitment and confidence.

Examples of Team Cohesion: The Good
A good example of team Cohesion is that of the Harley Davidson Motor Company (HDMC) and its group structure. The well known turnaround of HDMC occurred in the 1980s when it changed from a “command-and-control” culture to that of self-managing work teams (SMWT). This change allowed assembly employees to make important decisions in their work teams. With group work as the foundation of HDMC’s manufacturing cohesion among group members was essential.

At its Kansas City Plant HDMC natural work groups (NWG) were organized to make decisions (and build motorcycles). The plant’s employees are made up of local union members. “This partnership allows the shifting of the decision-making and financial responsibilities for the operation of the plant to the assembly floor employees”.

The structure of the plant divides workers into NWGs. Each NWG is either assigned to one of four process operations groups (POG) (the Assembly POG, the Fabrication POG, the Paint POG, or a POG dedicated to future programs) or provides “computer, human resources, materials, and so forth, support for the operations NWGs (denoted as RG or Resource Groups). Each of the NWGs is represented by NWG-elected (on a rotating basis) members. The highest level of the circular organization is the lone plant leadership group (PLG), which is co-chaired by the plant manager and two local union presidents”.

Within this group structure HDMC provides for widespread access to information. “All financial and operations information is available to all team members, which allows them to monitor budgets and production quotas”. This access to information facilitates open communication which in turn leads to greater team cohesion. Cohesion is also furthered by the autonomy of workers within the group. “Each NWG is empowered to make decisions with regard to any aspect of the assembly process as long as it does not cross over its boundary and impede another NWG”. With freedom to make any necessary decisions and freedom from continuous managerial intervention NWGs are free to bend and move as needed in response to any given situation. Interestingly in this structure there are no formal team leaders. “NWGs are collectively led by the members of the group. Traditional leadership duties such as scheduling, safety monitoring, budget balancing, and so forth, are rotated among the NWG members on a regular basis (usually monthly). The NWG controls its own budget, sick pay, overtime, and consumable production materials. Individual performance measures are not maintained. The NWG performance is measured on achievement of plant goals and on the goals that they set for themselves”. This sharing of responsibilities fosters cohesion by aligning the goals of the group, goals each member is included in creating.

Examples of Team Cohesion: The Bad
The 2010 film “The Social Network” is based on the events and circumstances that lead to the creation and founding of the social networking website “Facebook.” Founder Mark Zuckerberg and his friend, co-founder Eduardo Saverin agree to launch the site and split up ownership of the new company equitably. In the process of developing the company, other individuals and interests come into play that are detrimental to the team cohesion developed by Mark and Eduardo eventually leading to multi-million dollar lawsuits and the end of the original founding team.

Several factors that lead to the failure of team cohesion:

 * Team members were unable to work together cooperatively
 * Team goals were not shared by everyone on the team
 * Team members felt that they were not recognized for individual contributions to accomplish team goals
 * Selfish interests were able to infiltrate the team cohesion

The fact that team members were unable to work cooperatively together is likely the single biggest factor in the failure of the original “Facebook” leadership team. In the movie, to help advance the growth of the company, Mark brought in a third partner, Sean Parker, the co-founder of the famous music sharing sight “Napster.” Mark was instantly drawn to Sean’s charismatic personality and vision for “Facebook.”  At the same time, Eduardo was highly skeptical of Sean and his business history. Immediately Mark began to lean toward the ideas that Sean had developed for “Facebook” and eventually gave Sean a small ownership stake in the company as well as a management position. Upon learning this, Eduardo was very upset that Mark would go ahead and make the decision to include Sean without consulting him first.

Mark and Eduardo both had visions of keeping this site exclusive for the elite college institutions around the country and gradually introducing it to other colleges. When Sean was brought into the company he presented Mark with a business plan to expand “Facebook” beyond the college scene and introduce it to the general public. At the same time he was trying to convince Mark that he needed to relocate the business to Palo Alto, CA from Boston, MA. Eduardo was never consulted on these propositions that were made to Mark. Eduardo felt like Sean was trying to push him out of the company and influence many of the decisions made by Mark. As the company grew and others were able to influence decision making, the team goals had clearly changed and not everyone shared the same vision.

When “Facebook” was originally started Eduardo was designated as the CFO of the company. In this responsibility he put up the initial seed money to get it off the ground. He was in charge of all finances and bank accounts for the company. While Mark was moving the company headquarters to Palo Alto, Eduardo was spending time in New York working on securing advertising contracts with prominent advertising firms. When Eduardo goes to visit the team in Palo Alto he begins to tell Mark all about the progress he has made with the advertisers but instead he is told all about the work that Sean and Mark had accomplished and is essentially told that his time and work in New York will not be needed. Eduardo felt like his contributions to the company and goals were not being recognized. This drives Eduardo further and further from the team.

Throughout the life of the original leadership team there were many occasions where selfish interests were able to infiltrate team cohesion. Sean was the worst offender of this. Sean was one of the founders of “Napster.” “Napster” was eventually forced to shut down and was facing many lawsuits from the record industry. Sean saw an opportunity to work with Mark and Eduardo on “Facebook.” Sean could see the potential that this venture had and also that he could influence the socially introverted Mark by filling him with visions of big pay days and a life style full of privilege. At times he appeared to try and relive his days of “Napster” and treated “Facebook” like it was his own company and he was trying to accomplish the goals there that weren’t achievable at “Napster.” After a party to celebrate the 1 millionth member of “Facebook,” Sean was arrested with several other “Facebook” interns for possession of cocaine and was eventually dismissed from the company. Through these actions, Sean clearly was acting in his own self interest and did not take into account what the effects would be on the group or company. In many ways the selfish actions of Sean drove a wedge between Mark and Eduardo that eventually lead to lawsuits and the end of the original leadership team.

Ways to Increase Team Cohesion
Each group environment is different and will present different challenges. In order to create a cohesive team unit it is important for team members to be aware of this and work towards it. In Joseph Powell Stokes’s research, he found that “risk taking that occurs in a group, attraction to individual members of the group, and the instrumental value of a group are all related to the cohesion of the group”. He proposes that “increasing risk taking, intermember attraction, and the instrumental value of a personal change group might lead to increased cohesion, which in turn might lead to increase benefits for group participants.”

As such, groups should attempt to foster an “atmosphere of tolerance and acceptance” so they can assure openness and honesty and hence, increase their risk taking and intermember attraction. They can “[reward] members who make risky self-disclosures or give honest feedback to other group members”. They should make sure group members know that they are expected to “like each other” and can help members “differentiate between not liking other members’ behaviors and not liking the other members themselves”. Group leaders ought to act as examples and make sure that the group composition and expectations of the group members are in line with risk-taking and intermember attraction. “Leaders can maximize the instrumental value of a group for its members by having the group focus explicitly on its goals and by helping redirect the group when members’ needs are not being met”.

Potential problems
One possible caveat of cohesion is that when there is too much cohesion, groups are prone to groupthink. “Groupthink is a tendency by groups to engage in a concurrence seeking manner. Groupthink occurs when group members give priority to sustaining concordance and internal harmony above critical examination of the issues under consideration”. It is important for all group members to be conscious of this pitfall and to take precautions to prevent such behavior. See Ways to Prevent Groupthink.


text:
User talk:W Heald

Welcome to Wikibooks! I see that you've been editing the Russian wikibook: it's good to see some work being done on it. I would just like to encourage you to be bold, as there has been no real work done on this book in some time. I have created the page Russian/Planning to create a more fleshed-out TOC, and tried to outline some of the things I thought should be in a Russian textbook. I'd love to hear any feedback you have on my provisional TOC. Thanks, DettoAltrimenti 05:01, 5 June 2006 (UTC)

title: User talk:W Heald


text:
Entry Level PHP Web Application Development/Blank

This page is intentionally blank. It is a placeholder page for what comes up at the end when the book is not finished. When the book is finished, this page will be deleted, as it will no longer have any purpose.


text:
Basic Physics of Nuclear Medicine

Nuclear Medicine is a fascinating application of nuclear physics. The first ten chapters of this wikibook are intended to support a basic introductory course in an early semester of an undergraduate program. They assume that students have completed decent high school programs in maths and physics and are concurrently taking subjects in the medical sciences. Additional chapters cover more advanced topics in this field. Our focus in this wikibook is the diagnostic application of Nuclear Medicine. Therapeutic applications are considered in a separate wikibook, "Radiation Oncology".

'''Note that this WikiBooks is well past its use-by date. Some of the basic physics might still be of relevance, but the technologies and applications chapters need substantial updating.'''

A companion wikibook on the Basic Physics of Digital Radiography is also available.

Contents

 * /Atomic & Nuclear Structure/
 * /Radioactive Decay/
 * /The Radioactive Decay Law/
 * /Units of Radiation Measurement/
 * /Interaction of Radiation with Matter/
 * /Attenuation of Gamma-Rays/
 * /Gas-Filled Radiation Detectors/
 * /Scintillation Detectors/
 * /Nuclear Medicine Imaging Systems/
 * /Computers in Nuclear Medicine/
 * /Fourier Methods/
 * /X-Ray CT in Nuclear Medicine/
 * /PACS and Advanced Image Processing/
 * /Three-Dimensional Visualization Techniques/
 * /Patient Dosimetry/
 * /Production of Radioisotopes/
 * /Chapter Review/
 * /Dynamic Studies in Nuclear Medicine/
 * /Deconvolution Analysis/
 * /Sonography & Nuclear Medicine/
 * /MRI & Nuclear Medicine/
 * /Dual-Energy Absorptiometry/

The principal author of this text is grateful for the expert editorial assistance of Dirk Hünniger during his German translation of the text and his contribution to the section on the Operation of a 99m-Tc Generator.

title: Basic Physics of Nuclear Medicine