text:
Magic: The Gathering/Legacy Decks & Strategies

The below decks may be moved around between the tiers as new cards, trends, discoveries and interactions make certain strategies more or less competitive than they were previously. Please add to these primers any information or strategies that you have to offer. =Tier One Strategies=

Threshold Primer
Threshold is an evolution of Extended Miracle Gro/Super Gro lists. With the low amount of lands and high density of control, it uses Cantrips to find land early game and more cantrips and control midgame-lategame. This deck wins by using Threshold creatures, such as Nimble Mongoose and Werebear. More recently, Tarmogoyf has also been adopted due to its efficiency. This deck has many variations. ÐIt ranges from 3-4 colors, and each of those colors give it a different form of control or win conditions. White which happens to the most popular, is splashed for Swords to Plowshares, Meddling Mage, and Mystic Enforcer. As for the Sideboard, it is splashed for Tivadar's Crusade, Armageddon, Jotun Grunt, Worship, and at times, Nantuko Monastery. Red is splashed for maindeck Burn (Lightning Bolt, Fire // Ice, and/or Magma Jet/Chain Lightning) and Fledgling Dragon, and Pyroclasm for the Sideboard. Black is splashed for Dark Confidant and Ghastly Demise, and Pernicious Deed, Duress, Darkblast, and Diabolic Edict for the Sideboard.

Goblins Primer
Goblins is a pure aggro build that usually uses Aether Vial and Goblin Lackey to speed large numbers of goblins into play to overwhelm the opponent quickly. Goblin Piledriver, Goblin Warchief, Goblin Matron, and Goblin Ringleader are staple cards used towards this effect with many maindecked or toolbox goblins for specific removals and damage sources. Some common cards are Gempalm Incinerators, Mogg Fanatic, Goblin Sharpshooter, Siege-Gang Commander, and Kiki-Jiki Mirror Breaker. Goblins usually runs a touch of direct damage aside from these in the form of Lightning Bolt or Tarfire, and some land based land destruction in the form of Dust Bowl or Wasteland. Goblins is generally mono-red but has been known to spash white for sideboarded disenchants or black for Patriarch's Bidding.

=Tier Two Strategies=

Survival Primer
Survival decks involve using Survival of the fittest combined with early mana acceleration to search through a toolbox deck of well chosen creatures such as Anger, Genesis, Squee Goblin Nabob, Rofellos. There are several sub-versions of this deck that all play very different.

ATS (Angry Tradewind Survival) splashes blue in for Tradewind Rider and more control oriented cards (counterspell, force of will, mystic snake) and plays a slower paced game that involves using survival to find answers in creature form and Tradewind riders to lock the board. This build usually performs poorly against heavy aggro, such as goblins.

Survival combo. The original incarnations of this deck involved using recurring nightmare to reanimate fatties that were tossed in the graveyard with survival. The main creature focus of this deck were ones with come in to play effects such as Nekrataal, Uktabi Orangutan, Cloudchaser Eagle, Avalanche Riders etc. This deck is more aggressive than ATS, and in its time was THE survival deck. Also popular for quite some time now is to have a Volrath's Shapeshifter in play then toss multiple fatties or utility creatures with survival (such as morphling and krosan cloudscraper). These deck styles do not do well against decks with any type of disruption or control so they are currently not seeing much play.

Currently many players are working with R/G survival which focuses on using aggressive, efficient creatures to maintain board position, while survival guarantees finding answers in the early game and a finisher in the mid to late game. This has an advantage over previous builds which fall apart if the player can't resolve and keep a survival on the table. most versions agree on using burning wish to pull in key cards in poor match ups, namely against combo decks.

While this is a very fun deck to play; it can be rather expensive to build, and every incarnation seems to perform poorly against one of the main 3 archetypes(being combo, control/disruption, aggro).

Pikula & Variants Primer
Bw Pikula is a deck created by Chris Pikula, which happens to be a spin-off of Pikula's favorite decks from 96; Necropotence.

By replacing the Necropotence with Dark Confidant, and splashing White in for Vindicate, Swords to Plowshares, and Gerrald's Verdict, it created a perfect monster for the format. By mana screwing the opponent, and heavy discard, as well as Dark Confidants to keep the engine going, disruption and threats come constant.

Some other versions replace Red for Terminate and Blazing Specter, and Green for Pernicious Deed.

Faerie Stompy Primer
Faerie Stompy is a monoblue aggressive deck. This deck uses blue flying creatures such as Cloud of Faeries, Mulldrifter, Sea Drake, Serendib Efreet, and Sower of Temptation. This deck also uses Trinket Mage to search for Relic of Progenitus, Sigil of Distinction, Engineered Explosives, and Seat of the Synod. If a player controls a Chrome Mox and Ancient Tomb or City of Traitors but no other lands in play, Sea Drake's "comes into play effect" will not trigger.

Mana Sources:
 * 4 Chrome Mox
 * 4 City of Traitors
 * 4 Ancient Tomb
 * 9 Island
 * 1 Seat of the Synod

Creatures:
 * 4 Sea Drake
 * 4 Serendib Efreet
 * 3-4 Mulldrifter
 * 3-4 Cloud of Faeries

Instants:
 * 4 Force of Will

Artifacts:
 * 4 Chalice of the Void
 * 0-2 Umezawa's Jitte
 * Sword of Fire and Ice
 * Sword of Light and Shadow

=Tier Three Strategies=

Angel Stompy Primer
Angel Stompy is an accelerated White Weenie evolution that uses Turbo Accelerants, such as Ancient Tomb, Chrome Mox, and/or City of Traitors. The deck uses Equipment as Draw Engines and Removal such as Sword of Fire and Ice and Umezawa's Jitte, while using utility creatures and beaters to abuse the Equipment. The deck was created by Zilla from the Source.

It's most famous moves are...

Turn 1: Ancient Tomb, Chrome Mox, and Facedown Exalted Angel. Turn 2: Play Plains, Tap Plains, Chrome Mox, and Ancient Tomb, Flip Exalted Angel, and attack.

Some versions of Angel Stompy splash Blue and/or Black for Spectral Lynx, Meddling Mage, Duress, Srendib Efreet, and Brainstorm.

Stax Primer
Stax is a Prison deck ported from Type 1.

It uses Trinisphere, Crucible of Worlds, Tangle Wire, Uba Mask, Chalice of the Void, Sphere of Resistance, and Smokestack to create a board lock, and restrict the number of spells being played.

This deck uses a mana base of Ancient Tomb, Crystal Vein, and City of Traitors with Mox Diamond for extra speed. These land are very synergistic with Crucible of World because discarded land to Mox Dimonds can be replayed as well as replaying sacrificed Crystal Vein or City of Traitors. Crucible also allows the Stax player to replay sacrificed lands from Smokestack. Although the deck is much less powerful than the flame vault stax deck it is still a strong rogue deck seen with a top 16 place at worlds by Brandon Adams.

Flame Vault Stax is a Stax deck utilizing Flame Fusillade and Time Vault to inflict infinite damage. Also Time Vault could combo with Stasis and Smokestacks skipping infinite turns winning by decking. Time Vault was errataed to fix the combo and any power Time Vault had to create a prison lock.

Newer versions of the deck are designed by Chris Coppola and Brandon Adams.

List & Explanation
The best burn decks runs a base with only the fastest most efficient burn spells available and very few if any nonland permanents. Thus these decks make up for their inability to draw cards by making all of the removal and bounce in your opponents hand worthless. Magma Jet also serves a similar goal in making sure that the cards you draw are indeed cards that help you win. Spells:
 * 4 Lava Spike
 * 4 Chain Lightning
 * 4 Lightning Bolt
 * 4 Mogg Fanatic or Thunderbolt
 * 4 Rift Bolt
 * 4 Magma Jet
 * 4 Incinerate
 * 4 Flame Rift
 * 4 Flamebreak
 * 4 Fireblast

Lands:
 * 4 Mountain
 * 4 Snow Covered Mountain
 * 4 Plateau or Mountain
 * 4 Bloodstained Mire or Barbarian Ring
 * 4 Wooded Foothills

Explanation of the Alternatives

Lighning Helix/Plateau - There are two types of metagames, those where nonbasics and Wastelands run rampant, and those where nonbasics are few and far between. In the former, while the life gain and the ability to sideboard Disenchant are great reasons to splash white, the added versatility of Disenchant is offset by the added vulnerability to Wasteland. And the life gained by running Lightning Helix is offset by the life lost from Plateau since running a playset of Price of Progress is a must in such metagames. Thus, Lightning Helix is best thought off as an alternative to Price of Progress in those precisely those metagames where nonbasic lands and Wastelands are few and far between. In such metagames, Lightning Helix compensates for the life loss associated with the incredibly effective Flame Rift and Flamebreak.

Price of Progress - This card can be an absolute bomb against those decks that run multiple nonbasic lands. While many of the current decks fit this mold, a few decks run no such nonbasic lands and thus it is debatable if this card should be maindecked or sideboarded. If you choose not to run it, splash white and run Lightning Helix.

Barbarian Ring - This land has the slight disadvantage of not being saccable to Fireblast. It's a tough call. On one hand, it is very effective against Blue based control strategies and thus warrants consideration in decks running Lightning Helix. But on the same token, in mono Red builds running Price of Progress, the added vulnerability to both Wastelands and your own Price of Progress is just not worthwhile.

Mogg Fanatic - This is an excellent one drop creature that finds its way into most burn decks. Though it violates the no nonland permanent rule that burn decks live by, the fact that it can be sacrificed to deal damage compensates for this. The only reason not to run this would be in an almost entirely creature dominated environment where it will never get through to deal even as much damage as a Shock. But even then, it still warrants consideration.

Thunderbolt - This is an excellent alternative burn spells that replaces Mogg Fanatic in high toughness creature dominated metagames. It can also be used in burn decks that can't afford the Plateaus for the white splash though they play in areas where running Price of Progress is not worthwhile. It can even replace Flame Rift in environments where such life loss unacceptable.

Flame Rift - The main reason that Flame Rift is used is because that one extra damage lets you win the game a full turn faster a third of the matches you play. But it can replaced in metagames where you often find yourself being outraced.

Chain of Plasma - This serves the same purpose as Thunderbolt, as an alternative burn spell. But Thunderbolt is almost certainly the superior option. Chain of Plasma has the small but still relevant liability of being bounced back in situations where you don't have any cards to discard or simply don't want to discard (when you are holding a Fireblast for example). A good opponent would never bounce back Chain of Plasma unless it is advantageous to them. Thunderbolt on the other hand has no real drawback since there are so many other burn spells in the deck that can deal with creatures when necessary. In addition, the ability of Thunderbolt to destroy four toughness flying creatures when necessary is actually a positive.

Flamebreak - Burn wants to aim everything for the dome without caring about the creatures that your opponent is casting. This card lets it do that by clearing the board of opposing creatures while still dealing damage to the dome. Leaving this card out of the deck is not an option.

