text
stringlengths
8
1.28M
token_count
int64
3
432k
Lucid Dreaming/Reality Checks/Vision. Presentation. With the vision reality check, you check if your vision is at all different from the norm; for example, if you have perfect vision without wearing glasses. As well as doing this regularly, you could also do it every time you put on your glasses.
69
Guitar/Understanding the Strings. To properly understand the strings, the guitar must be in tune. The strings should be tuned to EADGBE. That is, the thickest string should be a low E, the next an A, and so on. This is called standard tuning. Other tunings exist, but we should not concern ourselves with them yet. The fifth (standard A) and fourth (standard D) strings. The fifth string behaves similarly to the others: each fret is a single semitone up from the previous fret. The fifth fret on the fifth string is a D, which is the same note as the open fourth string. Likewise, the fifth fret on the fourth string is a G, the same as the open third string. This is the fret used to tune the string above it. The third string. This string is slightly different from every other string on the guitar. The reason is the "fourth" fret on this string, not the fifth, has the same note as the second string. The second string. The fifth fret is an E and the same as the open first string.
247
Guitar/Harmonics. Harmonics are fun sounds to produce. They can be quiet and bell-like on an Acoustic or they can be loud and squeally on an overdriven Electric. Harmonics Introduction. When you strike a note on the guitar, the sound generated is not just one note but a series of notes. The "fundamental" (also called the first harmonic) is the loudest and lowest of the series and fainter notes which all have their own frequency of vibration, amplitude, and phase are heard as well. The frequencies are integer multiples of the lowest frequency. Looking at the diagram you will notice that the upper partials (this is the name given to any sine waves associated with a complex tone) follow a pattern 2,3,4,5,6,and 7 and these equal-sized sections resonate at increasingly higher frequencies. The guitar technique described below shows how to play harmonics by lightly touching the string directly over the fret. You are essentially cancelling out certain partials from being heard by not allowing that part of the string to vibrate. Pianists have no means of manipulating strings to produce harmonics unless they lift up the lid of the piano and lightly touch the string. Woodwind instruments can produce harmonics by the technique of "overblowing". It must be noted that we all tend to hear or play music as a "single sensation" and that the partials present are not considered or heard as separate during that experience. List of natural harmonics. There are more harmonics than these but these are the easiest to produce and the most audible. They are ordered from lowest to highest in pitch. Natural harmonics. Natural harmonics are the easiest to produce. A good place to begin is the 12th fret of the high e string. With your fretting hand, lightly touch a finger against the string directly above the 12th fret. Do not hold it down or apply any pressure. Then strike it with your picking hand and immediately release the string; almost simultaneously. If executed properly the result should be a high-pitched, silvery note. Try it again at the 7th and 5th frets; as shown on the Natural Harmonic fretboard diagram. Each harmonic shown on the diagram will produce a sound that is higher in pitch than its fretted note counterpart. Harmonics will sound quieter and the higher harmonics may be nearly inaudible without the overdrive of an amp. Harmonic Chords. Below are the Harmonic chords of Em and Bm. Both chords are first inversion with the third in the bass. You can play Harmonic arpeggios, add the open low E string to the Harmonic Em chord or play a melodic phrase. Below are the Harmonic chords of G and D. Both chords are second inversion with the fifth in the bass. A good example of the use of natural harmonics is in the song "Imperium" by Machine Head. Clear 5th fret harmonics can be heard enforcing the low drop B tuning. Pinch harmonics. Pinch harmonics are also known as Artificial Harmonics though there is really nothing artificial about them. This is an advanced technique and was popularized mostly by and later , as well as many others as early as the 1970s including many artists. These harmonics follow the same principles of physics as a natural harmonic; the difference being how the harmonic is produced. In this technique a note is struck in a downwards motion with the pick and in the same motion the string is touched (one might really say brushed) with the edge of the thumb that is holding the pick. You can also use the edge of the index fingernail followed by the pick. Pinch harmonics are most effective and audible using an Electric guitar with overdrive or distortion. These harmonics are virtually inaudible when using a clean (not distorted or overdriven) amp channel with the Electric guitar or when using an Acoustic. It can sound good when correctly used even without much overdrive but it's not always clear or detectable. Use overdrive or distortion for best results especially while learning and practicing this technique. This technique takes practice to master. Beginners may need to spend some time on scales, soloing, blues, riffing, strumming patterns before they feel comfortable enough to attempt this technique. It is mostly used in soloing and intense expressive riffing. As mentioned above, these harmonics are produced by striking a note with the pick and touching the string with the picking thumb. Grip the pick so that the tip barely peeks out between your fingertips (this is why they are called "pinch" harmonics). It's easier when you are fretting a note with the left hand. Try fretting the 5th fret of the D string and plucking the string just below the neck pick-up pole pieces (maybe 1/8" toward the bridge from the pole pieces). The position of the plucking along the length of the string is one of the most important parts of this technique. While with regular picking the position of the picking along the string can make slight variations in the sound of the note, when executing pinch harmonics the right position is vital and tiny positional differences can make entirely different harmonics. So try adjusting the picking hand just millimeters up and down the string around the area of the pick-ups. Try imagining the pick and your picking thumb plucking the string at the same time although the thumb is really just brushing past it. Consider it to be really one motion. Try thinking of your thumb and the pick as one entity and instead of picking straight down, pick down and a little bit (millimeters) out away from the face of the guitar so your picking motion is a sort of 'letter J' out from the face of the guitar and so the thumb brushes past the string and remember that the thumb should only touch the string for an instant just like the pick does. Try executing pinch harmonics while fretting different notes and by striking the string in slightly different places all around the pickup area of the guitar. Many kinds of harmonic ringing sounds may be produced. Without a pick, this technique may be simulated by plucking the string with the fingertip and lightly touching it with the fingernail. Classical guitarists use this technique and it is also found in jazz finger-style guitar. These harmonics, as opposed to natural harmonics, end up being much more practical to use while playing and when mastered can be used boldly like Zakk Wylde making the harmonic part of the riff, or subtly and possibly unintentionally to add color and character to the notes or chords while playing almost anything. Pinch harmonics can easily and effectively be combined with other techniques, such as bending or vibrato. To hear pinch harmonics in action check out the following: Don't despair if you can't get harmonics as clear as Judas Priest or Zakk Wylde, they've got equipment made just for making sounds like that. They both have expensive high gain amplifiers and their guitars are equipped with pickups that are naturally very good at pinch harmonics. Some pickups amplify pinch harmonics better than others (some pickups hardly amplify them at all). Judas Priest and Zakk Wylde both play guitars with EMG humbuckers, which are some of the hottest pickups and some of the best at amplifying pinch harmonics. Hot pickups (EMG, Duncan JB, Duncan Live Wire, Bill Lawrence 500XL) do an excellent job of picking up pinch harmonics. Once you've practiced at home, ask to try out a guitar with "hot pickups" and a "high gain" amplifier at the local guitar shop if you want a taste(warning: it's easy to get spoiled/hooked!). Tapped harmonics. This technique, like tapping itself, was popularized by . Tapped harmonics are an extension of the tapping technique. The note is fretted as usual, but instead of striking the string, the string is tapped at one of the frets listed in the natural harmonic list. Do not hold the string down with the tapping hand, just bounce the finger lightly on and off the fret. This technique can be extended by fretting a note, then tapping relative to the fretted note. For instance, hold the third fret, and tap the fifteenth fret, for the twelfth fret harmonic, because 12+3=15. Other techniques. A final technique (known as the harp harmonic) is a sort of combination between the natural and tapped harmonic techniques. Fret the note normally, and place the picking hand index finger on a natural harmonic relative to the fretted note (just as in tapped harmonics). Pluck the string with another finger and release the index finger, just as if producing a natural harmonic.
1,994
Investing/Mutual funds. Mutual funds come in a variety of different types. Fund managers select and group managed funds by industry sector (technology, international growth, etc.) as well as by risk level. A manager will buy and sell stocks within the area with the aim of getting the highest return on investment. Mutual funds with potentially higher returns tend to be riskier, so an investor who needs to have his money back into his hands in three years will choose a less volatile fund so as not to risk losing the original investment. However, a person who is more prepared to lose money sometimes will likely gravitate towards the higher-return funds which will over the long term generate higher returns. Index funds. An index fund is a mutual fund that holds a portfolio that seeks to match the performance of an index, for example the S&P 500. These funds have lower management costs than actively managed funds and therefore often outperform managed funds. Exchange traded Funds. ETF's are simply Index funds which can be traded like stocks. They have the same advantages as the index fund with its low management fees. They are superior to index funds because trades can be placed at the same speed of a stock, versus the fund which cannot be purchased until the following morning. Online resources. Many excellent resources available on the web:
285
Guide to Unix/Linux. Linux® is an , ®-like kernel and operating system. The author of the kernel itself is , plus a loosely-knit team of programmers who enhance it in a collaborative effort over the Internet. This page provides a brief overview of the main features of the Linux kernel and system, especially in comparison to other Unix-like systems. There are several other Wikibooks about Linux with more information. Linux Administration. Objective: To equip linux novice with essential administration skills to be proficient with the Linux environment. Links to more information. Wikibooks for Linux. Wikibooks has several other books on its . Here is a sample: In addition, some books have Linux chapters:
167
Investing/Bonds. A bond is a debt: the issuer of a bond (a company, government, or other entity) borrows money from the purchaser of a bond (bond holder). Until the bond matures (the debt becomes due), the issuer will make periodic interest payments to the bond holder. On the maturity date of the bond, the issuer pays back the principal (the amount borrowed) to the bond holder, and possibly also makes a final interest payment. From the point of view of the issuer, bonds may be an attractive alternative to borrowing from a bank (perhaps to avoid restrictive loan terms or to obtain a better interest rate), or to issuing stock (which would dilute the equity or ownership stake of the current owners of a company). From the point of view of the bond holder, bonds may be attractive relative to other investment alternatives, perhaps paying better interest rates than bank deposits or being more certain of retaining their value than stocks. With some exceptions, bonds are freely traded, so that the bond holders are not locked into their investments. (All of these advantages are possibilities and not certainties, as discussed below.) As an illustration, suppose a company wants to build a factory which will cost US $1,000,000. The company may issue a bond to cover this amount. The bond could either be backed by the factory, or could be a debenture, which is only a call on the future income of the company. The face value of the bond would be $1,000,000, which typically would be sold in increments of $1,000. (The face value of the bond is distinct from the current price in the marketplace, which might be more or less than the face value.) The bond might pay an interest rate of 5% (also known as having a 5% coupon), typically in semiannual payments of 2.5% each, and could have a maturity of up to 30 years. For example, assuming the 5% and 30 year figures above, the bond typically would make 60 payments of $25 per $1000 of face value, with a final repayment of the principal coinciding with the last interest payment. The purchase price of a bond is often not the price found on the bond itself, but can vary based on the interest rate of the bond, as well as the accrued interest on the bond. An increase in interest rates results in lower bond prices, and a decrease in interest rates results in higher bond prices (this is known as a loss or premium over the face value of the bond). Bonds return around 5% a year on average. To have a higher return in bonds you invest in riskier bonds. They are known as junk bonds. Bonds have a credit rating which shows their risk rating. The credit ratings go from AAA, AA or A, BBB, BB B, CCC, CC, C, DDD, DD, D. AAA bonds are seen at a very low risk of default. BBB indicate some problems. CCC bonds can be viewed with caution. DDD are bonds at a high risk of default. When can you use bonds? You could use bonds if you are an investor who would not want stocks and shares prices ups and down. How do you invest in bonds. You can invest in bonds through funds. You can also invest in bonds through stockbrokers. Be careful of too high charges on a bond fund, it could take away from the potential profits.
764
Electronics/History/Introduction. < ../../Expanded Edition/ Electronics has a long and varied history. It involves some of the most famous people in history.
40
Electronics/History/Chapter 5. Space Age Tech Fuel Cell. The first fuel cell was developed in the 19th century by British scientist Sir William Grove. A sketch was published in 1843. But fuel cells did not see practical application until the 1960s, where they were used in the U.S. space program to supply electricity and drinking water (hydrogen and oxygen being readily available from the spacecraft tanks). Extremely expensive materials were used and the fuel cells required very pure hydrogen and oxygen. Early fuel cells tended to require inconveniently high operating temperatures that were a problem in many applications. Further technological advances in the 1980s and 1990s, like the use of Nafion as the electrolyte, and reductions in the quantity of expensive platinum catalyst required, have made the prospect of fuel cells in consumer applications such as automobiles more realistic. Ballard Power Systems is a major manufacturer of fuel cells and leads the world in automotive fuel cell technology. Ford Motor Company and DaimlerChrysler are major investors in Ballard. As of 2003, the only major automobile companies pursuing internal development of fuel cells for automotive use are General Motors and Toyota; most others are customers of Ballard. United Technologies (UTX) is a major manufacturer of large, stationary fuel cells used as co-generation power plants in hospitals and large office buildings. The company has also developed bus fleets that are powered by fuel cells.
342
Electronics/History/Chapter 6. Computers
13
Electronics/History/Chapter 2. Electricity and Magnetism: 1600-1875 Luigi Galvani. Luigi Galvani (September 9, 1737 - December 4, 1798) was an Italian physician and physicist who lived and died in Bologna. Dissecting a frog at a table where he had been conducting experiments with static electricity, Galvani touched an exposed sciatic nerve of the frog with his metal scalpel, which had picked up a charge. At that moment, he saw the dead frog's leg kick as if in life. The observation made Galvani the first investigator to appreciate the relationship between electricity and animation--or life. He is typically credited with the discovery of biological electricity. Galvani coined the term animal electricity to describe whatever it was that activated the muscles of his specimens. Along with contemporaries, he regarded their activation as being generated by an electrical fluid that is carried to the muscles by the nerves. The phenomenon was dubbed "galvanism," after Galvani, on the suggestion of his peer and sometime intellectual adversary Alessandro Volta. Galvani's investigations led shortly to the invention of an early battery, but not by Galvani, who did not perceive electricity as separable from biology. Galvani saw electricity instead as the essence or the stuff itself of life, which he regarded vitalistically. Thus it was Volta who built the first battery, which became known therefore as a voltaic pile. While, as Galvani believed, all life is indeed electrical--in that all living things are made of cells and every cell has a cell potential--biological electricity has the same chemical underpinnings as the flow of current between electrochemical cells, and thus can be recapitulated in a way outside the body. Volta's intuition was correct as well. Galvani's name also survives in the Galvanic cell, the galvanometer and "galvanize". Alessandro Volta. Alessandro Giuseppe Antonio Anastasio Volta (February 18, 1745 - March 5, 1827) was an Italian physicist known especially for the development of the electric battery. Late in life, he received the title of Count. De vi attractiva ... Volta was born and educated in Como, Italy, where he became professor of physics at the Royal School in 1774. His passion had always been the study of electricity, and still a young student he had even written a poem in Latin on this fascinating new discovery.De vi attractiva ignis electrici ac phaenomenis inde pendentibus is his first scientific paper. In 1775 he devised the electrophorus, a device that produced a static electric charge. In 1776-77 he studied the chemistry of gases, discovered methane, and devised experiments such as the ignition of gases by an electric spark in a closed vessel. In 1779 he became professor of physics at the University of Pavia, a chair he occupied for 25 years. In 1794 Volta married Teresa Peregrini, daughter of Count Ludovico Peregrini; the couple had three sons. In 1800, as the result of a professional disagreement over the galvanic response advocated by Luigi Galvani, he developed the so-called voltaic pile, a forerunner of the electric battery, which produced a steady electric current. Volta had determined that the most effective pair of dissimilar metals to produce electricity was zinc and silver. Initially he experimented with individual cells in series, each cell being a wine goblet filled with brine into which the two dissimilar electrodes were dipped. The electric pile replaced the goblets with cardboard soaked in brine. (The number of cells, and thus the voltage it could produce, was limited by the pressure, exerted by the upper cells, that would squeeze all of the brine out of the cardboard of the bottom cell.) Templo Voltiano In honor of his work in the field of electricity, Napoleon made him a count in 1810; in 1815 the Emperor of Austria named him a professor of philosophy at Padua. Volta is buried in the city of Como in Italy; the Templo Voltiano near Lake Como is a museum devoted to explaining his work; his original instruments and papers are on display there. The building appeared, along with his portrait, on Italian currency before the introduction of the Euro. An electrophorus is a simple plate capacitor used to collect static charge produced as a result of friction, devised in 18th century by Johannes Wilcke and Alessandro Volta. The electrophorus consists of a dielectric plate on a metal surface and a metal plate with an insulating handle. First, the dielectric plate is triboelectrically charged, that is, by friction. Then, the metal plate is placed onto the dielectric plate. The metal plate charges by induction - the side facing the charged dielectric plate charges opposite to the charge of plate, while the side facing away from the dielectric charge attains the same sign of charge as the dielectric plate, thus making the metal plate electrically neutral as a whole. Then, the side facing away from the dielectric plate is momentarily grounded. Finally, the metal plate, now consisting only one sign of charge, is lifted. The Voltaic Pile was invented by Alessandro Volta in 1800. He demonstrated that when certain metals and chemicals come into contact with each other they can produce an electrical current. He placed together several pairs of copper and zinc discs separated by paper soaked in salt water, and an electrical current was produced. This was the first chemical battery. For his contributions to the study of electricity, the SI unit called the volt was named after Volta. In 1881 an important electrical unit was named the volt was named in his honor. Heinrich Hertz. Heinrich Rudolf Hertz (February 22, 1857 - January 1, 1894), was the German physicist for whom the hertz, the SI unit of frequency, is named. In 1888, he was the first to demonstrate the existence of electromagnetic radiation by building apparatus to produce radio waves. Hertz was born in Hamburg, Germany, to a Jewish family that had converted to Christianity. His father was an advocate in Hamburg, his mother the daughter of a doctor. While at school, he showed an aptitude for sciences as well as languages, learning Arabic and Sanskrit. He studied sciences and engineering in the German cities of Dresden, Munich and Berlin. He was a student of Gustav R. Kirchhoff and Hermann von Helmholtz. He obtained his PhD in 1880, and remained a pupil of Helmholtz until 1883 when he took a post as a lecturer in theoretical physics at the University of Kiel. In 1885 he became a full professor at the University of Karlsruhe where he discovered electromagnetic waves. Following Michelson's 1881 experiment (precursor to the 1887 Michelson-Morley experiment) which disproved the existence of Luminiferous aether he reformulated Maxwell's equations, to take the new discovery into account. Through experimentation, he proved that electric signals can travel through open air, as had been predicted by James Clerk Maxwell and Michael Faraday, and which is the basis for the invention of radio. He also discovered the photoelectric effect (which was later explained by Albert Einstein) when he noticed that a charged object loses its charge more readily when illuminated by ultraviolet light. He died in Bonn, Germany. His nephew Gustav Ludwig Hertz was a Nobel Prize winner, and Gustav's son Carl Hellmuth Hertz invented medical ultrasonography. See also People * Wilhelm Röntgen * Hans Christian Ørsted * Guglielmo Marconi * Gustav Ludwig Hertz * Hermann von Helmholtz * James Clerk Maxwell * Nikola Tesla * Wilhelm Röntgen Lists and histories * Electromagnetism timeline * Timeline of mechanics and physics * List of physicists * Radio history * Wireless telegraphy * List of people on stamps of Germany * List of physics topics Electromagnetic radiation * Frequency o Hertz * Microwave * X-ray * Photoelectric effect * Radar * Luminiferous aether Other * University of Bonn * University of Karlsruhe * Radio EM waves. The existence of electromagnetic waves, i.e. microwaves, was predicted by James Clerk Maxwell in 1864 from his famous Maxwell's equations. In 1888, Heinrich Hertz was the first to demonstrate the existence of electromagnetic waves by building apparatus to produce radio waves. spectrum. It was Sir Isaac Newton in 1666 who first used the word spectrum to refer to the celebrated Phenomenon of Colours which can be extracted from sunlight, by a glass prism. Infared. History In 1800 the English astronomer William Herschel held a mercury thermometer in the spectrum produced by a glass prism to measure the heat content of different coloured lights. He found that the thermometer registered an increase in temperature even when held beyond the red end of the spectrum, where there was no visible light. This was the first experiment to show that heat could be transmitted by an invisible form of light.
2,221
Electronics/History/Chapter 1. Early days: < 1600 Baghdad Battery. The Baghdad Battery is an artifact from between 250 BC and 250, discovered near Baghdad, with a structure similar to that of a modern battery. It also appears that similar batteries can be located around ancient Egypt, where objects with traces of precious metal electroplating have been discovered at different locations. In 1938, the German archaeologist Wilhelm Konig reportedly excavated the five-inch (13-cm)-long clay jar in Khujut Rabu, near Baghdad, Iraq (though some reports say it was found in the collections of the National Museum of Iraq). The jar contained a copper cylinder, in turn covering and protecting an iron rod, isolated from the copper by asphalt. The artifact had been exposed to the weather and had suffered corrosion. Konig published paper reporting the mechanism's resemblance to a battery in 1940. Upon publication, Konig's discovery was discounted by the scientific community and soon disregarded. Such ancient knowledge in the history of electricity bears no known continuous relationship to the development of modern batteries. Its form, though, is nearly identical to the principles that are in use today. After the Second World War, Willard Gray demonstrated current production by a reconstruction of the inferred battery design when filled with substances, like grape juice. Subsequent tests found acidic residues in the original, analysed as an electrolytic solution, perhaps vinegar or wine. Some people regard the Baghdad Battery as an anachronism (appearing to be out of place in time), because of the belief that ancient civilizations did not have electrical power and therefore would not have had a device that operated on the principles of electric power. The practical uses of this battery are uncertain. Some contemporary researchers have renewed interest in interpreting this artifact, and suggested electroplating precious metals as a practical use for early batteries by Baghdad Parthians (who used it to electroplate metallic items; e.g. put a thin layer of gold over an object made out of some other metal). Artifacts from ancient Egyptian sites, similarly resembling batteries, or bearing traces consistent with precious-metal electroplating, may support that. Ark of the Covenant. Speculations that the Ark of the Covenant may have operated as an electrical capacitor are common amongst some electrical engineers (Nikola Tesla being the earliest); they say that the design of it allowed it to store electric charge, and thus could facilitate an electric discharge between the cherubs. The theory suggests that it resembles a capacitor (of radiant energy) in its construction. The biblical accounts of individuals sudden deaths from touching the Ark could correspond to death by a lethal high voltage charge. Louis Ginzberg’s "Legends of the Jews" has ancient oral traditions referring to "sparks" from the cherubim. These "fiery jets" occasionally burned and destroyed close objects. Other biblical accounts could correspond with exposure to some high frequency electromagnetic fields. Jewish legend has occasional records of a "cloud" between the cherubim. The Ark was considered dangerous at these times and Moses would not approach it. Tesla, in the article "A fairy tale of electricity" (published September 9, 1915), stated in regards to the Ark: Archaeological discoveries of the last century (which include the Baghdad Battery among others), indicate that a working knowledge of energy devices might have been present in ancient Middle Eastern cultures, and therefore it might not have been beyond Moses' specialized training in the house of Pharaoh (Exodus 2:10). It is known that the acacia wood acts as an insulator, while the gold (the purest available at that time) is known as a good conductor. An electric charge could have accumulated from constant exposure to static electricity in the Middle East climate (among other possible sources). The Ark's upper surface has a rim of gold (a single coil of angels figures). Over the ark, the cherubs could form a spark gap, producing a dynamic radiance that would inspire awe in the observer, and act as a lightning source to kill anyone that touched it.—Num. 7:9; 10:21; 4:5,19, 20; 1 Kings 8:3, 6; Lev. 16:2; Num. 7:89; 2 Sam. 6:6, 7. Around 1999, author Richard Andrews built a model of the ark. He claims that when tested, it demonstrated that it would act as an electromagnetic accumulator.
1,057
Guitar/Hammer-ons, Pull-offs, and Trills. Hammer-ons and pull-offs are two closely related techniques. They are used to play "legato", that is, in a smooth manner, and are also used to help the guitarist to play faster. They are most commonly used in electric guitar work, but can be used in acoustic tunes as embellishments. The hammer-on. Hammer-ons can be done anywhere on the fretboard, but for the beginner it is easiest using an open string. To quickly learn, strike an open E on the first string. While the note is still ringing, quickly and firmly press a finger on the third fret. If done properly, a G note should be sounding. Quickly pressing your finger down and raising the note without hitting the string again is called "hammering on". Without electric amplification, the hammer-on tends to be quieter than regularly struck notes, especially if you haven't practiced it! Because the strings are closer to the fretboard, hammer-ons are easier to execute on an electric guitar. However, this doesn't make them less common on an acoustic guitar, where they are used frequently to embellish open chords The hammer-on can just as easily be played with fretted notes: just play the note normally and hammer onto another (higher-numbered) fret on the same string. If you practice hammer-ons, eventually you will be able to move each finger smoothly and independently. The pull-off. The pull-off is the opposite of the hammer-on. Again, using the E string, hold it at the third fret. Strike the string and while the note is still ringing, release the fretting finger. If done properly, the G should be followed by an open E. If the note doesn't ring out properly, try hitting the G harder and releasing faster. Like the hammer-on, the second note tends to be less loud than the first. To help alleviate this, a slight sideways motion of the fretting finger while pulling off will add extra vibration to the string, and give you some extra volume. Often it is hard for a beginner to accomplish, and the sideways movement helps greatly. A pull-off looks like this: The trill. A trill is two alternating notes, such as an A and A#. Only the first note is struck; the rest are rapidly hammered-on and pulled off
544
Electronics/History/Chapter 4. Frequency Spectrum Beam power. Microwaves can be used to transmit power over long distances, and post-World War II research was done to examine possibilities. NASA worked in the 1970s and early 1980s to research the possibilities of using Solar Power Satellite (SPS) systems with large solar arrays that would beam power down to the Earth's survace via microwaves. Van allen radiation belt. The presence of a radiation belt had been theorized prior to the Space Age and the belt's presence was confirmed by the Explorer I on January 31, 1958 and Explorer III missions, under Doctor James van Allen. The trapped radiation was first mapped out by Explorer IV and Pioneer III. FM. New technology was added to FM radio in the early 1960s to allow FM stereo transmissions, where the frequency modulated radio signal is used to carry stereophonic sound, using the pilot-tone multiplex system. UHF. On December 29, 1949 KC2XAK of Bridgeport, Connecticut became the first UHF television station to operate on a regular daily schedule. In Britain, UHF television began with the launch of BBC TWO in 1964. BBC ONE and ITV soon followed, and colour was introduced on UHF only in 1967 - 1969. Today all British terrestrial television channels (both analog and digital) are on UHF. FCC. The Federal Communications Commission (FCC) is an independent United States government agency, created, directed, and empowered by Congressional statute. The FCC was established by the Communications Act of 1934 as the successor to the Federal Radio Commission and is charged with regulating all non-Federal Government use of the radio spectrum (including radio and television broadcasting), and all interstate telecommunications (wire, satellite and cable) as well as all international communications that originate or terminate in the United States. The FCC took over wire communication regulation from the Interstate Commerce Commission. The FCC's jurisdiction covers the 50 states, the District of Columbia, and U.S. possessions. Table of contents [showhide] 1 Organization 2 History 2.1 Report on Chain Broadcasting 2.2 Allocation of television stations 3 Regulatory powers 4 External links Organization The FCC is directed by five Commissioners appointed by the President and confirmed by the Senate for 5-year terms, except when filling an unexpired term. The President designates one of the Commissioners to serve as Chairperson. Only three Commissioners may be members of the same political party. None of them can have a financial interest in any Commission-related business. As the chief executive officer of the Commission, the Chairman delegates management and administrative responsibility to the Managing Director. The Commissioners supervise all FCC activities, delegating responsibilities to staff units and Bureaus. The current FCC Chairman is Michael Powell, son of Secretary of State Colin Powell. The other four current Commissioners are Kathleen Abernathy, Michael Copps, Kevin Martin, and Jonathon Adelstein. History Report on Chain Broadcasting In 1940 the Federal Communications Commission issued the "Report on Chain Broadcasting." The major point in the report was the breakup of NBC (See American Broadcasting Company), but there were two other important points. One was network option time, the culprit here being CBS. The report limited the amount of time during the day, and what times the networks may broadcast. Previously a network could demand any time it wanted from an affiliate. The second concerned artist bureaus. The networks served as both agents and employees of artists, which was a conflict of interest the report rectified. Allocation of television stations The Federal Communications Commission assigned television the Very High Frequency, VHF, band and gave TV channels 1-13. The 13 channels could only accommodate 400 stations nationwide and could not accommodate color in its state of technology in the early 1940s. So in 1944 CBS proposed to convert all of television to the Ultra High Frequency band, UHF, which would have solved the frequency and color problem. There was only one flaw in the CBS proposal, everyone else disagreed. In 1945 and 1946 the Federal Communications Commission held hearings on the CBS plan. RCA said CBS wouldn't have its color system ready for 5-10 years. CBS claimed it would be ready by the middle of 1947. CBS also gave a demonstration with a very high quality picture. In October of 1946 RCA presented a color system of inferior quality which was partially compatible with the present VHF black and white system. In March 1947 the Federal Communications Commission said CBS would not be ready, and ordered a contiuation of the present system. RCA promised its electric color system would be fully compatible within five years, in 1947 an adaptor was required to see color programs in black and white on a black and white set. In 1945 the Federal Communications Commission moved FM radio to a higher frequency. The Federal Communications Commission also allowed simulcasting of AM programs on FM stations. Regardless of these two disadvantages, CBS placed its bets on FM and gave up some TV applications. CBS had thought TV would be moved according to its plan and thus delayed. Unfortunately for CBS, FM was not a big moneymaker and TV was. That year the Federal Communications Commission set 150 miles as the minimum distance between TV stations on the same channel. There was interference between TV stations in 1948 so the Federal Communications Commission froze the processing of new applications for TV stations. On September 30, 1948, the day of the freeze, there were thirty-seven stations in twenty-two cities and eighty-six more were approved. Another three hundred and three applications were sent in and not approved. After all the approved stations were constructed, or weren't, the distribution was as follows: New York and Los Angeles, seven each; twenty-four other cities had two or more stations; most cities had only one including Houston, Kansas City, Milwaukee, Pittsburgh, and St. Louis. A total of just sixty-four cities had television during the freeze, and only one-hundred-eight stations were around. The freeze was for six months only, initially, and was just for studying interference problems. Because of the Korean Police Action, the freeze wound up being three and one half years. During the freeze, the interference problem was solved and the Federal Communications Commission made a decision on color TV and UHF. In October of 1950 the Federal Communications Commission made a pro-CBS color decision for the first time. The previous RCA decisions were made while Charles Denny was chairman. He later resigned in 1947 to become an RCA vice president and general consel. The decision approved CBS' mechanical spinning wheel color TV system, now able to be used on VHF, but still not compatible with black-and-white sets. RCA, with a new compatible system that was of comparable quality to CBS' according to TV critics, appealed all the way to the U.S. Supreme Court and lost in May, 1951, but its legal action did succeed in toppling CBS' color TV system, as during the legal battle, many more black-and-white television sets were sold. When CBS did finally start broadcasting using its color TV system in mid-1951, most American television viewers already had black-and-white receivers that were incompatible with CBS' color system. In October of 1951 CBS was ordered to stop work on color TV by the National Production Authority, supposedly to help the situation in Korea. The Authority was headed by a lieutenant of William Paley, the head of CBS. The Federal Communications Commission, under chairman Wayne Coy, issued its Sixth Report and Order in early 1952. It established seventy UHF channels (14-83) providing 1400 new potential stations. It also set aside 242 stations for education, most of them in the UHF band. The Commission also added 220 more VHF stations. VHF was reduced to 12 channels with channel 1 being given over to other uses and channels 2-12 being used solely for TV, this to reduced interference. This ended the freeze. In March of 1953 the House Committee on Interstate and Foreign Commerce held hearings on color TV. RCA and the National Television Systems Committee, NTSC, presented the RCA system. The NTSC consisted of all of the major television manufacturers at the time. On March 25, CBS president Frank Stanton conceded it would be "economically foolish" to pursue its color system and in effect CBS lost. December 17, 1953 the Federal Communications Commission reversed its decision on color and approved the RCA system. Ironically, color didn't sell well. In the first six months of 1954 only 8,000 sets were sold, there were 23,000,000 black and white sets. Westinghouse made a big, national push and sold thirty sets nationwide. The sets were big, expensive and didn't include UHF. The problem was that UHF stations would not be successful unless people had UHF tuners, and people would not voluntarily pay for UHF tuners unless there were UHF broadcasters. Of the 165 UHF stations that went on the air between 1952 and 1959, 55% went off the air. Of the UHF stations on the air, 75% were losing money. UHF's problems were the following:(1) technical inequality of UHF stations as compared with VHF stations; (2) intermixture of UHF and VHF stations in the same market and the millions of VHF only receivers; (3) the lack of confidence in the capabilities of and the need for UHF television. Suggestions of de-intermixture (making some cities VHF only and other cities UHF only) were not adopted, because most existing sets did not have UHF capability. Ultimately the FCC required all TV sets to have UHF tuners. However over four decades later, UHF is still considered inferior to VHF, despite cable television, and ratings on VHF channels are generally higher than on UHF channels. The allocation between VHF and UHF in the 1950s, and the lack of UHF tuners is entirely analogous to the dilemma facing digital television of high definition television fifty years later. Regulatory powers The Federal Communications Commission has one major regulatory weapon, revoking licenses, but short of that has little leverage over broadcast stations. It is reluctant to do this since it operates in a near vacuum of information on most of the tens of thousands of stations whose licences are renewed every three years. Broadcast licenses are supposed to be renewed if the station met the "public interest, convenience, or necessity." The Federal Communications Commission rarely checked except for some outstanding reason, burden of proof would be on the compaintant. Fewer than 1% of station renewals are not immediately granted, and only a small fraction of those are actually denied. Note: Similar authority for regulation of Federal Government telecommunications is vested in the National Telecommunications and Information Administration (NTIA). Source: from Federal Standard 1037C See also: concentration of media ownership, Fairness Doctrine, frequency assignment, open spectrum Magnetron. There was an urgent need during radar development in World War II for a microwave generator that worked in shorter wavelengths - around 10cm rather than 150cm - available from generators of the time. In 1940, at Birmingham University in the UK, John Randall and Harry Boot produced a working prototype of the cavity magnetron, and soon managed to increase its power output 100-fold. In August 1941, the first production model was shipped to the United States. FM. FM radio is a broadcast technology invented by Edwin Howard Armstrong that uses frequency modulation to provide high-fidelity broadcast radio sound. W1XOJ was the first FM radio station, granted a construction permit by the FCC in 1937. On January 5, 1940 FM radio was demonstrated to the FCC for the first time. FM radio was assigned the 42 to 50 MHz band of the spectrum in 1940. After World War II, the FCC moved FM to the frequencies between 88 and 106 MHz on June 27, 1945, making all prewar FM radios worthless. This action severely set back the public confidence in, and hence the development of, FM radio. On March 1, 1945 W47NV began operations in Nashville, Tennessee becoming the first modern commercial FM radio station. TV. Main Page | Recent changes | Edit this page | Page history Printable version | Disclaimers Not logged in Log in | Help Other languages: العربية | Български | Dansk | Deutsch | Ελληνικά | Español | Esperanto | Français | Kurdî | Lietuvių | Nederlands | 日本語 | Polski | Português | Română | Simple English | Suomi | Svenska | 中文 Television From Wikipedia, the free encyclopedia. Television is a telecommunication system for broadcasting and receiving moving pictures and sound over a distance. The term has come to refer to all the aspects of television programming and transmission as well. The televisual has become synonymous with postmodern culture. The word television is a hybrid word, coming from both Greek and Latin. "Tele-" is Greek for "far", while "-vision" is from the Latin "visio", meaning "vision" or "sight". Table of contents [showhide] 1 History 2 TV standards 3 TV aspect ratio 4 Aspect ratio incompatibility 5 New developments 6 TV sets 7 Advertising 8 US networks 9 European networks 10 Colloquial names 11 Related articles 11.1 External links 11.2 See also: 12 Further Reading 12.1 TV as social pathogen, opiate, mass mind control, etc. History Paul Gottlieb Nipkow proposed and patented the first electromechanical television system in 1884. A. A. Campbell Swinton wrote a letter to Nature on the 18th June 1908 describing his concept of electronic television using the cathode ray tube invented by Karl Ferdinand Braun. He lectured on the subject in 1911 and displayed circuit diagrams. A semi-mechanical analogue television system was first demonstrated in London in February 1924 by John Logie Baird and a moving picture by Baird on October 30, 1925. The first long distance public television broadcast was from Washington, DC to New York City and occurred on April 7, 1927. The image shown was of then Commerce Secretary Herbert Hoover. A fully electronic system was demonstrated by Philo Taylor Farnsworth in the autumn of 1927. The first analogue service was WGY, Schenectady, New York inaugurated on May 11, 1928. The first British Television Play, "The Man with the Flower in his Mouth", was transmitted in July 1930. CBS's New York City station began broadcasting the first regular seven days a week television schedule in the U. S. on July 21, 1931. The first broadcast included Mayor James J. Walker, Kate Smith, and George Gershwin. The first all-electronic television service was started in Los Angeles, CA by Don Lee Broadcasting. Their start date was December 23, 1931 on W6XAO - later KTSL. Los Angeles was the only major U. S. city that avoided the false start with mechanical television. In 1932 the BBC launched a service using Baird's 30-line system and these transmissions continued until 11th September 1935. On November 2, 1936 the BBC began broadcasting a dual-system service, alternating on a weekly basis between Marconi-EMI's high-resolution (405 lines per picture) service and Baird's improved 240-line standard from Alexandra Palace in London. Six months later, the corporation decided that Marconi-EMI's electronic picture gave the superior picture, and adopted that as their standard. This service is described as "the world's first regular high-definition public television service", since a regular television service had been broadcast earlier on a 180-line standard in Germany. The outbreak of the Second World War caused the service to be suspended. TV transmissions only resumed from Alexandra Palace in 1946. The first live transcontinental television broadcast took place in San Francisco, California from the Japanese Peace Treaty Conference on September 4, 1955. Programming is broadcast on television stations (sometimes called channels). At first, terrestrial broadcasting was the only way television could be distributed. Because bandwidth was limited, government regulation was normal. In the US, the Federal Communications Commission allowed stations to broadcast advertisements, but insisted on public service programming commitments as a requirement for a license. By contrast, the United Kingdom chose a different route, imposing a television licence fee (effectively a tax) to fund the BBC, which had public service as part of its Crown Charter. Development of cable and satellite means of distribution in the 1970s pushed businessmen to target channels towards a certain audience, and enabled the rise of subscription-based television channels, such as HBO and Sky. Practically every country in the world now has developed at least one television channel. Television has grown up all over the world, enabling every country to share aspects of their culture and society with others. TV standards See broadcast television systems. There many means of distributing television broadcasts, including both analogue and digital versions of: * Terrestrial television * Satellite television * Cable television * MMDS (Wireless cable) TV aspect ratio All of these early TV systems shared the same aspect ratio of 4:3 which was chosen to match the Academy Ratio used in cinema films at the time. This ratio was also square enough to be conveniently viewed on round Cathode Ray Tubes (CRTs), which were all that could be produced given the manufacturing technology of the time -- today's CRT technology allows the manufacture of much wider tubes. However, due to the negative heavy metal health effects associated with disposal of CRTs in landfills, and the space-saving attributes of flat screen technologies that lack the aspect ratio limitations of CRTs, CRTs are slowly becoming obsolete. In the 1950s movie studios moved towards wide screen aspect ratios such as Cinerama in an effort to distance their product from television. The switch to digital television systems has been used as an opportunity to change the standard television picture format from the old ratio of 4:3 (1.33:1) to an aspect ratio of 16:9 (1.78:1). This enables TV to get closer to the aspect ratio of modern wide-screen movies, which range from 1.85:1 to 2.35:1. The 16:9 format was first introduced on "widescreen" DVDs. DVD provides two methods for transporting wide-screen content, the better of which uses what is called anamorphic wide-screen format. This format is very similar to the technique used to fit a wide-screen movie frame inside a 1.33:1 35mm film frame. The image is squashed horizontally when recorded, then expanded again when played back. The U.S. ATSC HDTV system uses straight wide-screen format, no image squashing or expanding is used. There is no technical reason why the introduction of digital TV demands this aspect ratio change, however it has been decided to introduce these changes for marketing reasons. Aspect ratio incompatibility Displaying a wide-screen original image on a conventional aspect television screen presents a considerable problem since the image must be shown either: * in "letterbox" format, with black stripes at the top and bottom * with part of the image being cropped, usually the extreme left and right of the image being cut off (or in "pan and scan", parts selected by an operator) * with the image horizontally compressed A conventional aspect image on a wide screen television can be shown: * with black vertical bars to the left and right * with upper and lower portions of the image cut off * with the image horizontally distorted A common compromise is to shoot or create material at an aspect ratio of 14:9, and to lose some image at each side for 4:3 presentation, and some image at top and bottom for 16:9 presentation. Horizontal expansion has advantages in situations in which several people are watching the same set; it compensates for watching at an oblique angle. New developments * Digital television (DTV) * High Definition TV (HDTV) * Pay Per View * Web TV * programming on-demand. TV sets The earliest television sets were radios with the addition of a television device consisting of a neon tube with a mechanically spinning disk (the Nipkow disk, invented by Paul Gottlieb Nipkow) that produced a red postage-stamp size image . The first publicly broadcast electronic service was in Germany in March 1935. It had 180 lines of resolution and was only available in 22 public viewing rooms. One of the first major broadcasts involved the 1936 Berlin Olympics. The Germans had a 441 line system in the fall of 1937. (Source: Early Electronic TV) Television usage skyrocketed after World War II with war-related technological advances and additional disposable income. (1930s TV receivers cost the equivalent of $7000 today (2001) and had little available programming.) For many years different countries used different technical standards. France initially adopted the German 441 line standard but later upgraded to 819 lines, which gave the highest picture definition of any analogue TV system, approximately four times the resolution of the British 405 line system. Eventually the whole of Europe switched to the 625 line standard, once more following Germany's example. Meanwhile in North America the original 525 line standard was retained. A television with a VHF "rabbit ears" antenna and a loop UHF antenna. Television in its original and still most popular form involves sending images and sound over radio waves in the VHF and UHF bands, which are received by a receiver (a television set). In this sense, it is an extension of radio. Broadcast television requires an antenna (UK: aerial). This can be an external antenna mounted outside or smaller antennas mounted on or near the television. Typically this is an adjustable dipole antenna called "rabbit ears" for the VHF band and a small loop antenna for the UHF band. Color television became available on December 30, 1953, backed by the CBS network. The government approved the color broadcast system proposed by CBS, but when RCA came up with a system that made it possible to view color broadcasts in black and white on unmodified old black and white TV sets, CBS dropped their own proposal and used the new one. European colour television was developed somewhat later, in the 1960s, and was hindered by a continuing division on technical standards. The German PAL system was eventually adopted by West Germany, the UK, Australia, New Zealand, much of Africa, Asia and South America, and most West European countries except France. France produced its own SECAM standard, which was eventually adopted in much of Eastern Europe. Both systems broadcast on UHF frequencies and adopted a higher-definition 625 line system. Starting in the 1990s, modern television sets diverged into three different trends: * standalone TV sets; * integrated systems with DVD players and/or VHS VCR capabilities built into the TV set itself (mostly for small size TVs with up to 17" screen, the main idea is to have a complete portable system); * component systems with separate big screen video monitor, tuner, audio system which the owner connects the pieces together as a high-end home theater system. This approach appeals to videophiles that prefer components that can be upgraded separately. There are many kinds of video monitors used in modern TV sets. The most common are direct view CRTs for up to 40" (4:3) and 46" (16:9) diagonally. Most big screen TVs (up to over 100") use projection technology. Three types of projection systems are used in projection TVs: CRT based, LCD based, and reflective imaging chip based. Modern advances have brought flat screens to TV that use active matrix LCD or plasma display technology. Flat panel displays are as little as 4" thick and can be hung on a wall like a picture. They are extremely attractive and space-saving but they remain expensive. Nowadays some TVs include a port to connect peripherals to it or to connect the set to an A/V home network (HAVI), like LG RZ-17LZ10 that includes a USB port, where one can connect a mouse, keyboard and so on (for WebTV, now branded MSN TV). Even for simple video, there are five standard ways to connect a device. These are as follows: * Component Video- three separate connectors, with one brightness channel and two color channels (hue and saturation), and is usually referred to as Y, B-Y, R-Y, or Y Pr Pb. This provides for high quality pictures and is usually used inside professional studios. However, it is being used more in home theater for DVDs and high end sources. Audio is not carried on this cable. * SCART - A large 21 pin connector that may carry Composite video, S-Video or, for better quality, separate red, green and blue (RGB) signals and two-channel sound, along with a number of control signals. This system is standard in Europe but rarely found elsewhere. * S-Video - two separate channels, one carrying brightness, the other carrying color. Also referred to as Y/C video. Provides most of the benefit of component video, with slightly less color fidelity. Use started in the 1980s for S-VHS, Hi-8, and early DVD players to relay high quality video. Audio is not carried on this cable. * Composite video - The most common form of connecting external devices, putting all the video information into one stream. Most televisions provide this option with a yellow RCA jack. Audio is not carried on this cable. * Coaxial or RF (coaxial cable) - All audio channels and picture components are transmitted through one wire and modulated on a radio frequency. Most TVs manufactured during the past 15-20 years accept coaxial connection, and the video is typically "tuned" on channel 3 or 4. This is the type of cable usually used for cable television. Advertising From the earliest days of the medium, television has been used as a vehicle for advertising. Since their inception in the USA in the late 1940s, TV commercials have become far and away the most effective, most pervasive, and most popular method of selling products of all sorts. US advertising rates are determined primarily by Nielsen Ratings US networks In the US, the three original commercial television networks (ABC, CBS, and NBC) provide prime-time programs for their affiliate stations to air from 8pm-11pm Monday-Saturday and 7pm-11pm on Sunday. (7pm to 10pm, 6pm to 10pm respectively in the Central and Mountain time zones). Most stations procure other programming, often syndicated, off prime time. The FOX Network does not provide programming for the last hour of prime time; as a result, many FOX affiliates air a local news program at that time. Three newer broadcasting networks, The WB, PAX, and UPN, also do not provide the same amount of network programming as so-called traditional networks. European networks In much of Europe television broadcasting has historically been state dominated, rather than commercially organised, although commercial stations have grown in number recently. In the United Kingdom, the major state broadcaster is the BBC (British Broadcasting Corporation), commercial broadcasters include ITV (Independent Television), Channel 4 and Channel 5, as well as the satellite broadcaster British Sky Broadcasting. Other leading European networks include RAI (Italy), Télévision Française (France), ARD (Germany), RTÉ (Ireland), and satellite broadcaster RTL (Radio Télévision Luxembourg). Euronews is a pan-European news station, broadcasting both by satellite and terrestrially (timesharing on State TV networks) to most of the continent. Broadcast in several languages (English, French, German, Spanish, Russian, etc.) it draws on contributions from State broadcasters and the ITN news network. Colloquial names * Telly * The Tube/Boob Tube * The Goggle Box * The Cyclops * Idiot Box Related articles * List of 'years in television' * Lists of television channels * List of television programs * List of television commercials * List of television personalities * List of television series o List of Canadian television series o List of US television series o List of UK television series * Animation and Animated series * Nielsen Ratings * Home appliances * Reality television * Television network * Video * Voyager Golden Record * V-chip * Wasteland Speech * DVB * Television in the United States External links * "Television History" * Early Television Foundation and Museum * Television History site from France * TV Dawn * British TV History Links * UK Television Programmes * aus.tv.history - Australian Television History * TelevisionAU - Australian Television History * Federation Without Television See also: Charles Francis Jenkins Federation Without Television Further Reading TV as social pathogen, opiate, mass mind control, etc. * Jerry Mander Four Arguments for the Elimination of Television * Marie Winn The Plug-in Drug * Neil Postman Amusing Ourselves to Death * Terence McKenna Food of the Gods * Joyce Nelson The Perfect Machine * Andrew Bushard Federation Without Television: the Blossoming Movement Alternate use of the term: Television (band) Television camera Edit this page | Discuss this page | Page history | What links here | Related changes Other languages: العربية | Български | Dansk | Deutsch | Ελληνικά | Español | Esperanto | Français | Kurdî | Lietuvių | Nederlands | 日本語 | Polski | Português | Română | Simple English | Suomi | Svenska | 中文 Main Page | About Wikipedia | Recent changes | This page was last modified 20:30, 17 Apr 2004. All text is available under the terms of the GNU Free Documentation License (see Copyrights for details). Disclaimers. Wikipedia is powered by MediaWiki, an open source wiki engine. Main Page Recent changes Random page Current events Community Portal Edit this page Discuss this page Page history What links here Related changes Special pages Contact us Donations Renewable energy. From Wikipedia, the free encyclopedia. Renewable energy is energy from a source which can be managed so that it is not subject to depletion in a human timescale . Sources include the sun's rays, wind, waves, rivers, tides, biomass, and geothermal. Renewable energy does not include energy sources which are dependent upon limited resources, such as fossil fuels and nuclear fission power. Table of contents [showhide] 1 General Information 2 Pros and cons of renewable energy 3 Renewable energy history 3.1 Wood 3.2 Animal Traction 3.3 Water Power 3.4 Wind Power 3.5 Solar power 3.6 The renewable energy movement 4 Renewable Energy Today 5 Modern sources of renewable energy 5.1 Smaller-scale sources 5.2 Renewables as solar energy 5.3 Solar energy per se 5.3.1 Solar electrical energy 5.3.2 System problems with solar electric 5.3.3 Solar thermal electric energy 5.3.4 Solar thermal energy 5.3.4.1 Solar water heating 5.3.4.2 Solar heat pumps 5.3.4.3 Solar ovens 5.4 Wind Energy 5.5 Geothermal Energy 5.6 Water power 5.6.1 Electrokinetic energy 5.6.2 Hydroelectric Energy 5.6.3 Tidal power 5.6.4 Tidal stream power 5.6.5 Wave power 5.6.6 OTEC 5.7 Biomass 5.7.1 Liquid biofuel 5.7.2 Solid biomass 5.7.3 Biogas 6 Renewable energy storage systems 6.1 Hydrogen fuel cells 6.2 Other renewable energy storage systems 6.2.1 Pumped water storage 6.2.2 Battery storage 6.2.3 Electrical grid storage 7 Renewable energy use by nation 8 Renewable energy controversies 8.1 The funding dilemma 8.2 Centralization versus decentralization 8.3 The nuclear "renewable" claim 9 References General Information Most renewable forms of energy, other than geothermal, are in fact stored solar energy. Water power and wind power represent very short-term solar storage, while biomass represents slightly longer-term storage, but still on a very human time-scale, and so renewable within that human time-scale. Fossil fuels, on the other hand, while still stored solar energy, have taken millions of years to form, and so do not meet the definition of renewable. Renewable energy resources may be used directly as energy sources, or used to create other forms of energy for use. Examples of direct use are solar ovens, geothermal heat pumps, and mechanical windmills. Examples of indirect use in creating other energy sources are electricity generation through wind generators or photovoltaic cells, or production of fuels such as ethanol from biomass (see alcohol as a fuel). Pros and cons of renewable energy Renewable energy sources are fundamentally different from fossil fuel or nuclear power plants because of their widespread occurrence and abundance - the sun will 'power' these 'powerplants' (meaning sunlight, the wind, flowing water, etc.) for the next 4 billion years. Some renewable sources do not emit any additional carbon dioxide and do not introduce any new risks such as nuclear waste. In fact, one renewable energy source, wood, actively sequesters carbon dioxide while growing. A visible disadvantage of renewables is their visual impact on local environments. Some people dislike the aesthetics of wind turbines or bring up nature conservation issues when it comes to large solar-electric installations outside of cities. Some people try to utilize these renewable technologies in an efficient and aesthetically pleasing way: fixed solar collectors can double as noise barriers along highways, roof-tops are available already and could even be replaced totally by solar collectors, etc. Some renewable energy capture systems entail unique environmental problems. For instance, wind turbines can be hazardous to flying birds, while hydroelectric dams can create barriers for migrating fish ? a serious problem in the Pacific Northwest that has decimated the numbers of many salmon populations. Another inherent difficulty with renewables is their variable and diffuse nature (with the exception being geothermal energy, which is however only accessible where the Earth's crust is thin, such as near hot springs and natural geysers). Since renewable energy sources are providing relatively low-intensity energy, the new kinds of "power plants" needed to convert the sources into usable energy need to be distributed over large areas. To make the phrases 'low-intensity' and 'large area' easier to understand, note that in order to produce 1000 kWh of electricity per month (a typical per-month-per-capita consumption of electricity in Western countries), a home owner in cloudy Europe needs to use ten square meters of solar panels. Systematic electrical generation requires reliable overlapping sources or some means of storage on a reasonable scale (pumped-storage hydro systems, batteries, future hydrogen fuel cells, etc.). So, because of currently-expensive energy storage systems, a small stand-alone system is only economic in rare cases. If renewable and distributed generation were to become widespread, electric power transmission and electricity distribution systems would no longer be the main distributors of electrical energy but would operate to balance the electricity needs of local communities. Those with surplus energy would sell to areas needing "top ups". Renewable energy history The original energy source for all human activity was the sun via growing plants. Solar energy's main human application throughout most of history has thus been in agriculture and forestry, via photosynthesis. Wood Firewood was the earliest manipulated energy source in human history, being used as a thermal energy source through burning, and it is still important in this context today. Burning wood was important for both cooking and providing heat, enabling human presence in cold climates. Special types of wood cooking, food dehydration and smoke curing, also enabled human societies to safely store perishable foodstuffs through the year. Eventually, it was discovered that partial combustion in the relative absence of oxygen could produce charcoal, which provided a hotter and more compact and portable energy source. However, this was not a more efficient energy source, because it required a large input in wood to create the charcoal. Animal Traction Motive power for vehicles and mechanical devices was originally produced through animal traction. Animals such as horses and oxen not only provided transportation but also powered mills. Animals are still extensively in use in many parts of the world for these purposes. Water Power Animal power for mills was eventually supplanted by water power, the power of falling water in rivers, wherever it was exploitable. Direct use of water power for mechanical purposes is today fairly uncommon, but still in use. Originally, water power through (hydroelectricity) was the most important source of electrical generation throughout society, and is still an important source today. Throughout most of the history of human technology, hydroelectricity has been the only renewable source of electricity generation significantly tapped for the generation of electricity. Wind Power Wind power has been used for several hundred years. It was originally used via large sail-blade windmills with slow-moving blades, such as those seen in the Netherlands and mentioned in Don Quixote. These large mills usually either pumped water or powered small mills. Newer windmills featured smaller, faster-turning, more compact units with more blades, such as those seen throughout the Great Plains. These were mostly used for pumping water from wells. Recent years have seen the rapid development of wind generation farms by mainstream power companies, using a new generation of large, high wind turbines with two or three immense and relatively slow-moving blades. Solar power Solar power as a direct energy source has been not been captured by mechanical systems until recent human history, but was captured as an energy source through architecture in certain societies for many centuries. Not until the twentieth century was direct solar input extensively explored via more carefully planned architecture (passive solar) or via heat capture in mechanical systems (active solar) or electrical conversion (photovoltaic). Increasingly today the sun is harnessed for heat and electricity. The renewable energy movement Renewable energy as an issue was virtually unheard-of before the middle of the twentieth century. There were experimentations with passive solar energy, including daylighting, in the early part of the twentieth century, but little beyond what had actually been practiced as a matter of course in some locales for hundreds of years. The renewable energy movement gained awareness, credence and strength with the great burgeoning of interest in environmental affairs in the mid-1900s, which in turn was largely due to Rachel Carson's ?'Silent Spring'?. The first US politician to focus significantly on solar energy was Jimmy Carter, in response to the long term consequences of the 1973 energy crisis. No president since has paid much attention to renewable energy. Renewable Energy Today Around 80% of energy requirements are focused around heating or cooling buildings and powering the vehicles that ensure mobility (cars, trains, airplanes). This is the core of society's energy requirements. However, most uses of renewable power focus on electricity generation. Geothermal heat pumps (also called ground-source heat pumps) are a means of extracting heat in the winter or cold in the summer from the earth to heat or cool buildings. Modern sources of renewable energy There are several types of renewable energy, including the following: * Solar power. * Wind power. * Geothermal energy. * Electrokinetic energy. * Hydroelectricity. * Biomatter, including Biogas Energy. Smaller-scale sources Of course there are some smaller-scale applications as well: * Piezo electric crystals embedded in the sole of a shoe can yield a small amount of energy with each step. Vibration from engines can stimulate piezo electric crystals. * Some watches are already powered by movement of the arm. * Special antennae can collect energy from stray radiowaves or even light (EM radiation). Renewables as solar energy Most renewable energy sources can trace their roots to solar energy, with the exception of geothermal and tidal power. For example, wind is caused by the sun heating the earth unevenly. Hot air is less dense, so it rises, causing cooler air to move in to replace it. Hydroelectric power can be ultimately traced to the sun too. When the sun evaporates water in the ocean, the vapor forms clouds which later fall on mountains as rain which is routed through turbines to generate electricity. The transformation goes from solar energy to potential energy to kinetic energy to electric energy. Solar energy per se Since most renewable energy is "Solar Energy" this term is slightly confusing and used in two different ways: firstly as a synonym for "renewable energies" as a whole (like in the political slogan "Solar not nuclear") and secondly for the energy that is directly collected from solar radiation. In this section it is used in the latter category. There are actually two separate approaches to solar energy, termed active solar and passive solar. Solar electrical energy For electricity generation, ground-based solar power has serious limitations because of its diffuse and intermittent nature. First, ground-based solar input is interrupted by night and by cloud cover, which means that solar electric generation inevitably has a low capacity factor, typically less than 20%. Also, there is a low intensity of incoming radiation, and converting this to high grade electricity is still relatively inefficient (14% - 18%), though increased efficiency or lower production costs have been the subject of much research over several decades. Two methods of converting the Sun's radiant energy to electricity are the focus of attention. The better-known method uses sunlight acting on photovoltaic (PV) cells to produce electricity. This has many applications in satellites, small devices and lights, grid-free applications, earthbound signaling and communication equipment, such as remote area telecommunications equipment. Sales of solar PV modules are increasing strongly as their efficiency increases and price diminishes. But the high cost per unit of electricity still rules out most uses. Several experimental PV power plants mostly of 300 - 500 kW capacity are connected to electricity grids in Europe and the USA. Japan has 150 MWe installed. A large solar PV plant was planned for Crete. In 2001 the world total for PV electricity was less than 1000 MWe with Japan as the world's leading producer. Research continues into ways to make the actual solar collecting cells less expensive and more efficient. Other major research is investigating economic ways to store the energy which is collected from the Sun's rays during the day. Alternatively, many individuals have installed small-scale PV arrays for domestic consumption. Some, particularly in isolated areas, are totally disconnected from the main power grid, and rely on a surplus of generation capacity combined with batteries and/or a fossil fuel generator to cover periods when the cells are not operating. Others in more settled areas remain connected to the grid, using the grid to obtain electricity when solar cells are not providing power, and selling their surplus back to the grid. This works reasonably well in many climates, as the peak time for energy consumption is on hot, sunny days where air conditioners are running and solar cells produce their maximum power output. Many U.S. states have passed "net metering" laws, requiring electrical utilities to buy the locally-generated electricity for price comparable to that sold to the household. Photovoltaic generation is still considerably more expensive for the consumer than grid electricity unless the usage site is sufficiently isolated, in which case photovoltaics become the less expensive. System problems with solar electric Frequently renewable electricity sources are disadvantaged by regulation of the electricity supply industry which favors 'traditional' large-scale generators over smaller-scale and more distributed generating sources. If renewable and distributed generation were to become widespread, electric power transmission and electricity distribution systems would no longer be the main distributors of electrical energy but would operate to balance the electricity needs of local communities. Those with surplus energy would sell to areas needing "top ups". Some Governments and regulators are moving to address this, though much remains to be done. One potential solution is the increased use of active management of electricity transmission and distribution networks. Solar thermal electric energy The second method for utilizing solar energy is solar thermal. A solar thermal power plant has a system of mirrors to concentrate the sunlight on to an absorber, the resulting heat then being used to drive turbines. The concentrator is usually a long parabolic mirror trough oriented north-south, which tilts, tracking the Sun's path through the day. A black absorber tube is located at the focal point and converts the solar radiation to heat (about 400°C) which is transferred into a fluid such as synthetic oil. The oil can be used to heat buildings or water, or it can be used to drive a conventional turbine and generator. Several such installations in modules of 80 MW are now operating. Each module requires about 50 hectares of land and needs very precise engineering and control. These plants are supplemented by a gas-fired boiler which ensures full-time energy output. The gas generates about a quarter of the overall power output and keeps the system warm overnight. Over 800 MWe capacity worldwide has supplied about 80% of the total solar electricity to the mid-1990s. One proposal for a solar electrical plant is the solar tower, in which a large area of land would be covered by a greenhouse made of something as simple as transparent foil, with a tall lightweight tower in the centre, which could also be composed largely of foil. The heated air would rush to and up the centre tower, spinning a turbine. A system of water pipes placed throughout the greenhouse would allow the capture of excess thermal energy, to be released throughout the night and thus providing 24-hour power production. A 200 MWe tower is proposed near Mildura, Australia. Solar thermal energy Solar energy need not be converted to electricity for use. Many of the world's energy needs are simply for heat ? space heating, water heating, process water heating, oven heating, and so forth. The main role of solar energy in the future may be that of direct heating. Much of society's energy need is for heat below 60°C (140°F) - e.g. in hot water systems. A lot more, particularly in industry, is for heat in the range 60 - 110°C. Together these may account for a significant proportion of primary energy use in industrialized nations. The first need can readily be supplied by solar power much of the time in some places, and the second application commercially is probably not far off. Such uses will diminish to some extent both the demand for electricity and the consumption of fossil fuels, particularly if coupled with energy conservation measures such as insulation. Solar water heating Domestic solar hot water systems were once common in Florida until they were displaced by highly-advertised natural gas. Such systems are today common in the hotter areas of Australia, and simply consist of a network of dark-colored pipes running beneath a window of heat-trapping glass. They typically have a backup electric or gas heating unit for cloudy days. Such systems can actually be justified purely on economic grounds, particularly in some remoter areas of Australia where electricity is expensive. Solar heat pumps With adequate insulation, heat pumps utilizing the conventional refrigeration cycle can be used to warm and cool buildings, with very little energy input other than energy needed to run a compressor. Eventually, up to ten percent of the total primary energy need in industrialized countries may be supplied by direct solar thermal techniques, and to some extent this will substitute for base-load electrical energy. Solar ovens Large scale solar thermal powerplants, as mentioned before, can be used to heat buildings, but on a smaller scale solar ovens can be used on sunny days. Such an oven or solar furnace uses mirrors or a large lens to focus the Sun's rays onto a baking tray or black pot which heats up as it would in a standard oven. Wind Energy Wind turbines have been used for household electricity generation in conjunction with battery storage over many decades in remote areas. Generator units of more than 1 MWe are now functioning in several countries. The power output is a function of the cube of the wind speed, so such turbines require a wind in the range 3 to 25 m/s (11 - 90 km/h), and in practice relatively few land areas have significant prevailing winds. Like solar, wind power requires alternative power sources to cope with calmer periods. There are now many thousands of wind turbines operating in various parts of the world, with utility companies having a total capacity of over 39,000 MWe of which Europe accounts for 75% (ultimo 2003). Additional windpower is generated by private windmills both on-grid and off-grid. Germany is the leading producer of wind generated electricity with over 14,600 MWe in 2003. In 2003 the U.S.A. produced over 6,300 Mwe of wind energy, second only to Germany. New wind farms and offshore wind parks are being planned and built all over the world. This has been the most rapidly-growing means of electricity generation at the turn of the 21st century and provides a complement to large-scale base-load power stations. Denmark generates over 10% of its electricity with windturbines, whereas windturbines account for 0.4% of the total electricity production on a global scale (ultimo 2002). The most economical and practical size of commercial wind turbines seems to be around 600 kWe to 1 MWe, grouped into large wind farms. Most turbines operate at about 25% load factor over the course of a year, but some reach 35%. Geothermal Energy Where hot underground steam or water can be tapped and brought to the surface it may be used to generate electricity. Such geothermal power sources have potential in certain parts of the world such as New Zealand, United States, Philippines and Italy. The two most prominent areas for this in the United States are in the Yellowstone basin and in northern California. Iceland produced 170 MWe geothermal power and heated 86% of all houses in the year 2000. Some 8000 MWe of capacity is operating over all. There are also prospects in certain other areas for pumping water underground to very hot regions of the Earth's crust and using the steam thus produced for electricity generation. An Australian startup company, Geodynamics, proposes to build a commercial plant in the Cooper Basin region of South Australia using this technology by 2004. Water power Energy inherent in water can be harnessed and used, in the forms of kinetic energy or temperature differences. Electrokinetic energy This type of energy harnesses what happens to water when it is pumped through tiny channels. See electrokinetics (water). Hydroelectric Energy Hydroelectric energy produces essentially no carbon dioxide, in contrast to burning fossil fuels or gas, and so is not a significant contributor to global warming. Hydroelectric power from potential energy of rivers, now supplies about 715,000 MWe or 19% of world electricity. Apart from a few countries with an abundance of it, hydro capacity is normally applied to peak-load demand, because it is so readily stopped and started. It is not a major option for the future in the developed countries because most major sites in these countries having potential for harnessing gravity in this way are either being exploited already or are unavailable for other reasons such as environmental considerations. The chief advantage of hydrosystems is their capacity to handle seasonal (as well as daily) high peak loads. In practice the utilization of stored water is sometimes complicated by demands for irrigation which may occur out of phase with peak electrical demands. Tidal power Harnessing the tides in a bay or estuary has been achieved in France (since 1966) and Russia, and could be achieved in certain other areas where there is a large tidal range. The trapped water can be used to turn turbines as it is released through the tidal barrage in either direction. Worldwide this technology appears to have little potential, largely due to environmental constraints. Tidal stream power A relatively new technology development, tidal stream generators draw energy from underwater currents in much the same way that wind generators are powered by the wind. The much higher density of water means that there is the potential for a single generator to provide significant levels of power. Tidal stream technology is at the very early stages of development though and will require significantly more research before it becomes a significant contributor to electrical generation needs. Wave power Harnessing power from wave motion is a possibility which might yield much more energy than tides. The feasibility of this has been investigated, particularly in the UK. Generators either coupled to floating devices or turned by air displaced by waves in a hollow concrete structure would produce electricity for delivery to shore. Numerous practical problems have frustrated progress. OTEC Ocean Thermal Energy Conversion is a relatively unproven technology, though it was first used by the French engineer Jacques Arsene d'Arsonval in 1881. The difference in temperature between water near the surface and deeper water can be as much as 20°C. The warm water is used to make a liquid such as ammonia evaporate, causing it to expand. The expanding gas forces its way through turbines, after which it is condensed using the colder water and the cycle can begin again. Biomass Biomass, also known as biomatter, can be used directly as fuel or to produce liquid biofuel. Agriculturally produced biomass fuels, such as biodiesel, ethanol and bagasse (a byproduct of sugar cane cultivation) are burned in internal combustion engines or boilers. Liquid biofuel Liquid biofuel is usually bioalcohols -like methanol and ethanol- or biodiesel. Biodiesel can be used in modern diesel vehicles with little or no modification and can be obtained from waste and crude vegetable and animal oil and fats (lipids). In some areas corn, sugarbeets, cane and grasses are grown specifically to produce ethanol (also known as alcohol) a liquid which can be used in internal combustion engines and fuel cells. Solid biomass Direct use is usually in the form of combustible solids, either firewood or combustible field crops. Field crops may be grown specifically for combustion or may be used for other purposes, and the processed plant waste then used for combustion. Most sorts of biomatter, including dried manure, can actually be burnt to heat water and to drive turbines. Plants partly use photosynthesis to store solar energy, water and CO2. Sugar cane residue, wheat chaff, corn cobs and other plant matter can be, and is, burnt quite successfully. The process releases no net CO2. Biogas Animal feces (manure) release methane under the influence of anaerobic bacteria which can also be used to generate electricity. See biogas. Renewable energy storage systems One of the great problems with renewable energy, as mentioned above, is transporting it in time or space. Since most renewable energy sources are periodic, storage for off-generation times is important, and storage for powering transportation is also a critical issue. Hydrogen fuel cells Hydrogen as a fuel has been touted lately as a solution in our energy dilemmas. However, the idea that hydrogen is a renewable energy source is a misunderstanding. Hydrogen is not an energy source, but a portable energy storage method, because it must be manufactured by other energy sources in order to be used. However, as a storage medium, it may be a significant factor in using renewable energies. It is widely seen as a possible fuel for hydrogen cars, if certain problems can be overcome economically. It may be used in conventional internal combustion engines, or in fuel cells which convert chemical energy directly to electricity without flames, in the same way the human body burns fuel. Making hydrogen requires either reforming natural gas (methane) with steam, or, for a renewable and more ecologic source, the electrolysis of water into hydrogen and oxygen. The former process has carbon dioxide as a by-product, which exacerbates (or at least does not improve) greenhouse gas emissions relative to present technology. With electrolysis, the greenhouse burden depends on the source of the power, and both intermittent renewables and nuclear energy are considered here. With intermittent renewables such as solar and wind, matching the output to grid demand is very difficult, and beyond about 20% of the total supply, apparently impossible. But if these sources are used for electricity to make hydrogen, then they can be utilized fully whenever they are available, opportunistically. Broadly speaking it does not matter when they cut in or out, the hydrogen is simply stored and used as required. Nuclear advocates note that using nuclear power to manufacture hydrogen would help solve plant inefficiencies. Here the plant would be run continuously at full capacity, with perhaps all the output being supplied to the grid in peak periods and any not needed to meet civil demand being used to make hydrogen at other times. This would mean far better efficiency for the nuclear power plants. About 50 kWh (1/144,000 J) is required to produce a kilogram of hydrogen by electrolysis, so the cost of the electricity clearly is crucial. Other renewable energy storage systems Sun, wind, tides and waves cannot be controlled to provide directly either reliably continuous base-load power, because of their periodic natures, or peak-load power when it is needed. In practical terms, without proper energy storage methods these sources are therefore limited to some twenty percent of the capacity of an electricity grid, and cannot directly be applied as economic substitutes for fossil fuels or nuclear power, however important they may become in particular areas with favorable conditions. If there were some way that large amounts of electricity from intermittent producers such as solar and wind could be stored efficiently, the contribution of these technologies to supplying base-load energy demand would be much greater. Pumped water storage Already in some places pumped storage is used to even out the daily generating load by pumping water to a high storage dam during off-peak hours and weekends, using the excess base-load capacity from coal or nuclear sources. During peak hours this water can be used for hydroelectric generation. However, relatively few places have the scope for pumped storage dams close to where the power is needed. Battery storage Many "off-the-grid" domestic systems rely on battery storage, but means of storing large amounts of electricity as such in giant batteries or by other means have not yet been put to general use. Batteries are generally expensive, have maintenance problems, and have limited lifespans. One possible technology for large-scale storage exists: large-scale flow batteries. Electrical grid storage One of the most important storage methods advocated by the renewable energy community is to rethink the whole way that we look at power supply, in its 24-hour, 7-day cycle, using peak load equipment simply to meet the daily peaks. Solar electric generation is a daylight process, whereas most homes have their peak energy requirements at night. Domestic solar generation can thus feed electricity into the grid during grid peaking times during the day, and domestic systems can then draw power from the grid during the night when overall grid loads are down. This results in using the power grid as a domestic energy storage system, and relies on ?'net metering'?, where electrical companies can only charge for the amount of electricity used in the home that is in excess of the electricity generated and fed back into the grid. Many states now have net metering laws. Today's peak-load equipment could also be used to some extent to provide infill capacity in a system relying heavily on renewables. The peak capacity would complement large-scale solar thermal and wind generation, providing power when they were unable to. Improved ability to predict the intermittent availability of wind enables better use of this resource. In Germany it is now possible to predict wind generation output with 90% certainty 24 hours ahead. This means that it is possible to deploy other plants more effectively so that the economic value of that wind contribution is greatly increased. Renewable energy use by nation Iceland is a world leader in renewable energy due to its abundant hydro- and geothermal energy sources. Over 99% of the country's electricity is from renewable sources and most of its urban household heating is geothermal. Israel is also notable as much of its household hot water is heated by solar means. These countries' successes are at least partly based on their geographical advantages. Leading countries by renewable electricity production, (2000) Hydro Geothermal Wind PV Solar 1. Canada U.S. Germany Japan 2. U.S. Philippines U.S. Germany 3. Brazil Italy Spain U.S. 4. China Mexico Denmark India 5. Russia Indonesia India Australia Share of the total power consumption in EU-countries that are renewable. < td> 5,73 < td> 7,54 < td> 5,19 1985 1990 1991 1992 1993 1994 EUR-15 5,61 5,13 4,92 5,16 5,28 5,37 Belgium 1,04 1,01 1,01 0,96 0,84 0,80 Denmark 4,48 6,32 6,38 6,80 7,03 6,49 Germany 2,09 2,06 1,61 1,73 1,75 1,79 Greece 8,77 7,14 7,63 7,13 7,33 7,16 Spain 8,83 6,70 6,56 6,49 6,50 France 7,24 6,34 6,75 7,32 7,98 Ireland 1,75 1,65 1,68 1,59 1,59 1,63 Italy 5,60 4,64 5,16 5,34 5,50 Luxembourg 1,28 1,21 1,14 1,26 1,21 1,34 The Netherlands 1,36 1,35 1,35 1,37 1,38 1,43 Austria 24,23 22,81 20,99 23,39 24,23 23,71 Portugal 25,07 17,45 17,03 13,88 15,98 16,61 Finland 18,29 16,71 17,02 18,10 18,48 18,28 Sweden 24,36 24,86 22,98 26,53 27,31 24,04 United Kingdom 0,47 0,49 0,48 0,56 0,54 0,65 Table from [1] Renewable energy controversies As with anything, even renewable energy generates controversies. The funding dilemma Research and development in renewable energies has been severely hampered by only receiving a tiny fraction of energy R&D budgets, with conventional energy sources getting the lion's share. Centralization versus decentralization Frequently renewable electricity sources will be disadvantaged by regulation of the electricity supply industry which favors 'traditional' large-scale generators over smaller-scale and more distributed generating sources. If renewable and distributed generation were to become widespread, electric power transmission and electricity distribution systems would no longer be the main distributors of electrical energy but would operate to balance the electricity needs of local communities. Those with surplus energy would sell to areas needing "top ups". Some Governments and regulators are moving to address this, though much remains to be done. One potential solution is the increased use of active management of electricity transmission and distribution networks. The nuclear "renewable" claim Some nuclear advocates claim that nuclear energy should be regarded as renewable energy. Arguments they put forward include: * The view that nuclear energy does not contribute to global warming (although evaporative cooling has a minor effect by introducing additional water vapor into the atmosphere, along with the heat production of the process). * Fast breeder reactors can produce more fuel than they consume. * The view that uranium and thorium, being radioactive, are not theoretically long-term resources. * The view that nuclear waste, since it will eventually become less radioactive than the original ore bodies, is not theoretically a long-term problem. This viewpoint is strongly rejected by most renewable energy advocates. The fact that nuclear power uses a depleting resource (uranium or thorium), that the half-life of uranium 238 is 4.5 billion years, and that the decay of the waste to a safe level may take three thousand years or longer (depending on the technology used) means that it cannot be included in such a classification. Breeder reactors consume uranium or thorium to produce fissile fuel, so this particular argument is a simple misunderstanding of the basic processes involved. Similar arguments can also be applied against proposed nuclear fusion power stations using deuterium and tritium, the latter bred from lithium, as fuel. References * U.S. Energy Information Administration provides lots of statistics and information on the industry. * Boyle, G. (ed.), Renewable Energy: Power for a Sustainable Future. Open University, UK, 1996. Solar power. From Wikipedia, the free encyclopedia. Solar power has become of increasing interest as other finite power sources such as fossil fuels and hydroelectric power become both more scarce and expensive (in both fiscal and environmental terms). As the earth orbits the sun it receives 1,410 W / m2 as measured upon a surface kept normal (at a right angle) to the sun. Of this approximately 19% of the energy is absorbed by the atmosphere, while clouds reflect 35% of the total energy upon average. After passing through the Earth's atmosphere most of the sun's energy is in the form of visible and ultraviolet light. Plant's use solar energy to create chemical energy through photosynthesis. We use this energy when we burn wood or fossil fuels. There have been experiments to create fuel by absorbing sunlight in a chemical reaction in a way similar to photosynthesis without using living organisms. Most solar energy used today is converted into heat or electricity. Types of solar power Methods of solar energy have been classified using the terms direct, indirect, passive and active. Direct solar energy involves only one transformation into a usable form. Examples: * Sunlight hits a photovoltaic cell creating electricity. (Photovoltaics are classified as direct despite the fact that the electricity is usually converted to another form of energy such as light or mechanical energy before becoming useful.) * Sunlight hits a dark surface and the surface warms when the light is converted to heat by interacting with matter. The heat is used to heat a room or water. Indirect solar energy involves more than one transformation to reach a usable form. Example: * systems to close insulating shutters or move shades. Passive solar systems are considered direct systems although sometimes they involve convective flow which technically is a conversion of heat into mechanical energy. Active solar energy refers to systems that use electrical, mechanical or chemical mechanisms to increase the effectiveness of the collection system. Indirect collection systems are almost always active systems. Solar design is the use of architectural features to replace the use of electricity and fossil fuels with the use of solar energy and decrease the energy needed in a home or building with insulation and efficient lighting and appliances. Architectural features used in solar design: * South facing windows with insulated glazing that has high ultraviolet transmittance. * Thermal masses. * Insulating shutters for windows to be closed at night and on overcast days. * Fixed awnings positioned to create shade in the summer and exposure to the sun in the winter. * Movable awnings to be repositioned seasonally. * A well insulated and sealed building envelope. * Exhaust fans in high humidity areas. * Passive or active warm air solar panels. * Passive or active Trombe walls. * Active solar panels using water or antifreeze solutions. * Passive solar panels for preheating potable water. * Photovoltaic systems to provide electricity. * Windmills to provide electricity. Solar hot water systems are quite common in some countries where a small flat panel collector is mounted on the roof and able to meet most of a household's hot water needs. Cheaper flat panel collectors are also often used to heat swimming pools, thereby extending their swimming seasons. Solar cooking is helping in many developing countries, both reducing the demands for local firewood and maintaining a cleaner environment for the cooks. The first known record of a western solar oven is attributed to Horace de Saussure, a Swiss naturalist experimenting as early as 1767. A solar box cooker traps the sun's power in an insulated box; these have been successfully used for cooking, pasteurization and fruit canning. Solar cells (also referred to as photovoltaic cells) are devices or banks of devices that use the photoelectric effect of semiconductors to generate electricity directly from the sunlight. As their manufacturing costs have remained high during the twentieth century their use has been limited to very low power devices such as calculators with LCD displays or to generate electricity for isolated locations which could afford the technology. The most important use to date has been to power orbiting satellites and other spacecraft. As manufacturing costs decreased in the last decade of the twentieth century solar power has become cost effective for many remote low power applications such as roadside emergency telephones, remote sensing, and limited "off grid" home power applications. Solar power plants generally use reflectors to concentrate sunlight into a heat absorber. * Heliostat mirror power plants focus the sun's rays upon a collector tower. The vast amount of energy is generally transported from the tower and stored by use of a high temperature fluid. Liquid sodium is often used as the transport and storage fluid. The energy is then extracted as needed by such means as heating water for use in stream turbines. * Trough concentrators have been used successfully in the State of California (in the U.S.) to generate 350MW of power in the past two decades. The parabolic troughs can increase the amount of solar radiation striking the tubes up to 30 or 60 times, where synthetic oil is heated to 390°C. The oil is then pumped into a generating station and used to power a steam turbine. * Parabolic reflectors are most often used with a stirling engine or similar device at its focus. As the single parabolic reflector achieves a greater focusing accuracy than any larger bank of mirrors can achieve, the focus is used to achieve a higher temperature which in turn allows a very efficient conversion of heat into mechanical power to drive a electrical generator. Parabolic reflectors can also be used to generate steam to power turbines to generate electricity. Applying Solar Power Deployment of solar power depends largely upon local conditions and requirements, for example while certain European or U.S. states could benefit from a public hot water utility, such systems would be both impractical and counter-productive in countries like Australia or states like New Mexico. As all industrialised nations share a need for electricity, it is clear that solar power will increasingly be used to supplying a cheap, reliable electricity supply. Many other types of power generation are indirectly solar-powered. Plants use photosynthesis to convert solar energy to chemical energy, which can later be burned as fuel to generate electricity; oil and coal originated as plants. Hydroelectric dams and wind turbines are indirectly powered by the sun. In some areas of the U.S., solar electric systems are already competitive with utility systems. The basic cost advantage is that the home-owner does not pay income tax on electric power that is not purchased. As of 2002, there is a list of technical conditions: There must be many sunny days. The systems must sell power to the grid, avoiding battery costs. The solar systems must be inexpensively mass-purchased, which usually means they must be installed at the time of construction. Finally, the region must have high power prices. For example, Southern California has about 260 sunny days a year, making it an excellent venue. It yields about 9%/yr returns of investment when systems are installed at $9/watt (not cheap, but feasible), and utility prices are at $0.095 per kilowatt-hour (the current base rate). On grid solar power can be especially feasible when combined with time-of-use net metering, since the time maximum production is largely coincident with the time of highest pricing. For a stand-alone system some means must be employed to store the collected energy for use during hours of darkness or cloud cover - either as electrochemically in batteries, or in some other form such as hydrogen (produced by electrolysis of water), flywheels in vacuum, or superconductors. Storage always has an extra stage of energy conversion, with consequent energy losses, greatly increasing capital costs. Several experimental photovoltaic (PV) power plants of 300 - 500 kW capacity are connected to electricity grids in Europe and the U.S. Japan has 150 MWe installed. A large solar PV plant is planned for the island of Crete. Research continues into ways to make the actual solar collecting cells less expensive and more efficient. Other major research is investigating economic ways to store the energy which is collected from the sun's rays during the day. See also Main Renewable resource, Renewable energy, Sustainable design Solar: Solar box cooker, Solar thermal energy, Sun, Solar power satellite, Current solar income Energy crisis: 1973 energy crisis, 1979 energy crisis Electricity: Electricity generation, Electricity retailing, Energy storage, Green electricity, Direct current, Photoelectric effect, Power station, Power supply, Microwave power transmission, Solar cell, Power plant Lists: List of conservation topics, List of physics topics People: Leonardo da Vinci, Charles Eames, Charles Kettering, Menachem Mendel Schneerson Other: Autonomous building, Solar-Club/CERN-Geneva-Switzerland, Electric vehicle, Lightvessel, Mass driver, Clock of the Long Now, Tidal power, Cumulonimbus Smart 1, Science in America, Slope Point, Back to the land, Architectural engineering, Ecology, Geomorphology, List of conservation topics, Nine Nations of North America
17,745
Electronics/History/Chapter 7. Radio Astronomy: Looking at space Schumann Resonance. The phenomenon is named after W. O. Schumann, who predicted this phenomenon in the 1950s, and helped detect its existence. CBR. The CBR was predicted by George Gamow, Ralph Alpher, and Robert Hermann in the 1940s and was accidentally discovered in 1964 by Penzias and Wilson, who received a Nobel Prize for this discovery. The CBR had, however, been detected and its temperature deduced in 1941, seven years before Gamow's prediction. Based on the study of narrow absorption line features in the spectra of stars, the astronomer Andrew McKellar wrote: "It can be calculated that the 'rotational' temperature of interstellar space is 2 K." Of these experiments, the Cosmic Background Explorer (COBE) satellite that was flown in 1989-1996 is probably the most famous and which made the first detection of the large scale anisotropies (other than the dipole). In June 2001, NASA launched a second CBR space mission, WMAP, to make detailed measurements of the anisotropies over the full sky. Results from this mission provide a detailed measurement of the angular power spectrum down to degree scales, giving detailed constraints on various cosmological parameters. The results are broadly consistent with those expected from cosmic inflation as well as various other competing theories, and are available in detail at NASA's data center for Cosmic Microwave Background (CMB) [ed. see links below], A third space mission, Planck, is to be launched in 2007. Unlike the previous two space missions, Planck is a collaboration between NASA and ESA (the European Space Agency). CBR and Non-Standard Cosmologies During the mid-1990's, the lack of detection of anisotropies in the CBR led to some interest in nonstandard cosmologies (such as plasma cosmology) mostly as a backup in case detectors failed to find anisotropy in the CBR. The discovery of these anisotropies combined with a large amount of new data coming in has greatly reduced interest in these alternative theories. Some supporters of non-standard cosmology argue that the primodorial background radiation is uniform (which is inconsistent with the big bang) and that the variations in the CBR are due to the Sunyaev-Zel'dovich effect mentioned above (among other effects).
569
Electronics/Fuel Cell. A fuel cell is an electrochemical device similar to a battery, but differing from the latter in that it is designed for continuous replenishment of the reactants consumed; i.e. it produces electricity from an external fuel supply as opposed to the limited internal energy storage capacity of a battery. Typical reactants are hydrogen on the anode side and oxygen on the cathode side. In contrast, conventional batteries consume solid reactants and, once these reactants are depleted, must be discarded, recharged with electricity by running the chemical reaction backwards, or, at least in theory, having their electrodes replaced. Typically in fuel cells, reactants flow in and reaction products flow out, and continuous long-term operation is feasible virtually as long as these flows are maintained. Fuel cells are also attractive in some applications for their high efficiency and low pollution. Some applications that have been suggested include Types of fuel cells. There are five generally recognised types of fuel cells, of which two are the main subject of intensive research. PEM. PEM fuel cells have a disputed acronym, meaning either proton-exchange membrane or polymer-electrolyte membrane, which both are in fact a good description. In this fuel cell, hydrogen is split at the membrane surface in protons, that travel through the membrane, and electrons, that travel through our external electric circuit, and provide our power. The hydrogen ions travel through the water that is entrained in the membrane to the other side, where they are combined with oxygen to form water. Unfortunately, while the splitting of the hydrogen molecule is relatively easy, splitting the stronger oxygen molecule is more difficult, and this causes significant losses that result in a sharp decrease of performance of the fuel cell. The PEM fuel cell is a prime candidate for vehicle and other mobile applications of all sizes down to mobile phones, because of its compactness. However, the water-entraining membrane is crucial to performance: too much water will flood the membrane, too little will dry it; in both cases, power output will drop; water management is a very difficult subject in PEM fuel cells. Furthermore, the platinum catalyst on the membrane is easily poisoned by CO. PEM systems that use reformed methanol were proposed, as in Daimler Chrysler Necar 5; reforming methanol, i.e. making it react to obtain hydrogen, is however a very complicated process, that requires also purification from the CO the reaction produces. A platinum-ruthenium catalyst is necessary as some CO will unavoidably reach the membrane. The level should not exceed 10 parts per million. DMFC. A subcategory of PEM is the DMFC, or direct methanol fuel cell; here, the methanol is not reformed, but fed directly to the fuel cell. One does not need complicated reforming, and storage of methanol is much easier than that of hydrogen. However, efficiency is low, due to the high permeation of methanol through the membrane, and the dynamic behaviour is sluggish. The main manufacturer of PEM is Ballard Power Systems of Vancouver, Canada. Efficiencies of PEM are in the range of 40-50%. SOFC. Solid oxide fuel cells, or SOFC, are intended mainly for stationary applications (power plants). They work at very high temperatures (some at 1000ºC), and their off-gases can be used to fire a secondary gas turbine to improve efficiency. Efficiency could reach as much as 70% in these hybrid systems. This time, it's oxygen being transferred through a solid oxide at high temperature to react with hydrogen on the other side. SOFC have such a high temperature that they can be fed (provided some modifications) with natural gas, that will react to give hydrogen in the fuel cell itself. SOFC are very resistant to poisoning, and can indeed be run on CO, which is a poison for PEM. Since SOFC are made of ceramic materials, they tend to be brittle; they are therefore unsuited for mobile applications. Furthermore, thermal expansion demands a uniform and slow heating process at startup, that will cause very long startup times: typically, 8 hours are to be expected. Research is going now in the direction of lower-temperature SOFC (600ºC), which will enable the use of metallic materials with better mechanical properties and heat conductivity. MCFC. Molten-carbonate fuel cells (MCFC) are also high-temperature, but in the range of 600ºC. Their main problem is corrosion, and the need to operate a high-temperature liquid rather than a solid as in the SOFC. PAFC. Phosphoric-acid fuel cells (PAFC) are a mature technology that is commercially available. Unfortunately, the phosphoric acid solidifies under 40ºC, making startup very difficult. They have been used for stationary applications with an efficiency of about 40%, and many believe they do not offer much potential for further development. AFC. The alkaline fuel cell (AFC) is the cell that brought the Man to the Moon. Used in Apollo-series missions and on the Space Shuttle, it is a very good fuel cell but for the fact that it is poisoned by CO. This means that the cell will require pure oxygen, or at least purified air. As this process is relatively expensive, not much development is being done on AFC. NASA has decided they will shift to PEM for the next generation of Space Shuttles. Science. Fuel cells are electrochemical devices, so they are not constrained by the maximum thermal (Carnot) efficiency as combustion engines are. Consequently, they can have very high efficiencies in converting chemical energy to electrical energy. In the archetypal example of a hydrogen/oxygen polymer electrolyte membrane (PEM) fuel cell, a proton-conducting polymer membrane separates the anode ("fuel") and cathode sides. Each side has an electrode, typically carbon paper coated with platinum catalyst. On the anode side, hydrogen diffuses to the anode catalyst where it dissociates into protons and electrons. The protons are conducted through the membrane to the cathode, but the electrons are forced to travel in an external circuit (supplying power) because the membrane is electronically insulating. On the cathode catalyst, oxygen molecules react with the electrons (which have travelled through the external circuit) and protons to form water. In this example, the only waste product is water vapor. Also, there is the possible use of fuel cells at home, to store energy at the cheap off-peak electricity rates and used at peak-use hours. It may even be profitable to sell back some of the energy to the power company, like they do with windmill electric power. Peak power production reaches twice the normal level, which means that the very expensive powerplant capacity is sized for levels used for a short period of time. Also, power plants are most efficient at only one production rate and their efficiency drops off significantly at off-peak rates. History. The first fuel cell was developed in the 19th century by British scientist Sir William Grove. A sketch was published in 1843. But fuel cells did not see practical application until the 1960s, where they were used in the U.S. space program to supply electricity and drinking water (hydrogen and oxygen being readily available from the spacecraft tanks). Extremely expensive materials were used and the fuel cells required very pure hydrogen and oxygen. Early fuel cells tended to require inconveniently high operating temperatures that were a problem in many applications. Further technological advances in the 1980s and 1990s, like the use of Nafion as the electrolyte, and reductions in the quantity of expensive platinum catalyst required, have made the prospect of fuel cells in consumer applications such as automobiles more realistic. The fuel cell industry. Ballard Power Systems is a major manufacturer of fuel cells and leads the world in automotive fuel cell technology. Ford Motor Company and DaimlerChrysler are major investors in Ballard. As of 2006, the only major automobile companies pursuing internal development of fuel cells for automotive use are General Motors, Toyota and Honda; most others are customers of Ballard. United Technologies (UTX) is a major manufacturer of large, stationary fuel cells used as co-generation power plants in hospitals and large office buildings. The company has also developed bus fleets that are powered by fuel cells. Pros and cons of fuel cells in various applications. Their use is controversial in some applications. The hydrogen typically used as a fuel isn't a primary source of energy. It is usually only a source of stored energy that must be manufactured using energy from other sources. Some critics of the current stages of this technology argue that the energy needed to create the fuel in the first place may reduce the ultimate energy efficiency of the system to below that of highly efficient gasoline internal-combustion engines; this is especially true if the hydrogen is generated from electrolysis of water by electricity. On the other hand, hydrogen can be generated from methane (the primary component of natural gas) with approximately 80% efficiency. The methane conversion method releases greenhouse gases, however, and the ideal environmental system would be to use renewable energy sources to generate hydrogen through electrolysis. Other types of fuel cells don't face this problem. For example, biological fuel cells take glucose and methanol from food scraps and convert it into hydrogen and food for the bacteria. There are practical problems to be overcome as well. Although the use of fuel cells for consumer products is probable in the near future, most current designs won't work if oriented upside down. They currently cannot be scaled to the small size needed by portable devices such as cell phones. Current designs require venting and therefore cannot operate under water. They may not be usable on aircraft because of the risk of fuel leaks through the vents. Technologies for safe refueling of consumer fuel cells are not yet in place. Among the controversies in the use of hydrogen are: First, the energy used to produce the hydrogen is comparable to the energy in the hydrogen, it is inefficient therefore too expensive. If conventional powerplants were used to produce the hydrogen, at best, there would be no gains in current pollution rates. Second, some have suggested that this is a "stalking horse" to bring back nuclear power, which may be the only commercially viable way to make hydrogen and reduce pollution. Finally, the need to provide the very long, costly and vulnerable thousands of miles of gas lines makes hydrogen too costly without government help. There are several advantages to hydrogen as well. Clean, renewable energy sources like solar and wind power are non-continuous and unreliable through the course of a day. So power from these sources is not always available at the time it is needed. The electricity produced from solar panels or wind generators could be stored in large battery complexes but this can be expensive and batteries have a limited storage capacity and lifetime. If the electricity is used to produce hydrogen however, the energy can be stored more easily. As a gas hydrogen is not hard to store until it is needed.
2,549
Guitar/Muting and Raking. Muting. Muting a string is simple: with the fretting hand, touch the string with a finger, but do not press it down, and strike the string. It is usually best to do this where a harmonic will not result, but strings can be muted at harmonics for special effect. In tablature, muted notes are often marked with an "x" instead of a fret number. It is also common practice to mute a string with the picking hand after striking a note to create a shortened "staccato" effect. Again touching a string to mute away from harmonic nodes is advised, but sometimes pulling off into harmonics creates interesting effects. Palm muting. Palm muting may or may not make the pitch of the string discernable. Very lightly rest the palm of the hand on or near the bridge, then fret and strike strings normally. Palm-muted notes are sometimes notated the same way as muted notes when the pitch is not discernable; otherwise fret numbers are given normally and the muted notes are marked "P.M." in tablature. The Palm Muting Technique. The idea is not to mute the strings, but to dampen them, so that the notes are still clear, but with less sustain. To start, hold your guitar like you normally would, but let your palm brush against the strings, near the bridge. Remember to "let" the strings brush against your palm, not putting any force on the strings. The closer to the bridge, the more forgiving it is. As you get better, try adjusting the amount of muting by keeping your palm at different distances from the bridge. Very heavy palm muting can raise the pitch of the note(s), especially on guitars with a floating tremolo bar system equipped. Using or not using this effect is at the reader's discretion. Finger Muting. You can also mute strings just by pressing your fingers against the strings, but not so hard that they are fretted and play notes. Raking. Raking is not a kind of muting, but a technique for applying it. It is vaguely related to sweep picking, but instead of an arpeggio, the result is usually a single percussive-sounding note. (However, sweep picking is sometimes incorrectly notated as a rake in tablature, and sloppy sweep picking may accidentally become a rake.) Between two and four strings are struck, only one containing the desired note and the rest muted. Rakes may be notated in various ways; the most common way is to add muted grace notes, possibly adding the word "rake" to the tablature for clarification.
596
Guitar/Tablature and Standard Notation. Tablature and standard notation are two ways that musical information is shared. Sight-reading of standard notation is a requisite skill for teaching careers, session work, and the theater orchestra. Reading music increases your knowledge of music and allows you to notate your musical ideas. Each notation system has its advantages and disadvantages. Tablature does not convey timing and pitch information as well as standard notation does though it is more useful for showing bends and to what degree (1/4, 1/2 or full) they should be executed and other worded instructions such as pick scrapes and whammy bar effects. For these reasons many guitar transcriptions for rock, jazz and blues, use both standard notation and tablature. Tablature. You do not need to know how to read music to use tablature. Each string is represented by a line and on those lines numbers are used to indicate which fret to press down. Below is a simple melody in tablature. Lower Section. In the lower section of the example above, the top line represents the thinnest string of the guitar (high e) and the lowest line represents the thickest string of the guitar (low E). Each number on a line represents a fretted note on that string. The number zero is an open string, the number one is the first fret, and so on. The tab is divided into measures using bar-lines but the duration of the notes is not indicated. You can figure out the duration of the notes using the standard notation in the upper section. You can also work out the note values using the time signature; which in this example is four-four time. This means that there are four quarter-notes in each measure. The tempo or style, which is given at the top of a piece of sheet music, is also an indicator of how a song should be played. The key signature is not shown in the example. Key signatures show which sharps , naturals, and flats are to be used; represented by #'s and b's. Each sharp or flat is shown on their respective line and space after the time signature. Upper Section. The upper section of the example above is in standard notation and shows that the first bar has eight notes. Each note is represented by an oval note-head which indicates which note pitch is to be played. A stem with tails is used to indicate notes duration (how long the note is to be held). In standard notation only the whole-note is written without a stem. Because the notes in the first bar are all eighth notes with one tail they are connected with a single beam as shown in the example. The beaming of the same notes in a bar allows for easier reading. In a bar of music with mixed note values a single eighth note would be shown with a single tail. Sixteenth notes have two tails so a double beam is used when grouping. The vertical bar-line after the last eighth note marks the end of one complete count of the time-signature. Bar-lines are used to show the pulse of the music and taken overall allows us to describe the form of a piece of music. The usefulness of using bar-lines to describe form is self-evident in the twelve bar blues whose title states that a cyclic group of twelve bars is to be performed. It is common to find musicians describing one complete thirty-two bar cycle of a jazz standard as a chorus. The term chorus is used to indicate how many times a song is to be repeated. A vamp on the thirty-two bar Jazz standard "Misty", written by the pianist Erroll Garner, would by convention start with all the musicians stating the melody with the following choruses dedicated to solo improvisation. The last chorus usually has the musicians stating the melody again without improvisation. The convenience of using the term chorus can be illustrated by imagining a four piece Jazz quartet with piano, saxophone, double bass and drums. If each musician is given a chorus to improvise over and the convention of all the musicians stating the melody on the first and last chorus is utilized then the song will have six choruses. The original hit recording of "Misty" as sung by Sarah Vaughan consisted of only one chorus with a four bar intro. Be aware that four and eight bar codas and intros are very common in Jazz and Blues and need to be taken into account when working out how many bars a chorus contains. In some forms of music there is a strong emphasis placed on the first beat of each bar. This is easily demonstrated by the Waltz time signature where the first beat of a count of three is emphasized for the dancers benefit in accord with the dance steps to be performed. If a note is tied over the bar-line with a curved tie-line then the note duration is held over to the next bar. Bars never have more notes in them than is indicated by the time signature. In the next bar there is a whole note which is a white oval with no stem. The two vertical black lines at the end are called a double bar-line indicating that the piece of music has ended. ASCII Tablature. There is a very informal and loose standard of "Internet Tablature" using only ASCII characters. The above example would be written like this: e---0-1-3-5-3-1-0----|-----------------|| B------------------3-|-1---------------|| G--------------------|-----------------|| D--------------------|-----------------|| A--------------------|-----------------|| E--------------------|-----------------|| It has the same disadvantages of tab and contains much less information than the standard notation of the upper section. Rhythm can only be suggested by spacing or by adding symbols above each note (such as Q for quarter note). Much Internet tablature does not even contain bar lines. The timing must be discerned by listening to the original piece. This is the major flaw of online tabs and this style of tab in general. However, online tabs are often much more convenient than standard notation for precisely conveying a specific finger positioning. Especially with alternate tunings this is a clear advantage. Common Tab symbols: Chords are often written in the form: EADGBE EADGBE EADGBE xx0232 x32010 320003 Standard Notation. Notes On The Staff. Here are the notes as they appear in standard notation. The set of lines and spaces that run horizontally across the page is called the staff ("plural" - staves). Notes can be written on the lines and in the spaces. A common mnenomic for remembering the notes of the Treble Clef is: ""Every Good Boy Deserves Fudge" and the word "FACE" The musical alphabet starts at the letter A and ends on the letter G. There are twelve sounds in music and seven letters to represent them. The other five sounds are the sharps or flats of these seven notes. Each step up the staff is the next letter, so it goes A, B, C, etc. The first symbol on the staff is always the clef; which in this case is the treble clef. The word "clef" is French for "key" and gives you the position of the first note. The treble clef shown here is also called the G clef. It is drawn so that the note G is indicated as being on the second line.
1,640
Spanish/Vocabulary/Technology. Computer-related terms will vary widely between countries, and in many cases the English word will be used. In Spain, terms will be translated literally, or an older word of similar meaning will be used. = Sujetos = La Telecomunicacion. Internet. La red. = Verbos =
78
Spanish/Word Order. The word order in Spanish is not as rigid as it is in English. It is normally SVO (subject - verb - object): However, it is possible to change the word order to emphasize the verb or the object: Note: To say "An apple ate Juan," that is, Juan was eaten by an apple, insert the word "a" () like this: <br> The subject is frequently omitted because the verb ending already gives information about the person: In the second sentence we know that I ate the apple because the verb ending would be different for all other persons. If you want to say "Juan ate it," the word order will have to be changed to accommodate the direct object pronoun: This is always the word order when using a direct or indirect object pronoun. In general, Spanish is very flexible because the core grammatical structure gives you the liberty of changing the order of words. A Spanish sentence can be constructed in a photographic manner so that you put words in the sentence in the same order you tend to think that you're observing them. Spanish tries to make possible the compatibility between the formal logic and the descriptive quality of the message. The main departure from English grammar is that instead of an adjective-noun form, it's noun-adjective. So, in English we would say blue car, while in Spanish you would say "car blue" (coche azul). There are, as in many other languages, exceptions to this rule, particularly when the adjective has a double meaning. For example, "a poor man" could be expressed as "an unfortunate man" (pobre hombre), or a "wealth-less man" (hombre pobre). As a rule of thumb, the more permanent meaning dictates that the adjective go before the noun, but when in doubt, place the adjective "after" the noun.
419
Electronics/Cells. Cells. A cell, or electrochemical cell, Galvanic cell or Voltaic cell, is a component used to store and provide electrical energy. The energy in a cell is stored as a chemical potential energy, and electrical energy can be extracted when the chemicals undergo a chemical reaction. A battery is the term used to refer to multiple cells that are used together as one unit, and can be connected in series, parallel or in a combination of series and parallel connections. The properties of the cell can be determined by the chemistry of the cell (i.e. what it is made up of), and its physical design. Different chemistries will affect cell voltage, energy density, internal resistivity, and other factors. Physical design will affect the total cell energy capacity, total internal resistance and the shape and size of the cell. Generally, increasing the size of a cell, while maintaining the cell chemistry, will result in a greater energy capacity and lower internal resistance, and consequently a greater current supplying capability, and vice versa. Cells are categorised as Primary (Dry) cells, and Secondary (Wet) cells, based on their chemistry. Primary cells are single-use and disposable, for example alkaline cells. Secondary cells are rechargeable, for example lead-acid cells. "What is the relationship between voltage and electronegativity?"
300
Guitar/Slides. The slide is one of the simplest guitar techniques. There are two kinds of slides: shift slides and legato slides. In a shift slide, a note is fretted, then struck, and then the fretting finger slides up or down to a different fret, and the string is struck again. A legato slide differs in that the string is struck only for the first note. The first slide pictured is a shift slide; the second is a legato slide. A few tablature writers do not distinguish between the two slides, using only shift slide notation. The abbreviation "sl." for slide may be omitted. When sliding from a higher fret to a lower fret, the slanted lines are usually changed to have a downward slope instead of an upward slope, to emphasize the sliding "down". It is possible to slide up from an open string, but this often does not sound as clean because this requires a hammer-on at the first fret (or for really fast slides, a higher fret) before sliding up. Likewise, it is possible to slide down to an open string but it requires a pull-off at the first (or some other) fret. In Internet tablature, a slide from the third fret to the fifth might be written like any of these: 3/5 3>5 3>s>5 3s5 Internet tablature rarely distinguishes between the two kinds of slides. Less commonly, tablature can instruct the guitarist to "slide into" or "slide out of" a note. In printed tablature, they are notated identically except, in the case of slide-into, the first note is omitted, and in the case of slide-out-of, the second note is omitted. In other words, the note slides in from nowhere, or out to nowhere. It simply tells the guitarist to quickly slide from or to an arbitrary point, usually only a few frets away. Good sliding keeps the new note audible, while keeping the note in tune. If you don't press the string hard enough, you mute the string or buzz it on the frets. Too hard and the string bends out of tune. The latter does not happen often, but sounds awful and should be avoided.
509
Cryptography/RSA. RSA is an asymmetric algorithm for public key cryptography, widely used in electronic commerce. The algorithm was described in 1977 by Ron Rivest, Adi Shamir and Len Adleman; the letters RSA are the initials of their surnames. Clifford Cocks, a British mathematician working for GCHQ, described an equivalent system in an internal document in 1973. His discovery, however, was not revealed until 1997 due to its top-secret classification. The security of the RSA system relies on the difficulty of factoring very large integers. New fast algorithms in this field could render RSA insecure, but this is generally considered unlikely. The algorithm was patented by MIT in 1983 in the United States of America. The patent expired 21 September 2000. Since the algorithm had been published prior to the patent application, it could not be patented in other countries. Operation. Key Generation. Suppose a user Alice wishes to allow Bob to send her a private message over an insecure transmission medium. She takes the following steps to generate a public key and a private key: "N" and "e" are the public key, and "N" and "d" are the private key. Note that only "d" is a secret as "N" is known to the public. Alice transmits the public key to Bob, and keeps the private key secret. You can generate and examine a real RSA keypair using OpenSSL and some Unix utilities. ( Cryptography/Generate a keypair using OpenSSL ). Encrypting messages. Suppose Bob wishes to send a message "m" to Alice. He knows "N" and "e", which Alice has announced. He turns "m" into a number "n" < "N", using some previously agreed-upon reversible protocol. For example, each character in a plaintext message could be converted to its ASCII code, and the codes concatenated into a single number. If necessary, he can break "m" into pieces and encrypt each piece separately. He then computes the ciphertext "c": This can be done quickly using the method of exponentiation by squaring. Bob then transmits "c" to Alice. Decrypting messages. Alice receives "c" from Bob, and knows her private key "d". She can recover "n" from "c" by the following procedure: Alice can then extract "n", since "n" < "N". Given "n", she can recover the original message "m". The decryption procedure works because and "ed" ≡ 1 (mod "p"-1) and "ed" ≡ 1 (mod "q"-1). Fermat's little theorem yields which implies (as "p" and "q" are "different" prime numbers) Signing Messages. RSA can also be used to sign a message. Suppose Alice wishes to send a signed message to Bob. She produces a hash value of the message, encrypts it with her secret key, and attaches it as a "signature" to the message. This signature can only be decrypted with her public key. When Bob receives the signed message, he decrypts the signature with Alice's public key, and compares the resulting hash value with the message's actual hash value. If the two agree, he knows that the author of the message was in possession of Alice's secret key, and that the message has not been tampered with since. Security. Suppose Eve, an eavesdropper, intercepts the public key "N" and "e", and the ciphertext "c". However, she is unable to directly obtain "d", which Alice keeps secret. The most obvious way for Eve to deduce "n" from "c" is to factor "N" into "p" and "q", in order to compute ("p"-1)("q"-1) which allows the determination of "d" from "e". No polynomial-time method for factoring large integers on a classical computer has yet been found, but it has not been proven that none exists. See integer factorization for a discussion of this problem. It has not been proven that factoring "N" is the only way of deducing "n" from "c", but no easier method has been discovered (at least to public knowledge.) Therefore, it is generally presumed that Eve is defeated in practice if "N" is sufficiently large. If "N" is 256 bits or shorter, it can be factored in a few hours on a personal computer, using software already freely available. If "N" is 512 bits or shorter, it can be factored by several hundred computers as of 1999. It is currently recommended that "N" be at least 1024 bits long. In 1993, Peter Shor showed that a quantum computer could in principle perform the factorization in polynomial time. If (or when) quantum computers become a practical technology, Shor's algorithm will make RSA and related algorithms obsolete. Should an efficient classical factorization code be discovered or a practical quantum computer constructed, using still larger key lengths would provide a stopgap measure. However, any such security break in RSA would obviously be "retroactive". An eavesdropper who had recorded a public key and any ciphertext produced with it (easily found by just recording traffic to that public key's owner), could simply wait until such a breakthrough. And then decipher that ciphertext into the plaintext message. Therefore, it is inherently unsafe to exchange long-term secrets with RSA or any cipher with similar vulnerabilities. Practical considerations. Key generation. Finding the large primes "p" and "q" is usually done by testing random numbers of the right size with probabilistic primality tests which quickly eliminate most non-primes. If such a test finds a "probable prime", a deterministic test should then be used to verify that the number is indeed prime. "p" and "q" should not be 'too close', lest the Fermat factorization for "N" be successful. Furthermore, if either "p"-1 or "q"-1 has only small prime factors, "N" can be factored quickly and these values of "p" or "q" should therefore be discarded as well. One should not employ a prime search method which gives any information whatsoever about the primes to the attacker. In particular, a good random number generator for the start value needs to be employed. Note that the requirement here is both 'random' and 'unpredictable'. These are not the same criteria; a number may have been chosen by a random process (i.e., no pattern in the results), but if it is predictable in any manner (or even partially predicatable), the method used will result in loss of security. For example, the random number table published by the Rand Corp in the 1950s might very well be truly random, but it has been published and thus can serve an attacker as well. If the attacker can guess half of the digits of "p" or "q", they can quickly compute the other half (shown by Coppersmith in 1997). It is important that the secret key "d" be large enough. Wiener showed in 1990 that if "p" is between "q" and 2"q" (which is quite typical) and "d" < "N"1/4/3, then "d" can be computed efficiently from "N" and "e". The encryption key "e" = 2 should also not be used. Speed. RSA is much slower than DES and other symmetric cryptosystems. In practice, Bob typically encrypts a secret message with a symmetric algorithm, encrypts the (comparatively short) symmetric key with RSA, and transmits both the RSA-encrypted symmetric key and the symmetrically-encrypted message to Alice. This procedure raises additional security issues. For instance, it is of utmost importance to use a strong random number generator for the symmetric key, because otherwise Eve could bypass RSA by guessing the symmetric key. Key distribution. As with all ciphers, it is important how RSA public keys are distributed. Key distribution must be secured against a man-in-the-middle attack. Suppose Eve has some way to give Bob arbitrary keys and make him believe they belong to Alice. Suppose further that Eve can "intercept" transmissions between Alice and Bob. Eve sends Bob her own public key, which Bob believes to be Alice's. Eve can then intercept any ciphertext sent by Bob, decrypt it with her own secret key, keep a copy of the message, encrypt the message with Alice's public key, and send the new ciphertext to Alice. In principle, neither Alice nor Bob would be able to detect Eve's presence. Defenses against such attacks are often based on digital certificates or other components of a public key infrastructure. Timing attacks. Kocher described an ingenious unexpected new attack on RSA in 1995: if the attacker Eve knows the hardware of Alice and is able to measure the decryption times for several known cyphertexts, she can deduce the decryption key "d" quickly. To thwart this attack, the decryption code should decrypt in constant time. This is known as RSA blinding. Adaptive Chosen Ciphertext Attacks. In 1998, Daniel Bleichenbacher described the first practical adaptive chosen ciphertext attack, against RSA-encrypted messages using the PKCS #1 v1 redundancy function (a redundancy function adds structure to an RSA-encrypted message, so it is possible to determine whether a decrypted message is valid.) Due to flaws with the PKCS #1 scheme, Bleichenbacher was able to mount a practical attack against RSA implementations of the Secure Socket Layer protocol, and potentially reveal session keys. As a result of this work, cryptographers now recommend the use of provably secure redundancy checks such as Optimal Asymmetric Encryption Padding, and RSA Laboratories has released new versions of PKCS #1 that are not vulnerable to these attacks.
2,309
Guitar/Intervals and Power Chords. An interval is the distance between two notes. Each interval has a distinctive sound. Intervals are named with reference to scales. For example, the interval from the root of the major scale to the second note of the major scale is called a "major second"; the interval from the root to the third note of that scale is a "major third", and so on. A "minor third" is the interval from the root to the third of a minor scale, and is a semitone (one fret) less than a major third. Major scale played on a single string: nut 12th fret O||-----|--●--|-----|--●--|--●--|-----|--●--|-----|--●--|-----|--●--|--●--|---- root 2nd 3rd 4th 5th 6th 7th octave (8th) Natural minor scale played on a single string: nut 12th fret O||-----|--●--|--●--|-----|--●--|-----|--●--|--●--|-----|--●--|-----|--●--|---- root 2nd minor 4th 5th minor minor octave 3rd 6th 7th (8th) Major 2nd interval played on one string (say, the 6th string): ||-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|--- Same interval played on two strings (6th and 5th): ||-----|--●--|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|--- Exception. If played on 2nd and 3rd strings, the shape of a major 2nd becomes this, because of the tuning irregularity: ||-----|-----|--●--|-----|-----|-----|-----|-----|-----|-----|-----|-----|--- Major 3rd on two strings (but not 2nd to 3rd strings) ||-----|-----|-----|--●--|-----|-----|-----|-----|-----|-----|-----|-----|--- Major 3rd on 2nd and 3rd strings: ||-----|-----|-----|-----|--●--|-----|-----|-----|-----|-----|-----|-----|--- If the two notes are played at the same time, an interval is called a harmonic interval. If they are played one after the other, it is called a melodic interval. (Only melodic intervals can be played on a single string.) Power chords. Power chords are simple chords consisting of root, fifth, and possibly octave. An advantage to understanding power chords is their shape can be used to quickly determine the location of the perfect fifth and the octave. This improves one's overall understanding of the location of notes on the fingerboard by relation to one another and builds the groundwork for understanding scales. Power chords are a staple of heavy distortion guitar styles, where the distortion creates harmonics that give a rich sound despite the bare-bones simplicity of the chord. Perfect fifths (e.g., C-G) and their inversion, perfect fourths (e.g., G-C), are the most consonant interval on the guitar (and in all of music for that matter), not counting unison and octaves. It is more difficult to play the octave for a root note on the D string, because the B string is tuned differently than the other strings, and you will need to stretch further to reach the octave. Power chords are most commonly played on the thicker strings, and many songs exclusively use perfect fifth power chords. Perfect Fifth above octave. The simplest perfect fifth power chord uses the same fingering as an E minor chord, except only the thickest three strings are played. Here is the fretting for the E5 power chord: When you play a power chord in the open position (or any power chord), you have to be careful to mute the other strings so they do not ring out. In this case, if you also played the G string, you would be playing a full chord, not a power chord. Use your extra fingers to lightly touch the other strings, use your fretting fingers to smother the unnecessary strings, or just avoid hitting the unnecessary strings with your impact hand. Power chords, and really any chord types, are useful because they can be moved anywhere on the neck, as long as the relationship between the notes is the same. For example, in the E5, the thickest string plays an E, the next string plays a B (which is the fifth note of "any" E scale), and the next string plays another E, but an octave above it. If you take the same chord pattern, and move it up the neck to make a different power chord. For example, take the two fretted notes, then use your first finger and fret the thick E string two frets behind the others. For example, if you were fretting the E string at the third fret, you would be playing a G5 which looks like this: There are several different fingerings you can use to play a power chord, but it is best to choose one that lets you easily move the power chord up and down the neck. Here are three most common fingerings for a power chord, in this case, a G5. In the second and third fingering, the two strings are barred at the fifth fret. The numbers indicate the number of finger to use. Finger #1 is the index finger, #2 the middle finger, #3 the ring finger, and finger #4 is the little finger. EADGBE EADGBE EADGBE ---xxx ---xxx ---xxx 1 ... 1 ... 1 ... 2 ... 2 ... 2 ... 3 1... 3 1... 3 1... 4 ... 4 ... 4 ... 5 .34... 5 .33... 5 .44... Alternate Fingerings. One common variation on the power chord involved omitting the second, higher octave note. For example, a G5 without the second G would look like this: These are easier to play because you only need two fingers and the sound is similar to the three string version. Since a power chord is just playing multiple strings that produce only two tones, it is possible to play all six strings and still be playing a power chord. Some open tunings set the guitar up so that when you strum it open, it plays a power chord. Here is an example of a full G5 chord, where all strings are either playing a G or a D. EADGBE --00-- 1 ... 2 ... 3 2...11 4 ... 5 .4... This chord can be considered a non-traditional power chord, since in popular music, power chords usually use only two or three strings. This is also a hard fingering for the beginner, but it emphasizes an important fact about double stops: as long as you keep adding octave or unison notes, you will "always" be playing the same interval. Playing a non-octave or unison note will instead produce a chord. Adding unison notes may sound different even though they are supposed to produce the same pitch. This may be because the strings have different tension or thickness. In general, the guitar's thinner strings will have a brighter, more ringing sound. Perfect Fourths. This type of power chord can be regarded as root plus perfect fifth in the octave below. Perfect fourths have a slightly more suspended sound than perfect fifth chords. These are easy to play, because most of the strings on the guitar are tuned in fourths. This means that playing any two of the thickest four strings, when they are beside one another and played at the same fret. For example, a D4 is played like this: EADGBE xx00xx These can easily be moved up the neck. For example, a G4 or a B4 would be played like this: EADGBE EADGBE (33xxxx) (x22xxx) Perfect fourths are the same as the upper two notes of the original three-string power chord. It is rare to add a new top octave, but it may done. The following Power chords show the G4 and B4 with the octave added: EADGBE EADGBE (335xxx) (x224xx) Other Double Stops. You can play a huge variety of different intervals by playing chords, and just plucking two notes at the same time. Often you can add variety to chord strumming by playing a quick fill by playing different sections of a chord, and achieving different intervals.
2,023
Organic Chemistry/Introduction to reactions/Reactions with organometallic reagents. Organometallic compounds are organic substances which contain bonds between carbon to metallic elements. Common metals found in organometallic compounds are Na, K, Li, Mg, and B. Formation of organometalic reagents: R-X + 2M -> R-M +MX
93
Electronics/Table of Chemicals. Electronics has quite a few chemicals in it many of which are toxic. What things are made of. Batteries: Electrolysis: LEDs: Phosphors: Semiconductors: wires: The * denotes toxic
69
Electronics/Audio Electronics. white noise generator Everything past this point is notes. Electromagnets are also used in loudspeakers. You have a voltage that is dependent on the sound's pitch and volume which turns a magnetic field on and off, setting the loudspeaker vibrating. Microphone = Records sound The Loud Speaker. A speaker consists of a paper cone attached to a coil which acts as a small electromagnet. The coil is fitted over a permanent magnet, and as the current flows through the coil it is either attracted or repelled depending on which direction the current flows. A typical signal from an amplifier will be a varying a.c. current, and so the cone will vibrate back and forth at the same frequency as the current. As the cone vibrates, it sets up pressure waves in the air, which we hear as sound. The electric bell. Once the battery is connected a current flows in the wire loops around the U shaped soft iron core. This turns the core into an electromagnet. The electromagnet attracts the amateur which is also made of soft iron. As the amateur moves towards the electromagnet, it causes the hammer to strike the bell. At the same time it breaks the circuit at X. The break in the circuit causes the current to stop flowing. The soft iron cores loses it's magnetic field and releases the amateur which springs back to its original position. The contact screw touches the springy metal and completes the circuit. The whole cycle is repeated over and over until the battery is disconnected or runs down. electric guitar electric keyboard
360
Latin/L3 Word List. This is a list of Latin words learned by the end of Lesson 3. Verbs. First Conjugation. Return to Lesson 3 - Introduction to Verbs
47
Fortran/History. Origins. Fortran was created by a team lead by John Backus at IBM in 1957. Originally, the name was written in all capital letters, but current standards and implementations only require the first letter to be capital. The name "Fortran" stands for "FORmula TRANslator". Initially it was specifically aimed at scientific calculations and thereby had very limited support for working with character strings and lacked other provisions important for a general purpose programming language, which it will attain later during its extensive development that ensued after its successful debut. Until the language became popular, Fortran had been one of the few high level languages with a reasonable degree of portability between different computer systems. Several websites indicate that the work on Fortran was started in 1954 and released commercially in 1957. It is believed that the first successful compilation of a small Fortran program took place on September 20, 1954. Fortran Versions. There have been several versions of Fortran. FORTRAN I, II, III and IV are considered obsolete and contained many machine-dependent features. FORTRAN 66 was the first standardized version and was released in 1966. All later versions of Fortran are numbered after the year the standard was released. The versions of Fortran most commonly remaining in use are FORTRAN 77, Fortran 90 and later. In FORTRAN II, codice_1 statements had the form: codice_2. It also had an odd type of string literal, called Hollerith literals (after the inventor of the keypunch and IBM). Where today one might code 'hello', FORTRAN II used 5Hhello. However, there was no string variable type. FORTRAN IV added the codice_1/codice_4 concept, the concept of logical expressions, with operators .AND., .OR., .EQ., .NE., et cetera. Complex numbers as a basic type were also added. FORTRAN 77 added strings as a distinct type. Fortran 90 added various sorts of threading, and direct array processing. Fortran 2003 added object orientated features, derived types, language interoperability with C, data manipulation and many I/O enhancements. Fortran 2008 added coarrays and parallelism and submodules. Fortran 2018 added even more C interoperability and parallelism features. Although Fortran became a standardized language early, many companies had their own extensions to it. Strangely, IBM and DEC had virtually the same set of extensions.
588
Electronics/CMOS. CMOS. CMOS stands for Complementary Metal-Oxide-Semiconductor. Metal-Oxide-Semiconductor refers to the construction method of the component Field-Effect Transistors (MOSFETs), and Complementary means that CMOS uses both n-type (nMOS) and p-type (pMOS) transistors. Older designs had used only n-type transistors, and are referred to as NMOS logic. n-type MOSFETs are active (conductive) when their input voltage is high, while p-type MOSFETs are active when their input voltage is low. All CMOS gates are arranged in two parts: the pull-up network (PUN), built from p-type transistors and connect to source; and the pull-down network (PDN), built from n-type transistors and connected to ground (also called drain). The two parts are logical duals of each other, so that if the PUN is active, then the PDN is inactive, and vice-versa. In this way there can never be a direct path between source and ground (in any steady state). The biggest advantage of CMOS over NMOS is that CMOS has a rapid change from both hi-to-low and from low-to-hi. NMOS transitions only slowly from low-to-hi (because it uses a resistor in place of a PUN), and since overall circuit speed must take into account the worst case, NMOS circuits must be much slower. Logic Gates. NOT. The simplest CMOS circuit: the NOT gate, or inverter. Although uncomplicated, it demonstrates the basic structure of a CMOS gate; a series of inputs (in this case, one) which are connected to the transistors, the PUN (consisting of a single p-type transistor) connected to source, the PDN (consisting of a single n-type transistor) connected to ground, and the output which is fed from both the PUN and PDN. When the input voltage is high, the p-type transistor will be inactive, and the n-type transistor will be active. This creates a connection between ground and the gate output, pulling the gate's output to low. Conversely, when the input voltage is low, the p-type transistor will be active instead, creating a connection between the output and source, pulling the gate's output to high. NAND. The PUN for NAND consists of a pair of p-type transistors in parallel, one with the A input feeding it and one with the B input feeding it. Therefore the PUN is active, and the output of the gate is high, as long as either of these inputs is low. The PDN for NAND consists of a pair of n-type transistors in series, also each fed by one of the two inputs. Therefore the PDN is active, and the output of the gate is low, only if both of the inputs are high.it uses the logic a bar(OR)b bar AND. A CMOS AND gate is constructed by driving a NOT gate from the output of a NAND gate. NOR. "Upside down" relative to the NAND gate, the NOR gate is made from a PUN of two p-type transistors in series and a PDN of two n-type transistors in parallel. OR. As AND is to NAND, OR is to NOR. CMOS OR is constructed by feeding the output of NOR to a NOT gate. XNOR. To build an XNOR gate, first we will need easy access to the inverted inputs. This is accomplished with a pair of NOT gates. The original inputs are A and B, and their inverted forms we will call NOT-A and NOT-B. Both the PUN and PDN are made of four of the appropriate type of transistor, in two parallel sets, of series of two transistors each. In the PUN there is one series fed by A and B and the other is fed by NOT-A and NOT-B; in the PDN one series is fed by A and NOT-B and the other is fed by NOT-A and B. All told, this takes 12 transistors (4 in the PUN, 4 in the PDN, and 2 for each inverter). There are more efficient designs for the XNOR circuit, but they require a more detailed analysis than we will go into here. Instead of serving as an example of an actual XNOR design, this section should instead help to suggest the methods one could use to generate a CMOS circuit for any arbitrary boolean function. XOR. If you've been following along, you may guess that an XOR gate is made by attaching a NOT onto the end of the XNOR; while this will produce "a" correct circuit, it is not the "most" correct (or efficient) circuit. Instead, we could use the same 12 transistors and simply shuffle around the wires. This is left as an exercise for the reader. it uses the logic a.b bar(OR) a bar.b
1,161
Supplemental Guide to Lord of the Flies. This book is intended to provide help for students studying the novel "Lord of the Flies" by William Golding at any level.
39
Linear Algebra/Inner product spaces. Recall that in your study of vectors, we looked at an operation known as the "dot product", and that if we have two vectors in formula_1, we simply multiply the components together and sum them up. With the dot product, it becomes possible to introduce important new ideas like length and angle. The length of a vector formula_2, is just formula_3. The angle between two vectors, formula_2 and formula_5, is related to the dot product by It turns out that only a few properties of the dot product are necessary to define similar ideas in vector spaces other than formula_1, such as the spaces of formula_8 matrices, or polynomials. The more general operation that will take the place of the dot product in these other spaces is called the "inner product". The inner product. Say we have two vectors: If we want to take their dot product, we would work as follows Because in this case multiplication is commutative, we then have formula_11. But then, we observe much like the regular algebraic equality formula_13. For regular dot products this is true since, for formula_14, for example, one can expand both sides out to obtain Finally, we can notice that formula_16 is always positive or greater than zero - checking this for formula_14 gives this as which can never be less than zero since a real number squared is positive. Note formula_19 if and only if formula_20. In generalizing this sort of behaviour, we want to keep these three behaviours. We can then move on to a definition of a generalization of the dot product, which we call the "inner product". An inner product of two vectors in some vector space formula_21, written formula_22 is a function formula_23, which obeys the properties The vector space formula_21 and some inner product together are known as an "inner product space". The dot product in formula_29. Given two vectors formula_30 and formula_31, the dot product generalized to complex numbers is: formula_32 where formula_33 for an arbitrary complex number formula_34 is the complex conjugate: formula_35. The dot product is "conjugate commutative": formula_36. One immediate consequence of the definition of the dot product is that the dot product of a vector with itself is always a non-negative real number: formula_37. formula_38 if and only if formula_39 The Cauchy-Schwarz Inequality for formula_29. In formula_41, the Cauchy-Schwarz inequality can be proven from the triangle inequality. Here, the Cauchy-Schwarz inequality will be proven algebraically. To make the proof more intuitive, the algebraic proof for formula_42 will be given first.
646
Guitar/Bending and Vibrato. Bending and vibrato are two related effects which help give extra "life" to notes, especially sustained notes, by changing their pitch. The techniques are not commonly used on the acoustic guitar or general rhythm playing. However, they are "extremely" important to many styles involving distorted guitar, e.g., rock or metal, even when playing rhythm (though, in that case, bends and vibratos are usually embellishments). Bending or an equivalent effect is not possible on all instruments; the piano, for example, cannot have notes that change in pitch. This is one reason why it is important to know how to bend: because you can! This section deals with bending and vibrato using your fingers, not the different technique of using the vibrato bar. The two techniques do the same basic thing, but using the vibrato bar as a substitute for fretting-hand bending is not good practice; it is best used for very heavy bends or heavy vibratos, not slight embellishments like finger bending. It is more difficult to be subtle with a vibrato bar, and it is usually a bit out of the way for the picking hand to reach, making it harder to use. In short, while in some cases which style of bending or vibrato is used is a matter of taste, the two techniques are not interchangeable and are used for different effects. Bending. Bending is exactly as it sounds: bending the string to the side by pushing it (towards the sixth string) or pulling it (towards the first string), often while a fretted note is ringing. The first three strings are normally pushed, and the others are normally pulled. This is particularly important on the first and sixth strings, as you do not want the string to fall off the fretboard. Whether the string is pushed or pulled, the note will be raised in pitch. Many aspiring guitarists cannot bend properly. The "sound" of a bend is more important than how it is actually executed or how it looks, but a bad bending technique usually leads to a bad sound. Your favorite guitarist might bend using just his or her fingertips and you might be inclined to copy this — don't! Your hands can sound every bit as good as your hero's without copying his or her technique. There are two keys to bending properly: proper thumb positioning, and bending with the proper muscles. Do not keep your thumb behind the neck, where it usually is, but bring it up perpendicular to the neck (a position that is "normally" incorrect, but not in the case of bending). Keep the fingers firm. Do not bend your fingers, but push or pull with your forearm. You will hardly see your forearm move, possibly just see a couple of muscles flex. It will feel awkward at first, but if you can bend with the thumb in the proper position and without bending the fingers, you are probably doing it correctly. Many guitarists will have trouble bending more than 1/4 step (half a semitone) or perhaps 1/2 step (one semitone) with only one finger, especially on frets close to the nut and on the thinner strings. It is much easier to bend with more than one finger, for instance, with the index finger on the first or second fret and the ring finger on the third, and pushing or pulling with both fingers in order to bend at the third fret. More fingers may be used if this is not enough. It should be possible to bend at least a full step (the pitch difference of two frets) this way. Pre-bending. Bending, whether by pushing or pulling the string, raises the tension in the vibrating portion of the string, and thus always "raises" the pitch of the note. This means it is easier to slide up rather than down in pitch. To create the impression of bending down, the guitarist uses a technique called "pre-bending", that is, bending "before" the string is struck, then strike and release the bend (either gradually or quickly, depending on the intended effect). Bend and Release. The ideas of bending and pre-bending can be combined for a "bend and release", that is, striking a note, bending it up, then releasing it as you would with a pre-bend. This will often be perceived as a "bounce" in pitch, especially if played quickly. The reverse is also possible: pre-bend, release, and bend. Repeatedly and steadily bending and releasing is called "vibrato". Vibrato. Players of many instruments, including the human voice, use vibrato to help add expression to sustained notes. Vibrato is performed in two major ways, the first by rapidly bending the string back and forth, causing a modulation in pitch; therefore, all of the information above about bending applies here, except it is performed faster or more prolonged. Or it can be performed in a 'classical' style where one applies pressure parallel to the string towards the neck then towards the bridge repeatedly, which allows one to achieve vibrato upward and downward in pitch, albeit with a smaller change. A small, subtle vibrato might not require the assistance of other fingers; the fretting finger should be sufficient. However, for sustained vibrato or vibrato on the first or second frets, using multiple fingers for bending is a good idea.
1,181
German/Level I/Essen. <br clear="all"> Lesson I.6: Essen Food! Section Problems » Accusative Case. As you know from the introduction, in German, there are four cases. Three are used often. The first, Nominative Case, you learned in Lesson 1. It covers the subject, and the predicate noun (in "He is (noun).", (noun) is the predicate noun). The second, the Accusative Case, you will learn now. It covers the direct object and the object of several prepositions. The third, the Dative Case will be taught later on. It covers the indirect object and the object of many other prepositions. The object of a sentence will be in accusative case. In, "You hurt me.", 'me' would be accusative. Note: The Accusative Case and Dative Case are identical in English; that's why German has one case extra. Articles. In the articles, the memory hook for accusative case is "Der goes to den (pronounced "dane" ) and the rest stays the same." The masculine indefinite article goes to "einen", and everything else stays the same there. Therefore above, "der" Hamburger goes to "den" Hamburger and "ein" Hamburger goes to "einen" Hamburger when the hamburger is the direct object, such as in "Er hat einen Hamburger." ("He has a hamburger.") If you are getting confused, it's fine. This topic is one of the hardest for English speakers to grasp. Here are some solutions: To find out the case of something, first find the verb. The verb rules the sentence. Everything revolves around it. Next you find the subject of the sentence. The subject is the thing/person that is "doing" the verb. The subject is always in the Nominative Case, so it takes on the der, die, das, die, or ein, eine, ein. Now you look back at the verb. If it is a being verb (am, are, is, etc.), the next noun after the verb is the predicate noun. An easy way to figure this out is to write an equation. If the verb can be replaced with an equals sign (=), then the following noun is a predicate noun. If it can't be replaced by an equals sign, refer to the next paragraph. The predicate noun is also always in the Nominative Case, so the same rules apply to it. Ich bin ein Junge. Sie ist eine Frau. If the verb of the sentence is an action verb (playing, throwing, making, eating), find what the subject is doing the verb to. For example, if the verb is "makes" (macht), you look for what is being made. That is the direct object. The direct object is always in the Accusative Case, so it takes on the den, die, das, die, or einen, eine, ein. Sie haben den Cheeseburger. Habt ihr einen Salat? The indefinite articles, when you just look at their endings, select e, -, e for nominative case, and en, e, -, e for accusative. Remember, between nominative and accusative, the only third-person change is in the masculine form. Section Problems » Pronouns. The pronouns experience a much bigger change than the articles. This is also true in English, as the articles (a, an, the) do not change ever, but "I" goes to "me", "we" goes to "us", etc. Not everything is the same, though. While "me" is "mich" and "us" is "uns", the second and third persons undergo different changes. In third person, as in the articles, the only change is in masculine singular. Following the "der goes to den" rule, "er" goes to "ihn" when in the accusative case. The second person in English never changes. In German, "du" goes to "dich" and "ihr" goes to "euch". "Sie", the formal version of either, stays the same. Remember, "Sie" (2nd person formal) and "sie" (3rd person plural) only differ in their meanings and the fact that the former is capitalized and the latter is not. This stays true throughout German grammar. Here is a tabular representation of the above. Section Problems » Antecedents. Note: "This is just a quick lesson in English grammar applied into German. If you already know all about antecedents in English, skip the first paragraph." When using a pronoun, you have to know what it is for it to work. There are some rare exceptions, such as in mysteries or drama, but otherwise this is always true. Sometimes in dialogue this is taken care of by pointing or making some other gesture, but most of the time, the pronoun modifies something already mentioned. The object/person mentioned earlier that turns into a pronoun later is called the antecedent. In German this is very useful. You can't simply say 'it' any more. Many food words are masculine and feminine, and when you turn them into pronouns, they turn into 'he', 'she', 'him', and 'her', not always 'it'. For example, the sentence "The cheeseburger tastes good. It's very crunchy." turns into "The cheeseburger tastes good. "He's" very crunchy." Note: You will learn how to say this in German later in this lesson. Why is it "he"? This is where the antecedent comes in. Because there are foods that are masculine and feminine in German, you can't assume the 'es'. You have to look back at the previous sentence, at the antecedent, "der Cheeseburger". "Der Cheeseburger" is replaced by "er" (since it is the subject, and therefore in Nominative Case). Therefore, all you need to know are these connections: der/den-er/ihn, die-sie, das-es, die-sie. Section Problems » Food-Related Verbs. Of these five verbs, only trinken and bekommen are regular. Essen is "irregular" (that's what the "I" means). Do you remember from the last lesson 'lesen' and 'sehen'? In both of them, the first 'e' changed to 'ie' in the du- and er/sie/es-forms. Well "essen" experiences the same change, except that it changes to 'i', not 'ie'. Also, it acts the same as 'lesen' in the du-form: You don't have three s's in a row. "Isst" sounds and looks a lot like "ist". The minute difference happens to be in the way you pronounce the "s". When you mean "eats" it is sometimes an overstressed hissing (i.e. extremely sharp) sound. In normal life Germans, too, can only tell which verb is meant from knowing the context. Just like in last lesson, where you could say, "Ich spiele gerne Fußball.", you can also extend it to food. "I like to eat cheeseburgers." is translated as ""Ich esse gerne Cheeseburger." " Before 1996, the usage of "ißt" and "eßt" were common, but the new reform rules specify that these spellings are now the only correct spellings. The last two verbs (marked "(M)") are "modals". They will be discussed in the next section. Section Problems » Modals. In the introduction, you learned that German has no helping verbs. Instead, they have modals, words that basically do the same thing. Modals are conjugated very differently from normal verbs. The ich- and er/sie/es-forms are always the same, while the du-form adds an 'st'. Most modals experience a vowel change from singular to plural, and the rest is the same. Möchten. 'Möchten' isn't technically a modal, but it acts exactly the same. There is no vowel change, and the ich- and er/sie/es forms are "möchte". Here is the complete conjugation: 'Möchten' means "would like" and can be applied to food (e.g. Ich möchte einen Cheeseburger.). Möchten can be translated even more literally as "would like to", and is traditionally used with an infinitive verb at the end of the sentence (e.g. "Ich möchte jetzt gehen"/"I would like to go now"). However, this infinitive is not necessary if it's completely obvious what you're talking about (If you say "Ich möchte einen Cheeseburger", everyone will assume that you would like a cheeseburger to eat.) Wollen. 'Wollen' is a true modal; it even changes vowels. Ich/er/sie/es "will" and du "willst". Here is the complete conjugation: 'Wollen' can also be applied to food, but may be considered impolite and demanding ("Ich will einen Cheeseburger!" roughly means "I demand a cheeseburger!" "Möchten" should be used instead: "Ich möchte einen Cheeseburger!" = "I want a cheeseburger!"). 'Wollen' should not be confused with the future tense, despite the presence of the English word 'will' in the conjugations. However, can also mean an intent or a document showing what one "wants" to happen. So it is not so different from 'to want' as possibly originally presumed. Modals with other verbs. This is very important. When you need to use another verb with a modal (such as expressing you would like or want to perform an action), the sentence's word order is somewhat different than it would be in English. In English, you would state the subject pronoun (such as "I"), an English equivalent to the modal verb (such as "want"), the action you want to perform (such as "to eat") and then what the action will be performed on (such as "hamburger"), making the sentence "I want to eat a hamburger." In German you must put the action at the end of the sentence, making the sentence "I want a hamburger to eat." ("Ich will einen Hamburger essen.") Section Problems » Hunger and Thirst. In German, instead of saying, "I'm hungry."(Ich bin hungrig), you may also say "I have hunger."(Ich habe Hunger) The same applies to thirst. Here are the German translations of the corresponding nouns: Hunger - der Hunger Thirst - der Durst Like in English, these two words do not have a plural form. When using them, you don't need to worry about the 'der'; you can just say, "Ich habe Hunger" to say "I am hungry" and "Ich habe keinen Hunger" for "I am not hungry." Somewhat archaic but still in use are the adjectives "hungrig" and "durstig". Those are often used when talking about someone (especially animals): "Der Löwe ist hungrig" for "The lion is hungry". Section Problems » Formal Conversations. In Lesson 1, you learned how to talk formally, using phrases like "Guten Morgen!" and "Wie heißen Sie?". There are, however, a few words that are 'survival words' in Germany, specifically: Danke - Thank you, Thanks Bitte - Please "and" You're welcome. To make this even more formal, you can tack on the word 'schön' to the end of "Thank you" and "You're welcome" to make 'dankeschön' and 'bitteschön' (both one word) in response. 'Schön' literally means 'pretty' (you'll relearn this next lesson). Some other ways to say "thank you": Some other ways to say "You are welcome": These might also be useful: Entschuldigung - Excuse me, Pardon Es tut mir leid - Sorry, I'm sorry Section Problems » Kein-words. Twice you have been taught that the ending of the indefinite article for plurals "would be" eine (for Nominative and Accusative cases), if there was an indefinite article for plurals. Now that lesson applies. The kein-words have the same endings as the ein-words, and they mean the opposite: no, not any, none. For example, "kein Cheeseburger" means "no cheeseburger". "Keine Cheeseburger" (in this case Cheeseburger is plural) means "No cheeseburgers". Notice the 'e' at the end of 'keine'. That's the ending for plurals and feminine nouns and can be likened to the "der, die, das -> die" relationship, where the feminine article serves for the plural as well. Section Problems » Ordering at a Restaurant in Germany. das Restaur'ant' (French pronunciation) - Restaurant There are many restaurants you might find in Germany. Much like in English-speaking countries, you would more likely use the name of the restaurant than name what kind of restaurant. If you want to address the wish to eat a certain food, there are two ways: example: "wanting to eat chinese food" 1. "Ich möchte gerne zum Chinesen." - literally: "I want to go to the Chinese (restaurant)." 2. "Ich möchte gerne chinesisch essen (gehen)." - literally: "I want to (go) eat Chinese (style food)." Here are some more restaurants you can find in Germany: Accusative case prepositions. You read at the beginning of this lesson that the Accusative Case covers the direct object and the objects of some prepositions. Here are those prepositions that always fall under Accusative Case "bis" - until "durch" - through "entlang" - along "für" - for "gegen" - against "ohne" - without "um" - at, around You learned "um" last lesson, and "ohne" earlier this lesson. "Bis", "durch", "entlang" and "gegen" will be taught in depth later, and "für" will be taught now. Up until this point, you have only worried about the Accusative Case in third person. "Für", meaning 'for', can and should be used in the first and second persons, too. Here's an example: "The cheeseburger is for me." - "Der Cheeseburger ist "für mich"." As you can see, 'me' is put into accusative case because the preposition is "für". Section Problems » Saying How Food Tastes. In German (as in English) there are several ways of telling how food tastes. You can do this with 'gut' and 'schlecht' from Lesson 1 to say: Der Cheeseburger schmeckt gut - The cheeseburger tastes good Der Cheeseburger schmeckt schlecht - The cheeseburger tastes bad But this is bland. Hopefully the food has more flavor than the description of it. You can use the following words to more colorfully describe how the cheeseburger tastes: Schmecken is a regular verb. Here is its conjugation: The first and second persons really shouldn't be used. No one is going to say, "You guys taste salty" or "I taste creamy." So the only forms you "really" need to know are er/sie/es "schmeckt" and sie (plural) "schmecken". You can use 'schmeckt' and 'schmecken' or 'ist' and 'sind' to state how the food tastes. Just use whichever one you would use in English and it'll usually be correct. Although the English meaning of "schmecken" is simply "to taste", "Schmeckt der Cheeseburger?" can be taken in a positive way to mean "Do you like the cheeseburger?". In other words, "schmecken" alone can mean "to taste good". Section Problems » Dieser-forms. ""The" cheeseburger tastes good." does not sound that specific as to which cheeseburger you are talking about. You could be talking about a cheeseburger that is not directly in front of you. It just isn't clear. Now, if you said, ""This" cheeseburger tastes good.", it would be obvious that you're talking about the cheeseburger you're eating. 'Dieser' is the German translation for 'this': "Dieser Cheeseburger schmeckt gut." Dieser. 'Dieser' is a special adjective. It changes forms in different situations: different genders and different cases. It can also mean 'these' when modifying a plural. Here are its forms: As you can see, "dieser" is only appropriate for modifying masculine nouns in nominative case. But 'Cheeseburger', which is masculine, is the subject of the sentence, "Dieser Cheeseburger schmeckt gut." So it is correct in that circumstance. Jeder. "Jeder" means 'every'. It acts exactly like 'dieser' in its endings, so it should be easy to remember. Here are the different forms: Notice the absence of the plural form. When you think about this, it's the same in English: no one says 'every books'. Welcher. 'Welcher' is the third of this threesome of adjectives. 'Welcher' means 'which' and is used like the other interrogatives (wer, was, wann, wo, warum, wie, and welcher). However, because the general subject has to be specified, "welcher" must be inflected before use: "Welcher Hamburger ist seiner?" Its forms have the same endings as 'dieser'. Connection with Time. You might want to say 'every day', 'this week', 'every morning', or 'which Tuesday night?'. But to do this, not only do you need to know the jeder-forms, but also the genders of the times and the cases. The second one is easy: Whenever you do something at a certain time, that time is put into Accusative Case. Last lesson, you learned the gender of one time: "der" Tag. So now you know everything to say 'diesen Tag', 'jeden Tag', and 'welchen Tag?' (this day, every day, and which day?). Here are the cases of all the times in Lesson 2: When extending to 'which Tuesday night?', remember that the night stays feminine on Tuesday, so it stays "Welche Dienstagnacht?". Likewise, you can say 'every June' the same as 'every month': 'jeden Juni'. This and That. "Ich möchte einen Cheeseburger. Der schmeckt sehr gut." "Ich esse jeden Tag Cheeseburger. Die habe ich gern." Look at the second sentence of each of these German dialogues. What's missing? That's right, instead of "Der Cheeseburger schmeckt sehr gut." and "Die Cheeseburger habe ich gern.", both of the 'Cheeseburgers, so to speak, are dropped. We're left with just the articles, only in this case, they aren't articles. They're demonstrative pronouns. Demonstrative pronouns aren't scary. They're just the same as the normal pronouns, only they give more "oomph" to the sentence. They can be translated as either 'this' or 'that' ("I'd like a cheeseburger. That tastes very good."), or 'these' or 'those' for plurals ("I eat cheeseburgers every day. These I like."). Demonstrative pronouns are exactly the same as the definite articles (well, there is one change in dative, but that will be covered in Lesson 7). If you are not sure of the gender (meaning in context, the speaker doesn't know, not that you've forgotten that it's 'der Cheeseburger'), use 'das', like in "Was ist das?" (What is that?). Money and Paying. Germany, Austria, Luxemburg, Belgium and Südtirol – in other words: all German speaking regions except Switzerland and Liechtenstein– have given up their former currencies and adopted the Euro as of 1999. One "Euro" is worth 100 "Cents". Because they are not members of the European Union, Switzerland and Liechtenstein have kept the Swiss Francs ("Franken" = 100 "Rappen"). 'Euro' normally does not change in the plural in German, so you would still say "Ich habe 500 Euro." Nevertheless, there is an exception: Euro "coins". If you say "Ich habe vier Euros.", you actually are saying that you have four 1-Euro coins. Because the backsides of euro coins look different in each country, many people in Europe have started collecting foreign euro coins. In this case you can say "Ich habe irische Euros." (I have Irish euro coins.) for example. There is not yet a rule whether or not the word "Cent" has a different plural form. The majority of Germans are using the word "Cent" as a plural form, but when they don't it is simply "Cents". In German "euro" is pronounced [‘oi-ro], not [you-ro]. For "Cent" there are two pronunciations: you can either pronounce it as in English or you say "tzent". The latter version seems to be preferred by older people. When at a restaurant, you will want to pay at the end. You can use this vocabulary to help you. Section Problems » Test. The test will be located here, but the test for this lesson is not yet completed.
5,231
Investing/Starting a business. Investing counselors advise that the best way to get a return on money is by starting up a business. This can take up many forms, from home-based business to a storefront to franchising. Franchising is a safe way to get into business for an inexperienced person because a corporation gives extensive help in getting the new venture started.
81
Investing/Stock market. The stock markets are a means to buy and sell, but they are a market place: when, what, and how often and how much one buys, accumulates or sells is NOT the province of the market: that is the province of the field of investment which is covered elsewhere. Investment in general is a rich and complex field as it serves all kinds of investors, government, corporations, services, groups and individuals: each investor has their own objective and their own access to capital which to invest. Indeed, the subject of investing can well be approached from the investors point of view. Given that I am writing this here in a wiki, an information forum open to and created by the community of the world, it might be appropriate to direct this summary to the individual small investor, who invests as part of a long term and life long plan of savings for them, their family and heirs. Again, the market is a place where one trades (buys and sells) financial instruments, such as stock, bonds and the many forms of these instruments, and is not itself concerned with investing, ie, the strategy for making a profit under many many varied desires and circumstances. This section under the stock market should be dry, technical and thorough, and should serve as a reference. However, to understand the vehicles, form a coherent view of ones own objectives and the appropriate vehicles: stocks (common, preferred) bonds (convertible or not) one should start with an introduction to investing, and most likely, focusing at first on individual investing, which should be the most straight forward and the most useful. Traditionally the US stock exchange has given an annual average return of seven percent after adjusting for inflation. This makes it one of the most lucrative investments available. Granted, there is no guarantee that the market will behave in the future as it has in the past, but it has been consistent in some respects over its 70+ year history. The challenge and lure of Investing come from the fact that it is an inexact science. In physics, there are a few laws which govern a large variety of physical phenomena. In Investing, there are no such comparable laws. Investing is all about predicting the future. Since, there are a large number of factors influencing the future price of a stock, there is always a degree of uncertainty with any position. Stocks are just one kind of financial instruments. The field is complicated by the fact that there are mutual funds, Exchange Traded Funds (ETFs), Real Estate Investment Trusts (REITs), options, futures , bonds and several other kind of financial instruments. It takes almost a year to just familiarize oneself with the jargon of the field. Finding a broker. There are several options to consider when finding a broker. These include but are not limited to the following: Full service brokers, discount brokers, and financial advisors. Each have their advantages and disadvantages. Transaction cost, experience, history and strategy are all factors to consider when hiring a broker. A full service broker is a broker that will generally come with the highest up front costs. These costs are probably the full service broker's biggest disadvantage. However, the broker history plays a large role in the weight of this disadvantage. If the full service broker proves to have a history of high returns, they may be worth the initial fee, with the assumption they may be able to make you more than your average expected return after the fees are paid. When choosing a full service broker, one should interview several brokers. This serves as a good way to view their history, ask about their experience, costs and finally their strategy. Their strategy is what stocks and funds they are most familiar with and their justification as to why they pick the stocks they do. If one is adverse to larger transaction costs and doesn't mind using a more hands on approach, then they may want to look at more cost effective methods, such as a discount broker. Generally these brokers will be cheaper than their full service cousins (hence the name 'discount'), but they may require more interaction from the user. Ameritrade, Brown & Co, and Interactive Brokers are some of the most cost effective brokers around. Barron's and Forbes periodically compare these brokers. Understanding Stock Fundamentals. Stock market prices fluctuate everyday, and no stock is completely safe. However, there are certain things that you can look at to try to determine the best stocks. The price of stocks is based on two things: hype, and the fundamental value of the company. You must be careful about stocks with lots of hype that lack strong fundamentals, because they have strong potential to lose much of their value rather quickly. When looking at a company, you will first notice its price. The listed price is generally taken as the most recent trade price on an open market. If you multiply the total shares outstanding by the price per share, you get the market capitalization (abbreviated market cap), which reflects the current market value of the company. The book value is the value of the various assets that make up the company. Many companys' market values are many times the book value, which reflects non-tangible assets like customer relationships. What really drives the prices, however, is earnings. The earnings are the money made, which is the sales or revenue minus the costs of doing business, among other things. Earnings are analyzed in relation to price by a value called the P/E or price to earnings ratio. The primary way to use the P/E ratio is in a relative valuation. That means, how cheap is this company/stock compared to similar companies. If company A and B are equally profitable, have similar levels of assets and debt, and are growing at similar rates, then the stock with the lower P/E would appear to be a "better deal" or is possibly undervalued. The major pitfall in this approach comes when both companies A and B are presently overvalued, which could precede a drop in the stock price. There were numerous examples of this during the dot-com "bubble" and it's subsequent "burst". Again, as a warning, it is imperative to note that one of the major conditions for determining relative value using P/E ratios is the growth rate of a company. If company A has a higher P/E ratio than company B, it is highly likely that the higher ratio is justified by a higher growth rate of company A's earnings. Research stocks over the Internet. Many free websites can help you learn more about stocks. Here are just a few: Understanding Stock Technicals. Some people give lots of importance to the price/volume behavior of stocks. The price and volume of a stock can be charted against time. A good thing about the price/volume history is that it does not lie. Also, you will read the disclaimer in several places that past performance does not predict the future. If the past performance, does not mean anything to future, why even study it? No amount of chart reading would have predicted the Enron Collapse. The rationale for looking at the charts is that it helps you identify the patterns and/or trends. Fundamental analysis tells you what to buy and technical analysis is supposed to tell you when to buy. Choosing stocks. The first thing to remember is that stocks are risky, and even the least risky stock can on occasion go down in value or even bankrupt. You can find out about companies from all over, but before buying you should thoroughly research the company. Also, keep in mind that many people including so-called professionals are often wrong. Over 80% of actively managed mutual funds do not generate better returns (after they take their fees) than the major indexes. A well known investor named Warren Buffett claims that "Rule number one" is, "don't lose money." This is easier said than done and if you can not tolerate modest, near term, temporary losses, simply buy new issue Treasury Bonds, hold them to maturity and do not expect much income (that will be taxed like wages, at higher rates), after inflation. Historically, stocks have generally provided better returns albeit with added risk. The older you are the less risk you should be willing tolerate. Warnings aside, the first thing to consider is risk. How much debt does the company have? Are they earning money, and will they continue earning money. Read their annual report, and look at their business, and think about what could happen that could hurt their business. Listening to conference calls is a rarely used but great way to assess the company's management. You can hear if the presentation of results and predictions made sound honest and realistic. Risky stocks may be a good investment, but you should always be aware of the risks beforehand, and decide what you are going to do if the worst comes to pass. After taking a hard look at the risks, you also have to look at the potential for the company, and the likelihood that it will happen. For example a solar cell company, may have huge potential if the government mandated solar cells on top of every building, but that is very unlikely to happen. Look at the current price/earnings(P/E) ratio and what it would be in the future with various levels of growth. Also, look and see if the company pays dividends. Often, the earning number is inflated through accounting tricks, but the dividend is what the company paid stockholders last year. If the company has a good dividend, you can make a bit every year while continuing to hold the stock. While the fundamentals, and how much money the company makes will affect it over the long term, other factors often dominate the markets in the short term. During the late 90's tech stocks got bid up, because they were hyped up in the media. After September 11, investors worried about terrorism, and stocks were priced accordingly. The market has day-to-day fluctuations, but usually there are certain themes from the media that hype something, that over-values or under-values certain stocks and segments of the market. However, when the theme goes away--often rather quickly--those stocks will correct (go up or down to their intrinsic or fundamental value). One short-term strategy would be to try to ride the themes, and profit, but it can at times be quite difficult, and mistakes often result in heavy losses. If you are going to buy a stock that you think will go up on hype use extreme caution. A more sensible approach is to try to buy things that are fundamentally undervalued before you think a cycle will start hyping that particular area of the market. The value of a share of stock is based on many things but how much the "market" thinks the company will make in the future is the usually the biggest factor in what dicatates the current selling price. Anticipating price movements will generally give much better results than reacting to them, in both the short and long term. It is important to recognize that the past does not dictate the future, but it can give some insight. Stocks with long histories of increasing value (including dividends when applicable) are more likely to continue appreciating than those with an erratic past. Recognize that the sector a company is in can be as or even more important to the share price as the company's fundamental future earnings expectations. Chasing after stocks with significant recent price appreciation may work but more likely buying an already over priced stock will cause losses. An important truism is that, "The wise man(woman) does first what a foolish one does last." Ask anyone who waited until late 1999 to buy tech stocks because they decided, "everyone is getting rich except me." Consider reviewing the past price performance of each security you consider buying or selling as a small part of your fundamental analysis. This is best achieved by using price charts of varying lengths of time. The easiest part of stock investing is buying; you just need money. The hardest part is deciding if and/or when to sell; that requires wisdom. Failing to sell or buying an overvalued stock will almost always lead to losses and vice versa. It is wise to decide on your selling price and loss limit before you buy a stock (and sticking to them). Never let tax consequences dictate you purchases and sales but keep in mind there are tax incentives (different tax rates on gains and losses) for holding shares with gains for a year and a day. This also serves to diminish the tax benefit if you have losses. It is always better to pay a high tax on a high gain than a low tax on a high gain that evaporates into a low gain. No one likes to lose money but it is part of all but the most conservative investment strategies; no one honestly bats 1000. Try very hard not to allow emotions, hope or pride to affect your decisions. It is far better to acknowledge a mistake and take a small loss (that is not likely to be short lived) than to let to let it become a large loss. Never chide yourself for buying or selling too early. It is far better than waiting until it is too late and realizing a larger loss. There are very few stocks that you can buy and hold for a lifetime. If you are unwilling to learn about a company/industry/sector on a fundamental basis you should not attempt to pick individual stocks. It is more appropriate to buy an index, mutual, or exchange traded fund based on your views of the future. This entails less risk (as well as lower returns) than stock picking, reducing possible losses. If you have the inclination and time to learn how and do fundamental analysis you will generally realize better results over time. You must also recognize that share prices can sometimes become completely disconnected and unrelated to fundamental, intrinsic value not merely over or under priced. That is the greatest opportunity for gains (or losses) as noted above over the long term. There is only one true thing about the stock market and stock prices; they will fluctuate. This observation is attributed to JP Morgan. Risk, Risk Premiums and Diversification. Stocks are risky. There is no guarantee that the return on a particular stock will beat the market average or even be positive. The riskier a stock is the greater its average return (but with a greater risk of no return or worse). This is called the "risk premium". Essentially, the seller is giving a discount to the buyer in return for taking on risk. Risk can be reduced through diversification while retaining the same average return (called the "expected return"). Imagine a stock (stock A) costing $10 with a 50% chance of paying $2 and a 50% chance of paying $0. This stock would have an expected return of $1 (the average of 2 and 0) but would be risky. Now imagine that instead of buying 10 shares of stock A we bought 5 shares plus 5 shares of stock B. The cost and payback of B is identical to A with the caveat that B is a stock in an industry totally unrelated to A, and thus is not linked in its results. The stock A + B combination now has exactly the same expected return as A alone, but with lower risk! In other words: DIVERSIFICATION LOWERS RISK WHILE MAINTAINING RETURNS. The more diverse a portfolio is, the less risky it is. This is one of the rationals behind the new breed of index funds which recreate broad indexes such as the S&P 500 or the Wiltshire index. For long-term investing, index funds of this type are an excellent choice. When to Sell. Knowing when to sell is often the most difficult part of buying and selling stocks. When a stock goes down, it is often difficult to admit that you made a mistake. When a stock goes up, will it keep going up? It is easy in hindsight to think that you should have held onto stock when you see it go up after you sold. You generally don't know when a stock has really reached its peak, or whether it will go back up again, but there are some things to look for. Remember the reason you bought the stock. Considering all currently available data, is that reason still valid? Try to avoid coming up with new justifications for holding a falling stock. If you bought the stock, because you thought the company's new product would do really well, and it hasn't it may be time to sell. There is nothing wrong with admitting you were wrong. However, you also need to be careful you aren't just selling to buy into the latest fad, either. The way the stock market works has been fairly consistent for many years. Different sectors have become hot, and later become not so hot. If you are going to revise your strategy, make you sure you still consider long term trends. However, if something doesn't continue to fit your strategy, sell it. It doesn't matter if it has gone up a lot, or is almost worthless. Unless, you still think it fits with your strategy sell it. Remember, just because it may have a chance of going up a lot, doesn't mean there isn't another stock out there that is better. Selling based simply on past performance is generally a bad idea.
3,773
Investing/Rental properties. Rental properties are a way to have a long-term monthly income as well as build equity, meaning that the property has value in itself that can be recovered upon sale. = Me, a landlord? = You, yes, you, can be a landlord. Well, maybe not *you*, but that other guy over there. Yes, him. He's got reasonably good credit, some initial cash, plus a moderate amount of time and patience to deal with initial paperwork and projects. He's willing to make his life more complicated now in the hope that he might be exchanging it for greater wealth later. And he lives very near an area where people are looking to rent. To be a landlord, he will need: a place to rent (fully insured), tenants in that place, and carefully constructed written agreements with the tenants (leases) that talk about how everyone is expected to behave, including how much the tenants will pay. If he doesn't have a place already, he'll need to buy it, which will mean negotiating with the previous owners (or their agents) and bankers. If the landlord can find a place to buy such that his monthly total of mortgage payments, insurance, taxes, utility, repair and miscellaneous costs are less than the rent he's taking in, he'll be making money. This may not be realistic at the start. A high property cost, low amount of down payment, a less than ideal interest rate, high taxes and critical property repairs could push expenses too high for profit. But he'll never know for sure until he researches his local market and starts making calls. = Choosing a property = Single Family Houses. Houses are a higher risk than apartments and condominiums simply because usually a house costs more and therefore you have a higher risk of negative monthly cash flow if your property is vacant. With a condo, since the overall cost is usually less, your exposure to risk is less. Likewise in an apartment since there are more units to rent if one is vacant there will still be some rent collected every month. For instance if an investor buys a 4 unit building (four-plex), with 2400 total square feet, then rents each 600 square foot unit for $500/month, the total rent collected is $2000 dollars. Lets say this same investor buys a 2400 square foot single family home and rents it for the same $2000 a month. The risk is obvious; the single family tenant could decided to leave, then the investor is stuck with a property with zero dollars collected for rent. While the four-plex only has one unit vacant, the other three are still rented thus the investor has $1500 of rent still coming in. The four-plex is a much smaller risk. The other negative is a multi-unit investment property usually rents at a higher rate per square foot than a single family house. Lets assume this same investor can get around $0.83 per square foot for a single family house while the four-plex will rent at $1 per square foot. That is $2400 of total potential rent for the four-plex, and $2000 for the single family house. It is obvious multi-family investing is better for maximizing positive cash-flow for a real estate investor. On a positive note single-family houses have tended to appreciate faster and more steadily than condos, in a steady real estate market, although that's no guarantee of future price changes. For this reason the single family house may equalize the monthly cash flow of a condominium when looking at a long-term investment (5 to 10 years +). It is important to look at the history of the neighborhood and region you are investing in to determine the best strategy that meets your financial goals before investing in single family houses. But remember, history is only a guide - the future may be very different and can't be predicted. Even the nicest area now can become a slum in the future. Condos. Condos are a great place to start for first time investors, simply because they require very little 'exterior' maintenance. Usually you pay an 'Association Fee' (HOA) that does all the 'Common Area' maintenance. This leaves you free to concentrate on the inside and taking care of the renters. Be wary, however. In a condo agreement, you are vulnerable to risks associated with the other condos. If another condo owner in the association goes bankrupt, you may be subject to higher HOA fees. Likewise, if another condo falls into disrepair it may become very difficult to rent or sell your unit. The larger fraction of ownership each associate owns, the greater the risk. Condo rules may change without your consent, as they are subject to majority votes; imagine the association deciding the units can no longer be rented! Vacation Properties. = Buying the property = Financing the purchase. You don't actually need to have a lot of cash on hand to buy a property. All you need is to have access to cash. This can be through equity that you withdraw from your home through a second mortgage or line of credit, or the cash a partner in a joint venture provides. This initial cash - whatever the source - provides your down payment. When you have a down payment that is sufficiently large (10% of purchase price, 25% or some other amount), a lender can lend you the rest. This lent sum will normally be secured against the value of the property, through a mortgage. Remember though the interest you are paying on the loan reduces your profit and the level of your risk increases the more you borrow... if your property is empty you still need to pay the mortgage. = Renting the property = Predicting rental income from a property is important because it is your only source of active income from the investment. The property may gain value over time and provide you with return upon sale of the property in the future, but it should not expected. Your rental property investment should be profitable on the rental income alone. There are several ways to estimate rental income. In rough order of accuracy: Once you have estimated the rental potential, it's time to correct the figure for vacancy and management costs. If you plan to manage the property yourself, do not correct for management. Management costs range from 8 to 12% of rental income on average. Skimping here may result in unruly tenants, more vacancy, and unchecked maintenance. Paying a premium may save you in the vacancy and maintenance department. 10% is a good rule of thumb for initial calculations. Vacancy should be expected and projected as well. Rule of thumb: 7% (about 1 month a year). Therefore, if you estimate rent to be $1,000 a month, multiply by .9 and then by .93 to obtain $837. Sobering, but if you calculate conservatively your risk will be mitigated. = Maintaining Property = Self Maintenance. = Tax Consequences of Rental Properties = = Links =
1,572
Cryptography/Vigenère cipher. Vigenère Cipher. One of the most famous and simple polyalphabetic cipher is the Vigenere Cipher developed by Blaise de Vigenere in the 16th century. The Vigenère cipher operates in a manner similar to a ../Caesar cipher/, however, rather than shifting the plaintext character by a fixed value n, a keyword (or phrase) is chosen and the ordinal values of the characters in that keyword are used to determine the offset. The process that creates encrypted text is simple, but it was unbroken for 300 years.The system is so simple that the Vigenere encryption system has been discovered and rediscovered dozens of times. For example, if the keyword is "KEY" and the plaintext is "VIGENERE CIPHER," then first the key must be repeated so that it is the same length as the text (so key becomes keykeykeykeyke). Next, the ordinal value of V (22) is shifted by the ordinal value of K (11) yielding F (6), the ordinal value of I (9) by the ordinal value of E (5) yielding M (13), etc. The keyword is repeated until the entire message is encrypted: An easier, but equivalent way of encrypting text is by writing out each letter of the alphabet and the key, and simply matching up the letters: First The V in the first row would up with the F in the second. Then, one would go down a row, and see that the I in the first row lines up with the M in the third. After one reaches the bottom row, then they would continue lining up letters with the second row. This uses exactly the same cipher, and is simply an easier method of performing the encryption when doing so by hand. The Caesar cipher could be seen as a special case of the Vigenère cipher in which the chosen keyword is only a single character long. An algorithmic way of expressing this cipher would be: GROMARK cipher. The Gronsfeld cipher is variation of Vigenere using a pseudo-random decimal key. The Gronsfeld cipher was invented by José de Bronckhorst, earl of Gronsfeld, in 1744. The cipher developed by Count Gronsfeld (Gronsfeld's cipher) was used throughout Europe. It is enciphered and deciphered identically to the Vigenere cipher, except the key is a block of decimal digits (repeated as necessary) shifting each plaintext character 0 to 9, rather than a block of letters (repeated as necessary) shifting each plaintext character 0 to 25. It was more popular than the Vigenère cipher, despite its limitations. An algorithmic way of expressing this cipher would be: The GROMARK Cipher is a Gronsfeld cipher using a mixed alphabet and a running key. running key cipher. The running key cipher is a type of polyalphabetic substitution cipher in which a text, typically from a book, is used to provide a very long keystream. Usually, the book to be used would be agreed ahead of time, while the passage to use would be chosen randomly for each message and secretly indicated somewhere in the message. A cryptanalyst will see peaks in the ciphertext letter distribution corresponding to letters that are formed when high-frequency plaintext letters are encrypted with high-frequency key text letters. If a cryptanalyst discovers two ciphertexts produced by (incorrectly) encrypting two different plaintext messages with the same "one-time" pad, the cryptanalyst can combine those messages to produce a new ciphertext that is the same as using one of the original plaintext messages as a running key to encrypt the other original plaintext, then use techniques that decode running key ciphers to try to recover both plaintexts. Further reading. In a later chapter of this book, we will discuss techniques for ../Breaking Vigenère cipher/.
912
Perl Programming/Perl 6. Raku will separate parsing and compilation and runtime, making the virtual machine more attractive to developers looking to port other languages to the architecture. Parrot is the Raku runtime, and can be programmed at a low level in Parrot assembly language. Parrot exists in a limited form as of June, 2003, and a small number of languages (Jako, Cola, Basic, Forth and a subset of Raku) exist simply to be 'compiled' down to Parrot assembly language opcodes. While Raku is being developed, the best way to stay informed about what's happening is to keep an eye on Weekly Rakudo News. Go there to see glimpses of Raku.
164
Perl Programming/Humour. Obfuscated code. Some people claim Perl stands for 'Pathologically Eclectic Rubbish Lister' due to the high use of meaningful punctuation characters in the language syntax. In common with , obfuscated code competitions are an interesting feature of the Perl culture. Similar to obfuscated code but with a different purpose, Perl Poetry is the practice of writing poems that can actually be compiled by perl. This practice is fairly unique to Perl, due to the large number of regular English words used in the language. New poems can regularly be seen in the Perl Poetry section of perlmonks.org. A Question. use strict; my $scupture = join("",<DATA>);$scupture =~ s/^\s*(.*?)\s*$/$1/; print unpack("A*", eval($scupture)); __DATA__ "\x20\x20\x0d\x0a\x6f\x62\x66\x75\x73\x63\x61\x74\x69\x6f\x6e\x0d\x0" Just another Perl Hacker. Your mission, should you choose to accept it, is to write a one-liner perl script which displays the phrase "Just another Perl hacker," (including the comma, and capitalization as shown). If successful, you win the right to use it as an email signature identifying yourself as a Perl hacker. Entries will be judged on how smart-ass the code is. Around 100 of the first JAPHs and some funky obfu Perl can be seen on CPAN. Acme. There's always a place in Perl for odd modules, and one such place is the Acme:: namespace. If you have a module which knows how long a piece of string is, or one which converts your perl script into an image of Che Guevara, post it here. Golf. Perl is a very compact language. So compact, that some have even create a game around perl's terseness called perlgolf. In perlgolf, you are given a problem to solve. You must solve it in the fewest number of characters possible. A scorecard is kept, and after 18 "holes", a winner is announced.
550
Perl Programming/Regular expressions. Regular expressions are tools for complex searching of text, considered one of the most powerful aspects of the Perl language. A regular expression can be as simple as just the text you want to find, or it can include wildcards, logic, and even sub-programs. To use regular expressions in perl, use the =~ operator to bind a variable containing your text to the regular expression: $Haystack =~ /needle/; This returns 1, if "needle" is contained within $HayStack, or 0 otherwise. $Haystack =~ /needle/i; # The i means "case-insensitive" $Haystack =~ /(needle|pin)/; # Either/or statements $Haystack =~ /needle \d/; # "needle 0" to "needle 9" Regular expression can also be used to modify strings. You can search and replace complex patterns by using the regex format s/// $msg = "perl is ok"; $msg =~ s/ok/awesome/; # search for the word "ok" and replace it with "awesome"
262
Perl Programming/Regular expression operators. Matching a string. # Shorthand form uses // to quote the regular expression $Text =~ /search words/; # The m function allows you to use your choice of quote marks $Text =~ m|search words|; $Text =~ m{search words}; $Text =~ m<search words>; $Text =~ m#search words#; Spliting a string into parts. # The split function allows you to split a string wherever a regular expression is matched @ArrayOfParts = split( /,/, $Text); # Splits wherever a comma is found @ArrayOfParts = split( /\s+/, $Text); # Splits where whitespace is found @ArrayOfParts = split( /,\s*/, $Text); # Comma followed by optional whitespace @ArrayOfParts = split( /\n/, $Text); # Newline marks where to split Searching and replacing a string. # The s function allows you to search and replace within a string. s(ubstitute) $Text =~ s/search for/replace with/; $Text =~ s|search for|replace with|; $Text =~ s{search for}{replace with}; # Putting a g (global) at the end, means it replaces all occurances and not just the first $Text =~ s/search for/replace with/g; # As with everything, putting an i (insensitive) at the end ignores the differences between # uppercase and lowercase. Use Locale; $Text =~ s/search for/replace with/i; Extracting values from a string. # This function sets the variables $1, $2, $3 ... # to the information that it has extracted from a string. $Text =~ m/before(.*)after/; # So, if $Text was "beforeHelloafter", $1 is now "Hello" $Text =~ m/bef(.*)bet(.*)aft/; # This time, if $Text was "befOnebetTwoaft", $1 is now "One" and $2 is "Two" # It can also be used to extract certain kind of information. $Text =~ m|([^=]*)=(\d*)|; #If $Text was "id=889", $1 now equals "id" and $2 equals 889.
560
Perl Programming/CPAN. =CPAN= A huge collection of freely usable Perl modules, ranging from advanced mathematics to database connectivity, networking and more, can be downloaded from a network of sites called CPAN. Most or all of the software on CPAN is also available under either the Artistic License, the GPL, or both. CPAN.pm is also the name of the Perl module that downloads and installs other Perl modules from one of the CPAN mirror sites; such installations can be done with interactive prompts, or can be fully automated. Look for modules on CPAN Installing modules. With ActivePerl (Windows systems). From a command-line, type the command ppm This will give you a "Perl Package Manager" prompt, which allows you to download and install modules from the internet. For example, to install the Time::HiRes module, type: search time::hires That will give you a list of modules that match your search query. Once you know the module is available and what its exact name is, you can install the module with: install Time::HiRes With Perl. If you're using a normal version of Perl, the way to activate the package manager is this: perl -MCPAN -e shell; This will load the CPAN module, and let you search for, download, install, and manage the modules on your computer the same as PPM. With Perl (cpanm). The Perl module cpanm (CPAN Minus) is another alternative for installing modules from the CPAN library cpanminus.pm. cpanm can be installed and used like this on a UNIX-like system: curl -L "http://cpanmin.us" >cpanm chmod +x cpanm ./cpanm LWP::Bundle One must have root privileges in order to install module in the system-wide directories, however alternatives exist such as local::lib, which allows regular users to install and use Perl modules in their home folder lib.pm. With Strawberry Perl (Windows systems). Strawberry Perl also includes the CPAN module, so you can use the command above to activate the package manager. The start menu, however, also includes a shortcut (with the name of "CPAN Client") so that you don't have to go to a command line to do so. A number of modules are already included in Strawberry Perl, beyond what comes with a normal version of Perl, or what comes with ActivePerl, so you may wish to check, if the module you want is already installed before you start the CPAN client. Using a module in your program. To incorporate a module into your program, use the use keyword: use Time::HiRes; You can supply an optional list of the functions you want to use from this module, if you're worried that some of the function names in the module are too similar to functions you're already using: use Time::Hires qw(time gmtime); With that done, you can simply use the supplied functions as normal. Most modules have example programs within their documentation, and the best way to start using a module is to copy and adapt one of the example programs. Finding documentation. The documentation for each module is installed in your documentation directory when you get a new module, or you can browse documentation on search.cpan.org and perldoc.perl.org. Unix systems. On Unix systems, the documentation is usually installed as "man" pages in section 3p so that the command below will work: man 3p Module::Name perldoc Module::Name will also work. If you want documentation that is browseable in a web browser, you can install Perldoc::Server as noted below. Windows systems running ActivePerl. Module documentation is installed as HTML files in ActivePerl. To find those files, try looking in some of the following directories: If you're having real trouble finding the HTML documentation for a module, you may be able to read the *.pm Perl file yourself for POD comments, or use the pod2html tool yourself to generate the HTML file. Windows systems running Strawberry Perl. Strawberry Perl does not install module documentation as either manpages or html files. Instead, you can run the perldoc command to display module documentation. perldoc Module::Name You can also use Perldoc::Server to display module documentation, as illustrated below. Perldoc::Server. The Perldoc::Server module (that can be installed via CPAN) will provide a local server that will display HTML files "on the fly" from Perl's documentation and the documentation for installed modules. Install it, and the command perldoc-server will be in your path. Run it, and then browse to http://localhost:7375/ in your Web browser to see the documentation. Note that the perldoc-server command must be running to provide the documentation using this method. Contributing your own modules to CPAN. In the event that a module you need isn't available on CPAN, the usual answer is to write the module yourself and add it to CPAN. That way, nobody else needs to waste time creating the same functionality that you're already written. See How to contribute modules to CPAN
1,199
Perl Programming/First programs. A first taste of Perl. Here's a simple program written in Perl to get us started: print "Hello World!\n"; Let's take a look at this program line by line:
53
Perl Programming/Variables. In Perl, there are five types of variables: $calars, @rrays, %hashes, &subroutines, and *typeglobs. Simple variables. Variables, called scalars, are identified with the $ character, and can contain nearly any type of data. For example: $my_variable = 3; # integers $my_variable = 3.1415926; # floating point $my_variable = 3.402823669209384634633e+38; # exponents $my_variable = $another_variable + 1; # mathematical operation $my_variable = 'Can contain text'; # strings $my_variable = \$another_variable; # scalar reference $my_variable = \@array_variable; # array reference print $my_variable; Case sensitivity. Note that the perl interpreter is case sensitive. This means that identifier names containing lowercase letters will be treated as being different and separate from those containing uppercase letters. Arrays. Arrays in Perl use the @ character to identify themselves. @my_array = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); # numeric list @my_array = (1 .. 10); # same as above @my_array = ('John', 'Paul', 'Kanai', 'Mahenge'); # strings @my_array = qw/John Paul Kanai Mahenge/; # the same - one-word strings, with less typing @my_array = qw/red blue 1 green 5/; # mixed types @my_array = (\@Array1, \@Array2, \@Array3); # array of arrays foreach my $Item (@my_array) { print "Next item is $Item \n"; However, when you deal with just one element of the array (using square brackets so it's not confused), then that element of the array is considered a scalar which takes the $ sigil: $my_array[0] = 1; As in the C programming language, the number of the first element is 0 (although as with all things in Perl, it's possible to change this if you want). Array subscripts can also use variables: $my_array[$MyNumber] = 1; Associative arrays. Associative arrays, or "hashes," use the % character to identify themselves. %my_hash = ('key1' => 'value1', 'key2' => 'value2'); When using the => the left side is assumed to be quoted. For long lists, lining up keys and values aids readability. %my_hash = ( key1 => 'value1', key2 => 'value2', key3 => 'value3', However, when you deal with just one element of the array (using braces), then that element of the array is considered a scalar and takes the $ identifier: $my_hash{'key1'} = 'value1'; Associative arrays are useful when you want to refer to the items by their names. Subroutines. Subroutines are defined by the sub function, and used to be called using & (using codice_1 is now deprecated). Here's an example program that calculates the Fibonnaci sequence: sub fib { my $n = shift; return $n if $n < 2; return fib( $n - 1 ) + fib( $n - 2 ); print fib(14);
859
Perl Programming/Function reference. String functions. codice_1. Action. Removes the last characters from a string only if they're recognized as a record separator (e.g. a newline character) Syntax. chomp($String = $_); Example. chomp; # removes the last character from $_ if it is a record separator chomp(); # (same) chomp($String); # removes the last character from $String if it is a record separator codice_2. Action. Removes the last character from a string regardless Syntax. chop($String = $_); Example. chop; # removes the last character from $_ chop(); # (same) chop($String); # removes the last character from $String See also. Removes the last character from a string (e.g. removes the newline characters when reading from a file) codice_3. print chr(65); # Prints a capital A Gets an ASCII character, given it's code codice_4. # One-way hash function my $HashedWord = crypt($Word, $Salt); The salt string needs only be two characters long, and provides a way of randomising the hash, such that the same word can produce several different hashes, if used with different values of codice_5! codice_6. print hex(11); # Prints B Converts a number to hexadecimal Other way around - converts hex to number: print hex(11); # prints 17 you can use print sprintf("%X",11); # Prints B codice_7. Search for one string within another (see "rindex" to search from end-to-start). $Result = index($Haystack, $Needle); $Result = index($Haystack, $Needle, $StartPosition); index("Some text", "bleh"); # Returns -1 (not found) index("Some text", "Some"); # Returns 0 (first character) index("Some text", "text"); # Returns 5 (sixth character) The special variable codice_8 always gets added to the return value, but codice_8 is normally 0, and the manual recommends leaving it at 0. codice_10. $Lowercase = lc($String); Converts a string to lower-case codice_11. Converts the first character of a string to lowercase codice_12. print "String is " . length($String) . " characters long\n"; Returns the length of a string codice_13. print oct(8); # Prints 10 Converts a number to octal codice_14. Converts a character to its number. print ord("A"); # prints 65 codice_15. Takes a list and converts it into a string using a supplied set of rules. my $String = pack($Template, @ListOfNumbers); my $String = pack("CCCC",65,66,67,68); # Result: "ABCD" $Template can be made up of: a A string with arbitrary binary data, will be null padded. A An ascii string, will be space padded. Z A null terminated (asciz) string, will be null padded. b A bit string (ascending bit order inside each byte, like vec()). B A bit string (descending bit order inside each byte). h A hex string (low nybble first). H A hex string (high nybble first). c A signed char value. C An unsigned char value. Only does bytes. See U for Unicode. s A signed short value. S An unsigned short value. (Exactly 16 bits unless you use the ! suffix) i A signed integer value. I An unsigned integer value. (At least 32 bits wide, machine-dependent) l A signed long value. L An unsigned long value. (Exactly 32 bits unless you use the ! suffix) n An unsigned short in "network" (big-endian) order. N An unsigned long in "network" (big-endian) order. v An unsigned short in "VAX" (little-endian) order. V An unsigned long in "VAX" (little-endian) order. (Exactly 16 bits and 32 bits respectively) q A signed quad (64-bit) value. Q An unsigned quad value. (Only available if your system supports 64-bit integers and Perl has been compiled to support them) f A single-precision float in the native format. d A double-precision float in the native format. p A pointer to a null-terminated string. P A pointer to a structure (fixed-length string). u A uuencoded string. U A Unicode character number. Encodes to UTF-8 internally. w A BER compressed integer. Its bytes represent an unsigned integer in base 128, most significant digit first, with as few digits as possible. Bit eight (the high bit) is set on each byte except the last. x A null byte. X Back up a byte. @ Null fill to absolute position. Each letter may optionally be followed by a number giving a repeat count. The integer types codice_16, codice_17, codice_18, and codice_19 may be immediately followed by a codice_20 suffix to signify native shorts or longs codice_21. Reverses a string (in scalar context) or a list (in list context): my @ReversedList = reverse(@List); # As commonly seen in Perl programs: foreach( reverse( sort( @List ))) ... my $ReversedString = reverse($String); my @List = ("One ", "two ", "three..."); my $ReversedListAsString = reverse(@List); # Prints "...eerht owt enO" codice_22. Search for one string within another, starting at the end of the string. $Result = rindex($Haystack, $Needle); $Result = rindex($Haystack, $Needle, $StartPosition); rindex("Some text", "bleh"); # Returns -1 (not found) rindex("Some text", "Some"); # Returns 0 (first character) rindex("abbbbb", "b"); # Returns 5 (first "b" found, when starting at the end) codice_23. Prints a formatted string: my $Text = sprintf("%d/%d is %08.5f", 1, 3, 1/3); # Result: "10/3 is 003.33333" sprintf("Character: %c", 65); sprintf("String %s", "Hello"); sprintf("Signed integer: %d", 15); sprintf("Unsigned integer: %u", 15); sprintf("Unsigned int (in octal): %o", 15); sprintf("Unisgned int (in hex): %x", 15); # Use %X to get upper-case output sprintf("Binary number: %b", 15); sprintf("Scientific notation: %e", 5000); # Use %E to get upper-case output sprintf("Floating point number: %f", 1/3); # 0.3333333 sprintf("Floating point number: %g", 1/3); # Decides between scientific and float. %G is uppercase sprintf("Pointer: %p", $Variable); Use %% to get a percent-sign. Use %n to request the number of characters written so far, and put it into the next variable in the list. You may want to check that user-supplied formatting rules don't contain this code. sprintf("%02d", $Minutes); # Forces leading zeros to make the string two characters long sprintf("%1.5f", $Number); # Limits the number of decimal places substr. Return part of a string (a "substring") Format: substr "string" "start-position" "length" $FirstLetter = substr($Text, 0, 1); # First letter $First3Letters = substr($Text, 0, 3); # First three letters $Last3Letters = substr($Text, -3); # Last three letters You can use substr on the left side of an assignment statement to change part of a string. This can actually shorten or lengthen the string. $text = 'cat dog'; substr ($mystring, 3, 1) = ' and '; # $text now contains 'cat and dog' codice_24. $Uppercase = uc($String); Converts a string to upper-case codice_25. Converts the first character of a string to uppercase Numeric functions. codice_26. Returns the absolute (positive) value of a number $Number = abs(-100); # Returns 100; codice_27. # Converts cartesian(x,y) coordinates into an angle $Number = atan2($Y, $X); codice_28. # Returns the cosine of an angle (radians) $Number = cos($Angle); # Cosine = Adjacent/Hypotenuse codice_29. # Raises e to a specified power $Number = exp(2); # Returns codice_30 e ≈ 2.71828183 more about e codice_6. # Interprets a string as hexidecimal, and returns its value $Number = hex("10"); # Returns 16 $Number = hex("0xFF"); # Returns 255 codice_32. Rounds a number towards zero, returning an integer $Number = int(-1.6); # Returns -1 $Number = int(0.9); # Returns 0 $Number = int(28.54); # Returns 28 codice_33. # Returns the natural logarithm of a number $Number = log(2.71828183); # Returns 1 $Number = exp(log($X)); # Returns $X $Number = log($X)/log(10); # Returns log10($X). Alternately, you can use the log10() function in the POSIX module $Number = log($X)/log(15); # Returns log to the base 15 of $X codice_13. # Interprets a string as octal, and returns its value $Number = oct("10"); # Returns 8 $Number = oct("21"); # Returns 17 codice_35. # Gets a random number (may automatically call srand() if that's not been done) $Number = rand(); # Returns a random number from 0 to 1 $Number = int(rand(800)); # Returns a random integer from 0 to 799 $Number = 1 + int(rand(999)); # Returns a random integer from 1 to 999 codice_36. # Returns the sine of an angle (radians) $Number = sin($Angle); # Sine = Opposite/Hypotenuse codice_37. # Returns the square-root of a number $Number = sqrt(4); # Returns 2 $Number = sqrt($X ** 2 + $Y ** 2); # Returns the diagonal distance across a $X x $Y rectangle See the codice_38 module, if you need to take roots of negative numbers. codice_39. # Seeds (sets-up) the random-number generator srand(); Version-dependent, and older versions of Perl are not guaranteed to have a good seed value. See the codice_40 module for more possibilities. The current version of Perl uses the urandom device if it's available. Array functions. codice_41. $LastElement = pop(@MyArray); Take the last element from an array. codice_42. push(@MyArray, "Last element"); push(@MyArray, "several", "more", "elements"); Push a list of elements onto the end of an array. codice_43. shift(@MyArray); # Delete the first element $FirstElement = shift(@MyArray); # Delete the first element, load it into $FirstElement instead Take the first element out of an array. codice_44. # Removes elements from an array, optionally replacing them with a new array splice(@Array); # Removes all elements from array splice(@Array, 10); # Removes from element 10 to the end of the array splice(@Array, -10); # Removes the last 10 elements of the array splice(@Array, 0, 10); # Removes the first 10 elements of the array @NewArray = splice(@Array, 0, 10); # Removes the first 10 elements of the array and returns those 10 items splice(@Array, 0, 10, @Array2); # Replaces the first 10 elements of the array with Array2 codice_45. unshift(@MyArray, "New element"); unshift(@MyArray, "several", "more", "elements"); Add a list of elements onto the beginning of an array. List functions. codice_46. # Returns a list of elements for which an expression is true @TextFiles = grep(/\.txt$/, @AllFiles); $NumberOfTextFiles = grep(/\.txt$/, @AllFiles); # Can use a block of code instead of an expression @TextFiles = grep({return(substr($_, -3) eq "txt");}, @AllFiles); codice_47. # Joins the items of a list into a single string $OneItemPerLine = join( "\n", @List); $EverythingBunchedTogether = join( "", @List); $Filename = join( "/", ($Directory, $Subdirectory, $Filename)); codice_48. # Evaluates a block of code for each item in a list, and returns # a list of the results @UppercaseList = map(uc, @List); @Numbers = map {"Number $_"} 1..100; codice_21. # Reverses the order of a list @ReversedList = reverse(@List); # In scalar context, concatenates the list and then reverses the string $ReversedString = reverse('foo','bar','baz'); # gives 'zabraboof' codice_50. # Sorts the elements in a list @AsciiSort = sort(@RandomList); @AsciiSort = sort @RandomList; foreach $Item (sort @RandomList) # Can specify a function to decide the sort order @CaseInsensitiveSort = sort {uc($a) cmp uc($b)} @RandomList; @NumericSort = sort {$a <=> $b} @RandomList; @CustomSort = sort custom_function_name @RandomList; codice_51. Unpacks a string into a list - see the templates available for the pack() function for details Associative array functions. codice_52. # Remove an element from a hash %h = ('a'=>1, 'cow'=>'moo', 'b'=>2); delete $h{cow}; # %h now contains ('a'=>1, 'b'=>2) codice_53. # Return the 'next' key/value pair (in a random order) while (($key, $value) = each (%hash)) { print "$key => $value\n"; codice_54. # Tests whether or not a key exists in a hash (even if the value for that key is undef) if (exists $hash{$key}) { print "\%hash contains a value for key '$key'\n"; codice_55. # Returns a list of all keys from the hash, in same 'random' order as each foreach $key (keys %hash) { print "$key => $hash{$key}\n"; codice_56. # Returns a list of all values from the hash, in same 'random' order as keys foreach $value (values %hash) { print "\%hash contains a value '$value'\n"; Input and output functions. codice_58. # closes a filehandle when it is no longer needed close(STDERR); # hide debugging info from the user codice_59. # Close a directory open by opendir closedir(DIRHANDLE); codice_62. Exits the program, printing to "STDERR" the first parameter and the current file and line. Used to trap errors. die "Error: $!\n" unless chdir '/'; codice_63. eof FILEHANDLE eof() eof This function returns codice_64, if the next read on codice_65 would return end-of-file, or if codice_65 is not open. codice_65 may be an expression whose value gives the real filehandle, or a reference to a filehandle object of some sort. An codice_63 without an argument returns the end-of-file status for the last file read. An codice_69 with empty parentheses codice_70 tests the codice_71 filehandle (most commonly seen as the null filehandle in codice_72). Therefore, inside a while (codice_72) loop, an codice_69 with parentheses will detect the end of only the last of a group of files. Use eof (without the parentheses) to test each file in a while (codice_72) loop. For example, the following code inserts dashes just before the last line of the last file: while (<>) { if (eof()) { print "-" x 30, "\n"; print; On the other hand, this script resets line numbering on each input file: while (<>) { next if /^\s*#/; # skip comments print "$.\t$_"; } continue { close ARGV if eof; # Not eof()! Like "codice_76" in a sed program, eof tends to show up in line number ranges. Here's a script that prints lines from codice_77 to end of each input file: while (<>) { print if /pattern/ .. eof; Here, the flip-flop operator (codice_78) evaluates the pattern match for each line. Until the pattern matches, the operator returns false. When it finally matches, the operator starts returning true, causing the lines to be printed. When the eof operator finally returns true (at the end of the file being examined), the flip-flop operator resets, and starts returning false again for the next file in codice_79 codice_84. Prints the parameters given. Discussed in the following sections: Functions for working with fixed length records. codice_15. See the entry for codice_15 further up the page codice_86. # Reads data from a file-handle read(FILEHANDLE, $StoreDataHere, $NumberBytes); # Returns the number of bytes read $NumberBytesRead = read(FILEHANDLE, $StoreDataHere, $NumberBytes); # Optional offset is applied "when the data is stored" (not when reading) read(FILEHANDLE, $StoreDataHere, $NumberBytes, Offset); codice_92. # Runs a system command syscall( $Command, $Argument1, $Argument2, $Argument3); # (maximum 14 arguments) $ReturnValue = syscall($Command); codice_51. # See the pack function for details (unpack does the opposite!) unpack($Template, $BinaryData); Filesystem functions. codice_108. if (-r $FullFilename) // File is readable by effective uid/gid. if (-w $FullFilename) // File is writable by effective uid/gid. if (-x $FullFilename) // File is executable by effective uid/gid. if (-o $FullFilename) // File is owned by effective uid. if (-R $FullFilename) // File is readable by real uid/gid. if (-W $FullFilename) // File is writable by real uid/gid. if (-X $FullFilename) // File is executable by real uid/gid. if (-O $FullFilename) // File is owned by real uid. if (-e $FullFilename) // File exists. if (-z $FullFilename) // File has zero size. if (-s $FullFilename) // File has nonzero size (returns size). if (-f $FullFilename) // File is a plain file. if (-d $FullFilename) // File is a directory. if (-l $FullFilename) // File is a symbolic link. if (-p $FullFilename) // File is a named pipe (FIFO), or Filehandle is a pipe. if (-S $FullFilename) // File is a socket. if (-b $FullFilename) // File is a block special file. if (-c $FullFilename) // File is a character special file. if (-t $FullFilename) // Filehandle is opened to a tty. if (-u $FullFilename) // File has setuid bit set. if (-g $FullFilename) // File has setgid bit set. if (-k $FullFilename) // File has sticky bit set. if (-T $FullFilename) // File is an ASCII text file. if (-B $FullFilename) // File is a "binary" file (opposite of -T). $Age = -M $FullFilename; // Age of file in days when script started. $Age = -A $FullFilename; // Same for access time. $Age = -C $FullFilename; // Same for inode change time. codice_109. chdir $Directory; chdir $Directory || die("Couldn't change directory"); codice_110. chmod 0744 $File1; chmod 0666 $File1, $File2, $File3; # 0 for octal, at the beginning of a number | Owner | Group | Others | Execute | 4 | 4 | 4 | Write | 2 | 2 | 2 | Read | 1 | 1 | 1 | Total | | | | codice_111. # Change the owner of a file chown($NewUserID, $NewGroupID, $Filename); chown($ NewUserID $NewGroupID, $File1, $File2, $File3); NewUserID, $NewGroupID, $File1, $File2, $File3); chown($NewUserID, -1, $Filename); # Leave group unchanged chown(-1, $NewGroupID, $Filename); # Leave user unchanged codice_112. chroot $NewRootDirectory; Sets the root directory for the program, such that the "codice_113" location refers to the specified directory. Program must be running as root for this to succeed. codice_115. # Expands filenames, in a shell-like way my @TextFiles = glob("*.txt"); See also codice_116. codice_118. # Creates a link to a file link($ExistingFile, $LinkLocation); link($ExistingFile, $LinkLocation) || die("Couldn't create link"); codice_119. Identical to stat(), except that if given file is symbolic link, stat link not the target. codice_120. mkdir $Filename || die("Couldn't create directory"); mkdir $Filename, 0777; # Make directory with particular file-permissions codice_121. open(my $FileHandle, $Filename) || die("Couldn't open file"); open(my $fp, "<", $Filename); # Read from file open(my $fp, ">", $Filename); # Write to file open(my $fp, "»", $Filename); # Append to file open(my $fp, "<$Filename"); # Read from file open(my $fp, ">$Filename"); # Write to file open(my $fp, "»$Filename"); # Append to file open(my $fp, "<", "./ filename with whitespace \0"); open(my $fp, "<", "./->filename with reserved characters\0"); open(my $fp, "$Program |"); # Read from the output of another program open(m myy $fp, "| $Program"); # Write to the input of another program open(my $fp, "<", "-"); # Read from standard input open(my $fp, ">", "-"); # Write to standard output codice_122. opendir(my $DirHandle, $Directory) || die("Couldn't open directory"); while (my $Filename = readdir $DirHandle) { # Do something with $Filename in $Directory closedir($DirHandle); opendir(DIR, $Directory) || die("Couldn't open directory"); foreach(readdir(DIR)) { # Do something with $_ in $Directory closedir(DIR); codice_123. # Finds the value of a symbolic link $LinkTarget = readlink($LinkPosition); codice_124. rename $OldFile, $NewFile or die("Couldn't move file"); May work differently on non-*nix operating systems, and possibly not at all when moving between different filesystems. See for more complicated file operations. codice_125. rmdir $Filename || die("Couldn't remove directory"); codice_126. stat $DeviceNum = $FileStatistics[0]; # device number of filesystemcs[0]; # device number of filesystem $Inode = $FileStatistics[1]; # inode number $FileMode = $FileStatistics[2]; # (type and permissions) $NumHardLinks = $FileStatistics[3]; # number of (hard) links to the file $UserID = $FileStatistics[4]; # numeric user ID $GroupID = $FileStatistics[5]; # numeric group ID $DeviceIdent = $FileStatistics[6]; # Device identifier (special files only) $SizeBytes = $FileStatistics[7]; $AccessTime = $FileStatistics[8]; # seconds since the epoch $ModifyTime = $FileStatistics[9]; $ChangeTime = $FileStatistics[10]; $BlockSize = $FileStatistics[11]; $NumBlocks = $FileStatistics[12]; codice_127. # Creates a new filename symbolically linked to the old filename symlink($OldFilename, $NewFilename); symlink($OldFilename, $NewFilename) || die("Couldn't create symlink"); eval(symlink($OldFilename, $NewFilename)); codice_128. # Sets or returns the "umask" for the process. my $UMask = umask(); umask(0000); # This process can create any type of files umask(0001); # This process can't create world-readable files umask(0444); # This process can't create executable files codice_129. # Deletes a file unlink $Filename; unlink $Filename || die("Couldn't delete file"); unlink $File1, $File2, $File3; (unlink($File1, $File2, $File3) == 3) || die("Couldn't delete files"); codice_130. # Updates the modification times of a list of files my $AccessTime = time(); my $ModificationTime = time(); utime($AccessTime, $ModificationTime, $Filename); my $NumFilesChanged = utime($AccessTime, $ModificationTime, $File1, $File2, $File3); Program functions. codice_131. Returns information about the current function call stack. In scalar context, returns only the name of the package from where the current subroutine was called. In list context, returns the package, filename, and line number. In list context with a numeric argument passed, returns several pieces of information (see below). The argument represents how many levels in the call stack to go back. # !/usr/bin/perl foo(); sub foo { $package = caller; # returns 'main' ($package, $filename, $line) = caller; # returns 'main', the file name, and 3 # Line below returns all 10 pieces of info. (Descriptions self-explanatory from variable names) ($package, $filename, $line, $subroutine, $hasargs, $wantarray, $evaltext, $is_require, $hints, $bitmask) = caller(0); codice_132. There is no actual 'import' function. Rather, it is a convention when writing a module to create a subroutine named 'import' that populates the current namespace with that module's needed variables or methods. The standard 'Exporter' module provides an import method, if your class has it as a base class. codice_133. Declares all lines that follow (until EOF or the next package statement) to belong to the given package's namespace. # !/usr/bin/perl $x = 5; # sets $main::x package Foo; $x = 5; # sets $Foo::x sub bar { # defines &Foo::bar print "hello world"; package Temp; $x = 5; # sets $Temp::x codice_134. includes the specified module's code into the current program. The module can be specified either with an absolute or relative path, or with a bareword. If a bareword is given, a 'codice_135' extention is added, and codice_136 is replaced with the current operating system's path seperator: require Foo::Bar; # identical to: require 'Foo/Bar.pm'; codice_137. Requires and imports the given module or pragma, at compile time. The line use Foo qw/bar baz/; is identical to BEGIN { require Foo; import Foo qw/bar baz/; Misc functions. codice_138. # returns true, if argument is not undef $x = 0; print "X defined\n" if defined $x; # prints print "Y defined\n" if defined $y; # does not print codice_140. eval('$a = 30; $b = 40;'); print $a, $b; codice_142. # assigns temporary value to global variable for duration of lexical scope $x = 5; print "x = $x\n"; # 5 local $x = 10; print "x = $x\n"; # 10 print "x = $x\n"; # 5 codice_143. # creates new lexical (ie, not global) variable $x = 5; # refers to $main::x my $x = 10; print "x = $x\n"; # the lexical - 10 print "main's x = $main::x\n" # the global - 5 print "x = $x\n"; # the global, because no lexical in scope - 5 codice_144. # resets hash's internal pointer, to affect lists returned by each while ($k, $v = each %h) { print "$k = $v\n"; last if ($i++ == 2); # if another each done here, $k,$v will pick up where they left off. reset %h # now each will restart from the beginning. codice_145. # forces scalar context on an array @sizes = (scalar @foo, scalar @bar); # creates a list of the sizes of @foo and @bar, rather than the elements in @foo and @bar codice_146. # undefines an existing variable $x = 5; undef $x; print "x = $x\n" if defined $x; # does not print codice_147. # returns 'true', 'false', or undef if function that called it was called in list, scalar, or void context, respectively. sub fctn { my @vals = (5..10); if (wantarray) { return @vals; } elsif (defined wantarray) { return $vals[0]; } else { warn "Warning! fctn() called in void context!\n"; Processes. codice_150. # clones the current process, returning 0 if clone, and the process id of the clone if the parent my $pid = fork(); if ($pid == 0) { print "I am a copy of the original\n"; } elsif ($pid == -1) { print "I can't create a clone for some reason!\n"; } else { print "I am the original, my clone has a process id of $pid\n"; Classes and objects. See also Perl Objects Time and date. codice_222. Converts a timestamp to GMT. @TimeParts = gmtime(); @TimeParts = gmtime($Time); $Seconds = $TimeParts[0]; # 0-59 $Minutes = $TimeParts[1]; # 0-59 $Hours = $TimeParts[2]; # 0-23 $DayOfMonth = $TimeParts[3]; # 1-31 $Month = $TimeParts[4]; # 0-11 $Year = $TimeParts[5]; # Years since 1900 $DayOfWeek = $TimeParts[6]; # 0:Sun 1:Mon 2:Tue 3:Wed 4:Thu 5:Fri 6:Sat $DayOfYear = $TimeParts[7]; # 1-366 codice_223. Converts a timestamp to local time. @TimeParts = localtime(); @TimeParts = localtime($Time); $Seconds = $TimeParts[0]; # 0-59 $Minutes = $TimeParts[1]; # 0-59 $Hours = $TimeParts[2]; # 0-23 $DayOfMonth = $TimeParts[3]; # 1-31 $Month = $TimeParts[4]; # 0-11 $Year = $TimeParts[5]; # Years since 1900 $DayOfWeek = $TimeParts[6]; # 0:Sun 1:Mon 2:Tue 3:Wed 4:Thu 5:Fri 6:Sat $DayOfYear = $TimeParts[7]; # 1-366 codice_224. $Time = time(); Returns number of seconds since an epoch (that is system-dependent, but may be 1970-01-01). See also codice_161. @CPUTimes = times(); $UserTimeForProcess = $CPUTimes[0]; $SystemTimeForProcess = $CPUTimes[1]; $UserTimeForChildren = $CPUTimes[2]; $SystemTimeForChildren = $CPUTimes[3]; Functions that reverse each other. Some functions in perl reverse or otherwise cancel the effect of each other, so running a string through both of them will produce the same output as the input, for example print ord(chr(1)); will echo codice_226 to standard output, codice_227 will convert a character to its number in the character set, while codice_228 will convert a number to its corresponding character, therefore in the same way that formula_1 and formula_2 in Mathematics (assuming x is non-negative), codice_229 and codice_230 in Perl. List of functions that reverse each other:
8,720
Physics Study Guide/Optics. Light. Light is that range of electromagnetic energy that is visible to the human eye, the visible colors. The optical radiation includes not only the visible range, but a broader range of invisible electromagnetic radiation that could be influenced in its radiation behavior in a similar way as the visible radiation, but needs often other transmitters or receivers for this radiation. Dependent on the kind of experimental question light - optical radiation behaves as a wave or a particle named lightwave or photon. The birth or death of photons needs electrons - electromagnetic charges, that change their energy. The speed of light is fastest in the vacuum. In a wave we have to distinguish between the speed of transport of energy or the speed of the transport of on phase state of a wave of a defined frequency. In vacuum the speed of waves of any photon energy - wavelength is the same, but the transmission speed through material is dependent on wavelength - photon energy. At the time the measurement of the speed of light in vacuum reached the uncertainty of the unit of length, the meter, this basic unit got in 1960 a new definition, based on the unit of time. Taking the best known measurement values it was defined without any uncertainties of length, that the speed of light is 299,792,458 meters per second. For this reason the only uncertainty in the speed of light is the uncertainty of the realization of the unit of time, the second. (If you like to get the standard of length, cooperate with the watchmaker). However, when electromagnetic radiation enters a medium with refractive index, formula_1 , its speed would become<br> where formula_3 is the speed of light in the medium. Refraction. Refraction occurs when light travels from one medium into another (i.e. from air into water). Refraction is the changing of direction of light due to the changing speed of light. Refraction occurs toward the normal when light travels from a medium into a denser medium. Example when light travels from air into a block of glass, light is refracted towards the normal. The ratio between the sine of the angle of the incident ray and sine of the angle of the refracted ray is the same as the ratios of the indexes of refraction. This is known as Snell's Law - an easy way to remember this is that 'Snell' is 'lens' backwards.
541
Linux Guide. See also. __NOEDITSECTION__
13
Guitar/Alternate Tunings. Many guitar players use alternate tunings, which differ from standard tuning. The use of alternate tunings (non-standard tunings) are found throughout the history of the classical guitar and are a major factor in the playing of blues slide guitar. Many alternate tunings involve downtuning ("dropping") strings. Dropped tunings. Dropped D (DADGBE). The most common alternate tuning is the dropped D (or "drop D") tuning. The lower E string is tuned down to a D. This tuning allows one to play power chords on the fourth, fifth and sixth strings with only one finger, and of course allows for lower bass notes. Used commonly in heavy metal, but also in nearly every other form of guitar music. Waylon Jennings used this frequently, even dropping to D with the use of a scruggs banjo tuner on his famous telecaster in the middle of a song. Drop C tuning CGCFAD. This progressive tuning is used in metal but often used by bands who stick with 6 string guitars to achieve an extra deep tone. Bands such as CydeDish, Deftones, System of a Down, KSE, August Burns Red and As I Lay Dying. Drop B (BF#BEG#C#). Alternatively, you can tune to BF#BEG#C#, if you are looking for a deep heavy hitting sound. This tuning is mostly used by nu-metal bands like Slipknot, August Burns Red, many deathcore bands, and some death metal bands. Drop A (AEADF#B). Alternatively, you can tune to AEADF#B, if you are looking for a deep heavy hitting sound. This tuning is mostly used by nu-metal bands like Slipknot, August Burns Red, many deathcore bands, and some death metal bands. Double dropped D (DADGBD). Similar to Dropped D above, for this tuning just drop both 'E' strings a full tone. Neil Young often tunes his guitars this way. Regular tunings. Among alternative guitar-tunings, regular tunings have equal musical-intervals between the paired notes of their successive open-strings. Regular tunings simplify the learning of the fretboard of the guitar and of chords by beginning students. Regular tunings also facilitate improvisation by advanced guitarists. Guitar tunings assign pitches to the open strings of guitars. Tunings can be described by the particular pitches that are denoted by notes in Western music. By convention, the notes are ordered from lowest to highest. The "standard tuning" defines the string pitches as E, A, D, G, B, and E. Between the open-strings of the standard tuning are three perfect-fourths (E-A, A-D, D-G), then the major third G-B, and the fourth perfect-fourth B-E. In contrast, regular tunings have constant intervals between their successive open-strings: For the regular tunings, chords may be moved "diagonally" around the fretboard, indeed "vertically" for the repetitive regular tunings (minor thirds, major thirds, and augmented fourths). Regular tunings thus appeal to new guitarists and also to jazz-guitarists, whose improvisation is simplified. On the other hand, some conventional chords are easier to play in standard tuning than in regular tuning. Major thirds tuning. [[Image:First and second inversions of C-major chord on six-string guitar with major-thirds tuning.png|right|thumb|alt=The C major chord and its first and second inversions. In the first inversion, the C note has been raised 3 strings on the same fret. In the second inversion, both the C note and the E note have been raised 3 strings on the same fret.|Chords are inverted by shifting notes three strings "on the same fret". Major-thirds tuning was introduced by jazz-guitarist Ralph Patt in 1964. All of the intervals between its successive open strings are major thirds; in contrast, the standard guitar-tuning has one major-third amid four perfect-fourths. Major-thirds tuning reduces the extensions of the little and index fingers ("hand stretching"). Major and minor chords are played on two successive frets, and so require only two fingers; other chords—seconds, fourths, sevenths, and ninths—are played on three successive frets. For each regular tuning, chord patterns may be moved around the fretboard, a property that simplifies beginners' learning of chords and that simplifies advanced players' improvisation. In contrast, chords cannot be shifted around the fretboard in the standard tuning E-A-D-G-B-E, which requires four chord-shapes for the major chords. There are separate chord-forms for chords having their root note on the third, fourth, fifth, and sixth strings. Major-thirds tuning repeats its octave after every two strings, which again simplifies the learning of chords and improvisation; Chord inversion is especially simple in major-thirds tuning. Chords are inverted simply by raising one or two notes three strings. The raised notes are played with the same finger as the original notes. All fourths tuning. [[File:C7 chord and alternative voicing for EADG (standard and all-fourths) tuning for six string guitar.png|thumb|left|In "all-fourths" and standard tuning, the C7 chord has notes on frets 3-8; Covering six frets is difficult, and so C7 is rarely played but "alternative voicing" are substituted instead. In "major-thirds" tuning, all seventh-chords can be played on three consecutive frets.]] [[File:All fourths tuning in the chromatic circle.png|right|thumb|The consecutive notes of all-fourths tuning are spaced apart by five semi-tones on the chromatic circle.]] [[Image:All fourths tuning.png|thumb|right|All fourths tuning.]] This tuning is like that of the lowest four strings in standard tuning. Consequently, of all the regular tunings, it is the closest approximation to standard tuning, and thus it best allows the transfer of a knowledge of chords from standard tuning to a regular tuning. Jazz musician Stanley Jordan plays guitar in all-fourths tuning; he has stated that all-fourths tuning "simplifies the fingerboard, making it logical". Contemporary players are also moving to fourths tuning, noted players include Alex Hutchings and Tom Quayle. A less commonly used version of fourths tuning is retaining the regular tuning on the first and second strings (E and B) and lowering the other strings by a semitone. This version can make playing classical pieces more accessible. All fifths tuning. New Standard Tuning (CGDAEG). [[Image:New standard tuning.png|thumb|New standard tuning. All perfect fifths (C-G-D-A-E) plus a minor third (E-G).]] [[Image:C major chord in new standard tuning.png|thumb|left|C major chord in new standard tuning .]] [[Image:D major chord in new standard tuning.png|thumb|D major chord in new standard tuning .]] [[Image:Open fifths on D in new standard tuning.png|thumb|left|[[w:open fifth|Open fifths]] on D in new standard tuning .]] The tuning, invented and introduced by [[w:|Robert Fripp]] of King Crimson, is: C(6th) - G(5th) - D(4th) - A(3rd) - E(2nd) - G(1st). Basically this tuning is efficient because it utilizes the tuning that is common is a cello (CGDA) , violin, and mandolin (both GDAE), in which it is in fifth, from a low C. The second string is a fourth up from the B to an E, and the first string is a minor third up from the E to a G. Since the lowest five strings are tuned in fifths, typical fingerings for chords and scales used on the violin, cello, and mandolin are applicable here. The minor third between the top strings allow denser chords in the high range of the scale, and easier access to some elementary chord tones (typically the thirteenth for chords with the root note on the sixth string, and the ninth and flat ninth for chords with the root note on the fifth string, see chord). NST has a greater range than the Old Standard Tuning, approximately a perfect fifth (a major third lower and a minor third higher). Scales across two strings in NST also line up nicely into coherent tetrachords or four-note patterns that have a visually rational relationship (whole and half-tone relationships have a remarkable symmetry that can be easier to learn than the OST whose intervals from 6 to 1 have the (inconsistent) major third thrown in the middle of the scale. Open tunings. Open A (EAC#EAE). Alternatively you could tune the guitar to EAC#AC#E "Slide" Open A (EAEAC#E). This tuning is identical to Open G tuning but with every string raised one step, or two frets Open C (CGCGCE). Used notably by Devin Townsend in his bands Strapping Young Lad and Devin Townsend Project. Open D (DADF#AD). Open D, like all open tunings, produces a major chord (in this case, D major) when all strings are strummed. Drop the sixth, first, and second strings down two semitones, and the third string one semitone. It is also called "DAD-fad" after its notes. Uses the same chord shapes as Open E but is easier on a guitar neck as the strings are detuned lessening the tension. Open D is a common tuning for folk, blues, and slide guitar. A variation of this tuning is open d minor. Open D minor is tuned DADFAD, meaning the only change is that the F# is tuned down to an F. Chord shapes. Here are some handy chord shapes: G/D: (020120) Em7/D: (022120) Open E (EBEG#BE). Used by Cat Stevens and a popular choice for slide guitarists. Strumming in the open position yields a Emajor chord. You can easily play any chord by barring across the neck at different fret positions. This does however have some disadvantages; mainly that it is slightly more difficult to play minor chords. Some artists overcome this by tuning to EBEGBE. This allows both minor and major chords to be played easily. Because tightening the strings more than is intended can break the strings or put unneeded stress on the neck, many players opt to tune in Open D and put a capo on the second fret; the result is the same. Open C6 (CACGCE). This tuning is rarely used. It has been used by Jimmy Page on "Bron-Yr-Aur", "Friends", and "Poor Tom". J. M. Smig uses this tuning on "Fingers In The Forest". Open G (DGDGBD). This is sometimes referred to as "Spanish Tuning", popular with slide guitarists. Tune the 1st and 6th strings down to D, and the 5th string to G. Keith Richards uses this tuning extensively after 1968. (See Brown Sugar, Honky Tonk Women, Start Me Up) He also removes the 6th string (low E in standard tuning) because the root of the chord is on the 5th string in Open G. Miscellaneous tunings. DADGAD. DADGAD (pronounced as a word: "DAD-gad"), one of the most versatile tunings, is named after the tuning of its strings. The sixth, second, and first strings are dropped two semitones to D, A, and D. Strumming all the strings open forms a Dsus4 chord; fretting the second fret of the third string (or muting the third string) produces a D5 chord, or D power chord. Most songs for DADGAD are in D major, or in G major with a capo at the fifth fret. Jimmy Page of Led Zeppelin played Kashmir in this tuning. DADADD. This is essentially one huge power chord. Each string neatly divides the scale in half and it is easy to make simple patterns then repeat them anywhere on the fretboard. Standard E-flat (EbAbDbGbBbeb). In this tuning, each string is tuned down a half step, or one fret. This is a popular tuning throughout the history of blues and rock, and many modern bands perform with it. Stevie Ray Vaughn frequently used this tuning with heavier strings to get a full, rich tone. Standard D (DGCFAD). Made popular by death metal band Death. Commonly used in metal today. Standard C (CFBbEbGC) Used by John Petrucci on 3 songs from Dream Theater’s Train Of Thought. [[fr:Apprendre la guitare/Accordage]]
3,139
Organic Chemistry/Introduction to reactions/Hydroboration. Hydroboration basics. By reacting an alkene with borane, a useful reaction intermediate called an organoborane can be formed. An organoborane can be oxidized to form a terminal alcohol, or it can be protonated to form an alkane. History. Hydroboration reactions were developed by Herbert C. Brown during his research at Purdue University. It earned him the 1979 Nobel Prize in Chemistry (along with Georg Wittig) because of the practical applications to synthesis, namely pharmaceuticals. Formation of borane reagents. Borane is not stable, it must be generated in situ from a borohydride salt (eg NaBH4) at the time of organoborane formation. Diborane exists in equilibrium with borane. <br>"Formation of diborane (and borane) from sodium borohydride" Hydroboration/Protonolysis. After one has formed an organoborane, it can be be reacted with an organic acid to obtain an alkane. The two hydrogens are added with syn stereospecificity Hydroboration/Oxidation. Organoboranes can be oxidized in a basic peroxide solution to form alcohols. The alcohol that is formed is the opposite product that would be formed by oxymercuration or hydration. The hydrogen and hydroxide groups add syn to each other. Regiochemistry of products. Boration reactions generate "anti-Markovnikov" products because hydrogen adds second as a hydride nucleophile. (In most other reactions, hydrogen usually adds first as an electrophile.) The borane adds first, which is an honor usually reserved for the strongly electrophilic proton.
426
Personal Finance/Budgeting. Budgeting involves maintaining control over your expenditures. There are typically three phases that show a maturation of a control of your budget. Making a budget. Write out your total income. Include wages, salaries, rent collections, settlements, allowances, or any other source of money you get. Write out your fixed costs. These are the expenses that come in bill form like insurance, car payments, rent or mortgage payments, or payments to any other kind of loan. Costs like these need to be paid and don't change no matter how much or little you use them. It is important to get these down first, since these payments are generally out of your control. Write out your variable costs. After you pay your bills, you can now allocate what's left of your income to other things that need to be paid. Groceries, utility bills, and other costs within your control go here. The basic budget. Budgets don't have to be painful experiences. Now that you have a set of realistic goals for all of the money you will be getting and that you have an idea of how much money you will be spending, you can start to budget effectively. For the first month, just count the ins and outs. You can use a normal notepad for this. In August, they had 820 US$ in addition to 4,095 US$ from their income for a total of 4,915 US$. They spent 2,150 US$ and had 520 US$ left at the end of the month. They therefore saved 2,245 US$ in August. Counting the leftover cash in your wallet allows for a precise expenses count even if you forgot to actually count an item or two. The forgotten cash will show up as Mysteriously Vanishing Money (MVM). Savings were distributed according to the priorities set out in Chapter 1 and were as follows: In case of unforeseeable emergencies when expenses exceed income, they use their travel money first, then the car money and then the retirement money to pull them out of the scrape. This is not recommended. In fact, an extra savings account for emergencies should ideally be created and hold about 6 months worth of income to deal with the ups and downs of life. Unfortunately, that is simply not possible for the family in the example above. They must therefore prioritize their needs and perhaps create a tighter budget. The revised budget. Now that you've thought about how to cut your expenses, it's time to get to it! Some expenses of course are fixed and so cannot be easily cut. In the example below, rental fees are exorbitant but reducing them would entail moving elsewhere... Not a realistic solution. So, what can be cut? Food, ET and the phone bill look like prime targets. Another important one to hit is MVM as it usually represents items which you can do without... after all, you don't remember buying them! Utilities and gasoline are already quite low, so don't need to be taken care of. Gradual cuts may be better than taking out 50% of one item in one fell stroke and suffering through the entire month, only to face the uncontrollable urge to splurge on that item next month. Perhaps cuts of 10% a month would be easier to bear. Hey, not bad! You have shaved 70$ from your budget. That's a great start. Continue doing this every month until you feel you are living *too* cheaply and yearn for a better life. Then, loosen up a little... just a little! Just enough to feel the difference between extreme poverty and the point where you enjoy life again. So, enjoy life, but on the cheap side!
839
Guitar/Chord Types. A chord is two or more different notes played simultaneously. Most chords have three notes though. Chords derive their names from the "root" note; so a C chord has C for its root note and a G7 chord will have G. The interval between the root note and the third determines whether a chord is a major or minor. Chords may be strummed or the notes picked individually though beginners find strumming much easier. The more advanced technique of picking is examined in the Picking and Plucking chapter. While chords are primarily used for rhythm guitar, basic chord knowledge can be important for lead playing as well. Knowing how chords are constructed can help when learning the lead parts of many songs since there is always a relationship between a chord and the lead part. For example, if you have to play a lead part over a C major chord (C-E-G) and you use the notes of a D flat major chord (Db-F-Ab) then the result will be very dissonant. Additionally, many lead patterns revolve around arpeggios. These are chords with their notes played in sequence (the word "arpeggio" actually means "broken chord") rather than together. For more information on arpeggios, see the Arpeggio and Sweep Picking chapter. Chords are easy to play though understanding the theory behind chord construction (harmony) will require some understanding of scales. While it is not essential to have a knowledge of scales to be able to use this section, understanding scales will definitely improve your general musicianship. With that in mind, go ahead and learn and use these chords without worrying too much about the theory and when you have the time take a look at the page on general music theory and the page on scales. Beginners are advised to start with open chords, which are often the easiest chords to form. Learning open chords is important because it sets the stage for learning how to form barre chords. Barre Chords are chords you form by pressing all (or some) of the strings down with the first finger. This finger acts as the barre (the same job that the nut of the guitar does when you are playing open chords). Because of this barre chords don't usually include open strings and can be moved freely up and down the neck. As you move your barre chord, the shape of the chord remains the same although all the notes change. Barring is an important technique and greatly opens up the neck of the instrument. Different Kinds of Chords. Major chords. The most basic chord is called a triad and consists of three different notes. A major triad consists of the root, a major third, and a perfect fifth. The early study of chords should be based around how to build the tonic triad (chord) from any major scale. To build the tonic triad you take the first note of any major scale and the third note (a major 3rd) and the fifth note (a perfect fifth). Take for example building a tonic triad (chord) from the C major scale. If you look at this C major scale: C-D-E-F-G-A-B-C you will notice that the first, third and fifth notes of the scale are C, E, and G. The most obvious thing that most guitarists become instantly aware of is that the C major played in the first position actually involves playing 5 strings and therefore must have more notes than a triad. The C major chord shown below has these notes C, E, G, C, E. If you cancel out the doubles you are left with a C major triad. This brings us to an important rule: any chord tone (note) can be doubled without affecting the chords designation. Therefore a C major triad (C-E-G) and the first position C major chord below (C-E-G-C-E) are both still C major chords though the 5 note version will sound fuller due to the note doubling. Major chords have a characteristically bright and happy sound. Minor chords. The minor triad consists of a root, a minor third and a perfect fifth. The interval between the root and third is a minor third and the interval between the root and fifth is a perfect fifth. Minor chords have a dissonant quality due to the interval of a minor third. It must be remembered that we are talking about building chords from scales and that these intervals, the minor third and perfect fifth, are the interval designations from the scale which are then applied to naming the intervals in a chord. Which is why the triad intervals are not named 1st, 2nd and 3rd respectively. Minor chords are best understood in relation to their major chord counterpart. In the example below we will use E major and E minor. When we play an E major chord, we can flatten the third of the chord by lifting the finger that is holding down the third string at the first fret, making it an open string. By altering this one note so that the interval is changed from a major third to a minor third, we have formed a new chord: E minor. Switching between major and minor chords can be relatively easy, as it involves the change of only one note. Some chord changes, for example changing between an open F major to a F minor, will need a little more effort. Dominant Seventh chords. A minor seventh is added to a major chord. When a minor seventh is added to any major chord that major chord is changed into a dominant seventh. The dominant chord always refers to the chord built on the fifth degree of any major scale. Look at the C major scale below: C-D-E-F-G-A-B-C The fifth degree of the scale is G. The chord built on the fifth contains the notes: G-B-D. To change this dominant major chord to a dominant seventh you need to add a fourth note. The note you add is F (the minor seventh) which now makes: G-B-D-F. This chord has very strong need to resolve usually to the tonic. The reason the interval in G-B-D-F is called a minor seventh and not a perfect fourth is that interval designation is determined from the root of the chord being discussed. Take for example the G major scale below: G-A-B-C-D-E-F#-G As you can see the interval G-F# is a major seventh. You can form a minor seventh interval by lowering the seventh by a semitone: G-F. This holds true for all major seventh intervals. At first it seems quite strange looking at the interval relationship of another key to determine the chord intervals of the key you are playing in. With practice it becomes very easy but does involve learning a few major scales. Sixth chords. Add a sixth to the chord. The two chords below are major chords from the key of C with a sixth added. Suspended chords. To form a suspended chord the third is replaced with either a second or a fourth. The third of a chord defines its modality - whether a chord is major or minor. By removing the third and replacing it with a second or fourth you have suspended the chord's modal quality. This creates a chord that is neither major or minor and the ear interprets the chord as harmonically ambiguous. Suspended chords derived from a D major chord: Suspended chords derived from the A major chord: Suspending an E major chord: Slash chords. Chords that are not in root position. For example, a C/G is a C chord with a bass note of G. They are also referred to as "inversions". Slash chords are always notated with their chord name first followed by the bass note. Diminished chords. These consist of a stack of minor thirds. You can extend a diminished triad (three note chord) by adding another minor third; which gives you a four note chord called a diminished seventh chord. The diminished seventh chord is notated as Co7 or dim7. Diminished seventh chords are built entirely from minor thirds, so you can move the chord shape up the neck in intervals of a minor third (three frets) and this will be exactly the same notes as the original chord but in a different order. The term "inversion" is used when chords have their notes rearranged. A half-diminished chord consists of a diminished triad with a major third on top. In other words, a half-diminished chord is a diminished triad with a minor seventh. Diminished chords are full of tension because of the dissonance created by stacking minor third intervals and they are normally resolved to a consonant major or minor chord.
1,991
Lucid Dreaming/Reality Checks/Time. Presentation. With the "time" reality check, you see if clocks work. Other than checking to see if clocks report a logical time, you can try blinking to change the time. Some have more success with a digital than an analog watch, for some it's the other way around.
77
Spanish/Tú-usted. In Spanish, as in many languages, there are two ways of addressing people, one of them familiar and the other formal. In English this is achieved by the use of first names or last names. "Tú" is used for people with whom you're familiar. For example, friends and acquaintances would be referred to as "tú". So would children, pets, and, usually, all family members. "Usted", which is more formal, is used for people older than you, authority figures, strangers, and people you are meeting for the first time. In parts of Colombia "usted" is widely used, even among friends.  * Depends a lot on the country See also. /Grammar
161
Spanish/Vos. Vos is a pronoun that was used when the Spanish soldiers arrived to America. In many places it replaces "tú" and in some of them is complementary with "tú". Its verbal forms are those of "vosotros," but with some sounds missing. Example: "vosotros coméis" produces "vos comés" (Argentina, Central America), "vos comes" (Bolivia), "vos comís" or "tú comís" (Chile), and "vos coméi" (Venezuela). See also. /Grammar
139
GCSE Science/Movement. < Forces How can we describe the way things move? Motion has two basic properties, direction and speed. Objects in our universe travel in three fundamental directions. We usually describe these directions, or axes, using the letters x, y and z. When we are describing motion close to, or with respect to, the Earth's surface we usually align the axes such that the z direction points vertically. Most people will then choose the x axis to point right and the y axis to point forwards (right-handed co-ordinate System). Motion in any other direction is the same as simultaneously moving in any of these three directions. Speed is how fast an object covers a particular distance per unit of time. The units of distance are most commonly specified in meters or some power of ten multiple of meters (millimeter, kilometer, etc.), but other imperial units, such as inches and miles are sometimes used. Nearly everyone uses seconds, minutes, and hours as the unit of time. In scientific reports, seconds are used exclusively. Together these two ideas form the notion of velocity, directed motion. The language we use to describe motion in our universe is the vector, which exists in three dimensions. A vector is similar to an arrow in three dimensional space (i.e. it has a direction associated with it.) You will learn more about this in maths.
296
Latin/Lesson 4-Exercises. Write out the subjunctive of laudo in the present tense, both active and passive. Write out the subjunctive of laudo in the imperfect tense, both active and passive. Write out the subjunctive of laudo in the perfect tense, both active and passive. Write out the subjunctive of laudo in the future tense, both active and passive.
95
Scouting/BSA/Environmental Science Merit Badge. Environmental Science is a required badge to qualify for Eagle Scout. Requirement 1. Make a timeline of the history of environmental science in America. Identify the contribution made by the Boy Scouts of America to environmental science. Include dates, names of people or organizations, and important events. 1500s 1600s 1700s 1800s 1900s 2000s Requirement 2. Define the following terms and describe the relationships among them: population, community, ecosystem, biosphere, symbiosis, niche, habitat, conservation, threatened species, endangered species, extinction, pollution prevention, brownfield, ozone, watershed, airshed, nonpoint source, hybrid vehicle, fuel cell. Requirement 3. Do ONE activity in EACH of the following categories (using the activities in this {the merit badge} pamphlet as the basis for planning and carrying out your projects): A. Ecology B. Air Pollution C. Water Pollution D. Land Pollution E. Endangered Species F. Pollution Prevention, Resource Recovery, and Conservation Requirement 4. Choose TWO outdoor study areas that are very different from one another (e.g., hilltop vs. bottom of a hill; field vs. forest; swamp vs. dry land). For BOTH study areas, do ONE of the following: A. Mark off a plot of 4 square yards in each study area, and count the number of species found there. Estimate how much space is occupied by each plant species and the type and number of non-plant species you find. Write a report that adequately discusses the biodiversity and population density of these study areas. Discuss your report with your counselor. B. Make at least three visits to each of the two study areas (for a total of six visits), staying for at least 20 minutes each time, to observe the living and nonliving parts of the ecosystem. Space each visit far enough apart that there are readily apparent differences in the observations. Keep a journal that includes the differences you observe. Then, write a short report that adequately addresses your observations, including how the differences of the study areas might relate to the differences noted, and discuss this with your counselor. Requirement 5. Using the construction project provided or a plan you create on your own, identify the items that would need to be included in an environmental impact statement for the project planned. Requirement 6. Find out about three career opportunities in environmental science. Pick one and find out the education, training, and experience required for this profession. Discuss this with your counselor, and explain why this profession might interest you.
634
Scouting/BSA/Citizenship in the Nation Merit Badge. Requirement 1. "Explain what citizenship in the nation means and what it takes to be a good citizen of this country. Discuss the rights, duties, and obligations of a responsible and active American citizen." Citizenship by definition is granted by a nation-state to a person born in it or given the rights by its government after immigrating there. One can also apply for citizenship by that nation's laws, by legal marriage to one of its citizens or any other combination of requirements of that state, for example after living for sometime there and having a permanent residence. International law and treaties may also apply, for example if one is born while the mother is located within the legal boundaries of a nation it would generally result in the baby having dual nationality/citizenship. Being a good citizen should mean being of value and compliant in the eyes of the state. While the notion of citizenship makes only sense in the context of statehood, that is, the legal constructions that are limited by a territory, a nation, the classification of good or bad tends only to relate, in its most basic form, to how a person obeys the laws of the land as set by its government body and enforced by law officials and the courts. Noting that since states tend to last longer than its governance, someone that is labeled a bad citizen today may receive accolades for that criticized behavior in future circles of governance, and vice versa. A good citizen also requires one to be an attentive, informed, and participative citizen by engaging in economic-political-social activities for the betterment of the state. As such knowing the national issues and problems by following news broadcast and press is of extreme importance, but remaining aware that control of the media is the control of the discourse, even your own, so, one should seek as many divergent and independent viewpoints as possible. Rights. Citizens' rights include: Duties. Duty is the sense of morality that guides the individual to perform a particular task or activity. According to the US Citizenship and Immigration Services, which is a program within the US Department of Homeland Security, responsibilities of an active American citizen include: Obligations. Obligation can be understood as something that is imposed on an individual due to some framework such as legality. Requirement 2. Do TWO of the following: Requirement 3. Watch the national evening news five days in a row OR read the front page of a major daily newspaper five days in a row. What world issues did you learn about? Choose one and explain how it affects you and your family. Requirement 4. Discuss each of the following documents with your counselor. Tell how you feel life in the United States might be different without each one. (a) Declaration of Independence. The Declaration of Independence was the newly established government's written document that asserted freedom from the rule of the English King, going as far as establishing the right of the people in overthrowing all tyranny and setting rules on how to preserve individual freedoms. The Declaration of Independence is the document that legally establishes the United States as an independent nation and is at the core of all future legislations created by the U.S. government. (b) Preamble to the Constitution. The Preamble was the "table of contents" for the Constitution. It outlined the most important aspects of the document, and explained the reasoning for having a constitution. It's important because it helps people to better understand the Constitution and why we have it. (c) The Constitution. The Constitution enshrines the philosophy and reasoning behind the establishment of the U.S. republic, and talks about the different rights and freedoms all citizens must be given and defended. It is essentially an instruction manual. The Constitution is important because it establishes the basis of the country's social, legal and political structures. (d) Bill of Rights. The Bill of Rights includes the first 10 amendments to the constitution. These are the basic rights of citizens of the United States. Life in the U.S. could be constricted and more federally controlled without one. These basic rights are vital for a truly free country. These rights are often referred to simply by their order in the Bill of Rights, such as "First Amendment rights "or" pleading the Fifth" in legal cases. Most of these amendments help define how criminal courts and investigations are conducted. In brief, these amendments are: (e) Amendments to the Constitution. There are currently a total of 27 amendments to the Constitution, the first 10 being the Bill of Rights. The other amendments are: Requirement 5. List the six functions of government as noted in the preamble to the United States Constitution. Discuss with your counselor how these functions affect your family and local community. Requirement 6. With your counselor's approval, choose a speech of national historic importance. Find out about the author, and tell your counselor about the person who gave the speech. Example: Speech: President Lincoln's Gettysburg Address About the Author: Abraham Lincoln, the 16th President of the United States. He was also the Commander in Chief of the Union Army during the Civil war. Importance at the time: In 1863, Gettysburg, Pennsylvania was the site of one of the bloodiest and most important battles during the Civil War. Over 51,000 causalities had been suffered on both sides. Four months later President Lincoln gave this speech to dedicate a cemetery on this battlefield site. Lincoln reminded everyone what we were fighting for - "one nation under God". Not a separated nation. He also claimed that the nation built by our fore fathers "shall not perish from the earth". In other words, he would not allow the country to be destroyed. How it applies today: Choose a sentence or two from the speech that has significant meaning to you, and tell your counselor why. Requirement 7. Name the three branches of our federal government and explain to your counselor their functions. Explain how citizens are involved in each branch. For each branch of government, explain the importance of the system of checks and balances. The three branches are... Requirement 8. Name your two senators and the member of Congress from your congressional district. Write a letter about a national issue and send it to one of these elected officials, sharing your view with him or her. Show your letter and any response you receive to your counselor. To find and contact your two Senators: http://www.senate.gov/general/contact_information/senators_cfm.cfm To find and contact your Congress person: http://www.house.gov/representatives/#state_al Works Cited. "Citizenship In The Nation Merit Badge" http://www.meritbadge.com/mb/003.htm 5/29/06 "A History of the Washington Monument" http://www.nps.gov/wamo/index.htm 5/29/06 "Washington Monument: Symbolism" http://www.nps.gov/wamo/memorial/symbolism.htm 5/29/06 "Wikipedia - Gettysburg Address" http://en.wikipedia.org/wiki/Gettysburg_Address 10/14/2007
1,692
Scouting/BSA/Citizenship in the Community Merit Badge. NOTE: The Citizenship In The Community Merit Badge requirements were revised in 2016. Requirement 1. What citizenship in the community means? You live in a city, town, or rural area where you participate in activities that are going on, attend school, and associate with other citizens of the same area. What does it take to be a good citizen in your community? Follow the Scout Law and Oath. Find ways to help out in the community, like Chain Reaction Days, Food Drives. What are the rights, duties, and obligations of citizenship? You have the right to attend school, to be able to vote in elections when you are 18, and to be safe. You have the duty to follow the Scout Law and Oath and do your part to keep the community safe. You have an obligation to keep to the laws and to assist where you are needed. Explain how you can demonstrate good citizenship in your community, Scouting unit, place of worship, or school: Be a law-abiding citizen in the community, with scouts, at school, and in church, and always strive to improve the community with a happy attitude. Requirement 5. A valuable and concerned member of the community- That you have your communities best interests at heart and that you bring these interests or problems to other valuable and concerned members of your community in a group or city council meeting Requirement 6. A lot of these services are important because they help people grow and enjoy themselves. In return, the people help the community which makes these services vital to the success of your community. Requirement 7. Your troop should have service hours readily available most of the time. Ask your scoutmaster if he has somewhere where you can volunteer to fulfill this requirement. Once you have completed this, answer the questions about it for the requirement.
431
Scouting/BSA/Soil and Water Conservation Merit Badge. Requirement 1. Soil is a combination of rock, sand, clay, minerals, organic material, air, moisture, organisms, crystals, plant roots, decayed leaves & other materials. As bits of crumbled material & moisture collect on a rock, simple plants begin to grow. After some time, water, decaying plants, and more minerals collect Sand - Coarse and gritty and you can just barely see individual particles. Silt - Feels smooth like flour. You cannot see the individual particles without using a strong magnifying glass. Clay - Fine granules bond together. Nitrogen (N)- Main nutrient that contributes to the growth of the above ground plant. Makes grass greener. Returned to soil by: Mowing grass & leaving clippings in lawn. Phosphorus (P) - Helps plants germinate. Also helps plants absorb nutrients to produce more. Provides overall plant health and disease resistance. Returned to soil by: Decomposed plants back into the soil. Potassium (K): Mainly for strong roots. Returned to soil by: Decomposed plants back into the soil. Requirement 2. Erosion is the displacement of solids (soil, mud, rock, and other particles) by the agents of wind, water, ice, movement in response to gravity, or living organisms. It's important because it helps prevent soil from being eroded and becoming chemically altered by overuse. Soil Conservation helps keep the environment in good working order, which helps provide clean air, food, shelter, clothing and living space which we all need and use. Water Erosion: Beating rain & moving water loosen up & carry soil particles, organic material and plant nutrients to a new location. Wind Erosion: A problem in windy areas when the soil is not protected by residue cover. Geologic: In dry regions where there is little vegetation and infrequent but intense rains that carves hills and scour valleys. Requirement 3. Is any specific action or process to care for natural resources, so they are protected from damage and improved for certain uses. Terraces: Are structural practices that can reduce erosion by holding back the water and routing it along a channel at a lower velocity to where it can be safely discharged, usually into a grassed waterway. Cover Crops: Crops such as rye that grow in late fall and provide soil cover during winter. By providing a cover to the soil, winter soil erosion from both air and water can be greatly reduced. Strip - Cropping: Is the practice of planting along the slope instead of up and down slopes, and planting strips of grass between row crops. Requirement 4. It's the area of land that catches rain and snow and drains or seeps into a marsh, stream, river, lake or groundwater. An area of land drained by a river and all its large and small tributaries. All river basins are large watersheds. The way that land and water are used and managed affects the quality and quantity of water people in cities downstream will have. Requirement 5. It will make the water run off faster, because nothing is holding it back. It helps slow down the run-off into the watershed and prevents flooding in other areas. It can cause water pollution by dumping chemicals into the rivers and also the ground which gets into our well water. Requirement 6. The contamination of water by foreign matter. It impacts our oceans, our surface water, and our underground water. Pollution comes in many forms--some conventional and others toxic. Sources of water pollution are people, factories, septic tanks, road salt, fertilizer. The effects of water pollution are weed Infested lakes, dead fish, sick birds. Primary water treatment: Allows the un-dissolved solids in raw sewage to settle out of suspension forming sludge. This only removes 1/3 of the BOD (Biochemical Oxygen Demand) and none of the dissolved minerals. Secondary waste treatment: The effluent from the primary water treatment is brought in contact with oxygen and aerobic microorganisms. They break down much of the organic matter to harmless substances such as carbon dioxide. After chlorination to remove its content of bacteria, the effluent from the secondary treatment is returned to the local surface water. Biochemical oxygen demand: The BOD is a measure of the amount of oxygen needed (in milligrams per liter or parts per million) by bacteria and other microorganisms to oxidize the organic matter present in a water sample over a period of 5 days.
1,089
GCSE Science/Coursework marking system. [This page is of historical use only now, as the GCSE Science has changed - it no longer uses the POAE criteria.] Each piece of coursework is split into four strands, of which three (Planning, Obtaining and Analysing) are worth 8 marks, and one (Evaluation) is worth 6 marks. In the event of a school prescribing more than one piece of coursework for a subject, the overall coursework mark will the be the sum of the highest marks in each strand. For example, if one obtained the marks 8 7 6 5 and 7 4 7 3, the overall mark would be 8 7 7 5, giving a total of 27 marks. The coursework marking is the same for all the subjects – even if you are doing Dual Award science, you will still have to do at least three pieces of coursework. As with all coursework, you will be required to fill in a sheet stating what help you received. The information in this section is merely a description of the marking scheme, and as such does not need to be included. However, if you use any of the rest of this book, you will need to acknowledge it as you would do with other textbook (see ). N.B. The information describes the AQA coursework system. Although it is likely to be the same for other exam boards, check if you will be taking an exam from another exam board. Specifically, AQA's marking scheme is hierarchical – the lower marks need to be obtained before the higher ones are. This may not apply to other boards. The mark descriptions are taken verbatim from the AQA documents, and their use is contended to be fair use. Planning (P). You will have to perform a preliminary and produce a plan before you carry out the actual investigation. The plan is expected to use the results of the preliminary to suggest a possible experiment that can be carried out. This will typically involve a recommendation of which factor should be altered, what should be measured, and what range of results should be taken. It is important to make a prediction here, as it is needed for marks in the Analysis. You should also make reference to safety and how your experiment will be fair, talk about the variables involved, your independent variable (the one you have chosen to investigate) and dependent variable (the factor you will be recording). These come in very helpful and pick up a few more marks. Obtaining Evidence (O). This strand is marked on how you perform while performing the experiment itself. You will be marked on both how you perform during the experiment and your results table, which must be handed in. In the unlikely event of no results being obtained from the Obtaining, your teacher will issue you with a set of results to use for the Analysis and Evaluation. You will, however, receive no or few marks on this section if you do not take your own results. Analysing and considering evidence (A). The analysis is intended as the longest section of the coursework, because it involves processing the data collected from the Obtaining Evidence section of the mark scheme. Graphs are notably important here, as is a conclusion, which is required to sum up the data which has been processed. Mark Descriptions 2 marks A.2a state simply what is shown by the evidence 4 marks A.4a use simple diagrams, charts or graphs as a basis for explaining the evidence A.4b identify trends and patterns in the evidence 6 marks A.6a construct and use suitable diagrams, charts, graphs (with lines of best fit, where appropriate), or use numerical methods, to process evidence for a conclusion A.6b draw a conclusion consistent with the evidence and explain it using scientific knowledge and understanding "'9-16 marks" mention a naseebo lal song and analyse it referring to its social historical and vulgar context" finally for 17-20 marks mention the laws of naseebo mujra A.8a use detailed scientific knowledge and understanding to explain a valid conclusion drawn from processed evidence A.8b explain the extent to which the conclusion supports the prediction, if one has been made Evaluating (E). The Evaluation consists of identifying any anomalous data, and suggesting possible improvements to the experiment.
955
Scouting/BSA/American Labor Merit Badge. Requirement 1. Using resources available to you, learn about working people and work-related concerns. List and briefly describe or give examples of at least EIGHT concerns of American workers. These may include, but are not limited to, working conditions, workplace safety, hours, wages, seniority, job security, equal opportunity employment and discrimination, guest workers, automation and technologies that replace workers, unemployment, layoffs, outsourcing, and employee benefits such as health care, child care, profit sharing, and retirement benefits. Requirement 2. With your counselor's and parent's approval and permission, visit the office or attend a meeting of a local union, a central labor council, or an employee organization, or contact one of these organizations via the Internet. Then do EACH of the following: Requirement 3. Explain to your counselor what labor unions are, what they do, and what services they provide to members. In your discussion, show that you understand the concepts of labor, management, collective bargaining, negotiation, union shops, open shops, grievance procedures, mediation, arbitration, work stoppages, strikes, and lockouts. Requirement 4. Explain what is meant by the adversarial model of labor-management relations, compared with a cooperative-bargaining style. Requirement 5. Do ONE of the following: 1648 - Boston shoemakers and coopers form guilds. 1770 - Boston Massacre set off by a conflict between rope workers and British soldiers. 1776 - Declaration of Independence signed in Carpenter's Hall. 1790 - First textile mill, built in Pawtucket, RI, is staffed entirely by children under the age of 12. 1814 - The invention of the power loom makes weaving a factory occupation. 1827 - The first citywide labor council forms in Philadelphia. 1837 - Andrew Jackson declares a 10-hour workday in Philadelphia Navy Yard. 1868 - The first federal 8-hour day takes effect. It is very limited, though. 1874 - The union label is used for the first time by the Cigar Makers International Union. 1876 - Molly Maguires convicted for coal-field murders in Pennsylvania. 10 are hanged. 1882 - First Labor Day Celebration takes place in New York City. 1885 - The Foran Act bans immigration of laborers brought in under contract to break strikes. 1886 - The American Federation of Labor forms with Samuel Gompers as its first president. 1886 - The Haymarket Riot takes place in Chacago. Four are hanged. 1892 - The Homestead Strike in Pennsylvania ends in a Union loss. 1906 - The International Typographical Union successfully strikes for an 8-hour day. 1919 - A strike by Boston police is the first ever by public safety workers. 1935 - The Social Security act is approved. 1936 - The Walsh-Healey Act sets safety standards, minimum wage, overtime pay and child labor provisions on all federal contracts. 1938 - A federal minimum wage law takes effect. 1947 - The Taft-Hartley Act restricts union activities and lets states pass "right-to-work" laws. 1955 - The AFL and CIO reunite. 1964 - The Civil Rights Act prohibits employment discrimination. 1981 - Ronald Reagan fires most of the nation's air traffic controllers for refusing to end strike. 1993 - The Family and Medical leave Act is passed. 1997 - UPS workers strike over control of retirement benefits. Requirement 6. Explain the term globalization. Discuss with your counselor some effects of globalization on the workforce in the United States. Explain how this global workforce fits into the economic system of this country. Requirement 7. Choose a labor issue of widespread interest to American workers-an issue in the news currently or known to you from your work on this merit badge. Before your counselor, or in writing, argue both sides of the issue, first taking management's side, then presenting labor's or the employee's point of view. In your presentation, summarize the basic rights and responsibilities of employers and employees, including union members and nonunion members. Requirement 8. Discuss with your counselor the different goals that may motivate the owners of a business, its stockholders, its customers, its employees, the employees' representatives, the community, and public officials. Explain why agreements and compromises are made and how they affect each group in achieving its goals. Requirement 9. Learn about opportunities in the field of labor relations. Choose one career in which you are interested and discuss with your counselor the major responsibilities of that position and the qualifications, education, and training such a position requires.
1,194
Scouting/BSA/Music Merit Badge. Requirement 1. Sing or play a simple song or hymn chosen by your counselor using good technique, phrasing, tone, rhythm, and dynamics.. Read all the signs and terms of the score. See Learn to Sing Better How to Play Music How to Play Guitar How to Play the Piano How to Play Basic Piano Chords Advanced Piano Playing Modern Musical Symbols List of Musical Symbols Musical Terms Key Signature Reading Music 101 Learning Music Symbols and Terms Requirement 2. Name the five general groups of musical instruments. Create an illustration that shows how tones are generated and how instruments produce sound. The science of musical instruments is called "organology". It embraces the study of instruments' history, instruments used in different cultures, technical aspects of how instruments produce sound, and musical instrument classification. Musical instruments are frequently classified by the way they generate sound: *Woodwind instruments generate a sound when a column of air is made to vibrate inside them. The frequency of the wave generated is related to the length of the column of air and the shape of the instrument, while the tone quality of the sound generated is affected by the construction of the instrument and method of tone production. Vibrations are created by blowing air across a single reed, double reed or across a sharp-edged hole opening at or near the end of the instrument. The clarinet and saxophone families are examples of single reed woodwinds. The oboe and bassoon are examples of double reed woodwinds. Flutes produce sound when air is blown across the embouchure hole. *Brass instruments generate sound by sympathetic vibration of air in a tubular resonator in sympathy with the vibration of the player's lips which are “buzzed” in the instrument’s mouthpiece. There are several factors involved in producing different pitches on a brass instrument. One is alteration of the player's lip tension (or embouchure), and another is air flow. Also, slides or valves are used to change the length of the tubing, thus changing the harmonic series presented by the instrument to the player. There are two different kinds of brass: low and high. The tuba, baritone and trombone are examples of low brass. The trumpet and French horn are examples of high brass. *Percussion instruments generate sound, with or without a definite pitch, when hit with an implement, shaken, rubbed, scraped, or by any other action which sets the object into vibration. The shape and material of the part of the instrument to be struck and the shape of the resonating cavity, if any, determine the sound of the instrument. The term usually applies to an object used in a rhythmic context or with musical intent. Examples of definite pitch percussion are chimes, glockenspiel, handbells, marimba, steelpan, gong, timpani and xylophone. Examples of indefinite pitch percussion are bass drum, castanet, cymbal, slapstick, snare drum, tom-tom drum and tam-tam. *String instruments generate a sound when a string is plucked, strummed, slapped, etc. The frequency of the wave generated (and therefore the note produced) usually depends on the length of the vibrating portion of the string, the diameter of the string, the tension of the string, and the point at which the string is excited. The tone quality varies according to the construction of the resonating cavity (size, shape and wood used), the material the string is made of, how the string is excited into motion, and the expertise of the musician. The guitar, violin, mandolin, ukulele, harp, autoharp, harpsichord and piano are examples of string instruments. *Electronic instruments generate sound through electronic means. Such an instrument sounds by outputting an electrical audio signal that ultimately drives a loudspeaker. They can mimic all of the other instruments or create very unique sounds. The digital piano, electronic keyboard, organ, analog synthesizer, digital synthesizer, MIDI instruments (Musical Instrument Digital Interface), wind synthesizer, digital drums and virtual musical instruments are examples of electronic instruments. Many alternate divisions and further subdivisions of instruments exist. See also Classifying Musical Instruments. To learn about a specific instrument, consult the list of musical instruments or List of archaic musical instruments. The human body, generating both vocal and percussive sounds, was the first human musical instrument. Most likely the first prehistoric rhythm instruments or percussion instruments involved the clapping of hands, hitting stones together, or other materials that are useful to create rhythm. The oldest flutes discovered thus far were in the Hohle Fels Cave in Germany and were dated at about 35,000 years old. All classes of instruments, other than electronic, are mentioned in ancient historic sources, such as Egyptian, Chinese, East Indian, Greek and Roman inscriptions and the Bible and have actually been recovered from historical archaeological sites from around the world. See Sound is Energy Vibrating String What is Sound? Changing Sounds Sounds and How Instruments Work Making Sounds With Musical Instruments Requirement 3. Do TWO of the following: If there is a program, make good use of the notes. See Music of the United States American Popular Music Before 1900 American Popular Music From 1900 to 1950 American Popular Music From 1950 to 2000 Google Timeline 1760–2011 American Music Timeline 1640–1890 American Composers List of American Composers List of American Songwriters Requirement 4. Do ONE of the following: *Teaching a Song. These tips will get you started and help you relax and have some fun, too. 1. Practice the words and the melody of the song you will teach until you know the song by heart. 2. Smile at the group. Be enthusiastic and act confident, even if this is your first time teaching a song. 3. Start with a lively, well-known warm-up number, so everyone (including you) can sing with confidence. 4. Tell the group the name of the song, and provide copies of the lyrics. Use songbooks or song sheets, or write the lyrics on a blackboard or large sheet of paper. 5. Sing the song through alone or with a small group that already knows it. 6. Then sing phrase by phrase and have the group repeat after you. If the song has several verses, teach one verse at a time. 7 When the group has learned the phrases or verses, sing the song all together. If the song is fast or difficult, sing it slowly at first, then pick up speed as the singers master it. 8. Musical accompaniment helps. Piano, accordion, guitar and harmonica are good accompaniments because they can play harmony, not just the melody. 9. When the group has sung the song a time or two, stop. Do not work so hard that it is no longer fun. Go all at once to a familiar song. Boy Scouts of America Merit Badge Series, Music, #35921, page 49, 2010. *Leading a Song. Because teaching is a part of song leading, many of the previous tips apply to both. Here are a few more hints to help you lead songs successfully. 1. Give the starting note. Sing or hum a few bars of the song. Or, have a few bars played, if an instrument is available. Be careful not to pitch the song too high or low. If you start the group on the wrong note, stop and start over. 2. Start with a slight upward arm motion followed by a decisive downward motion (a downbeat), and begin singing. Do not worry if some don’t start with the first note. They will join quickly. 3. Beat time with a simple down-and-up motion of the arm. Hold your arm high enough for everyone to see, and make your gestures definite and brisk. You are in command. 4. Control volume by raising your free hand for loudness and lowering it for softness. 5. Move around a little, put some energy into it, and smile. 6. Stop while everyone is still having fun. Leave the group wanting more. Boy Scouts of America Merit Badge Series, Music, #35921, page 50, 2010. See Conducting Tips Learn Music Conducting Techniques Conducting The Conducting Beat Patterns Conducting Music Conducting Interactive Conducting Course Interactive Conducting Course PDF See MusicTheory.net Music Theory Chord Chart "In Sequence" Chord House Money Chords Free Printable Staff Paper More Free Printable Staff Paper See Kinder Art Wanna Learn Building Musical Instruments *Classifying Your Collection. Classify (organize) your recordings in a way that suits you, but keep your system simple and flexible. You can classify recordings in several ways: • In chronological order of the periods during which the music was written. • In alphabetical order, by names of performers, composers or titles. • By category—classical, folk, jazz, country, rock, etc. • In numerical order, by catalog numbers. • In combinations of these or according to your own numbering system. Boy Scouts of America Merit Badge Series, Music, #35921, page 62, 2010. *Caring for Compact Discs (CD) and Players. • Handle CDs carefully by the edges. • After playing, store each CD in its protective plastic case. CDs can be stored horizontally or vertically in storage units. • A carrying case is good for organizing CDs as well as for transporting them. • Wipe carefully handled CDs with a soft cloth, stroking from the center to the rim. If a CD has been soiled, you can clean it gently with soap and water. • Place a CD on a level surface, away from dampness, high humidity, and extreme heat. Protect it from strong vibrations or jolting. • CD players ordinarily need no maintenance. If the player malfunctions, consult your dealer or a repair shop. Repair requires a trained technician and specialized tools. *Handling Records. • Handle records by the edges. Avoid touching the grooved surfaces. Use a soft brush or cloth to keep them free of dust, making strokes in a circular direction along the grooves. • When you play the records manually, lower the tone arm onto the record gently. A bumpy landing can scratch and injure the record and damage the needle. • Be sure the needle (stylus) is in good condition at all times. A worn needle can ruin your records. Replace diamond needles after every 1,000 hours of play. • Discard records that are cracked or full of nicks. They can damage the needle. *Caring for Tapes and Tape Players. • Clean and demagnetize the tape heads after at least every 20 hours of use to remove tiny particles that tapes leave behind. Do this especially before you plan to record an important program or play a valuable tape. Use cotton swabs soaked with denatured, not isopropyl (rubbing) alcohol. You can buy denatured alcohol or a special cleaning solution from an electronics or music store. Allow the heads to dry for 30 minutes before inserting a tape. • After you have cleaned the heads, use the swabs to clean the metal guides along the tape path. • To avoid erasing a cassette tape by accident, remove the small plastic tabs on the back of the cassette. Use a small screwdriver to pry out the tabs. Commercially recorded tapes already have he tabs removed. *Storage. Store record albums in an upright position and fit snugly against each other. Flat or slanted storage will cause the records to warp. Store tapes and CDs in a cabinet or case that protects them from dust and allows you to keep them organized and safe. Boy Scouts of America Merit Badge Series, Music, #35921, pages 66-67, 2010. See Manage Your Growing Disc Collection – Tools and Tricks Storing Your CD Collection Shelving Your CD Collection Organizing and Storing Your CD and DVD Disks More Storage Means More Freedom See Bugle History of the Bugle Evolution of the Bugle How to Play a Bugle How to Blow a Bugle How to Tune a Bugle How to Play a Trumpet How to Take Care of a Bugle How to Clean Brass Instruments g. Sound the following bugle calls: “First Call,” “Reveille,” “Assembly,” “Mess,” “To the Colors,” and “Taps.” Then explain when each of these calls is used. “First Call” is generally used to just get everyone’s attention that something will be happening soon (like assembly) and is sometimes used at race tracks as the “call to the post” (horses get in line to start the race). “Reveille” is used to awaken people and lets them know it is time to get up and about. “Assembly” is used to call everyone together, for everyone to “fall in”, often at a designated place. “Mess” signals that it is time to eat. It is also used at times at athletic events to stir up the crowd. “To The Colors” is a bugle call to render honors to the nation. The most common use is when the national flag is being lowered at the end of the day (where everyone may be assembled as well). It commands the same courtesies as the National Anthem. “Taps” signifies “lights out” at the end of the evening. Lyrics can be sung to it called “Day is Done”. It may also be played during flag ceremonies and at funerals, particularly for veterans. Bugle Calls Music More Bugle Calls Music and Listen to Bugle Calls Listen to Bugle Calls
3,186
Scouting/BSA/Personal Management Merit Badge. Requirement 1. Do the following: Requirement 2. Do the following: Requirement 3. Discuss with your merit badge counselor FIVE of the following concepts: Requirement 4. Explain the following to your merit badge counselor: Explain the differences between saving and investing, including reasons for using one over the other: Saving has a guaranteed low return with loss of money possible if you go over the insurance amount of $250,000 per account named depositor, per insured bank.(as of 6/7/09) Investing has a risk of losing you money but chance of a higher return. Explain the concepts of return on investment and risk: Risk - Possibility of your investment losing the money you put in. RoI = (gain from investment – cost of investment)/cost of investment Explain the concepts of simple interest and compound interest and how these affected the results of your investment exercise: Simple interest is calculated on principal only, Compound interest is calculated on total of principal plus the interest earned. Requirement 5. Select five publicly traded stocks from the business section of the newspaper. Explain to your merit badge counselor the importance of the following information for each stock: Requirement 6. Pretend you have $1,000 to save, invest, and help prepare yourself for the future. Explain to your merit badge counselor the advantages or disadvantages of saving or investing in each of the following: A- B-an investment program funded by shareholders that trades in diversified holdings and is professionally managed. C-insurance that pays out a sum of money either on the death of the insured person or after a set period. D-a certificate issued by a bank to a person depositing money for a specified length of time. E-a bank account that earns interest/U.S. savings bonds are debt securities issued by the U.S. Department of the Treasury to help pay for the U.S. government's borrowing needs. U.S. savings bonds are considered one of the safest investments because they are backed by the full faith and credit of the U.S. government Requirement 7. Explain to your merit badge counselor the following: What a loan is: A loan is a financial transaction in which one party (the lender) agrees to give another party (the borrower) a certain amount of money with the expectation of total repayment. The specific terms of a loan are often spelled out in the form of a promissory note or other contract. The lender can ask for interest payments in addition to the original amount of the loan (principal). The borrower must agree to the repayment terms, including the amount owed, interest rate and due dates. Some lenders can also assign financial penalties for missed or late payments. What interest is: An interest rate is the price a borrower pays for the use of money they do not own, for instance a small company might borrow from a bank to kick start their business, and the return a lender receives for deferring the use of funds, by lending it to the borrower. Interest rates are normally expressed as a percentage rate over the period of one year. How the annual percentage rate (APR) measures the true cost of a loan: You can think about the interest rate as a percentage of the money borrowed to be paid. The best way to compare mortgage loans is by comparing the Annual Percentage Rate, or APR on each prospective loan offer. By law, every mortgage loan offer, usually in the form of a disclosure called a Good Faith Estimate, must disclose APR associated with the loan. When we talk about real estate loans, interest rates are also sometimes referred to as mortgage rates. Requirement 8. Demonstrate to your merit badge counselor your understanding of time management by doing the following: Requirement 9. Prepare a written project plan demonstrating the steps below, including the desired outcome. This is a project on paper, not a real-life project. Examples could include planning a camping trip, developing a community service project or a school or religious event, or creating an annual patrol plan with additional activities not already included in the troop annual plan. Discuss your completed project plan with your merit badge counselor. Requirement 10. Do the following: External links. Personal Management Merit Badge with Workbook PDF, current requirements, and resources for the .
1,018
Scouting/BSA/Reptile and Amphibian Study Merit Badge. Requirement 1. Describe the identifying characteristics of six species of reptiles and four species of amphibians found in the United States. For any four of these, make sketches from your own observations or take photographs. Show markings, color patterns, or other characteristics that are important in the identification of each of the four species. Discuss the habits and habitats of all ten species. Requirement 2. Discuss with your merit badge counselor the approximate number of species and general geographic distribution of reptiles and amphibians in the United States. Prepare a list of the most common species found in your local area or state. Requirement 3. Describe the main differences between: Requirement 4. Explain how reptiles and amphibians are an important component of the natural environment. List four species that are officially protected by the federal government or by the state you live in, and tell why each is protected. List three species of reptiles and three species of amphibians found in your local area that are not protected. Discuss the food habits of all 10 species. Requirement 5. Describe how reptiles and amphibians reproduce. Requirement 6. From observation, describe how snakes move forward. Describe the functions of the muscles, ribs, and belly plates. Requirement 7. Describe in detail six venomous snakes and the one venomous lizard found in the United States. Describe their habits and geographic range. Tell what you should do in case of a bite by a venomous species. Requirement 8. Maintain one or more reptiles or amphibians for at least a month. Record the food accepted, eating methods, changes in coloration, shedding of skins, and general habits; or keep the eggs of a reptile from the time of laying until hatching; or keep the eggs of an amphibian from the time of laying until their transformation into tadpoles (frogs) or larvae (salamanders). Requirement 9. Identify at night three kinds of toads or frogs by their voices. Imitate the song of each for your counselor. Stalk each with a flashlight and discover how each sings and from where. Requirement 10. Tell five superstitions about reptiles and amphibians and give a correct explanation for each. Give seven examples of unusual behavior or other true facts about reptiles and amphibians.
581
Modern History/Space Exploration/Space Race. <br>"The Mercury Capsule" The Men. Werner Von Braun German scientist and creator of the German V-2 rocket which devastated London during WWII. He would prove instrumental in the design and creation of technology for the space program. Yuri Gagarin Russian cosmonaut; first man in space. Vladimir Komarov Russian Cosmonaut; First man to die in space. After a short period in space upon re-entry the parachutes on his spacecraft failed to open to slow the vehicle descent. Russian spacecraft of the era landed on earth rather than in the ocean as did the United States' spacecraft 'splashdown'. The parachutes of Cosmonaut Komarov's craft were burnt off during re-entry and this was noticed by observers in the upper part of the atmosphere. Communication with the spacecraft was established soon after re-entry and Cosomonaut Komarov was informed of the development and appraised that nothing could be done. There was time to inform his wife and have her present in the control room for the final moments. This man has been called a hero. Alan Shepard American astronaut; first American in space. Would later walk on the moon on Apollo 14 after battling an inner ear disease. Neil Armstrong American astronaut; first man to walk on the moon. Jim Lovell American astronaut; commander of the ill-fated Apollo 13 mission. Mercury. /Mercury Missions/ Gemini. A two man space craft that was instrumental in developing docking and EVA techniques. Gemini hardware was used to perform the first manned-unmanned docking in space. /Gemini Missions/ Apollo. A three man space craft consisting of a service module, which contained the engines and most of the flight hardware, and the command module, which was the portion of the spacecraft that would return to Earth. Apollo 11 carried the Lunar Module to the Sea of Tranquility region of the moon, where it touched down for the first manned lunar landing. Apollo would serve as the primary NASA spacecraft until it was replaced by the Space Shuttle Transportion System (STS). /Apollo Missions/ Lunar Module. A spider-like spacecraft composed of a descent stage, which carried the descent and ascent stages to the surface of the moon, and an ascent stage, which used the descent stage as a launchpad to return to the Apollo command module in lunar orbit. The lunar module was stored in the uppermost stage of the Saturn V rocket, until it was retrieved by the Apollo spacecraft through a docking maneuver.
637
History of Christianity. Table of Contents. __NOEDITSECTION__
16
Modern Physics/Constants of Nature. This is a brief listing of some constant values that are used in this book. Constants are currently listed in no particular order. Some values from the 2002 CODATA recommended values of the Fundamental Physical Constants. See Constants Information at NIST.
67
Modern History/Space Exploration/Space Race/Apollo Missions. In detailing the history of the Apollo missions, the most compelling question as a historian is, "where to stop?" As mankind's perhaps most significant achievement, the wealth of information regarding the Apollo missions is overwhelming. Below is a brief overview of the purpose, achievements, and some other critical data regarding each mission. Apollo 1. During a 'plugs-out' (disconnected from any earthbound umbilicals) test, faulty wiring under one of the astronauts seats combined with the cabin atmosphere which was 16 Pounds per square inch (PSI) pure oxygen caused a fire in the cabin, killing all three crew members in less than a minute: Virgil I. ("Gus") Grissom, Edward H. White II, and Roger B. Chaffee. Later missions would use a less combustible mixture of nitrogen and oxygen. Apollo 4. NASA elected to skip Apollo's 2 and 3 and move directly to mission 4. Mission 4 was the first full test of the Saturn V platform. Apollo 5. First test of Command Module in space. Apollo 6. Test of Command Module Heat shield and separation of launch vehicle stages. Apollo 7. Manned test of the Command Service Module in Earth orbit. Commander: Walter M. Schirra<br> Command Module Pilot: Donn F. Eisele<br> Lunar Module Pilot: R. Walter Cunningham Landing Site: Not applicable; did not leave Earth orbit. Duration: 10 days, 20 hours, 9 min, 3 seconds. Apollo 8. Manned test of the Command Service Module in Lunar orbit. Commander: Frank F. Borman, II<br> Command Module Pilot: James A. Lovell, Jr.<br> Lunar Module Pilot: William A. Anders Landing Site: None; no Lunar Module flown with this mission. Duration: 6 days, 3 hours, 0 min, 42 seconds. Apollo 9. Manned test of the Lunar Module in Earth orbit. Command Module: "Gumdrop"<br> Lunar Module: "Spider" Commander: James A. McDivitt<br> Command Module Pilot: David R. Scott<br> Lunar Module Pilot: Russell L. Schweickart Landing Site: Not applicable; did not leave Earth orbit. Mission Objective: Initial test of Lunar Module. Tested LM engines, backpack life support systems, navigation systems, and docking ability. Duration: 10 days, 1 hour, 0 min, 54 seconds. Apollo 10. Manned test of the Lunar Module in Lunar orbit. Command Module: "Charlie Brown"<br> Lunar Module: "Snoopy" Commander: Thomas P. Stafford<br> Command Module Pilot: John W. Young<br> Lunar Module Pilot: Eugene A. Cernan Landing Site: None; descended to within 14km of lunar surface and returned to orbit. Mission Objective: 'Dress rehearsal' for Apollo 11 lunar landing. Tested lunar descent and ascent operations. Duration: 08 Days, 0 hours, 3 min, 23 seconds. Apollo 11. First manned lunar landing.<br> <br> Command Module: "Columbia"<br> Lunar Module: "Eagle"<br> <br> Commander: Neil Armstrong <br> Command Module Pilot: Michael Collins <br> Lunar Module Pilot: Edwin E. ("Buzz") Aldrin Jr.<br> <br> Landing Site: Mare Tranquilatis (Sea of Tranquility)<br> <br> Mission Objective: Land on the moon safely and return safely.<br> <br> Duration: 08 Days, 03 hours, 18 min, 35 seconds. Apollo 12. Command Module: "Yankee Clipper"<br> Lunar Module: "Intrepid" Commander: Charles P. Conrad, Jr.<br> Command Module Pilot: Richard F. Gordon, Jr.<br> Lunar Module Pilot: Alan L. Bean Landing Site: Ocean of Storms Mission Objective: Retrieve parts of lunar probe Surveyor 3, deploy Apollo Lunar Surface Experiments package. Duration: 10 days, 4 hours, 36 minues. Apollo 13. Lunar landing was aborted due to failure of the second CSM oxygen tank, and associated collateral damage. Crew was safely returned. Command Module: "Odyssey"<br> Lunar Module: "Aquarius" Commander: James A. Lovell, Jr.<br> Command Module Pilot: John L. Swigert, Jr.<br> Lunar Module Pilot: Fred W. Haise, Jr. Landing Site: Fra Mauro (mission aborted) Mission Objective: Initial mission was exploration in the Fra Mauro lunar highlands. (mission aborted) Duration: 5 days, 22 hours, 54 minutes, 41 seconds Apollo 14. Command Module: "Kitty Hawk"<br> Lunar Module: "Antares" Commander: Alan B. Shepard, Jr.<br> Command Module Pilot: Stuart A. Roosa<br> Lunar Module Pilot: Edgar D. Mitchell Landing Site: Fra Mauro Duration: 09 days, 02 hours, 2 minutes. Apollo 15. First use of the Lunar Rover (LRV). Command Module: "Endeavour"<br> Lunar Module: "Falcon" Commander: David R. Scott<br> Command Module Pilot: James B. Irwin<br> Lunar Module Pilot: Alfred M. Worden Landing Site: Hadley-Apennine region near Apennine Mountains. Duration: 12 days, 17 hours, 12 minutes. Apollo 16. Command Module: "Casper"<br> Lunar Module: "Orion" Commander: John W. Young<br> Command Module Pilot: Thomas K. Mattingly II<br> Lunar Module Pilot: Charles M. Duke, Jr. Landing Site: Descartes Highlands. Duration: 11 days, 01 hour, 51 minutes. Apollo 17. Final Apollo lunar landing. First NASA mission to include a scientist-astronaut (Jack Schmitt). Command Module: "America"<br> Lunar Module: "Challenger" Commander: Eugene A. Cernan<br> Command Module Pilot: Ronald E. Evans<br> Lunar Module Pilot: Harrison H. ("Jack") Schmitt Landing Site: Taurus-Littrow, highlands and valley area. Duration: 12 days, 13 hours, 52 minutes.
1,911
Music Theory. This book discusses tonal music theory, specifically of the common practice period onwards, including jazz, blues, rock, and other modern styles. It focuses mostly on Western (i.e., Western European, Euro-American, and Afro-American) styles, however, all styles of music are discussed. Appendices. __NOEDITSECTION__
78
Scouting/BSA/Wilderness Survival Merit Badge. Requirements. Requirement 1a:"Explain to your counselor the hazards you are most likely to encounter while participating in wilderness survival activities, and what you should do to anticipate, help prevent, mitigate, or lessen these hazards." COMMENT: While risk reduction is an important concept and while this requirement opens the way to learning about the previously-omitted hazards that cause 75% of wilderness fatalities, this new requirement overlaps requirements 1b, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12. Requirement 1b:"Show that you know first aid for and how to prevent injuries or illnesses likely to occur in backcountry settings, including hypothermia, heat reactions, frostbite, dehydration, blisters, insect stings, tick bites, and snakebites."[emphasis added] COMMENT: A great improvement over prior language that required knowledge of first aid for all possible illness or injuries. However, still omits listing first aid for heart attack and drowning, which cause about half of all wilderness fatalities, and omits first aid for falls, which cause kill about another 25%. Still omits animal bites (rabies and plague). Requirement 2:"From memory, list the seven priorities for survival in a backcountry or wilderness location. Explain the importance of each one with your counselor." Page 20 of the pamphlet states that there is "an order of priority" for seven "priorities for survival" without reference to the actual facts on the ground. The official priorities are, in this order: A. "STOP" (Stop/Think/Observe/Plan, a tool to help you think properly about how to deal with a survival situation and establish what you need to do and in what order. Admitting there is a problem and thinking about it in a positive, productive, and creative fashion increases the chances for a good outcome. Control your fears and avoid panic. Decide to live. Focus on what you can do --- not what you cannot do. Analyze your situation and plan a course of action only after considering all of the aspects of your predicament and keeping in mind your safety at all times. Don't make unnecessarily quick judgments. How you think about your situation is the key to survival in an outdoor emergency. B. First Aid - Serious first aid problems need to be dealt with consistent with proper mental approach. First aid may be your top priority. Scouts are far more likely to have needed first aid information and skills than the general population. C. Shelter - Staying at or near 98.6 F is essential to survival. If the survival situation takes place in dangerous cold or heat, getting sheltered as best you can (starting with clothing) is critical -- first priority. D. Fire - Fire is not a survival need but a tool that addresses several survival needs, including staying at 98.6 when it is cold; signaling; purifying water; and boosting your morale. E. Signaling - If you are lost and want to be found than make yourself visible. A "signal" is something that stands out from the surroundings by virtue of its color, movement, sound or shape. F. Water - Water is often critical to survival. In great heat, water may be needed in a few hours. Dehydration interferes with the functioning of our bodies, including thinking straight. G. Food - Food is listed last in the pamphlet and is apparently not regarded as a priority at all: "Don't worry about food." However, food is an important necessity, however, not as important as water. COMMENT: The requirements ignore the need to navigate safety to avoid trouble or deal with it ("self-rescue") and the needs to conserve energy and sleep. These are critical omissions and conflict with other official B.S.A. literature.. While the pamphlet discusses the importance of leaving trip information with responsible parties who will "miss" you, that critical tool does not find its way into the requirements. Requirement 3:"Discuss ways to avoid panic and maintain a high level of morale when lost, and explain why this [sic] is important." COMMENT: Former editions of the pamphlet required that the candidate explain how to maintain a "positive mental attitude" without expressly explaining how that objective could be accomplished. The 2008 edition (the 2007 edition with colored pictures) urges in the text (p. 19) "Keep a Positive Attitude," explained as a "conscious choice to . . . endure." It then discusses the STOP process as the invariable first "priority," implying that STOP is a way to maintain a positive attitude, avoid panic, and maintain morale. OTHER COMMENTS: (a) Be positive about your problem situation. Things have gone wrong, but you are NOT helpless. There ARE things you can do to make the situation better. As a Scout, you have skills and experience that will help. Having a shelter and fire (light) built before dark helps you conclude that you are safer and that you will make it through the emergency. Getting dark? So what? It gets dark on every campout you have experienced. Noises in the dark? That's normal. Nothing new there. You left a Trip Plan at "home," so you will be missed, and help will be on the way. (b)Thinking realistically and creatively are keys to survival. Requirement 4:"Describe the steps you would take to survive in the following conditions:" COMMENT: The pamphlet vastly overrates waterproof-breathable garments and ignores the existence of polyester, dating the material to a period decades ago when the first waterproof-breathables were uncritically hailed, "polypro" was king, and wool was the number 1 insulation layer. The pamphlet inconsistently suggests both t-shirts and shorts and long-sleeved shirts and trousers for "hot" weather and shows many illustrations of Scouts at Philmont in t-shirts, shorts and no head ware whatsoever ("Crispy Critters") Requirement 5:"Put together a personal survival kit and explain how each item in it is useful." COMMENT: The text does not explain the reasoning behind a "personal survival Kit" (AKA "PSK"); namely, a collection of basic gear so small and light that one will never be tempted to leave it behind. The pamphlet confuses a PSK with the "Ten Essentials" approach to selecting gear for a wilderness trek. Requirement 6:"Using three different methods (other than matches), build and light three fires." COMMENT: While the text (p. 29) recognizes that the survival need is an ability to start a fire with something other than "matches and lighters," the requirement continues to technically allow any means other than matches (such as a butane or propane torch). Much of the information in the pamphlet on fire-building is incorrect. Hard woods, such as oak, are poor choices for fire-by-friction. The illustration that accompanies the discussion of natural flint and steel is a ferrocerium rod (man-made "flint" like that in a cigarette lighter or "Hot Spark"), and such a tool would easily be broken if you "strike the steel against the edge of the flint" (not that the ferrocerium rod has an edge)(The correct technique is, of course, to scrape the ferrocerium rod with a sharp, hard edge.) Charred cloth is not mentioned but is almost essential for most to make fire-by-friction or with natural flint and steel. Natural "flint" is not common in much of North America. Best firewood is not "dead and downed," but is dead and attached to the tree or shrub (The pamphlet amazingly advises that Leave No trace be followed even in a survival situation. Inconsistently, it also says the opposite.) The Teepee Fire lay has become the only lay illustrated in Scout literature, and it is the only lay illustrated in the pamphlet. There are other, more effective and secure fire lays, such as the Log Cabin or Hunter's Fire. Requirement 7:"Do the following:" COMMENT: Smoke signals can be seen for miles and fire is visible even further in the dark. A whistle can be heard for greater distances and uses far less energy than yelling. A mirror or other object that reflects the sun can make you visible to a helicopter or plane. Millions of people have been trained that three flashes, three whistle blasts, three smoke signals - three of any signal - stands for distress (HELP!). Requirement 8:"Improvise a natural shelter. For the purposes of this demonstration, use techniques that have little negative impact on the environment. Spend a night in your shelter." COMMENT: B.S.A. is trapped between Leave No Trace and the wishes of property owners on one side and, on the other, a desire for candidates to learn something about building an expedient shelter from leaves, grasses, and branches. So they try to have it both ways: "natural" but with "little impact on the environment." ("Unnatural" materials are only available around Halloween.) A realistic requirement would be to make a shelter from one or two plastic trash bag(s)and a framework of light, dead branches -- unless the situation allows building an expedient shelter from vegetation. The main "takeaway" from building a brush shelter is that Scouts almost invariably greatly underestimate the time and work required to build a shelter that insulates and keeps out rain. Be creative and use your surroundings the best you can. The shape of the ground may block wind in some places, as can trees or brush. If cold, try and find shelter and build a safe fire. If in really hot weather get out of the sun and dry wind. In the cold it may be easier to sleep in the day and stay awake at night by a warm fire. In very hot weather you may also want to seek shelter and/or sleep during the day. The pamphlet illustrates Scouts inadequately dressed for hot, sunny conditions and gives inconsistent advice on wilderness clothing. Requirement 9:"Explain how to protect yourself from insects, reptiles, and bears." COMMENT: Omits very significant categories of animals with which there are unpleasant interactions: 1) homo sapiens; 2) rodents and other small mammals Partial overlap with Requirement 1. Requirement 10:"Demonstrate three ways to treat water found in the outdoors to prepare it for drinking." COMMENT: The discussion of chemical disinfecting of water is incorrect. While they eliminate some risks, chlorine (except Chlorine dioxide) and iodine are not fully reliable to treat wild water according to all private and public authorities (W.M.S.; Red Cross; Mayo Clinic; U.S.C.D.C; U.S. Surgeon General; U.S.E.P.A.), as is pointed out in other B.S.A literature. There is inadequate discussion of where water is more likely to be found in nature. There is no discussion of field-expedient filtering. Only commercial filters are discussed. There is no discussion of: digging mini wells next to a body of water; SODIS (q.v.); or boiling without metal containers. There is no discussion of gathering dew or use of transpiration bags. The combination of any commercial filter AND chlorine or iodine is extremely safe. Newer filters eliminate all microorganisms. Requirement 11:"Show that you know the proper clothing to wear in your area on an overnight in extremely hot weather and extremely cold weather." COMMENT: While layers are mentioned, there is no explanation of what materials or construction are used for different layers. Polyester fleece is not mentioned, nor are polyester wicking garments. Though polypropylene is mentioned, it is obsolete when compared to polyester wicking garments. There is no mention of clothing as a barrier to insects, thorns, poisonous plants, or other sources of abrasions and cuts. The MBP suggests a brimmed hat for warm weather, omitting the need to avoid sunburn in cold weather. It repeatedly shows illustrations of Scouts in sunny mountain scenes with no hats whatsoever. There is no discussion of eye protection from solar radiation in summer or when snow covers the ground. Requirement 12:"Explain why it usually is not wise to eat edible wild plants or wildlife in a wilderness survival situation." COMMENT: Food is a need but is usually the least important wilderness survival need. A person can typically survive for many days without food. While you should use whatever food you have with you, gathering wild food uses energy and is unlikely to produce as many calories of energy as you use up trying to gather it. If you can acquire food easily then go for it. (Eating proteins and carbohydrates increases dehydration if water is in short supply.) OVERALL COMMENT: There is good information in the MBP, but also internal conflicts, conflicts with other B.S.A. literature, omissions, and simply incorrect information. There is no table of contents and the material does not track the requirements.
3,031
Dichotomous Key/Myriapoda. This is a Dichotomous Key for the Myriapods.
29
Perl Programming/Beginning exercises. These are a set of eight exercises that can be used to test your ability to write Perl programs. In some cases, these exercises might include material not covered from the textbook; in those cases, you may have to consult your platform documentation to identify a necessary function or otherwise implement one yourself.
69
Perl Programming/Getting started. Getting Started. This book assumes that you know absolutely nothing about programming at all and that Perl is your first language. However, basic operations such as making text files are outside of the realm of this tutorial. Obtaining Perl. To find out, if you already have Perl installed on your computer, go into the command line and type: perl -v This will display which version of Perl you have installed on your computer, if it is installed. There are at least two easy ways to install Perl on Windows: the ActiveState distribution, and the Strawberry Perl distribution. Both are downloadable as native Windows installers. ActivePerl has a prebuilt package repository and is supported by a corporation, while Strawberry Perl includes a compiler (gcc) so that perl modules can be installed "on the fly" and is community-supported. Most Unix-like operating systems will include Perl by default, and Linux Standard Base mandates that all compliant Linuxes ship with Perl installed. However, if for some reason you don't have perl, you can explore the options available to you at the main Perl download page, which will provide links to source and binaries. Writing programs. A sample program. Perl is an "interpreted" language, which means you will always need the Perl interpreter which will "compile" and "execute" your program each time you run it. Instead of compiling your program into bytecode, like in C++ or Pascal, and then executing it, you can simply copy your program's source code to a different computer (that has the Perl interpreter) and run it. For our first example, run your favorite text editor, and type something like this: use strict; use warnings; print "Hello World"; If you don't understand this yet, don't worry; This will be explained in more depth later. Save the file as myprog.pl and you have a Perl program ready to run. Running programs. Windows. To run a Perl program with a modern version of ActivePerl installed, you simply click on it. If the screen flashes and you can't see the output you might have to execute the file from within the windows shell (ie. cmd.exe or PowerShell). With Strawberry Perl, you'll have to execute a Perl program from the command line as shown below. From a Windows command-line interface, you can run the program thusly: C:\> perl path\to\foo\myprog.pl or, if perl.exe is not in your path: C:\> c:\perl\bin\perl.exe myprog.pl "Note: You may have to specify the full path to your program unless you are running the command prompt in that directory." UNIX-like systems. You can run a Perl program by running perl itself, and telling the shell the name of the file: perl myprog.pl Usually, Perl programs are made executable on their own. This involves two changes to the sample program. First, edit it and put the following shebang line at the top of the file: Then, at a command prompt, make your program executable by using chmod. chmod +x myprog.pl Your program is now executable and ready to run, just like any other file. To execute, type: ./myprog.pl By convention, .pl identifies a Perl script, and .pm a Perl library. The .pl file extension isn't needed for either of these examples; it's just a useful way of identifying files. The only time the convention "should" be violated is if the program is to be installed outside of the current working directory, and there runs a chance you might want to some day rewrite them in a different language.
870
Perl Programming/Exercise 1. Getting started, displaying text. Task: Create a Perl program which displays "Hello world" and then exits. print "Hello world"; exit(); Displaying numbers. Try doing these few excercises yourself my $divisionResult = 4000/7; print "Result of 4000 divided by 7 is $divisionResult"; Functions. Write a function to calculate the roots of a Quadratic equation, where you give the coefficients a,b,c to the function, and it returns both the values of x Putting it all together. Put together these programs into one which: Answers Next exercise
158
Perl Programming/Exercise 2. Input from the command-line. Write a program which you can call like so: perl myscript.pl "Argument 1" "Argument 2" "Argument 3" The program should take as many command-line arguments as are available, and display them on screen. Input from a text file. Create a text file containing the following 3 lines: This is line one This is line two This is line threes Write a program which reads the file, and displays all the lines of text. Modify it so that the whole file is output on one line with | characters between each input. use strict; use warnings; open MYFILE, '3lines.txt'; foreach(<MYFILE>){ chomp; print $_," |"; output: This is line one | This is line two | This is line threes |Press any key to continue . . . Putting it all together. Using the program from exercise 1, write a program which takes three numbers as command-line arguments, and solves the quadratic equation where those numbers are the coefficients (a, b, c). Print the roots. If no numbers are available from the command-line, prompt the user to type each number at the keyboard. If the first command-line argument is -h or --help, display some instructions on how to use the program. Answers Previous exercise | Next exercise
322
Perl Programming/Exercise 3. Reading and writing files. Write a program to read a file from disk, and save it as a new text file. (make sure you're not working with an important document!) Try downloading a public-domain book to test how your program works with large text files. Using regular expressions to search text. Modify your program to copy only lines of text which start with "Chapter 1" or other such identifier. Try identifying each chapter number as it's found and doing some simple maths with it. Display the number of chapters in the book, with how many lines each chapter contains. Put a regular-expression in to search for repeated repeated words in the text. Make it find repetitions even when the capitalisation of the words is different. Try to search for words beginning in de and ending in a vowel. Write a search to identify numbers in the text, whether they've got decimal places, - signs, etc. If you want, you can try to find them if they're written as text. How many distinct proper nouns are there in the book you've selected? How many questions? Doing search-and-replace. Modify the file-copy program so that it searches for each instance of one word, and replaces it with another word in the output file. Check that the program has operated correctly. Would you trust it with an important document yet? Write a program to capitalise the first letter of each sentence, and test it. Make sure it's not being misled by full-stops in numbers, abbreviations, and titles. Write a program to search for numbers in a book, and add 10 to each number. Write a program to search for expressions in brackets (10+3/2) and replace them with the result (11.5). Check that it doesn't do anything dangerous when you write (print "hello";) some code in the expressions. Benchmarking your programs. Using either the Time::HiRes module, or a benchmarking module, modify one of your programs to display the time taken to run. Try using a benchmarking system to identify which line of code takes the longest to run on one of your programs. Which line of code gets run the most often? Putting it all together. Write a program which searches a directory for files which match a supplied regular-expression. Display how long it took to run the program on a particular set of directories. Modify the program to search a directory-tree, rather than just one directory. Test how different search requests affect the time taken to do the search. See if you can find a regular-expression which never finishes (hit ctrl-c to stop a busy Perl program). Then try to re-write that regular-expression to do the same job but faster. Answers Previous exercise | Next exercise
630
Perl Programming/Exercise 4. Documenting your program. Using a technique called "Plain old Documentation" (POD), take one of your Perl programs, and write about what it does, how it works, and what options it accepts. You will need to write the documentation in the same file as the Perl program, using the special POD markup language Check that your program still runs correctly with the documentation embedded in it. Using the pod2text tool, create a text-file help file for your program, and check that it's nicely formatted and easy to read. (You will need to run a conversion program to extract the documentation from your program into a text-file) Creating HTML documentation. Using the POD toolkit, extract the documentation from your Perl program into an HTML file. Open the HTML file with your browser and check it's nicely formatted and easy to read. If you like to use LaTeX or man, try compiling your documentation as LaTeX or Troff files, respectively. Writing a test-suite. Find a testing framework which will allow you to write tests for your Perl program, to automatically test its functionality. Taking a complex program from a previous exercise, write tests which check for correct behaviour in each part of your program. Insert a deliberate error in the program being tested, and check that the error is spotted by the test-suite. See whether you can make the program display incorrect results and still pass the test-suite. (if so, modify the test-suite to detect this incorrect version of the program) Re-write the program from scratch using a different method for some of the functions. Check that the new program passes your test-suite. Putting it all together. Write a program which scans a Perl script and displays the size of the program, the number of comments, and calculates the density of the program (number of statements divided by lines of code) Display the value of the program by looking-up an estimate of how much it costs per line of code to develop a program in industry. Display the estimated number of errors in the program by looking-up the expected number of errors per thousand lines of code for an average program. Write the documention and test-suite for your new program. Download a random perl script from the internet, and see how it matches up on your code-quality meter. Answers Previous exercise | Next exercise
528
Perl Programming/Exercise 5. Temperature Converter. Write a program that takes in a temperature (either Celsius or Fahrenheit) and converts it. The program will know what to convert it to through interpreting the last character in the input string, which will either be an 'F' (for Fahrenheit) or a 'C' (for Celsius). So, for example if the user were to input 10C, the program will output 50F (the output should be to the nearest whole integer). If the end character in the input string is not equivalent to an F or a C, the program should handle the error appropriately. For extra points, have the program print out its opinion on the temperature. For example, if the user were to input 50F, the program would say "10C, that's cold!". Answers Previous exercise | Next exercise
205
Perl Programming/Exercise 6. Answers Previous exercise | Next exercise
19
Perl Programming/Exercise 7. Answers Previous exercise | Next exercise
19
Active Server Pages/Differences between ASP 3.0 and ASP.NET. The most important difference between ASP and ASP.Net is that ASP uses interpreted VBScript or JScript, and ASP.net uses any .Net language (including VB.Net, C#, J#, etc.) "compiled". ASP 3.0 left all its code in the front of the application. There was no way for a programmer to "hide" the sensitive code which he or she may not want anybody to see. The fact that the code was interpreted also slowed performance. ASP.NET allows the programmer to create dynamic link libraries containing the sensitive code. This may be a disadvantage from an open-source perspective but compiling code into dll's greatly improves performance. ASP.NET is firmly rooted in XML. Customarily, the dlls that ASP.NET creates start out as namespaces. All of the classes in the namespaces are then compiled into a single dll binary.
223
Perl Programming/Useful modules. See search.cpan.org Also, try subscribing to the use.perl.org mailing list, which sends out daily summaries of new modules as they're added to CPAN.
54
Dichotomous Key/Arachnida. Arachnids are the largest and most well known class of the Chelicerata with around 65,000 described species. Members of Arachnida can be found on every continent. There are 11 subgroups that most authorities recognize, but the level of classification and some names are not always agrees upon.
81
Internet Technologies/SSH. SSH is a secure replacement for Telnet and rsh. All communications between the client and server are encrypted. To access an SSH client (usually OpenSSH) in most Unix OSs, type codice_1 in a terminal window. If you don't specify the username, the user that entered the command (codice_2) will be used. In Windows, you will need to download a 3rd-party utility such as PuTTY or Cygwin. Find more information in the ssh(1) man page. On other Operating Systems (smart phones for example), you will have to use a webbased client. There are several SSH apps for Android, including ConnectBot, Dropbear, ServerAssistant, and the Telnet / SSH Simple Client. Uses. SSH is actually so much more than just a way to access a remote shell securely. It can be used for lots of other ways to transfer information securely. Using SSH. The secure shell client is conveniently called codice_3. It is typically used to access a remote host. A typical usage of codice_3 is This means that the client intends to login as codice_6 on codice_7 machine. On successful authentication, an SSH session is established between the client and the codice_7. Rsync and SFTP are the two recommended ways to transfer files, since there are unfixable flaws with SCP. Using SFTP. SFTP has "nothing" to do with FTP. SFTP merely works like FTP, meaning you use it as you would FTP. Using SFTP requires only the SSH server. The FTP server is irrelevant to SFTP. Files are transferred as binary by default. Using Rsync. "rsync" is not part of the SSH suite but is nearly ubqiquitous. It uses SSH to secure connections when transferring to or from a remote system. or One of the best parts of "rsync" is that it only transfers any changes, if an earlier version the file is on the destination. That saves on time and bandwidth. There are a lot of useful options for "rsync" including the -a option which combines recursive copying with preserved times, attributes, owner, and group, among others. Using SCP. The SSH suite still includes a neat utility "scp", which stands for secure copy, which has a great way to copy files between machines. In recent version it is a wrapper for SFTP but it works almost exactly like the default unix codice_12 command. codice_13 also allows you to copy a file from a remote host to a remote host. An example of codice_13: codice_15 which means copy files from codice_16 directory in user's home directory on the host.com machine (it will copy ALL files from the files/ directory) to the CWD (current working directory). Another great use is to use it to encrypt the transport of any data from one machine to another. As an extreme example, you can use SSH to remotely move a disk from one machine to another (akin to ghost, but securely). This may not be the best use of SSH, or the fastest way to transfer data from one machine to another over a network, but it shows you how powerful SSH can be. codice_13, aka Secure Copy, works just like codice_18. Note : If your filename contains spaces then, use scp like this:- Note : If you want to copy the whole directory then use Creating SSH Keys. Although SSH can be used with passwords, doing so is not recommended, and many servers will not allow password logins. Instead, use a key - this is more secure, and more convenient. To create an SSH key , Most modern Unix systems include the OpenSSH client. To generate a key, run: $ ssh-keygen This will store your private key in $HOME/.ssh/id_rsa, and your public key in $HOME/.ssh/id_rsa.pub. You can use different filenames, but these are the default filenames, so it's easiest to not change them. Permissions. Because the security of your private key is so important, SSH will not work if file permissions are insecure. SSH will create files and directories with the appropriate permissions, but sometimes things will go wrong. To fix permission issues: $ chmod 600 ~/.ssh/KEY ~/.ssh/KEY.pub $ chmod 700 ~/.ssh Establish Trust. To log into a remote server using SSH keys, you'll need to put the public key on that server's list of authorized keys. In other words, you need to append a copy of your local codice_24 file to the end of the remote codice_25 file. Transfer Method A: ssh-copy-id. The easiest way to do that is using codice_26. This requires some alternate form of authentication, usually password (since you haven't got a key on the server you cannot use key authentication yet). Transfer Method B: Step-by-step. The hard way to do that is to manually do each step that the above codice_26 command does automatically for you: Advanced *nix users could do all those steps in one line: SSH Personal Configuration. You don't need to set up a ~/.ssh/config file, but it makes authentication easier. The important part is to specify your user name and your private key - if this is specified in the config file, you needn't provide it on the command line. Using HostName, you can shorten the ssh command to: $ ssh servername Example. You can now ssh into codice_38 with just codice_39. The configuration options are chosen on a first-match basis, so put very specific rules torwards the beginning and more general rules towards the end. Using an SSH Agent. Most desktop environments provide SSH agents automatically these days. So if you wish to see the details, look for the environment variables $SSH_AUTH_SOCK and $SSH_AGENT_PID, though only the former is used for connecting to it and must be available in to any program which needs to connect to the agent. Keys can be added to the agent easily manually, Or they can be added automatically on first use by setting AddKeysToAgent to "yes" in the appropriate rule set in the client configuration file. However, keep in mind that once you go over six keys in the agent, special considerations have to be taken to keep the agent from trying the wrong keys in the wrong order and preventing logging in. Specifically, IdentitiesOnly should be set to "yes" for each host, ideally using the client configuration file. See below. Public-key cryptography. The most significant difference between SSH and Telnet & "rsh" is in the realm of security. SSH uses RSA, EcDSA, or Ed25519 for public-key cryptography. Communication from the server to the client is also possible in the same way — the server encrypts using the client's public key and the client decrypts using it's private key. Setting up OpenSSH with public key cryptography. The following presumes physical access to the server or some out-of-band equivalent. With your distro's package manager, install sshd (or openssh-server) on the server, and on the client install ssh (or openssh-client). It is likely that they're already installed since they're usually part of the distro's default installation for servers and workstations respectively. Be sure the following is in /etc/ssh/sshd_config on the server and uncommented there. That is to say, that there's no # in front of them: PubkeyAuthentication yes PasswordAuthentication no Tip: If the username that you are logging in as on the server is the same as the one you're currently using on the client, you don't need to specify the user to log in as on the server. SSH as a Proxy. If you can make an SSH connection, you can (most likely) use that connection as a SOCKS5 proxy, without any extra setup on the remote computer. Traffic can then be tunneled securely through the SSH connection. If you are on a wireless connection, you can use this to effectively secure all your traffic from snooping. You can also use this to bypass IP restrictions, because you will appear to be connecting from the remote computer. Note that DNS traffic is not tunneled, unless specific provisions are made to do so. Pick some big port number (bigger than 1024 so you can use it as non-root). Here I choose 1080, the standard SOCKS port. Use the codice_45 option for dynamic port forwarding. That's it. Now as long as the SSH connection is open, your application can use a SOCKS proxy on port 1080 on your own computer (localhost). For example, in Firefox on Linux: SSH from your webbrowser. You can also use ssh from a webbrowser with javascript support even when you don't have a secure shell client. In order to do this you have to install AnyTerm, AjaxTerm or WebShell on the system where the SSH server is running or use a third party service like WebSSH.
2,154
Indonesian/Lessons/Rainbow. ^ Indonesian ^ | « Lesson 12: To The Market | Lesson 13: Rainbow | Lesson 14: Happy Birthday! »
46
Portuguese/Contents/Present tense regular verbs. « Portuguese:Regular verbs Regular verbs have a invariable radical (falar - to speak) and are easy to memorize. Each conjugation follows a different, but a regular pattern. -ar present tense regular verbs. All regular verbs ending in -ar are conjugated the same way. The conjugation is dependent on the subject that the verb is in reference to. Here is an example conjugation for the verb falar: -ir present tense regular verbs. Regular tense verbs ending in -ir are handled very similarly to -er verbs. The only difference is the conjugation for nós and vós. Here is an example conjugation for the verb partir (to leave):
170
XML - Managing Data Exchange/XUL/Answers. Exercises Question 1: Answer <br><br> "XulNum1.js" "XulNum1.xul"
56
XML - Managing Data Exchange/SMIL/Answers. Answer. 1. Submitted by Anne Rayborn Howard File "Exercise1.smil" File "Exercise1.rt" 2. Submitted by Anne Rayborn Howard File "Exercise2.smil" File "Exercise2.rt" 3. Submitted by (your name here) If you have MS Powerpoint, you can use the Smil Generator for Powerpoint presentations to convert your powerpoint. 4. Submitted by (Your Name Here!)
123
XML - Managing Data Exchange/XUL. Introduction. XUL (pronounced zool and rhymes with cool), which stands for eXtensible User interface Language, is an XML-based user interface language originally developed for use in the Netscape browser. It is now maintained by Mozilla. It is a part of Mozilla Firefox and many other Mozilla applications, and is available as part of Gecko, the rendering engine developed by Mozilla. In fact, XUL is powerful enough that the entire user interface in the Firefox application is implemented in XUL. Like HTML, in XUL you can create an interface using a relatively simple markup language, define the appearance with CSS style sheets, and use JavaScript to manipulate behavior. Unlike HTML, however, XUL provides a rich set of user interface widgets to create, for example, menus, toolbars and tabbed panels. To put it in simple terms, XUL can be used to create lightweight, cross-platform, cross-device user interfaces. Many applications are developed using features of a specific platform that makes building cross-platform software time-consuming and costly. Some users may want to use an application on technologies other than traditional computers, such as small handheld devices. To date, there have been some cross-platform solutions already developed. Java, for example, was created just for such a purpose. However, creating GUIs with Java is cumbersome at best. Alternatively, XUL has been designed for building portable user interfaces easily and quickly. It is available on most versions of Windows, Mac OS X, Linux and Unix. Yahoo! currently uses XUL and related technologies for its Yahoo! tool bar (a Firefox extension) and Photomail application. To illustrate XUL’s potential, this chapter will work through a few examples. Potential is the correct word here. The full capabilities of XUL are beyond the scope of this chapter but it is designed to give the reader a first look at the power of XUL. One more thing needs to be noted: you’ll need a Gecko-based browser (such as Firefox or the Mozilla Suite) or XULRunner to work with XUL. The Basics. XUL is XML, and like all good XML files, a good XUL file begins with the standard XML version declaration. Currently, XUL is using the XML version 1.0. To make your XUL page look good, you must include a "global" stylesheet in it. The URI of the default stylesheet is "href = "chrome://global/skin/"". While you can load as many stylesheets as you like, it is best practice to load the global stylesheet initially. Look at Fig.1. Notice the reference to “chrome”. ‘The chrome is the part of the application window that lies outside of a window's content area. Toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the chrome.’(1) Chrome is the descriptive term used to name all of the elements in a XUL application. Think of it like the chrome on the outside of a car. It’s what catches your eye. The elements in a XUL file are what you see in the browser window. All XML documents must have a namespace declaration. The developers of XUL have provided a namespace that shows where they came up with the name XUL. (The reference is from the movie ‘Ghostbusters’ for the uninitiated) <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="window identifier" title="XUL page" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> . . . (add elements here) </window> The next thing to note is the tag <window>. This tag is analogous to the <body> tag in HTML. All the elements will live inside the window tag. In Fig. 1 the window tag has three attributes that are very important. The ‘id’ attribute is important in that it is the way to identify the window so that scripts can refer to it. While the title attribute is not necessary, it is good practice to provide a descriptive name. The value of title will be displayed in the title bar of the window. The next attribute is very important. This tells the browser in what direction to lay out the elements described in the XUL file. Horizontal means just that. Lay out in succession across the window. Vertical is the opposite; it adds the elements in column format. Vertical is the default value so if you do not declare this attribute you’ll get vertical orientation. As was stated earlier, a XUL document is used to create user interfaces. UI's are generally full of interactive components such as text boxes, buttons and the like. A XUL document accomplishes this with the use of widgets, which are self-contained components with pre-defined behavior. For example buttons will respond to mouse clicks and menu bars can hold buttons. All the normally accepted actions of GUI components are built in to the widgets. There is already a rich library of predefined widgets, but because this is open source, any one can define a widget or a set of widgets for themselves. The widgets are ‘disconnected’ until they are programmed to work together. This can be done simply with JavaScript or a more complex application can be made using something like C++ or Java. In this chapter we will use JavaScript to illustrate XUL’s uses and potential. Also, a XUL file should have .xul extension. The Mozilla browser will automatically recognize it and know what to do with it when you click on it. Optionally, an .xml extension could be used but you would have to open the file within the browser. One more thing needs to be mentioned. There are a few syntax rules to follow and they are: A First Example. What better way to start then with the good old ‘Hello World’ example. Open up a text editor (not MS Word) like notepad or TextPad and type in: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="Hello" title="Hello World Example" orient="vertical" persist="screenX screenY width height" xmlns= "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <description style='font-size:24pt'>Hello World</description> <description value='Hello World' style='font-size:24pt'/> <label value = 'Hello World' style='font-size:24pt'/> </window> Save it anywhere but be sure to give the file the .xul extension. Now just double click on it and it should open in your Mozilla or Netscape browser. You should get ‘Hello World’ three times, one on top of the other. Notice the different ways that ‘Hello World’ was printed: twice from a description tag and once from a label tag. Both <description> and <label> are text related tags. Using the description tag is the only way to write text that is not contents of a ‘value’ attribute. This means that you can write text that isn't necessarily assigned to a variable. In the second and third examples the text is expressed as an attribute to the tag description or label, respectively. You can see here that the orient attribute in window is set to ‘vertical’. That is why the text is output in a column. Otherwise, if orient was set to ‘horizontal’, all the text would be on one line. Try it. Now let’s start adding some more interesting elements. Adding Widgets. As stated earlier, XUL has an existing rich library of elements fondly called widgets. These include buttons, text boxes, progress bars, sliders and a host of other useful items. One good listing is the XUL Programmer's Reference. Let us take a look at some simple buttons. Enter the following code and place it into a Notepad or other text editor that is not MS Word. <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button id="find-button" label="Find" default="true"/> <button id="cancel-button" label="Cancel"/> </window> Save it and give the file the .xul extension. Open a Mozilla or Netscape browser and open the file from the browser. You should see a "find" button and a "cancel button". From here it is possible to add more functionality and build up elaborate interfaces. There has to be some place to put all of these things and like the <body> tag in HTML, the <box> tag in XUL is used to house the widgets. In other words, boxes are containers that encapsulate other elements. There are a number of different <box> types. In this example we’ll use <hbox>, <vbox>, <toolbox> and <tabbox>. <hbox> and <vbox> are synonymous with the attributes 'orient = "horizontal"' and 'orient = "vertical"', which respectively form the <window> tag. By using these two boxes, discrete sections of the window can have their own orientation. These two elements can hold all of the other elements and can even be nested. The tags <toolbox> and <tabbox> serve special purposes. <toolbox> is used to create tool bars at the top or bottom of the window while <tabbox> sets up a series of tabbed sheets in the window. Take the XUL framework from Fig. 1 and replace ". . .( add elements here)" with a <vbox> tag pair (that's both open and close tags). This will be the outside container for the rest of the elements. Remember, the <vbox> means that elements will be positioned vertically in order of appearance. Add the attribute 'flex="1"'. This will make the menu bar extend all the way across the window. <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox flex="1"> (... add elements here) </vbox> </window> The 'flex' attribute needs some explanation since it is a primary way of sizing and positioning the elements on a page. Flex is a dynamic way of sizing and positioning widgets in a window. The higher the flex number (1 being highest), the more that widget gets priority sizing and placement over widgets with lower flex settings. All elements have size attributes, such as width and/or height, that can be set to an exact number of pixels but using flex insures the same relative sizing and positioning when resizing a window occurs. Now put a pair each of <toolbox> and <tabbox> tags inside of the <vbox> tags with <toolbox> first. As was said <toolbox> is used to create tool bars so lets add a toolbar similar to the one at the top of the browser. This is the code so far: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox flex="1"> <toolbox> <menubar id="MenuBar"> <menu id="File" label="File" accesskey="f"> <menupopup id="FileMenu"> <menuitem label="New" accesskey="n"/> <menuitem label="Open..." accesskey="o"/> <menuitem label="Save" accesskey="s"/> <menuitem label="Save As..." accesskey="s"/> <menuitem label=" ... "/> <menuseparator/> <menuitem label="Close" accesskey="c" /> </menupopup> </menu> <menu id="Edit" label="Edit" accesskey="e"> <menupopup id="EditMenu"> <menuitem label="Cut" accesskey="t" acceltext="Ctrl + X"/> <menuitem label="Copy" accesskey="c" acceltext="Ctrl + C"/> <menuitem label="Paste" accesskey="p" disabled="true"/> </menupopup> </menu> <menu id="View" label="View" accesskey="v"> <menupopup id="ViewMenu"> <menuitem id="Tool Bar1" label="Tool Bar1" type="checkbox" accesskey="1" checked="true"/> <menuitem id="Tool Bar2" label="Tool Bar2" type="checkbox" accesskey="2" checked="false"/> </menupopup> </menu> </menubar> </toolbox> <tabbox> </tabbox> </vbox> </window> There should now be a menu bar with “File Edit View” in it and they should each expand when you click on them. Let’s examine the elements and their attributes more closely to see how they work. First the <menubar> holds all of the menu items (File, Edit ,View). Next there are the three different menu items. Each menu has a set of elements and attributes. The <menupopup> does just it says. It creates the popup menu that occurs when the menu label is clicked. In the popup menu is the list of menu items. Each of these has an 'accesskey' attribute. This attribute underlines the letter and provides the reference for making a hot key for that menu item. Notice in the Edit menu, both 'Cut' and 'Copy' have accelerator text labels. In the File menu there is a <menuseperator/> tag. This places a line across the menu that acts as a visual separator. In the Edit menu, notice the menu item labeled 'Paste' has an attribute: disabled="true". This causes the Paste label to be grayed out in that menu and finally in the View menu the menu items there are actually checkboxes. The first one is checked by default and the second one is not. Now on to the <tabbox>. Let's make three different sheets with different elements on them. Put this code in between the <tabbox> tags: <tabbox flex="1"> <tabs> <tab id="Tab1" label="Sheet1" selected="true"/> <tab id="Tab2" label="Sheet2"/> <tab id="Tab3" label="Sheet3"/> </tabs> <tabpanels flex="1"> <tabpanel flex="1" id="Tab1Sheet" orient="vertical" > <description style="color:teal;"> This doesn't do much. Just shows some of the style attributes. </description> </tabpanel> <tabpanel flex="1" id="Tab2Sheet" orient="vertical"> <description class="normal"> Hey, the slider works (for free). </description> <scrollbar/> </tabpanel> <tabpanel flex="1" id="Tab3Sheet" orient="vertical"> <hbox> <text value="Progress Meter" id="txt" style="display:visible;"/> <progressmeter id="prgmeter" mode="undetermined" style="display:visible;" label="Progress Bar"/> </hbox> <description value="Wow, XUL! I mean cool!"/> </tabpanel> </tabpanels> </tabbox> The tabs are first defined with <tab>. They are given an id and label. Next, a set of associated panels is created, each with different content. The first one is to show that like HTML style sheets can be applied in line. The second two sheets have component type elements in them. See how the slider works and the progress bar is running on its own. XUL has a number of types of elements for creating list boxes. A list box displays items in the form of a list. Any item in such a particular list can be selected. XUL provides two types of elements to create lists, a listbox element to create multi-row list boxes, and a menulist element to create drop-down list boxes, as we have already seen. The simplest list box uses the listbox element for the box itself, and the listitem element for each item. For example, this list box will have four rows, one for each item. <listbox> <listitem label="Butter Pecan"/> <listitem label="Chocolate Chip"/> <listitem label="Raspberry Ripple"/> <listitem label="Squash Swirl"/> </listbox> Like with the HTML option element, you a value can be assigned using the value attribute. The list box will set to a normal size, but you can alter the size to a certain level using the row attributes. Set it to the number of rows to display in the list box. A scroll bar will automatically come up to let the user be able to see the rest of the items in the list box if the box is too small. <listbox rows="3"> <listitem label="Butter Pecan" value="bpecan"/> <listitem label="Chocolate Chip" value="chocchip"/> <listitem label="Raspberry Ripple" value="raspripple"/> <listitem label="Squash Swirl" value="squash"/> </listbox> Assigning values to each of the listitems lets the user be able to reference them later using script. This way, other elements can be reference this items to be used for alternative purposes. All these elements are very nice and easy to put into a window, but by themselves they don't do anything. Now we have to connect things with some other code. Adding Event Handlers and Responding to Events. To make things really useful, some type of scripting or application level coding has to be done. In our example, JavaScript will be used to add functionality to the components. This is done in a similar fashion as to scripting with HTML. With HTML, an event handler is associated with an element and some action is initiated when that handler is activated. Most of the handlers used with HTML are also found in XUL, in addition to some unique ones. Scripting can be done in additional lines of code, but a more efficient way is to create a separate file with the needed scripts inside of it. This allows the page to load faster since the rendering engine doesn’t have to decide what to do with the embedded script tags. That being said, we’ll first add a simple script, in line, as a first example. Let’s add an ‘onclick’ event handler to fire an alert box when an element is selected. Inside the <window> tag add the line beginning with onclick: <window onclick="alert(event.target.tagName); return false;" id="findfile-window" title="Find Files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> (... add elements here) </window> Now when you click on any element in the window, you created an alert box that pops up telling you the name of the element. One interesting thing to note: When you click on the text enclosed by the description tag the response is undefined but when you click on the text wrapped by the label tag you get the tabName label. This implies that a description tag is not really an element. After playing with the alert box, delete that line and add this inside the opening tag of the ‘Close’ menu item in the ‘File’ menu: oncommand="window.close()" Now when you click on ‘Close’ or use the ‘C’ as a hot key, the entire window will close. The oncommand event handler is actually preferred over onclick because oncommand can handle hot keys and other non-mouse events. Let’s try one more thing. Add this right after the opening <window> tag. <script> function show() var meter=document.getElementById('prgmeter'); meter.setAttribute("style","display: visible;"); var tx=document.getElementById('txt'); tx.setAttribute("style","display: visible;"); function hide() var meter=document.getElementById('prgmeter'); meter.setAttribute("style","display: none;"); var tx=document.getElementById('txt'); tx.setAttribute("style","display: none;"); </script> These two functions first retrieve a reference to the progress meter and the text element using their ids. Then both functions set the style attributes of the progress meter and text element to have a display of 'visible' or ‘none’ which will do just that: hide or display those two elements. (The tabpanel for the progress meter has to be displayed in order to see these actions) Now add two buttons that will provide the event to fire these two methods. First, add a new box element to hold the buttons. The width attribute of the box needs to be set otherwise the buttons will be laid out to extend the length of the window. <box width="200px"> <button id="show" label="Show" default="true" oncommand="show();"/> <button id="hide" label="Hide" default="true" oncommand="hide();"/> </box> Style Sheets. Style sheets may be used both for creating themes, as well as modifying elements for a more elaborate user interfaces. XUL uses CSS (Cascading Style Sheets) for this. A style sheet is a file which contains style information for elements. The style sheet makes it possible to apply certain fonts, colors, borders, and size to the elements of your choice. Mozilla applies a default style sheet to each XUL window. So far, this is the style sheet that has been used for all the XUL documents: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> That line gives the XUL document the default chrome://global/skin/ style sheet. In Mozilla, this will be translated as the file global.css, which contains default style information for XUL elements. The file will still show is this line is left out but it will not be as aesthetically pleasing. The style sheet applies theme-specific fonts, colors and borders to make the elements look more suitable. Even though style sheets can provide a better looking file, adding styles cannot always provide a better view. Some CSS properties do not affect the appearance of a widget, such as those that change the size or margins. In XUL, the use of the "flex: attribute should be used instead of using specific sizes. There are other ways that CSS does not apply, and may be to advanced for this tutorial. Using a style sheet that you perhaps have already made, you just have to insert one extra line of code pointing to the CSS file you have already made. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="findfile.css" type="text/css"?> This second line of code references the style sheet, and will take over as the default style sheet used for the XUL document. Sometimes it is desired not to have the style that comes with the default CSS file. Conclusion. The examples shown in this chapter merely scratch the surface of XUL’s capabilities. Even though these examples are very simple, one can see how easy it would be to create more complex UI’s with XUL. With a complete set of the standard components such as buttons and text boxes at the programmer’s disposal, the programmer can code anything in XUL that can be coded in HTML. The cross-platform ability of XUL is another bonus but the fact that it doesn’t work with Microsoft’s Internet Explorer may suppress XUL’s widespread use. There is some hope that due to the delay in the development of the next version of IE that XUL may find it’s way into IE, but don’t hold your breath..
6,473
Guitar/Arpeggios and Sweep Picking. Introduction. The word arpeggio (ar-"peh"-jee-oh) is Italian for "like a harp". It is a common technique for playing chords on the harp. To play an arpeggiated chord on the guitar, pick each note of the chord slowly, one string at a time. You can play arpeggios with a plectrum or fingerstyle. Exercise 1. Below is a simple arpeggio study using these chords: Sweep picking. Sweep picking is a more specialized technique, occurring most often in metal. It involves playing a fast arpeggio with a special technique: when switching from one string to the next, mute the note currently ringing by lifting the fretting finger. A sweep can become a rake if notes are muted incorrectly. Rakes can sound nice, but they are not sweeps. Remember only one note can ring out at a time or it won't sound good. It takes practice and it helps to start slow and build up speed. Below is example tablature of sweep picking: This is not the only way to notate sweeps. Small sweeps can be indicated with grace notes or even the arpeggio notation with the word "sweep" (or, less correctly, "rake") written above. In a more classical approach, arpeggios must follow a distinct pattern of notes depending on the chord/scale we're playing. This is similar to playing chords note-by-note on a piano (not on a guitar). The basic chords (the major and minor triads) are composed of three tones: the first, the third and the fifth note of the scale (major or minor, depending on the chord type). For instance, the C major scale is: C D E F G A B. So, according to the 1-3-5 principle, the C major triad consists of C, E and G. Note that the C major chord on a guitar also consists only of these three notes but they are not always in the 1-3-5 order. Now, while playing "classical arpeggios", you would not just pick around the chord randomly but you would play C, E, G, then C, E, G an octave higher, etc. This is what is called an arpeggio scale. You can play around it, up and down with complete freedom or just use the 1-3-5 pattern as a bass line. This method can also be used with more complex chords (sus4, maj7, etc.) but then it follows a pattern different from 1-3-5 structure, depending on the chord type. In all, this is a very simple but effective method for composing. While playing guitar, this might not appear as interesting as picking "full" six-string chords but it can be used to give your music a classical edge. It also has a more lead quality to it than using full chords and requires more skill. Playing fast arpeggios like these is sometimes used in metal music with very satisfactory results. The "classical arpeggios" are in no way better than the "harp like chords" and it is ultimately up to the player/composer to choose what is best for the song in question.
744
Steam Locomotive Operation. This book is an operators manual for the operation of functional steam locomotives. The terms and procedures described here will enable a person to safely operate a 19th or 20th-century steam locomotive well into the future. To hostle, fire, or engineer a locomotive effectively, efficiently, and safely, a person should have a good understanding of the construction and the physics that go into a steam engine to produce locomotion as well as an understanding of normal operating techniques. Locomotive Construction and Parts. The Boiler. A common later (the 1940s) boiler design was the radial stay extended wagon top type of locomotive boiler, which consists of an oblong box with a circular top made of steel plating, connected to a cylindrical part which is commonly known as the barrel of the boiler. That part of the boiler enclosing the firebox is known as the outer casing or shell. The firebox corresponds in shape to the back end and sides of the outer casing or shell, a space being provided between the firebox sheets and those of the outer casing which provides for the firebox being surrounded by water. The front or cylindrical part of the boiler encloses the flues which are secured at the front to the front flue sheet and at the back to the inner or firebox flue sheet. This arrangement provides that all parts of the firebox, as well as the flues, are completely surrounded by water, and it also provides that when fuel is burned in the firebox, the heat will be transmitted by the flues and firebox plates to the water; the unused gasses and smoke having free passage from the firebox through the flues to the smokebox and smokestack. The "smoke box" is formed by extending the cylindrical part of the boiler beyond the front flue sheet. The boiler shell is provided with a steam dome on top of the shell which forms a chamber where steam may collect and free itself from the water in the boiler before passing through the throttle valve to the cylinders. The flues in a locomotive boiler are known as "fire tubes", because the heat passes through them, while the arch tubes, of which there are usually four in each firebox are called "water tubes" because the fire is on the outside, and the water passes through them. The firebox sheets and flues constitute what is known as the "heating surface". In addition to this heating surface, there is an additional, or superheater heating surface in many boilers, which superheats the steam after it leaves the boiler and while it is passing from the boiler to the cylinders. Comparing the flue heating area with that of the area of the firebox plates shows that the plate heating surface equals only 5% of the flue heating surface, but the firebox heating surface generates about 40% of the steam. This fact should be remembered. In the locomotive boiler, a large number of small flues are provided instead of a few large flues, in order that the heat and gasses passing from the firebox to the smokebox will be split up and come into contact with a larger flue surface. If large flues were used, great quantities of heat would pass through the center of the flues without coming into contact with the surface of the flue, such heat would pass away and be lost. A large number of small tubes also provides for the heat is more evenly distributed through the boiler shell water space. The small flue can be made of thinner material, which permits the heat to be more easily transmitted to the water which surrounds the flues. In the extended wagon top type of locomotive boiler, the back part, or outer shell, is considerably larger in diameter than the front section, or cylindrical part; while the straight type of boiler has the outer shell and cylindrical part of practically the same diameter. The extended wagon top type, therefore, allows more steam and water space, and gives superior performance in foaming water conditions. Locomotive boilers are made entirely of steel, except stay-bolts and stays, which are of iron. The crown sheet is supported by what are called radial stays, reaching from the crown sheet to the exterior wrapper sheet. There are three common designs of fireboxes in general use. The narrow, deep firebox, which is between the frames and extends below the top frame rails. The semi-wide shallow firebox which rests on top of the frames and extends to the outside edges of the frame rails, and the wide firebox type having a firebox wider than the frames and extending outside the frame rails on both sides, and resting on top of the frame rails, or expansion brackets which are secured to the top of the frames. Combustion Chamber. The combustion chamber for large locomotives was originally introduced for the purpose that its name implies, of providing increased firebox area for combustion purposes. As locomotives grew larger and the wheelbase longer, it then became a question of limiting the length of flues. It was found that when flues were more than 21 or 22 feet long, there was considerably more trouble in respect to leakage and in order to keep the flues within those limits of length it was necessary to lengthen out the firebox, which was done by extending the flue area into the boiler. There is also an advantage of the combustion chamber, in addition to allowing shorter flues, the heating surface of the firebox sheets composing the combustion chamber is vastly more efficient than the increased length of flues would be if the combustion chamber was not used. The combustion chamber also serves to protect the ends of the tubes from cold air which comes up through the grates at the front end of the firebox, in addition to providing a long flameway for the burning gases, which is particularly desirable with oil, or coal, having a large percentage of volatile matter. Effects of Heating, Cooling, and Low Water. When the crown sheet or firebox sheets are not covered with water, they become overheated very quickly with a hot fire in the firebox. If for any reason water is not maintained over the crown sheet, and the sheet becomes overheated, the fire must be put out or deadened at once, and under no circumstances should cold water be forced into the boiler. The boiler should be cooled down before any attempt is made to refill it, because forcing cold water into the boiler when it is very hot produces sudden changes in temperature of the various parts of the sheets and sets up destructive strains. The prevention of destructive strains and stresses, or reducing their amplitude should interest all who have to do with the upkeep of the locomotive. In order to bring out clearly and simply the cause of destructive stresses, it should fully be understood that the contraction or expansion of a body of metal when changes of temperature occur is irresistible. A firebox sheet expanding or contracting as a result of a change in temperature cannot be restrained. It is certain to find relief in some direction, either by self-destruction or destroying the obstacle opposing its movement. The life of a locomotive boiler or firebox is dependent largely upon the care which it receives while in service. It is not possible in the operation of a locomotive to avoid all strains and stresses, but it is possible, practical, and beneficial to reduce the frequency of the stresses and also their amplitude. In other words, if by any means the severity of the strains is reduced even though their frequency be increased, the period between failures will be prolonged, the time between repairs and the life of fireboxes and boilers will be lengthened. Figure 3, which is a diagram of the boiler shown in Figure 1, illustrates the action of metal when heating and cooling takes place. It will be noted that the boiler is divided into sections. After the steam is generated in the boiler to 200lbs per square inch, it is found that the boiler has expanded nearly one inch, which demonstrates that the metal expands as heating takes place and that when the boiler cools the metal contracts. Expansion and contraction of the metals thus sets up strains and stresses at various parts in the boiler, and it is important that as these strains are developed that they are developed slowly, in order that the effect of heating or cooling will be distributed throughout the boiler so that the expansion or contraction will be as uniform as possible throughout all its parts. Temperatures of Steam and Water. Operating water injector or water pump while the locomotive is standing causes more frequent and greater inequality of temperatures throughout the boiler and the development of more destructive stresses than any other cause. To illustrate: Temperature of the steam in a locomotive boiler at 190 psi is 383 degrees Fahrenheit (195 degrees Centigrade). This is also the temperature of the water at that steam pressure. When an injector is operated, the water passing through the injector on its way to the boiler is heated from 160 to 200 degrees F (71 to 93 degrees C). It is therefore from 183 to 223 degrees F (102-124 deg C) cooler than the water within the boiler. The water from the injector being cooler is heavier than the higher temperature water in the boiler, and on entering the boiler must take a downward course and continue downward until it reaches the lowest part. The weight of a cubic foot of water as it enters the boiler from the injectors is 60 1/8 pounds, while a cubic foot of water at 190 psi steam pressure, or 383 degrees Fahrenheit, is 54 1/4 pounds, or 9% lighter than the water at 200 degrees delivered into the boiler from the injector. This difference of weight makes it clear why the cooler and heavier water seeks the lower levels and displaces the hotter, lighter water. -A quick reference to Water boiling point (Not Steam Temp) at different pressures- The boiling point of water raises 3 degrees F per each pound of square inch pressure added. For example: at sea level, water will boil at 212 degrees F (100 deg C). +1 PSI over sea level it will raise the boiling point 3 degrees F, to 215 degrees F (1.7 deg C, to 101.7 deg C). At +5 PSI over sea level, the boiling point of water will be 227 degrees F (108.3 deg C). And so on. This is why directions for boiling noodles and baking goods at high altitudes require longer cook times, and/or more water added to the mixture. The Crew. Hostler. The hostler prepares an engine each day for service. This usually includes starting the fire, greasing and oiling all lubrication points on a steam locomotive. This was traditionally the starting point for a person coming onto the engine crew. Additionally, hostlers service locomotives with fuel and water, sand and lubricants and assure that all required tools and flagging equipment are provided on the locomotive. The firebox is cleaned or banked as necessary upon arrival at the locomotive. Fireman. The fireman maintains the steam pressure in a locomotive boiler. This is accomplished through careful regulation of the fire, and by regular addition of water to the boiler. Water is added through the use of an injector or a feedwater pump. In the absence of an Engineer, he will be responsible for the safety and security of the locomotive. Locomotive Firemen will not operate locomotives unless under the direct supervision of a qualified Engineer. Engineer. The engineer is responsible for ensuring that the engine is fit for operation before and during any movement of the locomotive. The engineer is responsible for it's over the road upkeep, oiling and proper operation of the locomotive to be the most fuel-efficient and easy on the machinery. The engineer controls the operation of the locomotive but the conductor controls the movement of the train, and both are responsible for its safe operation. The steam whistle, headlight, throttle, air brakes, reverse lever, and fireman are usually under the direct control of the engineer. Firing. Firing involves caring for the boiler and making sure there is always sufficient steam for the engineer to use. When proficient, a fireman should concentrate on an efficient operation to conserve fuel, water and extend the life of the engine. This is especially important in the 21st century as working steam engines are rare and often in precarious financial situations. General Practices. The boiler of a locomotive is made of a steel alloy and holds thousands of gallons of water. The boiler must be treated with care at all times, as it must withstand tremendous amounts of heat, pressure and vibration. The fireman should take care to minimize the thermal stresses placed on the boiler when safety permits. Fireless Locomotives. Fireless locomotives generally used a tank (in place of a boiler and firebox) filled with superheated water that flashed into steam as the pressure from working existing steam dropped the pressure (refer to pressure table above). Fireless locomotives were tied to operating in an area where they could obtain water heated higher than the boiling point while a fire was undesirable for safety reasons. They were used mostly in industries or a group of industries, and due to this limitation were not common for moving trains on main lines. They were replaced by explosion-proof diesel or electric locomotives. There are no references to currently operating fireless locomotives found by this author. Wood Burning Locomotives. Wood burning locomotives fell into disfavour in the United States once expansion into the western plain states began, chiefly because of the generally lower amount of thermal energy wood locomotives offered from the fuel, and the scarcity of forests in the plains states. Oil Burning Locomotives. Oil burning locomotives in the steam era mainly used "Bunker C" fuel oil. (Bunker C is also known as Type 6 or Number 6.) While some preserved steam locomotives of today (circa 2005) still use Bunker C, most have switched to various alternative fuels as Bunker C can be difficult to locate, transport, and store. Alternatives include Number 4 fuel oil, kerosene or diesel oil (and sometimes a mixture of diesel/kerosene), others employ used motor oil. Regardless of the kind of oil used, most locomotives store the fuel in a tank on the tender. The oil tank is equipped with steam heat coils to heat the fuel before combustion. This is done to keep the oil viscosity such that the oil can flow freely to the combustion chamber. Bunker C fuel oil is very thick and difficult to use without pre-heating. The fire in an oil-burning locomotive is controlled with two valves: The fuel valve, which controls the flow of oil to the atomizer, and the atomizer valve, which controls the steam to force the oil into small droplets for burning. The fireman must control the amount of steam, oil, and air in the combustion chamber to produce the most efficient fire to boil the water. The fireman observes the colour of the smoke emitted from the smokestack to determine what the fire needs. Thick, foul-smelling black smoke indicates that the fire is not burning correctly due to too much fuel oil. The fireman can increase the draft of air using dampers and the blower or reduce the amount of oil to the burner. Blue smoke indicates too much steam is being admitted to the atomizer, and he must reduce the steam pressure. A light grey smoke indicates proper adjustment, while no smoke at all means the fire is too light and should be increased. It is worthy to note that under some circumstances, the fireman can cause a series of hollow booms or small explosions though misadjustment of the fire. If one were to be watching with the fire doors open at such a time, one would see that the flame is being ripped away from the burner and into the flues. This also can cause heavy amounts of soot to be deposited in the flue, reducing the efficiency of the boiler. The soot can be cleaned by throwing sand into the combustion chamber, but this causes undesirable wear to the flues and any superheaters.
3,699
Guitar/Authors. This book has no authors other than the public: it is open for anyone and everybody to improve. Therefore, this is more properly a list of acknowledgements of contributors than a list of authors. Whoever we are, this is where we get to brag about our accomplishments in writing this book.
68
Geometry/Polygon. A Polygon is a two-dimensional figure, meaning all of the lines in the figure are contained within one plane. They are classified by the number of angles, which is also the number of sides. One key point to note is that a polygon must have at least three sides. Normally, three to ten sided figures are referred to by their names (below), while figures with eleven or more sides is an "n"-gon, where "n" is the number of sides. Hence a forty-sided polygon is called a 40-gon. A polygon with three angles and sides. A polygon with four angles and sides. A polygon with five angles and sides. A polygon with six angles and sides. A polygon with seven angles and sides. A polygon with eight angles and sides. A polygon with nine angles and sides. A polygon with ten angles and sides. For a list of n-gon names, go to and scroll to the bottom of the page. Polygons are also classified as convex or concave. A convex polygon has interior angles less than 180 degrees, thus all triangles are convex. If a polygon has at least one internal angle greater than 180 degrees, then it is concave. An easy way to tell if a polygon is concave is if one side can be extended and crosses the interior of the polygon. Concave polygons can be divided into several convex polygons by drawing diagonals. Regular polygons are polygons in which all sides and angles are congruent.
355
Spanish/Diminutives. Diminutives are suffixes that indicate small size, youth, affection or contempt. English examples are "–y" in "doggy" or "-let" in booklet. The most common Spanish diminutive suffix is "-ito/-ita." "Gatito" means "small cat," particularly "kitten." "Esté quietecito" is a nice way of telling someone to keep still. Unlike English, Spanish diminutives can be applied not only to nouns "(gatito)" but to adjectives "(quietecito)" and adverbs "(rapidito)." Morphology of "-ito/-ita" Diminutives are formed in the following ways Regular formation of diminutives (*) indicates non-existent word. It follows that all diminutives ending in "-ecito/-ecita" are irregular. Some irregular diminutives: "novio/noviecito," "pez/pececito," Carlos/"Carlitos," "mano/manito/manita" "(manita" is used in México and Spain), "caliente/calentito." Defective words Many words lack a diminutive, such as "edad/*edadita, bondad/*bondadita, ciudad/*ciudadita" (but "maldad/maldadita)," "útil/*utilito" (but "fácil/facilito)," "lunes/*lunesito, …, viernes/*viernesito" (but "sábado/sabadito, domingo/dominguito)," "espacio/*espacito" (but "despacio/despacito)," "lenguaje/*lenguajito/*lenguajecito, apetito/*apetitito, termita/*termitita." On the other hand there are diminutives that are never used, such as "autentiquito, peliagudito, emigrantito, cabellerita." Diminutives of diminutives "chico/chiquito/chiquitito; poco/poquito/poquitito." -ico/-ica In some countries, particularly Colombia and Cuba the endings "tito/tita" are replaced by "tico/tica:" "zapato/zapatico" (preferred to "zapatito)." Other examples: "pato/patico, rato/ratico." Other diminutive suffixes Words originated from diminutives Some diminutives have evolved to be new words. For example, a knob is a small pear "(perilla)." These words may have their own diminutives "(perillita)." /Grammar
627
Spanish/Formation of the feminine in nouns. < ../Grammar Index Natural gender nouns may belong to the following categories Regular inflection of the feminine. If a word ends in a vowel, the feminine replaces that vowel by "a:" "el cliente, la clienta." If a word ends in a consonant, the feminine adds an "a:" "el profesor, la profesora." When nouns are inflected Nouns are inflected or not depending on the ending of the masculine-gender form. /Grammar
140
XML - Managing Data Exchange/SyncML/Answers. SyncML Exercises. 1) Visit the Open Mobile Alliance Website, download the pdf of the SyncML v. 1.1 protocol and review it. Reading this reference is a valuable exercise in learning. 2) Answer these questions: a. What is WBXML and why is it used? b. How do you foresee SyncML being used in the future? c. Name a problematic situation whereby SyncML is the best 'tool' for the job. Answers. 2a. WBXML is a form of XML that abbreviates XML tags by using a binary representation of the tag. Tags need to be abbreviated in order to work with mobile devices that have limited bandwidth and limited memory. 2b. SyncML could be used in any application in which synchronization is needed such as calendars, address books, phone books, inventory tracking, etc. 2c. An auto mechanic needs to view the work history on cars in the shop. A PDA can be used to view work logs, active work orders, and to log work done towards a current work order.
259
Electronics/Integrated Circuit. Overview. An "integrated circuit" is a collection of very small components etched onto a silicon wafer. The wafer is then cut out and placed into a package usually made out of plastic or ceramic and connected to leads with small wires. The integrated circuit was independently invented in 1959 by both Jack Kilby of Texas Instruments and Robert Noyce of Fairchild Semiconductor. (about.com) Their invention led to the modern integrated circuit, devices with millions of transistors and incomprehensible computing power. Some popular ICs
135
XML - Managing Data Exchange/SVG. What is SVG? Based on XML, Scalable Vector Graphics (SVG) is an open-standard vector graphics file format and Web development language created by the W3C, and has been designed to be compatible with other W3C standards such as DOM, CSS, XML, XSLT, XSL, SMIL, HTML, and XHTML. SVG enables the creation of dynamically generated, high-quality graphics from real-time data. SVG allows you to design high-resolution graphics that can include elements such as gradients, embedded fonts, transparency, animation, and filter effects. SVG files are different from raster or bitmap formats, such as GIF and JPEG that have to include every pixel needed to display a graphic. Because of this, GIF and JPEG files tend to be bulky, limited to a single resolution, and consume large amounts of bandwidth. SVG files are significantly smaller than their raster counterparts. Additionally, the use of vectors means SVG graphics retain their resolution at any zoom level. SVG allows you to scale your graphics, use any font, and print your designs, all without compromising resolution. SVG is XML-based and written in plain text, meaning SVG code can be edited with any text editor. Additionally, SVG offers important advantages over bitmap or raster formats such as: Data-driven graphics. Because it is written in XML, SVG content can be linked to back-end business processes, databases, and other sources of information. SVG documents use existing standards such as Cascading Stylesheets (CSS) and Extensible Stylesheet Language (XSL), enabling graphics to be easily customized. This results in: Interactive graphics. SVG allows you to create Web-based applications, tools, or user interfaces. Additionally, you can incorporate scripting and programming languages such as JavaScript, Java, and Visual Basic. Any SVG element can be used to modify or control any other SVG or HTML element. Because SVG is text based, the text inside graphics can be translated for other languages quickly, which simplifies localization efforts. Additionally, if there is a connection to a database, SVG allows drill-down functionality for charts and graphs. This results in: Personalized graphics. SVG can be targeted to people to overcome issues of culture, accessibility, and aesthetics, and can be customized for many audiences and demographic groups. SVG can also be dynamically generated using information gathered from databases or user interaction. The overall goal is to have one source file, which transforms seamlessly in a wide variety of situations. This results in: SVG vs. Macromedia Flash. Macromedia has been the dominant force behind vector-based graphics on the web for the last 10 years. It is apparent, however, that SVG provides alternatives to many of the functions of Flash and incorporates many others. The creation of vector-based graphical elements is the base structure of both SVG and Flash. Much like Flash, SVG also includes the ability to create time-based animations for each element and allows scripting of elements via DOM, JavaScript, or any other scripting language that the SVG viewer supports. Many basic elements are available to the developer, including elements for creating circles, rectangles, lines, ellipses, polygons, and text. Much like HTML, elements are styled with Cascading Stylesheets (CSS2) using a style element or directly on a particular graphical element via the style attribute. Styling properties may also be specified with presentation attributes. For each CSS property applicable to an element, an XML attribute specifying the same styling property can also be used. There is an on going debate about whether Flash or SVG is better for web development There are advantages to both, it usually comes down to the situation. Flash Advantages: SVG advantages: Why use SVG? SVG is emerging through the efforts of the W3C and its members. It is open source and as such does not require the use of proprietary languages and development tools as does Macromedia Flash. Because it is XML-based, it looks familiar to developers and allows them to use existing skills. SVG is text based and can be learned by leveraging the work (or code) of others, which significantly reduces the overall learning curve. Additionally, because SVG can incorporate JavaScript, DOM, and other technologies, developers familiar with these languages can create graphics in much the same way. SVG is also highly compatible because it works with HTML, GIF, JPEG, PNG, SMIL, ASP, JSP, and JavaScript. Finally, graphics created in SVG are scalable and do not result in loss of quality across platforms and devices. SVG can therefore be used for the Web, in print, as well as on portable devices while retaining full quality. SVG Viewer. The Adobe SVG Viewer. The Adobe SVG Viewer is available as a downloadable plug–in that allows SVG to be viewed on Windows, Linux and Mac operating systems in all major browsers including Internet Explorer (versions 4.x, 5.x, 6.x), Netscape (versions 4.x, 6.x), and Opera in Internet Explorer and Netscape. The Adobe SVG Viewer is the most widely deployed SVG Viewer and it supports almost all of the SVG Specification including support for the SVG DOM, animation and scripting. Features of the Adobe SVG Viewer Click the right mouse button (CTRL-Key + mouse click in Mac) over your SVG image to get a context menu. The context menu gives you several options, which can all be accessed utilizing the menu itself or “hotkeys”: SMIL. The Synchronized Multimedia Integration Language (SMIL, pronounced “smile”) enables simple authoring of interactive audiovisual presentations. SMIL is typically used for “rich media”/multimedia presentations which integrate streaming audio and video with images, text or any other media type. SMIL is an easy-to-learn HTML-like language, and many SMIL presentations are written using a simple text-editor. SMIL can be used with XML to enable video and sound when viewing a SVG. Attention Microsoft Windows Mozilla users! The Seamonkey and Mozilla Firefox browsers have SVG support enabled natively. If desired, the Adobe SVG Viewer plugin will work with Mozilla Firefox, or the Seamonkey browser. Webkit based browsers also have some SVG support natively. Native SVG (Firefox). The Mozilla SVG implementation is a native SVG implementation. This is as opposed to plug-in SVG viewers such as the Adobe viewer (which is currently the most popular SVG viewer). Some of the implications of this are: rsvg-view. rsvg-view program is a part of the librsvg package. It may be used as the default svg opener. It can resize svgs and export them to png which is often the only thing one needs to do with an svg file. Example : rsvg-view-3 name.svg Creating SVG files. How to do it. One can use 4 groups of programs : SVG editors. As you can see from the previous example of a path definition, SVG files are written in an extremely abbreviated format to help minimize file size. However, they can be very difficult to write depending on the complexity of your image. There are SVG editor tools that can help make this task easier. Some of these tools are: own programs. C. Here is example in C : /* c console program based on : cpp code by Claudio Rocchini http://commons.wikimedia.org/wiki/File:Poincare_halfplane_eptagonal_hb.svg http://validator.w3.org/ The uploaded document "circle.svg" was successfully checked as SVG 1.1. This means that the resource in question identified itself as "SVG 1.1" and that we successfully performed a formal validation using an SGML, HTML5 and/or XML Parser(s) (depending on the markup language used). const double PI = 3.1415926535897932384626433832795; const int iXmax = 1000, iYmax = 1000, radius=100, cx=200, cy=200; const char *black="#FFFFFF", /* hexadecimal number as a string for svg color*/ *white="#000000"; FILE * fp; char *filename="circle.svg"; char *comment = "<!-- sample comment in SVG file \n can be multi-line -->"; void draw_circle(FILE * FileP,int radius,int cx,int cy) fprintf(FileP,"<circle cx=\"%d\" cy=\"%d\" r=\"%d\" style=\"stroke:%s; stroke-width:2; fill:%s\"/>\n", cx,cy,radius,white,black); int main(){ // setup fp = fopen(filename,"w"); fprintf(fp, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" "%s \n " "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \n" "\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n" "<svg width=\"20cm\" height=\"20cm\" viewBox=\"0 0 %d %d \"\n" " xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n", comment,iXmax,iYmax); // draw draw_circle(fp,radius,cx,cy); // end fprintf(fp,"</svg>\n"); fclose(fp); printf(" file %s saved \n",filename ); return 0; Haskell. Haskel code : lavaurs' algorithm in Haskell with SVG output by Claude Heiland-Allen Matlab. Based on code by Guillaume JACQUENOT : filename = [filename '.svg']; fid = fopen(filename,'w'); fprintf(fid,'<?xml version="1.0" standalone="no"?>\n'); fprintf(fid,'"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'); fprintf(fid,'<svg width="620" height="620" version="1.1"\n'); fprintf(fid,'xmlns="http://www.w3.org/2000/svg">\n'); fprintf(fid,'<circle cx="100" cy="100" r="10" stroke="black" stroke-width="1" fill="none"/>\n'); fprintf(fid,'</svg>\n'); fclose(fid); Lisp. One can use cl-svg library or your own procedure. Maxima. BeginSVG(file_name,cm_width,cm_height,i_width,i_height):= block( destination : openw (file_name), printf(destination, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>~%"), printf(destination,"<svg width=\"~d cm\" height=\"~d cm\" viewBox=\"0 0 ~d ~d\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">~%", cm_width,cm_height,i_width,i_height), return(destination) CircleSVG(dest,center_x,center_y,_radius):=printf(dest,"<circle cx=\"~d\" cy=\"~d\" r=\"~d\" fill=\"white\" stroke=\"black\" stroke-width=\"2\"/>~%", center_x,center_y,_radius); CloseSVG(destination):= printf(destination,"</svg>~%"), close (destination) /* ---------------------------------------------------- */ cmWidth:10; cmHeight:10; iWidth:800; iHeight:600; radius:200; centerX:400; centerY:300; f_name:"b.svg"; f:BeginSVG(f_name,cmWidth,cmHeight,iWidth,iHeight); CircleSVG(f,centerX,centerY,radius); CloseSVG(f); Python. One can use a prepared library, or wrap the svg code in single quotes. Getting started. Because it is based on XML, SVG follows standard XML conventions. Every SVG file is contained within an <svg> tag as its parent element. SVG can be embedded within a parent document or used independently. For example, the following shows an independent SVG document: Exhibit 1: Creating a SVG <?xml version="1.0" standalone="no"?> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> </svg> The first line declares that the code that follows is XML. Note the “standalone” attribute. This denotes that this particular file does not contain enough processing instructions to function alone. In order to attain the required functionality it needs to display a particular image, the SVG file must reference an external document. The second line provides a reference to the Document Type Definition, or DTD. As mentioned in Chapter 7: XML Schemas, the DTD is an alternate way to define the data contained within an XML instanced document. Developers familiar with HTML will notice the DTD declaration is similar to that of an HTML document, but it is specific for SVG. For more information about DTDs, visit: http://www.w3schools.com/dtd/dtd_intro.asp Hint: Many IDEs (ex. NetBeans) do not have SVG “templates” built in to the tool. Therefore, it may be easier to use a simple text editor when creating SVG documents. Once you have an SVG Viewer installed, you should then be able to open and view your SVG document with any browser. When creating your SVG documents, remember to: The <svg> element on the second line defines the SVG document, and can specify, among other things, the user coordinate system, and various CSS unit specifiers. Just like with XHTML documents, the document element must include a namespace declaration to declare the element as being a member of the relevant namespace (in this case, the SVG namespace). Within the <svg> element, there can be three types of drawing elements: text, shapes, and paths. Text. The following is an example of the text element: Exhibit 2: Using text with SVG <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg width="5.5in" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" height="0.5in"> <text y="15" fill="red">This is SVG.</text> </svg> The <svg> element specifies: 1) that white space within text elements will be retained, 2) the width and height of the SVG document — particularly important for specifying print output size. In this example, the text is positioned in a 5.5 inches wide by .5 inches tall image area. The “y” attribute on line 5 declares that the text element’s baseline is 15 pixels down from the top of the SVG document. An omitted “x” attribute on a text element implies an x coordinate of 0. Because SVG documents use a W3C DTD, you can use the W3C Validator to validate your document. Notice that the “style” attribute is used to describe the presentation of the text element. The text could equivalently have been given a red color by use of a presentation attribute fill="red". Shapes. SVG contains the following basic shape elements: These basic shapes, along with “paths” which are covered later in the chapter, constitute the graphic shapes of SVG. In this introduction to SVG, we will only cover some of the shapes here. Rectangles. The <rect> element defines a rectangle which is axis-aligned with the current user coordinate system, the coordinate system that is currently active and which is used to define how coordinates and lengths are located and computed on the current canvas. Rounded rectangles can be created by setting values for the rx and ry attributes. The following example produces a blue rectangle with its top left corner aligning with the top left corner of the image area. This uses the default value of "0" for the x and y attributes. Exhibit 3: Creating a rectangle in SVG <?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" top="0in" width="5.5in" height="2in"> <rect fill="blue" width="250" height="200"/> </svg> It will produce this result: Circles. A circle element requires three attributes: cx, cy, and r. The 'cx’ and 'cy’ values specify the location of the center of the circle while the 'r’ value specifies the radius. If the 'cx’ and 'cy’ attributes are not specified then the circle's center point is assumed to be (0, 0). If the 'r’ attribute is set to zero then the circle will not appear. Unlike 'cx’ and 'cy’, the 'r’ attribute is not optional and must be specified. In addition the keyword stroke creates an outline of the image. Both the width and the color can be changed. Exhibit 4: Creating a circle in SVG <?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" width="350" height="300"> <circle cx="100" cy="50" r="40" stroke="darkslategrey" stroke-width="2" fill="grey"/> </svg> It will produce this result: Polygons. A polygon is any geometric shape consisting of three or more sides. The 'points' attributes describes the (x,y) coordinates that specify the corners points of the polygon. For this specific example, there are three points which indicate that a triangle will be produced. Exhibit 5: Creating a Polygon in SVG <?xml version="1.0" standalone="no"?> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <polygon points="220,100 300,210 170,250" style="fill:#blue;stroke:red;stroke-width:2"/> </svg> It will produce this result: Paths. Paths are used to draw your own shapes in SVG, and are described using the following data attributes: The following example produces the shape of a triangle. The “M” indicates a “moveto” to set the first point. The “L” indicates “lineto” to draw a line from “M” to the “L” coordinates. The “Z” indicates a “closepath”, which draws a line from the last set of L coordinates back to the M starting point. Exhibit 6: Creating paths in SVG <?xml version="1.0"?> <svg xmlns="http://www.w3.org/2000/svg" width="5.5in" height="2in"> <path d="M 50 10 L 350 10 L 200 120 z"/> </svg> It produces this result: Validation. After creating file check its code with the W3C Validatior Optimisation. Even code without errors can be improved. For example grouping elements makes code shorter. Including SVG in HTML. There are three methods to include SVG in an HTML document. Basically, the SVG document is first created as a stand-alone file. It is then referenced in the HTML document using one of the following commands: Embed. The syntax is as follows: Exhibit 7: Embedding SVG into HTML using keyword embed <embed src="canvas.svg" width="350" height="176" type="image/svg+xml" name="emap"> An additional attribute, “pluginspage”, can be set to the URL where the plug-in can be downloaded: codice_1 Object. The syntax is as follows and conforms to the HTML 4 Strict specification: Exhibit 8: Embedding SVG into HTML using keyword object <object type="image/svg+xml" name="omap" data="canvas_norelief.svg" width="350" height="176"></object> Between the opening and the closing <object> tags, information for browsers that do not support objects can be added: <object ...>You should update your browser</object> Unfortunately some browsers such as Netscape Navigator 4 do not show this alternative content if the type attribute has been set to something other than text/html. Iframe. The syntax is as follows and conforms to the HTML 4 Transitional specification: Exhibit 9: Embedding SVG into HTML using keyword iframe <iframe src="canvas_norelief.svg" width="350" height="176" name="imap"></iframe> Between the opening and the closing <iframe> tags, information for browsers that do not support iframes can be added: <iframe ...>You should update your browser</iframe> Creating 3D SVG images. "Section by Charles Gunti, UGA Master of Internet Technology Program, Class of 2007" Sometime we may want to view an SVG image in three dimensions. For this we will need to change the viewpoint of the graphic. So far we have created two dimensional graphics, such as circles and squares. Those exist on a simple x, y plane. If we want to look at something in three dimensions we have to add the z coordinate plane. The z plane is already there, but we are looking at it straight on, so if data is changed on z it doesn't look any different to the viewer. We need to add another parameter to the data file, the z parameter. <?xml version="1.0"?> <data> <subject x_axis="90" y_axis="118" z_axis="0" color="red" /> <subject x_axis="113" y_axis="45" z_axis="75" color="purple" /> <subject x_axis="-30" y_axis="-59" z_axis="110" color="blue" /> <subject x_axis="60" y_axis="-50" z_axis="-25" color="yellow" /> </data> Once we have the data we will use XSLT to create the SVG file. The SVG stylesheet is the same as other stylesheets, but we need to ensure an SVG file is created during the transformation. We call the SVG namespace with this line in the declarations: xmlns="http://www.w3.org/2000/svg Another change we should make from previous examples is to change the origin of (0, 0). We change the origin in this example because some of our data is negative. The default origin is at the upper left corner of the SVG graphic. Negative values are not displayed because, unlike traditional coordinate planes, negative values are above positive values. To move the origin we simply add a line of code to the stylesheet. Before going over that line, let's look at The g element. The container element, g, is used for grouping related graphics elements. Here, we'll use g to group together our graphical elements and then we can apply the transform. Here is how we declare g and change the origin to a point 300 pixels to the right and 300 pixels down: <g transform="translate(300,300)">"graphical elements"</g> SVG transformations are pretty simple, until it comes to changing the viewpoint. SVG has features such as rotating and skewing the image in two dimensions, but it cannot rotate the coordinate system in three dimensions. For that we will need to use some math and a little Java. When rotating in three dimensions two rotations need to be made, one around the y axis, and another around the x axis. The first rotation will be around the y axis and the formula will look like this: formula_1 "Az is the angle the z axis will be rotated" formula_2 formula_3 "y will not change because we are rotating around the y axis" The second rotation will be around the x axis. Keep in mind that one rotation has already been made, so instead of using x, y, and z values we need to use x', y', and z' (x-prime, y-prime and z-prime) found in the last rotation. The formula will look like this: z" = z'*cos(Ay) – y'*sin(Ay) "Ay is the angle of rotation on the y axis" y" = z'*sin(Ay) + y'*cos(Ay) x" = x' "Remember we are rotating around the x axis, so this does not change" Remember from trig class the old acronym SOH CAH TOA? This means "Sin = Opposite/Hypotenuse" "Cos = Adjacent/Hypotenuse" "Tan = Opposite/Adjacent" And we use those functions to find the angles needed for our rotations. Based of the previous two formulas we can make the following statements about Az and Ay: tan(Az) = Xv/Zv sin(Ay) = Yv/sqrt(Xv2 + Yv2 + Zv2) With so many steps to take to make the rotation we should drop all of this information into a Java class, then call the class in the stylesheet. The Java class should have methods for doing all of the calculations for determining where the new data points will go once the rotation is made. Creating that java class is beyond the scope of this section, but for this example I'll call it ViewCalc.class. Now that we can rotate the image, we need to integrate that capability into the transformation. We will use parameters to pass viewpoints into the stylesheet during the transformation. The default viewpoint will be (0, 0, 0) and is specified on the stylesheet like so: Exhibit 10: 3D images with SVG <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- default viewpoint in case they are not specified --> <!-- from the command line --> <xsl:param name="viewpoint_x">0</xsl:param> <xsl:param name="viewpoint_y">0</xsl:param> <xsl:param name="viewpoint_z">0</xsl:param> <xsl:template match="/"> Java now needs to be added to the stylesheet so the processor will know what methods to call. Two lines are added to the namespace declarations: <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <b>xmlns:java="ViewCalc" exclude-result-prefixes="java"</b» Notice the "exclude-result-prefixes="java"" line. That line is added so things in the stylesheet with the "java:" prefix will be processed, not output. Be sure to have the ViewCalc class in the CLASSPATH or the transformation will not run. The final step is to call the methods in the ViewCalc class from the stylesheet. For example: <xsl:template match="square"> <xsl:for-each select="."> <xsl:variable name="locationx" select="@x_axis"/> <xsl:variable name="locationy" select="@y_axis"/> <xsl:variable name="locationz" select="@z_axis"/> <xsl:variable name="thisx" select="java:locationX($locationx,$locationy, $locationz, $viewpoint_x, $viewpoint_y, $viewpoint_z)"/> <xsl:variable name="thisy" select="java:locationY($locationx, $locationy, $locationz, $viewpoint_x, $viewpoint_y, $viewpoint_z)"/> </xsl:for-each> Finally we pass new parameters and run the XSL transformation to create the SVG file with a different viewpoint. Demos. The following table provides a sampling of SVG documents that demonstrate varying degrees of functionality and complexity: The Basic demo demonstrates the effects of zooming, panning, and anti-aliasing (high quality). The Fills demo demonstrates the effects of colors and transparency. The black circle is drag-able. Simply click and drag the circle within the square to see the changes. The HTML, JS, Java Servlet demo describes an interactive, database-driven, seating diagram, where chairs represent available seats for a performance. If the user moves the mouse pointer over a seat, it changes color, and the seat detail (section, row, and seat number) and pricing are displayed. On the client side of the application, SVG renders the seating diagram and works with JavaScript to provide user interactivity. The SVG application is integrated with a server-side database, which maintains ticket and event availability information and processes ticket purchases. The Java Servlet handles form submission and updates the database with seat purchases. The HTML, JS, DOM demo shows how SVG manages and displays data, generating SVG code from data on the fly. Although this kind of application can be written in a variety of different ways, SVG provides client-side processing to maintain and display the data, reducing the load on the server as well as overall latency. Using the DOM, developers can build documents, navigate their structure, and add, modify, or delete elements and content. The PHP, MySQL demo shows the use of database driven SVG generation utilizing MySQL. It randomly generates a map of a European country. Each time you reload the page you will see a different country. The HTML5, ANGULARJS, PostGreSQL demo shows how to create a SVG, then integrate variable data into the SVG & spool a variable data pdf.
7,613
Electronics/Requests. Links used:
10