We can produce animations by repeating the following four steps: Clear the offscreen canvas. Draw objects on the offscreen Copy the offscreen canvas to the onscreen canvas. Wait for a short while. In support of these steps, the StdDraw has several methods: The "Hello, World" program for animation is to produce a black ball that appears to move around on the canvas, bouncing off the boundary according to the laws of elastic collision.
We do so in four steps: Clear the offscreen canvas to white. Draw a black ball at the new position on the offscreen canvas. Copy the offscreen canvas to the onscreen canvas.
Damian "Pink Eyes" Abraham (Fucked Up) - What's In My Bag? - Amoeba Music
To create the illusion of movement, BouncingBall. Our standard draw library supports drawing pictures as well as geometric shapes. The command StdDraw. User interaction. Our standard draw library also includes methods so that the user can interact with the window using the mouse. A first example. It draws a blue ball, centered on the location of the mouse. When the user holds down the mouse button, the ball changes color from blue to cyan. A simple attractor. It also accounts for a drag force. Many simple attractors.
When the user clicks, the balls disperse randomly. StdAudio is a library that you can use to play and manipulate sound files. It allows you to play, manipulate and synthesize sound. We introduce some some basic concepts behind one of the oldest and most important areas of computer science and scientific computing: digital signal processing. Concert A. Concert A is a sine wave, scaled to oscillate at a frequency of times per second.
The amplitude y -value corresponds to the volume. Other notes. A simple mathematical formula characterizes the other notes on the chromatic scale. When you double or halve the frequency, you move up or down an octave on the scale. For example hertz is one octave above concert A and hertz is two octaves below concert A. For digital sound, we represent a curve by sampling it at regular intervals, in precisely the same manner as when we plot function graphs. We sample sufficiently often that we have an accurate representation of the curve—a widely used sampling rate is 44, samples per second.
For example, the following code fragment plays concert A for 10 seconds. It takes notes from standard input, indexed on the chromatic scale from concert A, and plays them on standard audio. Exercises Write a program MaxMin. Write a program Stats. Write a program LongestRun.
For example, if the input is 1 2 2 1 5 1 1 7 7 7 7 1 1 , then your program should print Longest run: 4 consecutive 7s. Write a program WordCount. For the purpose of this exercise, a word is a sequence of non-whitespace characters that is surrounded by whitespace. Write a program Closest. For efficiency, do not use Math. Given the positions and masses of a sequence of objects, write a program to compute their center-of-mass or centroid. The centroid is the average position of the n objects, weighted by mass. Hint : model your program after Average.
Write a program Checkerboard. Color the lower-left square red. Write a program Rose. Write a program Banner. Add a second command-line argument to control the speed. Write a program Circles. Your program should take four command-line arguments: the number of circles, the probability that each circle is black, the minimum radius, and the maximum radius.
Creative Exercises Spirographs. Write a program Spirograph. A spirograph technically, an epicycloid is a curve formed by rolling a circle of radius r around a larger fixed circle or radius R. For a dramatic 3d effect, draw a circular image, e. Write a program Clock. Use the method StdDraw. Write a program Oscilloscope. These patterns are named after the French physicist, Jules A. Lissajous, who studied the patterns that arise when two mutually perpendicular periodic disturbances occur simultaneously. The other has parameters 1, 1, 5, 3, 30, 45 Web Exercises Word and line count.
Modify WordCount. Rainfall problem. Write a program Rainfall. Remove duplicates. Write a program Duplicates. Run length encoding. Write a program RunLengthEncoder. Write a program RunLengthDecoder. Head and tail. Write programs Head. Print the whole file if it consists of Print a random word.
What's In My Bag?
Read a list of N words from standard input, where N is unknown ahead of time, and print out one of the N words uniformly at random. Do not store the word list. Print out the word that survives after reading in all of the data. Caesar cipher. Julius Caesar sent secret messages to Cicero using a scheme that is now known as a Caesar cipher. Each letter is replaced by the letter k positions ahead of it in the alphabet and you wrap around if needed. Write a program Caesar. If a letter is not an uppercase letter, simply print it back out.
Caesar cipher decoding. How would you decode a message encrypted using a Caesar cipher? Hint : you should not need to write any more code. Parity check. A Boolean matrix has the parity property when each row and each column has an even sum. This is a simple type of error-correcting code because if one bit is corrupted in transmission bit is flipped from 0 to 1 or from 1 to 0 it can be detected and repaired. Here's a 4 x 4 input file which has the parity property: 1 0 1 0 0 0 0 0 1 1 1 1 0 1 0 1 Write a program ParityCheck.
Use as little internal storage as possible. Hint: you do not even have to store the matrix! Takagi's function. Plot Takagi's function: everywhere continuous, nowhere differentiable. Hitchhiker problem. You are interviewing N candidates for the sole position of American Idol. Every minute you get to see a new candidate, and you have one minute to decide whether or not to declare that person the American Idol. You may not change your mind once you finish interviewing the candidate. Suppose that you can immediately rate each candidate with a single real number between 0 and 1, but of course, you don't know the rating of the candidates not yet seen.
Nested diamonds. Write a program Diamonds. Regular polygons. Create a function to plot an N-gon, centered on x, y of size length s. Use the function to draws nested polygons like the picture below. Bulging squares. Write a program BulgingSquares. Spiraling mice. Suppose that N mice that start on the vertices of a regular polygon with N sides, and they each head toward the nearest other mouse in counterclockwise direction until they all meet.
Write a program to draw the logarithmic spiral paths that they trace out by drawing nested N-gons, rotated and shrunk as in this animation. Write a program to draw a spiral like the one below. Write a program Globe. Drawing strings. Write a program RandomText. Write a program RandomWalk. Start at the center of a 2N-by-2N grid. The current location is displayed in blue; the trail in white. Rotating table. You are seated at a rotating square table like a lazy Susan , and there are four coins placed in the four corners of the table. Your goal is to flip the coins so that they are either all heads or all tails, at which point a bell rings to notify you that you are done.
You may select any two of them, determine their orientation, and optionally flip either or both of them over. To make things challenging, you are blindfolded, and the table is spun after each time you select two coins. Write a program RotatingTable. Then, it prompts the user to select two positions , and identifies the orientation of each coin. Next, the user can specify which, if any of the two coins to flip. The process repeats until the user solves the puzzle.
Rotating table solver. Write another program RotatingTableSolver. One effective strategy is to choose two coins at random and flip them to heads. However, if you get really unlucky, this could take an arbitrary number of steps. Goal: devise a strategy that always solves the puzzle in at most 5 steps. Hex is a two-player board game popularized by John Nash while a graduate student at Princeton University, and later commercialized by Parker Brothers. It is played on a hexagonal grid in the shape of an by diamond. Write a program Hex. Projectile motion with drag. Write a program BallisticMotion.
Account for gravitational and drag forces. Assume that the drag force is proportional to the square of the velocity. Write a program Heart. Changing square. Write a program that draws a square and changes its color each second. Simple harmonic motion. Repeat the previous exercise, but animate the Lissajous patterns as in this applet. Bresenham's line drawing algorithm. To plot a line segment from x1, y1 to x2, y2 on a monitor, say by, you need to make a discrete approximation to the continuous line and determine exactly which pixels to turn on.
Miller's madness. Write a program Madness. You should get the following complex picture. Experiment by changing the parameters and produce original pictures. Fay's butterfly. Write a program Butterfly. You should get an image like the following butterfly-like figure. Student database. The file students. The first line contains an integer N that specifies the number of students in the database. Each of the next N lines consists of four pieces of information, separated by whitespace: first name, last name, email address, and section number. The program Students.
Then, the program prints out a list of students in section 4 and 5. In the October 7, California state runoff election for governor, there were official candidates. To avoid the natural prejudice against candidates whose names appear at the end of the alphabet Jon W. Zellhoefer , California election officials sought to order the candidates in random order. Write a program program Shuffle. California decided to randomize the alphabet instead of shuffling the candidates. Using this strategy, not all N!
For example, two candidates with very similar last names will always end up next to each other. Write a program Reverse. Time series analysis. This problem investigates two methods for forecasting in time series analysis. Moving average or exponential smoothing. Polar plots. Create any of these polar plots. Java games. Use StdDraw.
Consider the following program. Shuffle a deck of cards, and deal one to the player. Prompt the player to guess whether the next card is higher or lower than the current card. Repeat until player guesses it wrong. Game show:????
Elastic collisions. Write a program CollidingBalls. Exceptions are accounted for in the same way: three months pregnant in modern usage, one says neither pregnant of three months , nor one month ' s pregnant. No apostrophe is used in the following possessive pronouns and adjectives: yours , his , hers , ours , its , theirs , and whose. The possessive of it was originally it's , and it is a common mistake today to write it this way, though the apostrophe was dropped by the early s and authorities are now unanimous that it's can be only a contraction of it is or it has.
All other possessive pronouns ending in s do take an apostrophe: one's ; everyone's ; somebody's , nobody else's , etc. With plural forms, the apostrophe follows the s , as with nouns: the others' husbands but compare They all looked at each other's husbands , in which both each and other are singular. Kingsley Amis , on being challenged to produce a sentence whose meaning depended on a possessive apostrophe, came up with:. The spelling of these ends with -s , -se , -z , -ze , -ce , -x , or -xe. Many respected authorities recommend that practically all singular nouns, including those ending with a sibilant sound, have possessive forms with an extra s after the apostrophe so that the spelling reflects the underlying pronunciation.
Rules that modify or extend the standard principle have included the following:. Although less common, some contemporary writers still follow the older practice of omitting the second s in all cases ending with a sibilant, but usually not when written -x or -xe. Similar examples of notable names ending in an s that are often given a possessive apostrophe with no additional s include Dickens and Williams. There is often a policy of leaving off the additional s on any such name, but this can prove problematic when specific names are contradictory for example, St James' Park in Newcastle [the football ground] and the area of St.
James's Park in London. Having said that, there has been ongoing debate around the punctuation of St James' Park Newcastle for some time, contrary to St James's Park London which is the less contentious version. For more details on practice with geographic names, see the relevant section below. Some writers like to reflect standard spoken practice in cases like these with sake : for convenience' sake , for goodness' sake , for appearance' sake , for compromise' sake , etc.
This punctuation is preferred in major style guides. Others prefer to add 's : for convenience's sake. The informal majority view 5—4, based on past writings of the justices as of [update] favoured the additional s , but a strong minority disagrees. The English possessive of French nouns ending in a silent s , x , or z is addressed by various style guides.
- How To Write Kickass Book Descriptions That Sell: Quick Guide to Marketing & Selling Your Kindle Book.
- Why We Left the Left: Personal Stories by Leftists/Liberals Who Evolved to Embrace Libertarianism.
- Standard output..
- Red eyes: List of common causes.
- UNDER REVIEW: The Well Runs Red – Alone We Wither | DISCOVERED MAGAZINE?
- The Perfect Illusion!
- Buying Options.
Certainly a sibilant is pronounced in examples like Descartes's and Dumas's ; the question addressed here is whether s needs to be added. The same principles and residual uncertainties apply with "naturalised" English words, like Illinois and Arkansas. For possessive plurals of words ending in silent x , z or s , the few authorities that address the issue at all typically call for an added s and suggest that the apostrophe precede the s : The Loucheux's homeland is in the Yukon ; Compare the two Dumas's literary achievements.
Guides typically seek a principle that will yield uniformity, even for foreign words that fit awkwardly with standard English punctuation. Place names in the United States do not use the possessive apostrophe on federal maps and signs. Australia's Intergovernmental Committee on Surveying and Mapping also has a no-apostrophe policy, a practice it says goes back to the s  and which is generally followed around the country.
These names were mainly fixed in form many years before grammatical rules were fully standardised. Modern usage has been influenced by considerations of technological convenience including the economy of typewriter ribbons and films, and similar computer character "disallowance" which tend to ignore past standards. Sometimes the apostrophe is omitted in the names of clubs, societies, and other organizations, even though the standard principles seem to require it: Country Women's Association , but International Aviation Womens Association ;  Magistrates' Court of Victoria ,  but Federated Ship Painters and Dockers Union.
Usage is variable and inconsistent. Style guides typically advise consulting an official source for the standard form of the name as one would do if uncertain about other aspects of the spelling of the name ; some tend towards greater prescriptiveness, for or against such an apostrophe. Where a business name is based on a family name it should in theory take an apostrophe, but many leave it out contrast Sainsbury's with Harrods. In recent times there has been an increasing tendency to drop the apostrophe.
Names based on a first name are more likely to take an apostrophe, but this is not always the case. Some business names may inadvertently spell a different name if the name with an s at the end is also a name, such as Parson. A small activist group called the Apostrophe Protection Society  has campaigned for large retailers such as Harrods, Currys , and Selfridges to reinstate their missing punctuation. Barclays is no longer associated with the family name. Use of the apostrophe may be recommended only for lowercase letters.
- Realm of the Unknown;
- Send this video to your pals!.
- Hitting Trees with Sticks by Jane Rogers.
- See a Problem?.
- Primary Sidebar.
An apostrophe is used by some writers to form a plural for abbreviations, initials including acronyms , and symbols, especially where adding just s rather than ' s may leave meaning ambiguous or presentation inelegant. Some specific cases:. For abbreviations, acronyms, etc. Names that are not strictly native to English sometimes have an apostrophe substituted to represent other characters see also As a mark of elision , below. In transliterated foreign words, an apostrophe may be used to separate letters or syllables that otherwise would likely be interpreted incorrectly.
For example:. Furthermore, an apostrophe may be used to indicate a glottal stop in transliterations. If you have a name that ends in "s," or if you will observe home-made signs selling tomatoes or chili-and-beans, you will quickly note what can be done with a possessive apostrophe in reckless hands.
Failure to observe standard use of the apostrophe is widespread and frequently criticised as incorrect,   often generating heated debate. Apostrophes used in a non-standard manner to form noun plurals are known as greengrocers' apostrophes or grocers' apostrophes , often written as greengrocer's apostrophes  or grocer's apostrophes.
The practice, once common and acceptable see Historical development , comes from the identical sound of the plural and possessive forms of most English nouns. It is often criticised as a form of hypercorrection coming from a widespread ignorance of the proper use of the apostrophe or of punctuation in general.
Truss says this usage is no longer considered proper in formal writing. The term is believed to have been coined in the middle of the 20th century by a teacher of languages working in Liverpool , at a time when such mistakes were common in the handwritten signs and advertisements of greengrocers e. Some have argued that its use in mass communication by employees of well-known companies has led to the less literate assuming it to be standard and adopting the habit themselves. The same use of apostrophe before noun plural -s forms is sometimes made by non-native speakers of English.
For example, in Dutch , the apostrophe is inserted before the s when pluralising most words ending in a vowel or y for example, baby's English babies and radio's English radios. This often produces so-called " Dunglish " errors when carried over into English. For example, the French word pin's from English pin is used with the apostrophe in both singular and plural for collectible lapel pins.
In , a resident in Royal Tunbridge Wells was accused of vandalism by one neighbour after he painted apostrophes on road signs that had spelled the street name as St Johns Close. UK supermarket chain Tesco omits the mark where standard practice would require it. Signs in Tesco advertise among other items "mens magazines", "girls toys", "kids books" and "womens shoes". In his book Troublesome Words , author Bill Bryson lambastes Tesco for this, stating that "the mistake is inexcusable, and those who make it are linguistic Neanderthals. George Bernard Shaw , a proponent of English spelling reform on phonetic principles, argued that the apostrophe was mostly redundant.
He did not use it for spelling cant , hes , etc. He did, however, allow I'm and it's. Lewis Carroll made greater use of apostrophes, and frequently used sha'n't , with an apostrophe in place of the elided ll as well as the more usual o. The British pop group Hear'Say famously made unconventional use of an apostrophe in its name. Truss comments that "the naming of Hear'Say in was [ The apostrophe in the name of rock band The La's is often thought to be misused, but in fact it marks omission of the letter d.
The name comes from the Scouse slang for lads. The over-use of apostrophes in names in fantasy literature was satirised by Neal Stephenson in Reamde. Over the years, the use of apostrophes has been criticised. George Bernard Shaw called them "uncouth bacilli", referring to the apostrophe-like shape of many bacteria. The author and language commentator Anu Garg , in a humourous but well-argued discussion, has called for the abolition of the apostrophe, stating "Some day this world would be free of metastatic cancers, narcissistic con men, and the apostrophe.
Adrian Room, in his English Journal article "Axing the Apostrophe", argued that apostrophes are unnecessary, and context will resolve any ambiguity. Wells , emeritus professor of phonetics at University College London , says the apostrophe is "a waste of time". In many languages, especially European languages, the apostrophe is used to indicate the elision of one or more sounds, as in English. Several languages and transliteration systems use the apostrophe or some similar mark to indicate a glottal stop , sometimes considering it a letter of the alphabet:.
The apostrophe represents sounds resembling the glottal stop in the Turkic languages and in some romanizations of Semitic languages , including Arabic and Hebrew. In typography, this function may be performed by the closing single quotation mark. Some languages and transliteration systems use the apostrophe to mark the presence, or the lack of, palatalization :.
Some languages use the apostrophe to separate the root of a word and its affixes , especially if the root is foreign and unassimilated. For another kind of morphemic separation see pinyin , below. The form of the apostrophe originates in manuscript writing, as a point with a downwards tail curving clockwise. Later sans-serif typefaces had stylised apostrophes with a more geometric or simplified form, but usually retaining the same directional bias as a closing quotation mark.
This is known as the typewriter apostrophe or vertical apostrophe. The same convention was adopted for quotation marks. However, although these are widely used due to their ubiquity and convenience, they are deprecated in contexts where proper typography is important. Unicode defines three apostrophe characters: . As such, it is a highly overloaded character. In ASCII, it represents a left single quotation mark , right single quotation mark, apostrophe, vertical line or prime punctuation marks , or an acute accent modifier letters.
This can still be seen in many documents prepared at that time, and is still used in the TeX typesetting system to create typographic quotes. Both sets also used this code point for a closing single quote. There is no such character in ISO Due to "smart quotes" in Microsoft software converting the ASCII apostrophe to this value, other software makers have been effectively forced to adopt this as a de facto convention.
The typewriter apostrophe has always been considered tolerable on Web pages because of the egalitarian nature of Web publishing, the low resolution of computer monitors in comparison to print, and legacy limitations provided by ASCII. More recently, the standard use of the typographic apostrophe is becoming more common on the Web due to the wide adoption of the Unicode text encoding standard, higher-resolution displays, and advanced anti-aliasing of text in modern operating systems. Because typewriter apostrophes are now often automatically converted to typographic apostrophes by word processing and desktop publishing software, the typographic apostrophe does often appear in documents produced by non-professionals, albeit sometimes incorrectly—see the section "Smart Quotes" below.
To make typographic apostrophes easier to enter, word processing and publishing software often converts typewriter apostrophes to typographic apostrophes during text entry at the same time converting opening and closing single and double quotes to their standard left-handed or right-handed forms.
A similar facility may be offered on web servers after submitting text in a form field, e. This is known as the smart quotes feature; apostrophes and quotation marks that are not automatically altered by computer programs are known as dumb quotes. Such conversion is not always correct. Smart quotes often incorrectly converts a leading apostrophe to an opening quotation mark e. In Microsoft Word it is possible to turn smart quotes off in some versions, by navigating through Tools , AutoCorrect , AutoFormat as you type , and then unchecking the appropriate option. Alternatively, typing Control-Z for Undo immediately after entering the apostrophe will convert it back to a typewriter apostrophe.
In the Lisp family of programming languages, an apostrophe is shorthand for the quote operator.
Six Common Punctuation Errors that Bedevil Bloggers
In Rust , in addition to being used to delimit a character literal, an apostrophe can start an explicit lifetime. From Wikipedia, the free encyclopedia. Punctuation or diacritical mark. For other uses, see ' disambiguation and Apostrophe disambiguation. See why. June Typographic apostrophe.
Diacritics Logic symbols. Chinese Hebrew Japanese Korean. See also: English possessive. See also: S-form. See also: Okina , Saltillo linguistics , Modifier letter apostrophe , Modifier letter double apostrophe , and Modifier letter right half ring. Nouns borrowed from French ending in -eau , -eu , -au , or -ou sometimes have alternative plurals that retain the French -x : beaux or beaus ; bureaux or bureaus ; adieux or adieus ; fabliaux or fabliaus ; choux or chous. The x in these plurals is often pronounced.
If it is, then in the absence of specific rulings from style guides the plural possessives are formed with an apostrophe alone: the beaux' [or beaus'] appearance at the ball ; the bureaux' [or bureaus'] responses differed. If the x is not pronounced, then in the absence of special rulings the plurals are formed with an apostrophe followed by an s : the beaux's appearance ; the bureaux's responses ; their adieux's effect was that everyone wept. See also Nouns ending with silent "s", "x" or "z" , below, and attached notes. Both allow either a joint or distributive interpretation of the genitive relation.
If you put an apostrophe with each element in the series. Not one of the other sources listed on this page supports the use of it's as a possessive form of it. Some modern editions add the apostrophe some with an s also , some omit it; and some make a compound with a hyphen: The Beaux-Stratagem. Farquhar himself used the apostrophe elsewhere in the standard ways, for both omission and possession. Do not mistake a descriptive form ending in s for a possessive form[:] sales effort sales describes the kind of effort Some cases can be difficult to distinguish. Is it the girls basketball team or the girls' basketball team?
Try substituting an irregular plural like women. You would not say the women basketball team ; you would say the women's basketball team.
Related Red Enters the Eye (Comma Singles)
Copyright 2019 - All Right Reserved