Popular Cards That Shouldn't Be Run

Volcanic Hammer - This is yet another alternative to Thunderbolt and Chain of Plasma. It shouldn't be run, simply because the sorcery speed is a bigger drawback than the drawbacks of either of the other cards. Playing your cards at the end of your opponents turn is a critical component of playing burn decks, and this interferes with that plan. Incinerate in just a much better card.

Grim Lavamancer - While a few people feel that this card is ultimately too efficient not to run, it clearly violates the no nonland permanent rule and also is a bit too slow. These are the same reason that a number of other nonland permanants such as Ankh of Mishra, Sulfuric Vortex and Cursed Scroll are not utilized in this deck.

Ball Lightning - While the main reason this card fell into disuse, Mana Drain, no longer exists in Legacy, it's high casting cost makes it only usable as a finisher. And the fact that this a creature that can be targeted by removal or blocked makes it an unreliable finisher at that.

Reprinted with permission from the original author Centroles.


text:
Magic: The Gathering/Vintage Decks & Strategies

The below decks may be moved around between the tiers as new cards, trends, discoveries and interactions make certain strategies more or less competitive than they were previously. Please add to this page but do not modify existing decklists without making note of the changes.

=Tier One Strategies= These are the cream of the crop, these strategies are the ones that are consistently winning tournaments and have no significant weaknesses or matchups that can't be won.

Oath Primer
This deck wins by playing and activating Oath of Druids, often taking advantage of Forbidden Orchard to ensure that the opponent has at least one creature in play.

Mana Drain Variant
Team White Lotus (TWL) Oath

Article at Star City Games here.

GWS Oath
This is the variant that has recently became very popular and has placed high in numerous tournaments. It too runs no Mana Drains in favor of Impulse and a black splash for additional Tutors and Duress. As a result, this variant can be built on a budget without losing any cards when one utilizes the ten proxies that most American tournaments now allow.

List & Explanation
Oath of Druids

Maindeck:

Artifacts

 * 1 Black Lotus (Restricted in Vintage)
 * 1 Mox Emerald (Restricted in Vintage)
 * 1 Mox Jet (Restricted in Vintage)
 * 1 Mox Pearl (Restricted in Vintage)
 * 1 Mox Ruby (Restricted in Vintage)
 * 1 Mox Sapphire (Restricted in Vintage)
 * 2 Sensei's Divining Top

Enchantments

 * 4 Oath Of Druids

Instants

 * 1 Ancestral Recall (Restricted in Vintage)
 * 1 Brainstorm (*now Restricted in Vintage, like Ponder)
 * 1 Crop Rotation (Now Unrestricted in Vintage)
 * 4 Force Of Will
 * 4 Impulse
 * 4 Mana Leak
 * 1 Vampiric Tutor (Restricted in Vintage)

Legendary Creatures

 * 1 Emrakul, the Aeons Torn
 * 1 Griselbrand

Sorceries
 * 1 Ponder
 * 2 Preordain
 * 1 Demonic Tutor (Restricted in Vintage)
 * 4 Duress
 * 1 Gaea's Blessing
 * 1 Imperial Seal
 * 1 Time Walk (Restricted in Vintage)

Basic Lands

 * 2 Island

Lands

 * 2 City Of Brass
 * 1 Flooded Strand
 * 4 Forbidden Orchard
 * 3 Polluted Delta
 * 1 Strip Mine (Restricted in Vintage)
 * 1 Tropical Island
 * 1 Underground Sea
 * 4 Wasteland

Sideboard:
 * 1 Darksteel Colossus
 * 2 Triskelion
 * 2 Choke
 * 3 Ground Seal
 * 3 Annul
 * 3 Oxidize
 * 1 Tinker (Restricted in Vintage)

Variations of this build, popularized by team GWS, have placed in the top 8 of the GenCon Vintage Championships and several Starcity Power 9 events. This has become the most popular form of Oath of Druids decks. Tinker-Darksteel Colossus can be run maindeck. It does have the advantage of getting around Meddling Mage and Chalice of the Void, however is bad if the opponent controls a Goblin Welder. Razia is starting to take the place of Spirit of the Night as the deck's second large hasted flier. The deck plays as an aggro-control deck disrupting the opponent until it finds Forbidden Orchard and Oath of Druids to win. Other cards commonly played are Mystical Tutor, Misdirection and Chalice of the Void.

Decklist posted by team GWS.

Drainless Tinker Variant
This variant runs no Mana Drains in favor of Impulse and a black splash for additional Tutors and possibly Duress. As a result, this variant can be build on a budget without losing any cards when one utilizes the ten proxies that most tournaments now allow. In addition, it runs Tinker as an additional way to combo out.

List & Explanation
Search:
 * 4 Brainstorm (*Restricted in Vintage)
 * 4 Impulse
 * 2 Sensei's Divining Top (This was a new addition to the list.)
 * 1 Ancestral Recall
 * 1 Time Walk
 * 1 Imperial Seal
 * 1 Vampiric Tutor
 * 1 Mystical Tutor
 * 1 Personal Tutor
 * 1 Demonic Tutor

Disruption:
 * 4 Duress
 * 4 Mana Leak or Daze
 * 4 Force of Will
 * 1 Misdirection

Combo:
 * 4 Oath of Druids
 * 1 Tinker
 * 1 Akroma, Angel of Wrath
 * 1 Razia (edited)
 * 1 Gaea's Blessing

Mana: (Had been tweaked since then.)
 * 1 Black Lotus
 * 1 Mox Emerald
 * 1 Mox Jet
 * 1 Mox Pearl
 * 1 Mox Ruby
 * 1 Mox Sapphire
 * 1 Strip Mine
 * 1 Island
 * 1 Underground Sea
 * 2 Tropical Island
 * 2 Wasteland
 * 2 Flooded Strand
 * 3 Polluted Delta
 * 4 Forbidden Orchard

Some of the Drainless Oath builds including the first such build (listed above) run Tinker and Darksteel Colossus as an additional way to combo out quickly. This gives the additional advantage of an alternative win condition in situations when Oath of Druids is neutralized by cards such as Meddling Mage, Forbidden Orchard, Goblin Bombardment, or Wasteland targeting Forbidden Orchard. Such variations sometimes run Imperial Seal, Mystical Tutor and Personal Tutor to help grab Tinker, Ancestral Recall, Time Walk, or disruption. Other Drainless Oath builds such as the one above do not run either Tinker or Darksteel Colossus and instead run Razia, Boros Archangel.

Other variations on the deck include running cards such as [b]Muddle in the Mixture, Crop Rotation, Chalice of the Void, Pithing Needle, Regrowth, Library of Alexandria, City of Brass, more Sensei's Divining Top and on occasion running three creatures rather than two[/b] in order to significantly decrease the probability of being slowed down by an active Goblin Welder. Some rarely even run cards such as Yawgmoth's Will, Enlightened Tutor, Engineered Explosives and Balance.

Decklist reprinted with permission from the original author, Centroles, who posted this in May 28, 2005.

Stax Primer
The Stax deck in Vintage wins through a board-lock created by cards like Trinisphere, Smokestack, Tangle Wire and lots of other cards that restrict the number of spells being played.

The advantage of Stax is that it has a lot of permanents, so it does not care about Tangle Wire or Smokestacks.

The win conditions are Karn, Silver Golem, Sundering Titan or Triskelion who could be reanimated with Goblin Welder, also a quite important part of the deck. Even 2 Goblin Welders could create a Tangle Wire of fading 4 permanently which makes playing impossible for your opponent.

Gifts Primer
GG Gifts Artifacts
 * 1 Black Lotus (Restricted in Vintage)
 * 1 Engineered Explosives
 * 1 Lotus Petal (Restricted in Vintage)
 * 1 Mana Crypt (Restricted in Vintage)
 * 1 Mana Vault (Restricted in Vintage)
 * 1 Mox Emerald (Restricted in Vintage)
 * 1 Mox Jet (Restricted in Vintage)
 * 1 Mox Pearl (Restricted in Vintage)
 * 1 Mox Ruby (Restricted in Vintage)
 * 1 Mox Sapphire (Restricted in Vintage)
 * 2 Pithing Needle
 * 1 Sol Ring (Restricted in Vintage)
 * 1 Time Vault

Artifact Creatures Instants
 * 1 Darksteel Colossus
 * 1 Ancestral Recall (Restricted in Vintage)
 * 4 Brainstorm
 * 4 Force Of Will
 * 2 Gifts Ungiven (Now restricted in Vintage)
 * 4 Mana Drain
 * 1 Mystical Tutor (Restricted in Vintage)
 * 4 Thirst For Knowledge
 * 1 Vampiric Tutor (Restricted in Vintage)

Sorceries
 * 1 Burning Wish (Restricted in Vintage)
 * 1 Demonic Tutor (Restricted in Vintage)
 * 1 Flame Fusillade
 * 1 Imperial Seal
 * 1 Recoup
 * 1 Time Walk (Restricted in Vintage)
 * 1 Tinker (Restricted in Vintage)
 * 1 Yawgmoth's Will (Restricted in Vintage)

Lands
 * 4 Island
 * 3 Flooded Strand
 * 1 Library Of Alexandria (Restricted in Vintage)
 * 2 Polluted Delta
 * 2 Underground Sea
 * 2 Volcanic Island
 * 1 Tolarian Academy (Restricted in Vintage)
 * 1 Snow-covered Island

Meandeck Gifts Artifacts
 * 1 Black Lotus (Restricted in Vintage)
 * 1 Lotus Petal (Restricted in Vintage)
 * 1 Mana Crypt (Restricted in Vintage)
 * 1 Mana Vault (Restricted in Vintage)
 * 1 Mox Emerald (Restricted in Vintage)
 * 1 Mox Jet (Restricted in Vintage)
 * 1 Mox Pearl (Restricted in Vintage)
 * 1 Mox Ruby (Restricted in Vintage)
 * 1 Mox Sapphire (Restricted in Vintage)
 * 1 Sol Ring (Restricted in Vintage)

Artifact Creatures
 * 1 Darksteel Colossus

Instants
 * 1 Ancestral Recall (Restricted in Vintage)
 * 4 Brainstorm
 * 1 Echoing Truth
 * 1 Fact Or Fiction (Restricted in Vintage)
 * 4 Force Of Will
 * 4 Gifts Ungiven
 * 4 Mana Drain
 * 3 Misdirection
 * 1 Mystical Tutor (Restricted in Vintage)
 * 1 Rebuild

Sorceries
 * 1 Burning Wish (Restricted in Vintage)
 * 1 Demonic Tutor (Restricted in Vintage)
 * 4 Merchant Scroll
 * 1 Recoup
 * 1 Time Walk (Restricted in Vintage)
 * 1 Tinker (Restricted in Vintage)
 * 1 Yawgmoth's Will (Restricted in Vintage)

Lands
 * 4 Island
 * 2 Flooded Strand
 * 3 Polluted Delta
 * 2 Underground Sea
 * 2 Volcanic Island
 * 1 Tolarian Academy (Restricted in Vintage)
 * 1 Snow-covered Island

Note: As of April 24th, there is an errata on Time Vault, causing the Flame Fusillade/ Time Vault/ Infinite Damage combo to no longer work.

'''Note: As of September, 2008, Time Vault has received additional errata which allows it to combo with Voltaic Key to take infinite turns. This has subsequently made everything written on this wiki more inaccurate than it already was. Go somewhere else to get information on Vintage. (perhaps www.themanadrain.com)'''

Control Slaver Primer
A Standard Decklist Lands
 * 1 Library of Alexandria
 * 1 Tolarian Academy
 * 2 Polluted Delta
 * 2 Flooded Strand
 * 4 Volcanic Island
 * 2 Underground Sea
 * 4 Island

Creatures
 * 4 Goblin Welder
 * 1 Triskelion
 * 1 Pentavus

Spells
 * 4 Force of Will
 * 4 Mana Drain
 * 1 Echoing Truth
 * 1 Darkblast
 * 4 Brainstorm
 * 1 Fact or Fiction
 * 1 Ancestral Recall
 * 4 Thirst for Knowledge
 * 2 Mindslaver
 * 1 Rack and Ruin
 * 1 Gifts Ungiven
 * 1 Time Walk
 * 1 Tinker
 * 1 Demonic Tutor
 * 1 Yawgmoth's Will
 * 1 Vampiric Tutor
 * 1 Black Lotus
 * 1 Mana Crypt
 * 1 Mana Vault
 * 1 Sol Ring
 * 1 Mox Emerald
 * 1 Mox Jet
 * 1 Mox Pearl
 * 1 Mox Ruby
 * 1 Mox Sapphire

The First Primer by Rich Shay aka The Atog Lord

An article on Burning Slaver, a Control Slaver variant, by Brian Demars

Everything Wins Again Primer
Everything Wins Again is a metagame hate deck designed to have a 50/50 matchup against any deck in the metagame preboard, and a 51/49 matchup postboard.

This is done by completely sacrificing manabase immunity to Wasteland for the support of all five colors. Sometimes this element is forgone in favor of a four color manabase depending on the metagame.

The first and only top 8 of this deck was recorded here.

6. Andrew Fox "Everything Wins Again"

Maindeck (60 cards):

 * 1 Mox Emerald
 * 1 Mox Jet
 * 1 Mox Pearl
 * 1 Mox Ruby
 * 1 Mox Sapphire
 * 4 Dark Confidant
 * 1 Demonic Consultation
 * 1 Duress
 * 1 Ancestral Recall
 * 2 Brainstorm
 * 1 Curiosity
 * 1 Daze
 * 1 Disrupt
 * 1 Memory Lapse
 * 1 Ninja of the Deep Hours
 * 1 Seal of Removal
 * 1 Spell Snare
 * 1 Time Walk
 * 2 Fire/Ice
 * 3 Hide/Seek
 * 3 Meddling Mage
 * 1 Call of the Herd
 * 1 Sylvan Safekeeper
 * 1 Gorilla Shaman
 * 1 Pyroblast
 * 4 Swords to Plowshares
 * 1 Children of Korlis
 * 3 Jotun Grunt

Lands (18):
 * 2 Bloodstained Mire
 * 4 City of Brass
 * 2 Flooded Strand
 * 2 Mishra's Factory
 * 1 Island
 * 1 Plains
 * 1 Plateau
 * 1 Scrubland
 * 1 Swamp
 * 1 Taiga
 * 1 Underground Sea
 * 1 Volcanic Island

Sideboard: (15 cards)

 * 1 Artifact Mutation
 * 1 Darkblast
 * 1 Flametongue Kavu
 * 1 Gifts Ungiven
 * 1 Hide and Seek
 * 1 Meddling Mage
 * 1 Pyrokinesis
 * 3 Pyrostatic Pillar
 * 4 Serenity
 * 1 Spell Snare

Everything Wins Again builds up incremental card advantage over the course of the game by confusing the opponent and causing them to misplay. This is done by playing almost no repeating cards in a given game so that the opponent cannot correctly find the 'optimal' play in any given situation.

=Tier Two Strategies=

Fish Primer
Fish is a tier two Vintage Deck that tries to win throug little creatures like "Isamaru", "Kataki, War´s Wage" and "Meddling Mage". Secondly Fish includes a lot of hate-cards and counters like Force of Will and Stifle or Trickbind. As an answer for creatures it has 4 Swords to Plowshares, the best Spot-Removal ever printed.

It´s a nice opportunity to start with playing Vintage and a so called Budget-Deck, the most valuable cards are Force of Will and probably Meddling Mage.

At a high player-skill it could even reach the Top 8 of a T1 tournament.

Food Chain Goblins Primer
=Famous decks= Here are some famous decks of tournament winners:

Zak Dolan 1994 world champion

 * 1 Library of Alexandria
 * 4 Savannah
 * 4 Tropical Island
 * 4 Tundra
 * 2 Strip Mine

15 lands

 * 1 Clone
 * 2 Old Man of the Sea
 * 1 Time Elemental
 * 1 Vesuvan Doppelganger
 * 1 Birds of Paradise
 * 1 Ley Druid
 * 4 Serra Angel

11 creatures

 * 1 Ancestral Recall
 * 1 Control Magic
 * 1 Mana Drain
 * 1 Recall
 * 1 Siren's Call
 * 2 Stasis
 * 1 Timetwister
 * 1 Time Walk
 * 1 Regrowth
 * 1 Armageddon
 * 2 Disenchant
 * 1 Kismet
 * 4 Swords to Plowshares
 * 1 Wrath of God
 * 1 Black Lotus
 * 1 Black Vise
 * 1 Howling Mine
 * 1 Icy Manipulator
 * 1 Ivory Tower
 * 1 Mana Vault
 * 2 Meekstone
 * 1 Mox Emerald
 * 1 Mox Jet
 * 1 Mox Pearl
 * 1 Mox Ruby
 * 1 Mox Sapphire
 * 1 Sol Ring
 * 1 Winter Orb

34 other spells

Sideboard

 * 1 Chaos Orb
 * 1 Circle of Protection: Red
 * 1 Copy Artifact
 * 1 Diamond Valley
 * 1 In the Eye of Chaos
 * 1 Floral Spuzzem
 * 2 Karma
 * 1 Magical Hack
 * 1 Power Sink
 * 1 Presence of the Master
 * 1 Reverse Damage
 * 1 Sleight of Mind
 * 1 Kismet
 * 1 Winter Blast

15 sideboard cards

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


text:
Programming Mac OS X with Cocoa for Beginners/What is Cocoa?

Next Page: Installing the developer tools

Cocoa is possibly one of the most rewarding, fun and productive ways to program a modern computer yet devised. If you own a Mac running Mac OS X, you already have Cocoa, and all the tools needed to program your Mac are available for free from Apple. Anyone who has an interest in programming can use Cocoa to write Mac applications, yet it is not just for beginners; many of the best OS X software titles available are written using Cocoa. You are able to harness the full power of the machine from Cocoa.

Programming using Cocoa involves both using a graphical user interface (GUI -- pronounced "gooey") tool to build your user interfaces, and an integrated development environment (IDE). Cocoa consists of hundreds of ready-built classes, which are pre-programmed modules of reusable code, that you can simply include in your own work. Since these classes are well designed, powerful and fully debugged, using them saves you hundreds of hours in building in complex functionality.

Cocoa is the name given to the complete set of classes, functions and constants, grouped together into an Application Programming Interface, or API. For building Mac applications Cocoa is the only API that is really used anymore. (The other APIs that used to be provided by Apple, the Classic API and the Carbon API have been deprecated.)

To get the most out of this text, you will need to be running Mac OS X 10.3 or later. If you have 10.2, most of what is here will work OK, but the tools as described will be different, and a little harder to use. The coding examples avoid Cocoa features that only exist on 10.3 or 10.4, but later chapters will explain them.

Significant parts of this text describe older versions of Interface Builder. Some of what is described will not work with version 3.0.

Above all, this text aims to get you started in the smoothest way possible, so that you can begin to see not just how powerful Cocoa can be, but also how much fun it is to work with.

Next Page: Installing the developer tools


text:
Programming Mac OS X with Cocoa for Beginners/Installing the developer tools

Previous Page: What is Cocoa? | Next Page: Getting around in Xcode and Interface Builder

Before you can begin, you need to install the developer tools. These are supplied on a separate CD or DVD with your OS X install discs. Find the CD and insert it. Because Apple works on the principle that developers need less hand-holding than the average user, the installer will not run automatically. Instead, you need to find the "devtools.mpkg" icon, and double-click it to run the installer.

Follow the on-screen instructions carefully. Make sure you have enough disk space available. At this stage, do not be tempted to customise the installation, just do a standard install which will give you everything you need (and more, but you may need it later).

Once the installer has run its course, you will find a new folder at the top level of your machine's disk, called Developer. Note — this is at the root level of the hard disk, not in your Home folder. To find it, you may need to open a Finder window and navigate to the disk itself, depending on how your Finder is configured.

Within Developer→Applications you will find a variety of folders, plus two applications, called Xcode and Interface Builder. These are the two main applications you will be working with throughout this text. You can ignore any others for now.

Double-click Xcode to launch it.

When Xcode starts, it defaults to multi-window mode which is not how this tutorial expects you to use it. In general, single-window mode is easier to use and avoids a confusing proliferation of windows as you work. To change it, before doing anything else, open the Preferences. Under General, choose "All-in-One" layout. In the same place, check the four boxes on the right - "Open counterparts in same editor", "Automatically open/close attached editor", "Automatically Clear Log", "Save Window State". Click OK.

It's also a good idea to make a folder for all the coding work you will do. This should be somewhere in your own Home area — you could make it directly under the Home folder, or perhaps within "Documents". It's up to you. Create the folder in the Finder wherever you want it, and name it "Projects". Xcode will make new folders inside this one for each new application we build.

Now we are ready to begin.

If you plan to work through this text, a good idea is to add the Xcode icon to the Dock for easy access. To do this, simply drag the Xcode icon in the Finder to the Dock.

Previous Page: What is Cocoa? | Next Page: Getting around in Xcode and Interface Builder


text:
Programming Mac OS X with Cocoa for Beginners/Getting around in Xcode and Interface Builder

Previous Page: Installing the developer tools | Next Page: First Cocoa program - Hello World

We will shortly write our first Mac application in Cocoa, good old "Hello World!". While not very useful, this will give you confidence that your developer installation is working as it should.

XCode 3 and Earlier

When Xcode first starts, it may not create any windows but it will have a menu bar and you can create a project and open its window by choosing: File→New Project...

An assistant opens with all the types of projects that Xcode can build. We want to make a simple Cocoa application, so scroll down the list to find "Cocoa Application", select it and click Next.

In the upper field, type the name of the project. We will call it "HelloWorld". In the lower field, Xcode wants the path to the Projects folder. You could type it, but it's safer to use the "Choose..." button to navigate to it. Find wherever you put it, and click Choose. The path will be filled in. Click Finish.

Xcode opens a window with the title of your project — in this case "HelloWorld". Down the left hand side of the window is a hierarchical list which lists all of the various elements that make up the program. The first item is selected, called "HelloWorld". The main part of the window lists a number of files, such as 'Cocoa.framework', but they are not important right now. The top part of the window is the toolbar with a number of buttons, such as "Build", "Info", etc.

Let's build and run the project, to see what it does. Click the "Build and Run" ("Build and Go" on older versions of Xcode) button. Xcode will churn away for a minute, compiling various files. Shortly it will finish, the toolbar will change to the running state, and the application will be launched. A new window with the title "Window" will open with nothing in it, and the menu bar will show the name of the application, HelloWorld.

You will see that while this isn't a very useful application, it does exhibit much of the basic behaviour that any Mac application would be expected to. You can drag the window around, resize it, choose items from the menu, and so forth. It even has an "about box"! Not bad for not even writing any code yet. When you're done, choose "Quit" and control will return to Xcode. If you want to run it again, you can click the "Run" button.

On returning to Xcode, you are in the "build" view. To return to the original project view, click the leftmost button at the top left of the toolbar, below the window close button.

Interface Builder
We'll now jump into Interface Builder (IB) to make our application do something. While you could launch Interface Builder from the Finder, Xcode works hand in hand with it, so it's usually easier to let Xcode handle this. To start IB then, find the item "NIB Files" at the bottom of the list on the left. Open it, and double-click 'MainMenu.nib'. IB will launch and open that file in one go.

MainMenu.nib contains the resources for the basic application. This includes the default menu bar and the simple window we already saw. The main view of a file in IB is a graphical list of the objects it contains, just like files in the Finder. Thus there is the MainMenu object, the Window object, and a couple of others, such as 'File's Owner' and 'First Responder' which will be explained in detail much later. Double-click on the icon for Window. The actual window will open. The size and position of this window is exactly what will show up in the finished app, so put it where you want it.

Let's add some text to the window. You should see a palette called Cocoa-Controls. Click the Text button which is third from the left. The window title will now be Cocoa-Text, and you will see various examples of text. Find the 'System Font Text' item in the pallete. (Note: In newer versions of Xcode and Interface Builder, the Cocoa-Control palette has been replaced with a content library, and 'System Font Text' items have been replaced with 'labels'. In Xcode 3.2.6, for example, in Tools→Library→Objects, indented under 'Library' and 'Views & Cells' select 'Inputs & Values', then below choose 'Label'.) Drag the 'System Font Text' item from the palette (or 'Label' item from the library) into the window and drop it there. It will appear with a set of selection 'handles' around it. Double-click on the text to select it, and change the text to "Hello World!". Click outside of the text to deselect it.

Choose File→Save and return to Xcode. Click "Build and Run". When your application launches, it now includes the text you just added.

Well, so far not so very impressive, but it means that at this stage, everything is working as it should. We can now proceed to more interesting and challenging things with confidence in our tools.

Documentation
Xcode comes with the complete Apple Developer Reference Library locally installed. It is fully integrated into the Xcode editor — to look up any method or class within Cocoa, simply option-double-click the class or method name anywhere in any text editor, or you can command-click on the identifier in the source-code and be taken to the declaration of that identifier in the .h file. Remember, all Cocoa classes start with 'NS...' (this stands for NextStep, the predecessor to Mac OS X where the Cocoa API first appeared as the programming environment itself. Because of this, avoid the temptation to call your own classes 'NS...' anything.

There are other APIs available to use to develop software that runs on Mac OS X include Carbon, Toolbox for the Classic environment, POSIX, and Java), making them easy to spot. Though, Carbon and Classic aren't really supported by Apple anymore.  They were for providing developers with an upgrade path from old version of Classic Mac OS (before Cocoa).  You can still use Java, but Apple has lessened its support of Java.  Java is good for cross-platform work where you want to develop apps that will run on Mac or Windows.  The problem with Java is it reduces the application software to the "least common denominator" disallowing the use of many APIs in Cocoa and Mac OS X.  The Mac App Store will not accept applications written in Java.

Although there are a number of APIs available to program the Mac, Cocoa and Objective-C are "native" allowing you to develop apps that are truly "Mac-like".

You can open the documentation window at any time using Help→Documentation. This will take you to the documentation that was installed when you installed XCode, etc. on your computer.

The documentation library can also be updated by going to the Xcode Preferences (Xcode→Preferences), and choosing the Documentation option.

As well as complete descriptions of all Cocoa classes and methods, it also has a number of extended discussions about particular aspects of Cocoa programming. These are well worth reading once you have picked up the basics, perhaps from here.

Previous Page: Installing the developer tools | Next Page: First Cocoa program - Hello World


text:
Common Lisp/Advanced topics/Numbers/Example 1

Problem: given a function f defined on complex numbers and a square area that contains only one root of the function, find this root.

We will use residue theorem for the function 1/f(x). First we need to be able to calculate integrals on a square path.

The main loop could be made more concise with the use of extended loop syntax. The above function is very procedural in nature. You would use the same algorithm in C-like programming languages. Still, Lisp has a little advantage due to its native complex number support and the fact that case returns value, unlike switch in C.

Note the use of float function that converts the result of division to float. Without it, Lisp would operate with rational numbers, and the result won't be pretty (unless you find rationals with 1000-digit denominators pretty). As soon as the function is loaded into Lisp, you can test it:

This correlates with the theory that predicts 2πi being the result.

Now, the corollary of the residue theorem states that there is a pole in the area iff the path integral that goes around that area is not zero. We can write a simple function on top of the previous one that provides what we need:

The return value would be useful in the recursion-terminating case of the next function, which divides a square into 4 smaller squares and uses indirect recursion to complete its task.

Now, this is an example how functional programming can save lines of code. We define a small helper function that uses its lexical environment to know the values of f, start, h and precision, so the only thing we need to pass to it is the upper-right corner of the square. The power of or macro saved some superfluous branching as well. This function, while elegant, is quite hard to understand. It's a good exercise to work out what do check-pole and find-pole return in different situations and how their return values affect the control flow.

Finally, to find a root of function f we need to find a pole of 1/f. This is quite easy to do.

Let's test it. f(x)=x²+2 has two complex roots: ±sqrt(2)*i. Let's see if our program can find the upper one:

Looks like the right answer!


text:
Introduction to Psychology/Introspection

Introspection, in psychology, means to examine experience for its constituents, or elements. It was utilized by the first psychologist (Wilhelm Wundt) as a method of discovering the elements of conscious experience. Basically, Wundt showed visual stimuli to well-trained subjects and asked them what elements they were experiencing. The method proved to be unreliable as other researchers, using other subjects, discovered other elements than Wundt. Wundt's first student in America, Bradford Titchner, had just such a long-running disagreement with Wundt.

The common use of "introspection" today is to look inward in an effort toward self-understanding. While both the present-day and the historical uses of the term utilize observations of unknown veracity, it is important to note that psychology, historically, used the method to examine sensory phenomena to deduce elements of mental experience, not explanations for individual behavior.


text:
How To Become A Good Student/Chapter 2 - Concentration On Studies

Concentration Is Like Salt Used For Food
After eagerness comes concentration on studies. One may think that motivation is all that one requires to become a good student, but it is not this easy. Remember: the journey never has a quick end. Education is what schools, colleges and universities are all made for. Concentration isn't something which is always required, but when it is, it must be done whether it is difficult or easy. It can take a long time for some people to learn how to properly concentrate in a given environment, but like in meditation or prayer, it will come with time and practice.

Concentration can be made easier following these steps:
 * 1) Arouse Concentration By Increasing Its Consciousness In Your Mind
 * One can arouse concentration by spending extra time with some good educational chores, or spending time on the Internet searching for good articles at Wikipedia. Yeah! Wiki Rules!
 * You can also try chewing thick pieces of gum. The deep muscle exercising of your jaws can help you focus on the task at hand. Some people find bouncing on a big ball while studying will also move those muscles in much the same way.
 * 1) Reading Books
 * Reading good books can arouse concentration towards studies sometimes. Try reading books related to your favorite hobbies, subjects, role models, etc.
 * 1) Good Hobbies
 * Reading books can actually belong in this category. Like other good hobbies, it not only arouses concentration for studies, it also arouses concentration for lifetime processes.
 * 1) Discussion On Projects
 * Discussion on certain good subjects (e.g., physics phenomena) also leads to concentration automatically. It can also help you to remember important information in those subjects, as discussing things will often embed concepts and key facts deeper into your mind.
 * 1) Environment
 * Make sure there is nothing to distract you. You should have a working surface such as a desk in front of you, but some people may prefer to work on the floor. Remember that the optimum goal is to achieve comfort so that you can focus on your work. Clear everything off your desk or other surface so that you only have what you need on it. Nothing can make work harder than continuously looking for space to put your books, so put things you don't need on a shelf or somewhere else where they will not distract you. On top of that, make sure that there is nothing which may divert your attention away from your work such as a game, or even any books and papers which you don't need. Some people will be surprised at how much their mind can wander when they are trying to do work!

 * Make sure you have done your dishes, cleaned the sink, and that you have done all the other things you suddenly 'want' or 'need' to do when you should start studying. Another option is to do your work in the library. Many libraries will provide a room which is specially designed for studying in. They may even go so far as to provide some light music to listen to while you work!

 * One major thing that you want to avoid is doing your homework on your bed, in the kitchen or in the lounge room. Your mind is conditioned to performing different activities in these rooms which do not require the same level of concentration as when you are studying. For example, if you try doing work on your bed, you may suddenly feel tired! This is because your body is used to sleeping on a bed, not doing work. Another negative effect is that you may find it harder to sleep at night, as your body becomes confused as to whether it should be concentrating or relaxing.
 * For the same reasons, try to avoid the following:
 * Eating heavy meals at your designated work area. (Light snacks might be acceptable for some people)
 * If you are able, try not to do your work on your computer desk if you use it mostly for playing games. That's why many houses have a 'study' room.
 * With time, your body will become used to concentrating at your work area, and you may find studying much easier after a while!
 * 1) Time
 * Time is important in two ways. First, think about when you are most able to study, when you are most awake. Is it in the morning, the afternoon or in the evening? Study at that time. Second, don't try to study for a whole day, or even a whole afternoon. Study for 45 minutes or an hour and take a break of about 15 minutes.
 * Students can increase their concentration by doing exercises and yoga in the morning. One of the best tips being tried by many Indian students to increase their concentration is Brahmari pranayam.
 * To practice it:
 * Sit in a relaxed posture
 * Take a deep breath inside
 * Close both of your eyes using your index and middle finger
 * Close your nose with your third finger
 * Close your ears with your thumbs
 * Exhale slowly

Use your creativity One effective way of developing deeper level of understanding is to use creative skills to think on the subject. One can do that by trying to arrive at the conclusion from a different point of view, or by trying to make original questions. This technique is elaborated here. Following these can help your concentration and increase your comfort so that you can focus on the work at hand.

That's it for here. Let's learn manners next.


text:
How To Become A Good Student/Chapter 3 - Behavior

Manners, The One Behind Your True Reputation
Whether you are a president at a conference or a normal guy in the street, your reputation is what your respect determines it all and the one behind your reputation is "Manners". Manners is almost everything you can represent at a meeting or anywhere in the world other than your contributions. Excellent behavior leads to excellent results. Behavior also determines the quality & dignity a person has. Behavior is developed easily in students, though it takes time.

Ways To Behave
Good behavior should become a way of life, not just something that is shown or talked about. The ways to behave differs from situation to situation, for example.

If a man talks to you by saying "Hello!" or "Good Evening!" or "Good Afternoon!", your reply will absolutely be positive like " Hello! Nice to meet you too!"

Situations can be of two types:-

1.) Positive Situations - As illustrated in the example given above

2.) Negative Situations -

Example:- If someone teases you, you'll probably say a negative reply like "Stop teasing me, you idiot!!!"

Although someone can arise you to say a negative reply, you can say a reply which is not rude but still negative.

Example:- Watch "MTV's Boiling Points". In a situation, you'll see that the one who passes the time of the Boiling Point always/probably uses negative replies which aren't rude.

Behaving At School/University
So how does all this behavior fit into your education? Well first of all you may find it much easier to deal with pressure, and you won't take it out on the people you love, but you can also use it to win the favour of your teacher. Giving out a pleasant, positive atmosphere is sure to make you stand out in your classes, and your teachers may be more willing to help you succeed.

So always try your best to be on your best behavior, no matter wherever you are, because it determines your respect in the world. Let's move onto management.


text:
GCSE Science/Parallel and series circuits revision questions

WHEN THE VOLTAGE INCREASES, WHAT WILL HAPPEN TO THE CURRENT? How is voltage calculated in series and parallel circuits?

how do you change the amount of electrons going round the circuit?


text:
Programming Mac OS X with Cocoa for Beginners/First Cocoa program - Hello World

Previous Page: Getting around in Xcode and Interface Builder | Next Page: Objective C, the language and its advantages

In the last chapter, we made a version of "Hello World" just by adding the text to a window in Interface Builder. You may have felt that this was cheating a little, as we haven't even written a line of code yet. We'll now revisit "Hello World", but this time do it in code.

First, we need to know a little bit about writing code for Cocoa. Cocoa is programmed in Objective-C, a small extension to the C language. If you know C, Objective-C is very easy to learn. If you know C++, it's far simpler while embodying many of the same basic concepts, and more. If you know another language, you should be able to pick it up easily enough.

Objective-C, is, as its name might suggest, a version of C that supports Objects, or Object-Oriented Programming (OOP). Some people that have come from a traditional procedural language background find object-oriented a bit alien at first, but those with no programming experience at all often do better, because OOP is much closer to how we deal with things in the real world.

Most objects in the real world have a defined purpose, a set of properties, and a particular way that they are best used. Think of the everyday task of making a cup of tea. Several objects are involved, each with their particular role in the overall task. A tap provides water; a kettle raises its temperature to boiling point; a cup provides a container for the tea, and so on. The kettle for example, has particular properties — how much water it can contain, its operating voltage, the material it is made from. It also has one main job — to boil the water. In OOP terms, the boiling operation is a method of the kettle object, as is the pour into cup operation. All objects are described in terms of their properties and their behaviours (methods). It is the same in an OOP programming language.

A collection of methods and properties is defined in the idea of an object which we call a class. The class 'kettle' is just the idea of a kettle, it is not any particular kettle. When we want an actual kettle, we are then talking about a concrete example of a kettle, which in OOP programming we call an instance of the class 'kettle'. This distinction is important — we will occasionally define a class of object, but this on its own will do nothing until we make an actual concrete example of that class, or instantiate it. A class definition describes the properties and methods of the object, but only the instance actually has those properties, and is able to carry out the methods. Usually, when we are casually talking about "objects" within the program, we are talking about instances of objects.

In Objective-C, an instance of an object is referenced by a pointer variable:

NSString* myString;

This references an NSString object with the variable name 'myString'. Note: all Cocoa's built-in classes start with 'NS'. Your own classes should probably adopt a naming convention of your own device — perhaps your initials. This is just to make sure that there is no ambiguity between the classes Cocoa provides and any you create. Another example:

GCKettle* teasMaidK2;

One of the key goals of OOP programming is to hide implementation details from the user of an object — for example, we don't care whether a kettle boils the water using a resistive element or an exotic molecular jiggler device, we only care that the water boils when we press the 'boil' switch, or some short time after. Similarly, users of objects in a program should generally be designed to not care about how objects work, only that they give the expected results on demand. This means that in order to examine the properties of an object, we should not rudely peek directly at the innards of the object, but instead ask the object politely to tell us the value of a particular property. Some properties of an object are fixed, others changeable. In OOP-speak, we call this 'immutable' and 'mutable' respectively. Since we can ask for properties, or change them, or set a method going such as 'boil', all of these things are achieved in the same way, which is by sending a message to the object. Because we are hiding the implementation details of the object, all properties are in fact accessed via methods, so the distinction between them is fairly blurred.

In Objective-C, we send a message to an object by using a square bracket notation:

[teasMaidK2 boil];

This sends the message 'boil' to the kettle object 'teasMaidK2'.

We can also obtain information about properties in the same way:

NSColor* kettleColor = [teasMaidK2 color];

This sends the message 'color' to the kettle object. It responds by returning the value of the 'color' property and assigns it to 'kettleColor'.

Very often, we need to supply additional information to a method so it knows what we want. This extra information is called the method's parameters. Objective-C has a very interesting way of passing parameters, one that might look strange at first, but which has some great advantages. Suppose we have a kettle that can operate on either 220 V or 110 V AC, and we can change it using a method called setVoltage. We need to tell it what voltage to use, and it's as simple as:

[teasMaidK2 setVoltage:110];

We simply put a colon and the value of the parameter.

Where it gets interesting is when there is more than one parameter to a method. C and C++ programmers (and most others) are used to using commas to separate a list of parameters, such as:

object->setColor( 255, 128, 0 );

Looking at this, you have no idea what the three parameters actually are — you would have to look it up in the header to find the original definition, hoping that the programmer actually included the information (some languages such as C don't require parameter names here, so you could still be in the dark):

void setColor(int green, int red, int blue);

Note that if you assumed it was in order red, green, blue you'd have been wrong!

Objective-C takes a different approach, one that saves you the trouble of looking up the header to simply read the code, and it makes it much more self-documenting. For example:

[teasMaidK2 setColorWithRed:128 green:255 blue:0];

In Objective-C, the parameter names are part of the overall method name; they can't be missed out. The actual method is called "setColorWithRed:green:blue:" The colons are also part of the unique method name, so setVoltage and setVoltage: are two distinct methods. This often catches out beginners, so make a note of it.

Method calls in Objective-C can be nested as required, e.g.

[teasMaidK2 setVoltage:[mainsSupply outputVoltage]];

Note that the square brackets as used for array indices in C are still available without ambiguity:

[teasMaidK2 setVoltage:supply[2]];

Don't call us, we'll call you
When should you call a method? Whenever you want information or action from another object. However, very often, it's not you that wants to know — it's Cocoa itself, and you are expected to provide the answer. In practice, writing applications with Cocoa needs both, but there are many places where you will simply be expected to provide answers on demand. Again, classically-oriented programmers often have trouble with this idea; they are used to having complete control, and asking the operating system to do things for them. OOP tends to turn things on their heads a bit — make the right object, put it in the right place and wait for it to be called upon. Again, this is more like real life, where you as an employee have a particular role — your boss will give you tasks, you carry them out. It's not your job to run the whole company, just to do your little bit. You might delegate part of your task to others, or request information from others to get the job done, but your boss doesn't care as long as he gets his results.

In this exercise, we will in fact be doing just this — creating an object that will be called upon by Cocoa to perform a little task for it. What is the task? It's to draw the famous words "Hello World" to the screen when needed.

To do this, we need to make an object that we can be sure will be called upon whenever a window's contents needs to be drawn. Later in this text, we will go into this in much more detail, but for now we'll just gloss over the basics. In Cocoa, stuff that is drawn in windows is actually drawn by objects called views. A button that you can click is a view, for example, as is the "Hello World" text that we added in the first part. Views can contain other views, so a complex hierarchy of them can exist. Here though, we will keep it simple.

We'll need a custom view that 'knows' how to write "Hello World"; that is, it contains code that will accomplish this when called upon by Cocoa.

In all OOP frameworks such as Cocoa, another main goal is to make coding as efficient as possible by maximizing reuse of code. The idea is to solve a typical kind of problem once, then allow the programmer to leverage that solution in their own work rather than starting again from scratch, which is usually just a waste of valuable time. In Cocoa, the 'problem' of drawing all sorts of things in windows has already been solved by the views classes, so we do not need to solve this problem again. Instead, we can make use of the existing code and simply extend it a little bit to do the unique thing that we want it to do, without worrying about the rest. This customisation of existing classes is called subclassing. We will subclass Cocoa's NSView class, and then write some code to make it do the unique extra thing we want.

Interface Builder contains some neat helper tools to make this task very easy. Go into Interface Builder by double-clicking "MainMenu.nib" in the left hand panel of Xcode. Double-click the Window icon to make the window come to the front. Select and delete the "Hello World" text. In the library go to the map Cocoa and submap `views & Cells` (for Xcode versions prior to Xcode 3.1 it is in the tools palette). Drag the 'CustomView' into the window and drop it.

Drag the selection handles to position the view where you'd like — for this exercise, don't make it fit exactly to the whole window; leave a bit of a margin. Note how Interface Builder gives you guidelines as you move and size the custom view. These guidelines are a boon for neatly laying out more complex interfaces.

At the moment, "CustomView" is just a placeholder for the view we are going to make, so next we need to define a class for the custom view. IB will help us. Go back to the main IB window, titled "MainMenu.nib (English)", and click the tab button marked 'Classes'. This shows a column view of lots of classes, starting with 'NS'. Find NSObject→NSResponder→NSView and select it. A number of existing NSView subclasses will show to its right, but we don't need those now — we want to add to this list. With NSView selected, choose Classes→Subclass NSView. A new item is added to the list, with its name highlighted. Type in a descriptive name for the class. If you are using XCode 3.0 or greater, Apple changed the way to do this step. In XCode, right click in the folder "Other Sources", then mouse over "Add", then "New File...". Under the Cocoa heading, choose "Objective-C Class" from the icon list, then in the drop down list below that area, select "NSView subclass". Type in your name in place of untitled, and leave the other stuff alone. I used 'GCHelloView' because GC are my initials, and HelloView is reasonably descriptive. Avoid the temptation to use silly or obscure names — you'll regret it later!

Now go back to the window and click on CustomView to select it. Choose Tools→Show Identity Inspector. A new palette appears, which allows you to set the properties of objects. In the pop-up menu, choose "Custom Class". A list appears. Find your custom class name ('GCHelloView' in my case) and select it. You'll see that the name of the view in the window changes to this name.

The next step is to get IB to actually create some skeleton code for this new class. Go back to the main window and its "Classes" panel. Ensure your custom view class is selected, and choose Classes→Create Files for GCHelloView (or whatever you named it). A dialog opens asking whether you want the files added to the project. Of course you do, so the defaults are fine. Click Choose. The files are created and added to Xcode automatically. If you're using a version of XCode larger than 3.0, however, don't worry — you created these files earlier during the process of adding them. We're done with IB for now, so save the changes, and return to Xcode.

In the left-hand panel of your Xcode project, drill down to HelloWorld/Other Sources. You'll see two files added there: GCHelloView.h and GCHelloView.m (or whatever name you chose). The .h file is the header, as with any C program. The .m file contains the Objective-C code. Select the .h file. The main area of the Xcode window changes and displays the content of this file. (By the way, you might like to make the text part bigger by dragging the split bar upwards — the top area isn't very interesting here and can be made much smaller.) The interesting part looks like:

@interface GCHelloView : NSView { } @end

This is how a subclass is defined in Cocoa — everything between '@interface' and '@end' is the class definition. The class name is GCHelloView, and it is a subclass of NSView. Because our class doesn't implement any new methods, it will just reimplement (or override, as we call it) existing NSView methods, the definition is empty and we don't need to add anything here. Note: C++ programmers might find this a bit odd — in C++ we must explicitly declare which methods we are going to override; in Objective-C we just do it, which saves ourselves a little effort.

OK, to the code! Select the .m file. You will see two method skeletons there, one called 'initWithFrame:', and one called 'drawRect:' (remember, a colon is an intrinsic part of a method's name). For this exercise, we don't need to worry about the initWithFrame: method; all of our code will go in the drawRect: method.

First though, what happens if we build and go now? Try it! You'll see that everything compiles just fine, the program runs, and the window is blank once more (assuming you took the old text out in IB). OK, quit and go back to the editor.

This time, we want to make the text we write in the window a lot more impressive, so we'll make it use a large font size and a bright color. The way that Cocoa specifies fonts and so forth when rendering strings is to use a dictionary of attributes. This is an object which simply associates a named property with a value. The font property is named "NSFontAttributeName", and the color of the text attribute name is "NSForegroundColorAttributeName". These names are called the keys of the attributes. First we'll set up these attributes, then draw the string using them. Here's the code:

Type that in exactly as given, and hit "Build and Go". Your application should greet you in large red letters! (If the text doesn't show up, try making the "GCHelloView" box in IB larger.) This code might look a little complex for such a trivial task as drawing a large red string, but in some ways that's because this task is a little artificially contrived. However, it's not that complex, let's look at it line by line.

The top five lines are simple variable declarations as you'd find in any C routine. The pointer variables with the name 'NS…' indicate that these are references to Cocoa objects. We declare a simple fixed string first, containing the text "Hello World". This is an NSString object. This object is very different from an old-style C string, though here we use it in a very similar way. NSStrings are objects containing a text string which is encoded in a particular way, such as Unicode. NSStrings are more than mere containers, however; they have many methods for performing operations on strings. We'll revisit it later, but for now we just use it in a fairly dumb manner. Note that NSString constants are preceded by the '@' symbol and surrounded by quote marks.

The attributes are stored in a NSDictionary object which here is mutable — that is, we wish to change it so that we can set up the attributes, so we use an NSMutableDictionary object. The color and font information is encapsulated in NSColor and NSFont objects.

Note that NSPoint is not a class but a plain old C type. It is a struct consisting of two floats x and y representing coordinates. That is why p is not a pointer variable like hws or attribs.

Now we will tell the text WHERE it will be drawn within the window. 'p' is just a coordinate which is 10 pixels in from the left, and 100 pixels up from the bottom of the view.

Next we instantiate the dictionary object — that is, we make a concrete object of the class NSMutableDictionary. The line that does this is one you will encounter again and again — the first method alloc reserves memory for the object and returns it; the second one, init, asks it to initialise itself (whatever that means in practice); and the third tells it to "autorelease" itself. We'll discuss what that means later. Hold on, you might be saying — what object is being called with the alloc method? We haven't made the object yet! In fact, alloc is an example of a class method, which is a method that doesn't require a concrete example of the object, the class itself knows what to do. Class methods are common — we'll encounter two more in a minute — and very useful. They allow us to perform generic operations that pertain to the class of object without actually having an object available. Very often these class methods return actual objects — they are known as factory methods in OOP-speak. A class method is called very simply by using the name of the class in place of an object instance variable, e.g.

red = [NSColor redColor]; /* class method */

is a class method but:

bright = [red brightnessComponent]; /* instance method */

is an instance method.

Two more factory methods follow — the first to make an object embodying the color red, the second a font object embodying the font 48 point Times Roman. These are then added as attributes to the dictionary using the appropriate keys.

Finally, we are all set and ready to draw. The last line accomplishes this. Note that it is a method of NSString itself — the string knows how to render itself, provided we give it enough information. So we tell it where, and what attributes we'd like it to use. Note that what we didn't tell it was WHEN to draw the string. Instead, we just made the method available, knowing that Cocoa would call upon it when required. Cocoa will do this when it needs to refresh the content of the window — at such times, the documentation tells us that a view's drawRect: method will be called, so provided we put our code there, it will get called as needed.

Gilding the lily
Let's add a little more code, just for fun. At the end of the method, before the closing brace, add:

[[NSColor blueColor] set]; NSFrameRect([self bounds]);

Hit Build & Go (command-R), and see what that does. Maybe you can guess?

The first line is a class method on NSColor to get us a blue color object, then call its 'set' method. This simply establishes that color as the one that will be used for drawing whatever happens to be drawn next. This is a handy way of setting up colors, and you will use it often. Finally we use a simple C function, 'NSFrameRect' which draws a rectangular frame. The interesting thing here is that the rectangle it draws is a property of the view itself, called bounds. To ask an object for one of its own properties, or to call one of its own methods we use the object reference 'self'. This always refers to the object in which the code itself resides, so it's a very handy way of talking to yourself. The bounds of a view is the space it occupies within its parent view or window.

Previous Page: Getting around in Xcode and Interface Builder | Next Page: Objective C, the language and its advantages


text:
Introduction to Business/Overview

When we look around us, we observed that most of the people are engaged in one activity or the other. Teacher teach in the school, farmers work in the fields, workers work in the factories, drivers drive vehicles, shopkeepers sells goods, doctors attend to patients and so on. In this way,people are busy during the day and sometimes during the night throughout the year. Now the question WHY we all keep ourselves busy. The answer is to satisfy our wants. By doing so, we either fulfill various obligations or earn money through which we can buy goods and commodities.

Business is a human activity in order to satisfy our wants.

Human Activities
Activities which human being undertake are known as human activities. These may be cultivating land, growing plants, rearing animals, teaching in school or college, working in a factory or office, watching television, listening radio, reading newspaper, worshiping in a temple, playing football, etc. We can divide this activities into two broad categories as (i) economic activities (ii) non-economic activities

(i) Economic activities

Activities, which are performed with an objective to earn money, are known as economic activities. For example, a farmer grow crops to sell them, a factory or office employee works and gets wage or salary, a businessman earns profit through buying and selling of goods.

(ii) Non-economic activities

Activities which are not performed to earn money but to get some satisfaction

Types of Businesses
Sole Proprietorship

A sole proprietorship is a business run by one person. This one person, known as a proprietor, has the advantage of being in control of the entire business, and having all the income of the business going directly to him or her. The downside of this is that a Sole Proprietorship is not taxed as a business entity, so all income of the business is taxed as personal income tax. Additionally, the proprietor has Unlimited Liability meaning that if the business goes under, and the assets of the business are insufficient to satisfy the debts of the business, the creditors can seize the personal assets of the proprietor.

Partnership

A partnership is a firm run by more than one person. These people are all known as partners of the company, and they have the advantage of sharing the losses, but have to share the profits too. The percentage of sharing loses and profits could be determined according to the partnership agreement drawn between the partners, they vary from country to country. The partners make all decisions collectively, and each partner is responsible to the others for any decision he makes with relation to the business. Each partner, by the virtue of being a partner, represents the business and is expected to act in ways that won't be detrimental to the business. New Partners are added for their expertise. Partnerships are easy to form usually professionals lawyers, doctors and consultants form partnership to benefit from the expertise of each other.

Private Limited Companies

A private limited company too can have just two shareholders. However the shareholders of a private limited company could be limited to family members or friends. A private limited company is formed by registering the memorandum and articles of association with the local registrar of companies. The shareholder liability is limited to the authorized share capital. It is less complex to form unlike a public limited company. The rules and regulations on the formation of a private limited company have to be checked out with your local chamber of commerce or registrar of companies. The accounts of a private limited company have to be audited by independent auditors and board of director; they meet regularly to make decisions and they have an annual general meeting when all shareholders meet to discuss the wider management issues of the company.

Corportations

A corporation is created as a separate legal entity that has privileges and liabilities that are distinct from those of its owners. Despite not being a natural person, corporations are recognized by the law, in some countries and the USA in particular, as having the same legal rights and responsibilities as natural persons ("people"). The formation of a corporation protects the owners against unlimited liability. As long as the business operates legally it is liable to it's creditors only the value of the assets of the business. If the corporation fails the investors are liable only for the assets of the business.

title: Introduction to Business/Overview


text:
Talk:Engineering Thermodynamics/Thermodynamic Systems

There appears to be an error on this page. The text 'InsertFormulaHere' near the bottom of the page is the vicinity of this error.

 * Think I've fixed it now. --Aleksev 19:08, 17 January 2006 (UTC)

Possible Error?
The following comment is in referrence to the following sentence in this page:

"Volume is an extensive property, but both volume per mass and molar volume are intensive properties since they depend on the measured mass of the system"

Don't you mean to say that:

"..., but both volume per mass and molar volume are intensive properties since they DO NOT depend on the measured mass of the system"

or

"..., but both volume per mass and molar volume are intensive properties since they are INdependENT of the measured mass of the system" ?


text:
Digital Signal Processing/Continuous-Time Fourier Transform

The Continuous-Time Fourier Transform (CTFT) is the version of the fourier transform that is most common, and is the only fourier transform so far discussed in EE wikibooks such as Signals and Systems, or Communication Systems. This transform is mentioned here as a stepping stone for further discussions of the Discrete-Time Fourier Transform (DTFT), and the Discrete Fourier Transform (DFT). The CTFT itself is not useful in digital signal processing applications, so it will not appear much in the rest of this book

CTFT Definition
The CTFT is defined as such:

 * $$\mathcal{F}(\omega) = \int f(t) e^{-j \omega t} dt$$

Convolution Theorem
Multiplication in the time domain becomes convolution in the frequency domain. Convolution in the time domain becomes multiplication in the frequency domain. This is an example of the property of duality. The convolution theorem is a very important theorem, and every transform has a version of it, so it is a good idea to become familiar with it now (if you aren't previously familiar with it).


text:
Digital Signal Processing/Discrete-Time Fourier Transform

The Discrete-Time Fourier Transform (DTFT) is the cornerstone of all DSP, because it tells us that from a discrete set of samples of a continuous function, we can create a periodic summation of that function's Fourier transform. At the very least, we can recreate an approximation of the actual transform and its inverse, the original continuous function. And under certain idealized conditions, we can recreate the original function with no distortion at all. That famous theorem is called the Nyquist-Shannon sampling theorem.

DTFT

 * $$X(e^{j\omega}) = \sum_{n=-\infty}^\infty x[n]e^{-j\omega n}$$

The resulting function, $$X(e^{j\omega})$$ is a continuous function that is interesting for analysis. It can be used in programs, such as Matlab, to design filters and obtain the corresponding time-domain filter values.

DTFT Convolution Theorem
Like the CTFT, the DTFT has a convolution theorem associated with it. However, since the DTFT results in discrete-frequency values, the convolution theorem needs to be modified as such:

Energy
It is sometimes helpful to calculate the amount of energy that exists in a certain set. These calculations are based off the assumption that the different values in a set are voltage values, however this doesn't necessarily need to be the case to employ these operations.

We can show that the energy of a given set can be given by the following equation:

 * $$\mathcal{E}_x = \sum_{n=-\infty}^\infty \left| x[n] \right| ^2$$

Energy in Frequency
Likewise, we can make a formula that represents the power in the continuous-frequency output of the DTFT:

 * $$\mathcal{E}_x = \frac{1}{2\pi} \int_{-\infty}^\infty \left|X(e^{j \omega})\right|^2 d\omega$$

Parseval's Theorem
Parseval's theorem states that the energy amounts found in the time domain must be equal to the energy amounts found in the frequency domain:

 * $$\sum_{n=-\infty}^\infty \left| x[n] \right| ^2 = \frac{1}{2\pi} \int_{-\pi}^\pi \left|X(e^{j \omega})\right|^2 d\omega$$

Power Density Spectrum
We can define the power density spectrum of the continuous-time frequency output of the DTFT as follows:

 * $$S_{xx}(e^{j\omega}) = \left|X(e^{j \omega})\right|^2$$

The area under the power density spectrum curve is the total energy of the signal.


text:
Digital Signal Processing/Discrete Fourier Transform

As the name implies, the Discrete Fourier Transform (DFT) is purely discrete: discrete-time data sets are converted into a discrete-frequency representation. This is in contrast to the DTFT that uses discrete time, but converts to continuous frequency. Since the resulting frequency information is discrete in nature, it is very common for computers to use DFT(Discrete fourier Transform) calculations when frequency information is needed.

Using a series of mathematical tricks and generalizations, there is an algorithm for computing the DFT that is very fast on modern computers. This algorithm is known as the Fast Fourier Transform (FFT), and produces the same results as the normal DFT, in a fraction of the computational time as ordinary DFT calculations. The FFT will be discussed in detail in later chapters.

DFT
The Discrete Fourier Transform is a numerical variant of the Fourier Transform. Specifically, given a vector of n input amplitudes such as {f0, f1, f2, ..., fn-2, fn-1}, the Discrete Fourier Transform yields a set of n frequency magnitudes.

The DFT is defined as such:

$$X[k] = \sum_{n=0}^{N-1} x[n] e^{\frac{-j 2 \pi k n}{ N }}$$

here, k is used to denote the frequency domain ordinal, and n is used to represent the time-domain ordinal. The big "N" is the length of the sequence to be transformed.

The Inverse DFT (IDFT) is given by the following equation:

$$x[n] = \frac{1}{N} \sum_{k=0}^{N-1} X[k] W_N^{-kn}$$

Where $$W_N$$ is defined as:

$$W_N = e^{-j2\pi/N}$$

Again, "N" is the length of the transformed sequence.

Matrix Calculations
The DFT can be calculated much more easily using a matrix equation:

 * $$\mathbf{X} = \mathbf{D}_N \mathbf{x}$$

The little "x" is the time domain sequence arranged as a Nx1 vertical vector. The big "X" is the resulting frequency information, that will be arranged as a vertical vector (as per the rules of matrix multiplication). The "DN" term is a matrix defined as such:

 * $$\mathbf{D}_N =

\begin{bmatrix} 1     & 1         & 1            & \cdots & 1 \\   1      & W_N       & W_N^2        & \cdots & W_N^{(N-1)} \\   1      & W_N^2     & W_N^4        & \cdots & W_N^{2(N-1)} \\   \vdots & \vdots    & \vdots       & \ddots & \vdots \\   1      & W_N^{N-1} & W_N^{2(N-1)} & \cdots & W_N^{(N-1)(N-1)} \end{bmatrix}$$

In a similar way, the IDFT can be calculated using matrices as follows:

 * $$\mathbf{x} = \mathbf{D}_N^{-1} \mathbf{X}$$

And we will define $$\mathbf{D}_N^{-1}$$ as the following:

 * $$\mathbf{D}_N^{-1} =

\begin{bmatrix} 1     & 1          & 1             & \cdots & 1 \\   1      & W_N^{-1}   & W_N^{-2}      & \cdots & W_N^{-(N-1)} \\   1      & W_N^{-2}   & W_N^{-4}      & \cdots & W_N^{-2(N-1)} \\   \vdots & \vdots     & \vdots        & \ddots & \vdots \\   1      & W_N^{-(N-1)} & W_N^{-2(N-1)} & \cdots & W_N^{-(N-1)(N-1)} \end{bmatrix}$$

Visualization of the Discrete Fourier Transform
It may be easily seen that the term

 * $$ e^{-\pi t} $$

represents a unit vector in the complex plane, for any value of j and k. The angle of the vector is initially 0 radians (along the real axis) for $$j=0$$ or $$k=0$$. As j and k increase, the angle is increased in units of 1/nth of a circle. The total angle therefore becomes $$2\pi*jk/n$$ radians.

To understand the meaning of the Discrete Fourier Transform, it becomes effective to write the transform in matrix form, depicting the complex terms pictorally.

For example, with $$n=8$$, the fourier transform can be written:

 * [[Image:DFT_vis.jpg]]

The top row (or the left-hand column) changes not at all; therefore, F0 is the resultant when the amplitudes augment each other. The second row changes by 1/nth of a circle, going from left to right. The third row changes by 2/nths of a circle; the fourth row changes by 3/nths of a circle; the fifth row, here, changes by 4/nths = 4/8 = 1/2 a circle. Therefore, F4 is the resultant when the even terms are set at odds with the odd terms.

We therefore see from the square matrix that the DFT is the resultant of all 2-D vectoral combinations of the input amplitudes.

Relation to DTFT
The DFT and the DTFT are related to each other in a very simple manner. If we take the DTFT of a given time sequence, x[n], we will get a continuous-frequency function called $$X(e^{j\omega})$$. If we sample $$X(e^{j\omega})$$ at N equally-spaced locations, the result will be the DFT, X[k]

Circular Time Shifting
Circular Time Shifting is very similar to regular, linear time shifting, except that as the items are shifted past a certain point, they are looped around to the other end of the sequence. This subject may seem like a bit of a tangent, but the importance of this topic will become apparent when we discuss the Circular Convolution operation in the next chapter.

Let's say we have a given sequence, x[n], as such:

x[n] = [1& 2 3 4]

As we know, we can time-shift this sequence to the left or the right by subtracting or adding numbers to the argument:

x[n+1] = [1 2& 3 4 0]

x[n-1] = [0& 1 2 3 4]

Here, we've padded both sequences with zeros to make it obvious where the next item is coming in from. Now, let's say that when we shift a set, instead of padding with zeros, we loop the first number around to fill the hole. We will use the notation x[] to denote an A-point circular shift:

x[] = [2& 3 4 1]

Notice how the length of the sequence started as 4, and ended as 4, and we didn't need to pad with zeros. Also notice that the 1 "fell off" the left side of the set, and "reappeared" on the right side. It's as if the set is a circle, and objects that rotate off one direction will come back from the other direction. Likewise, let us rotate in the other direction:

x[] = [4& 1 2 3]

If we rotate around by N points, where N is the length of the set, we get an important identity:

x[] = x[] = x[n]

Time Inversion
Now, let's look at a more complicated case: mixing circular shifting with time inversion. Let's define our example set x[n]:

x[n] = [1& 2 3 4]

we can define our time-inverted set as such:

x[n] = [4 3 2 1&]

notice that the "4" went from n=3 to n=-3, but the "1" stayed at the zero point. Now, let's try to combine this with our circular shift operation, to produce a result x[<-n>]. We know that the "1" (in the zero position) has not moved in either direction, nor have we shifted to the left or right, because we aren't adding or subtracting anything to our argument (n). So we can put 1 back in the same place as it was. All the rest of the numbers (2 3 and 4) all shifted to the right of the sequence, and therefore we will loop them around to the other side:

x[<-n>] = [1& 4 3 2]

Here is a general rule for circular time-inversion:

 * $$x[<-n>] = \left\{

\begin{matrix} x[0], & \mbox{if }n = 0 \\    x[], & \mbox{if }n \ne 0 \end{matrix}\right.$$

Circular Convolution
Circular Convolution is an important operation to learn, because it plays an important role in using the DFT.

Let's say we have 2 discrete sequences both of length N, x[n] and h[n]. We can define a circular convolution operation as such:

 * $$y[n] = \sum_{m=0}^{N-1} x[m]h[_N]$$

notice how we are using a circular time-shifting operation, instead of the linear time-shift used in regular, linear convolution.

Circular Convolution Theorem
The DFT has certain properties that make it incompatible with the regular convolution theorem. However, the DFT does have a similar relation with the Circular Convolution operation that is very helpful. We call this relation the Circular Convolution Theorem, and we state it as such:

Relation to Linear Convolution
Circular Convolution is related to linear convolution, and we can use the circular convolution operation to compute the linear convolution result. Let's say we have 2 sets, x[n] and h[n], both of length N:

 * 1) pad both sets with N-1 zeros on the right side.
 * 2) perform the circular convolution on the new sets of length N+(N-1)
 * 3) The result is the linear convolution result of the original two sets.

Fast Fourier Transform (FFT)
The Fast Fourier Transform refers to algorithms that compute the DFT in a numerically efficient manner.Algorithms like:-decimation in time and decimation in frequency. This is a algorithm for computing the DFT that is very fast on modern computers.


text:
Digital Signal Processing/Z Transform

The Z Transform has a strong relationship to the DTFT, and is incredibly useful in transforming, analyzing, and manipulating discrete calculus equations. The Z transform is named such because the letter 'z' (a lower-case Z) is used as the transformation variable.

z Transform Definition
For a given sequence x[n], we can define the z-transform X(z) as such:

 * $$\mathcal{Z}(x[n]) = X(z) = \sum_{n=-\infty}^\infty x[n]z^{-n}$$it is important to note that z is a continuous complex variable defined as such:

 * $$z = Re(z) + j Im(z)$$ where $$ j = \sqrt{-1} $$ is the imaginary unit.

There can be several sequences $$ x[n] $$ which will generate the same z-transform $$ X(z) $$ with the different functions being differentiated by the convergence region of $$ z $$ for which the summation in the z-transform will converge. These convergence regions are annuli centered at the orgin. In a given convergence region, only one $$ x[n] $$ will converge to a given $$ X(z) $$.

Example 1

 * $$ x[n] = \left\{ \begin{array}{ll} 0 & n < 0 \\ a^n & n \ge 0 \end{array} \right. $$

 * $$ X(z) = \sum_{n=-\infty}^{\infty} x[n] z^{-n} = \sum_{n=0}^{\infty} a^n z^{-n} = \frac{1}{1- a z^{-1}} $$ for $$ \left| z \right| > \left| a \right| $$

Example 2

 * $$ x[n] = \left\{ \begin{array}{ll} - a^{n} & n < 0 \\ 0 & n \ge 0 \end{array} \right. $$
 * $$ X(z) = \sum_{n=-\infty}^{\infty} x[n] z^{-n} = \sum_{n=-\infty}^{-1} - a^{n} z^{-n} = - \sum_{n=1}^{\infty} a^{-n} z^{n} = - \left( \frac{1}{ 1 - z a^{-1} } -1 \right) = \frac{1}{1 - a z^{-1} } $$  for $$ \left|z\right| < \left| a \right| $$

Note that both examples have the same function $$ X(z) $$ as their z-transforms but with different convergence regions needed for the respective infinite summations in their z-transforms to converge. Many textbooks on z-transforms are only concerned with so-called right-handed functions which is to say functions $$ x[n] $$ for which $$ x[n] = 0 $$ for all $$ n $$ less than some initial start point $$ N_i $$ ; that is, $$ x[n] = 0 $$ for all $$ n < N-i $$. So long as the function grows at most exponentially after the start point, the z-transform of these so-called right-handed functions will converge in an open annulus going to infinity, $$ \left| z \right| > R $$ for some positive real $$ R $$.

It is important to note that the z-transform rarely needs to be computed manually, because many common results have already been tabulated extensively in tables, and control system software includes it (MatLab,Octave,SciLab).

The z-transform is actually a special case of the so-called Laurent series, which is a special case of the commonly used Taylor series.

The Inverse Z-Transform
The inverse z-transform can be defined as such:

 * $$x[n] = \frac{1}{2 \pi j} \oint_C X(z) z^{n-1} dz$$

Where C is a closed-contour that lies inside the unit circle on the z-plane, and encircles the point z = {0, 0}.

The inverse z-transform is mathematically very complicated, but luckily—like the z-transform itself—the results are extensively tabulated in tables.

Equivalence to DTFT
If we substitute $$z = e^{j\omega}$$, where $$\omega$$ is the frequency in radians per second, into the Z-transform, we get

 * $$Z(e^{j\omega}) = \sum_{n=-\infty}^{\infty} x[n]e^{-j\omega n}$$

which is equivalent to the definition of the Discrete-Time Fourier Transform. In other words, to convert from the Z-transform to the DTFT, we need to evaluate the Z-transform around the unit circle.

Properties
Since the z-transform is equivalent to the DTFT, the z-transform has many of the same properties. Specifically, the z-transform has the property of duality, and it also has a version of the convolution theorem (discussed later).

The z-transform is a linear operator.

Convolution Theorem
Since the Z-transform is equivalent to the DTFT, it also has a convolution theorem that is worth stating explicitly:

Y(s)=X(s).H(s)

Z-Plane
Since the variable z is a continuous, complex variable, we can map the z variable to a complex plane as such:

Transfer Function
Let's say we have a system with an input/output relationship defined as such:

Y(z) = H(z)X(z)

We can define the transfer function of the system as being the term H(z). If we have a basic transfer function, we can break it down into parts:

 * $$H(z) = \frac{N(z)}{D(z)}$$

Where H(z) is the transfer function, N(z) is the numerator of H(z) and D(z) is the denominator of H(z). If we set N(z)=0, the solutions to that equation are called the zeros of the transfer function. If we set D(z)=0, the solutions to that equation are called the poles of the transfer function.

The poles of the transfer function amplify the frequency response while the zero's attenuate it. This is important because when you design a filter you can place poles and zero's on the unit circle and quickly evaluate your filters frequency response.

Stability
It can be shown that for any causal system with a transfer function H(z), all the poles of H(z) must lie within the unit-circle on the z-plane for the system to be stable. Zeros of the transfer function may lie inside or outside the circle. See Control Systems/Jurys Test.

Gain
Gain is the factor by which the output magnitude is different from the input magnitude. If the input magnitude is the same as the output magnitude at a given frequency, the filter is said to have "unity gain".

Properties
Here is a listing of the most common properties of the Z transform.

title: Digital Signal Processing/Z Transform


text:
Blender 3D: Noob to Pro/Creating Blender Libraries

You've finally made that perfect object, armature or material: a gamepiece, a robot, a fully rigged vampire character, or a millimeter-accurate model of the Empire State Building. Besides using this work in your own artistic project, you have made the courageous decision to share that creation with the world.

Sharing your creative work is a great way to "give back to the community," even if you don't write Blender code and you can't translate the Blender documentation to Swahili.

How to Make a Library
So how do you make a library? In Blender, you don't need to export to a special format. In fact, you don't need to do anything special beyond saving your regular .blend file. Every .blend is a library file. Users can Append what they like from your .blend file, and ignore parts which they don't need for their own project.

This scheme has some benefits and some drawbacks.

The benefit of using .blend files as a library format is that it's super easy to include extra stuff to help the user see the objects. If the user loads the .blend file directly, it works like the pretty packaging for foods, including a quick and easy way to get a pretty "serving suggestion" rendering of the library contents. What you save in your .blend is what the user will see when they load it, including all your user interface settings, lighting types, and camera positions.

The drawback of using .blend files as a library format is that it's super easy to include unintended things, such as extra meshes, unused material and texture channels, and other things which the user will not find helpful. Blender doesn't save things which are no longer referenced anywhere, but it cannot read your mind if you leave a spare mesh on layer 13 which uses some abandoned Material.034.

Also, some people are not accustomed to the way that Blender saves all of the user interface settings along with the .blend file. When they load your mesh, they see your way of working. This can be instructive, but unless that's your intention, it's best to try to stick to a simple and clean user interface setup for your library files.

For best results, you need to apply some discipline to publish a clean and useful library.

Library Usefulness Checklist
After having used several library .blend files from various sources, I propose that anyone making libraries follow a few suggestions:

 * keep to a certain object, theme or area of focus for each library file
 * all the test cameras and lights prefixed with a dash; e.g., -Camera, -HemiLight.001, etc.
 * any other components not intended for Appending prefixed with a dash; e.g., -ground
 * all the test cameras and lights on the last one or two layers (lower right layer button)
 * any composite object intended for Appending organized in a group to hold it together
 * any groups, objects, materials, textures intended for Appending given meaningful names
 * document your unit scheme; e.g., 1 blender unit == 1 imperial foot, etc.
 * any other layer contains test-render-ready objects or scenes
 * choose rendering and world settings which will not take an hour to make a simple test render
 * make visible upon loading the layers required for a camera, a good lighting angle, and a shared object
 * make visible upon loading one small text file which lists layers and objects
 * make visible upon loading any python script, with instructions on how to start it in a big comment
 * make your licensing expectations clear: artistic license, creative commons, etc.
 * pack the texture files and other data before saving that final .blend for publishing
 * sign your work, stable email address or website url if possible

The dash prefixes for test-rendering cameras, boxes, floors and lights will help the user know at a glance what to Append and what not to Append from your library.

Here's a quick way to throw out all the stuff you really don't need, including extra meshes, materials and user interface complexity.

 * save your current .blend (and make a nice backup file too)
 * shut down Blender entirely
 * open up Blender again, which will load the default settings
 * delete the cube and cameras from the default settings
 * Append all the useful parts of your library .blend file (including the useful test-rendering items)
 * select the proper test-rendering camera for users to try out your model quickly (select, then Ctrl+KEYPAD0)
 * adjust the views to ensure important things are visible and ready to render
 * save the new library .blend, ready to publish

Blender saves the default settings in a file called .b.blend on your disk. If your own preferred default settings are still too complicated for newcomers to understand, you can move that file away temporarily to get the "factory" built-in default settings which the Blender team produces as a part of each new version of the software. Move the file back again when you want to go back to your individual way of working.

Publishing Your Library
It's helpful to include the .txt file and/or post it separately so that people can read a summary before loading the blend file. This should include any credits, usage notes, layer explanations, and licensing information. For you Unix folks, remember to run it through unix2dos to enforce \r\n CRLF newlines, readable by people with less flexible tools such as Windows Notepad.

It's also of immense benefit to put up small test-renders of your library objects or materials. They don't need to be large but they should give an honest view of the work you're sharing before a potential user takes the time to download library files that will not be useful to them.

So, where do you publish your work of artistic genius?

 * http://www.e2-productions.com/bmr Blender 3D Model Repository -- link has been taken over to serve malware
 * http://blenderartists.org/ forums
 * http://www.deviantart.com/
 * http://www.blendswap.com
 * your own website

If you post things on your own website, try not to rely on a free site that will over-run your bandwidth limits and disappear two months later. Search engine links will sometimes live on for years, just frustrating those who were hoping to find a millimeter-accurate model of the Empire State Building.

Beyond Libraries
If you have even more time to spare, consider writing up a tutorial on how you achieved any tricky results!

Thank You
For every artist who chooses to share their creative works with the community, there are a dozen artists, or even hundreds, who thank you immensely.