text:
Home » Transient Voltage Suppression Diodes
Written by Andrew Levido
A transient voltage suppressor (TVS) as the name implies is a device designed to suppress momentary over-voltage conditions (transients) that might otherwise damage a circuit. Such transients can be caused by very high energy events such as lightning strikes or high voltage switching, or by lower energy (but still fatal to unprotected electronics) sources such as electrostatic discharges from the human body.
Typically, we would rely on metal oxide varistors and gas discharge tubes to manage the former and semiconductor devices to manage the latter. I want to concentrate on semiconductor solutions that might be used to protect high speed signal lines such as USB and HDMI against electrostatic discharge (ESD).
Most commonly we characterise ESD circuits using a "human body model" (HBM) like that shown in Figure 1. This is intended to mimic the level of electrostatic charge a person may accumulate and pass on to the device by touching it. The human body is represented by a 100pF capacitor which is charged to a high voltage and discharged via a 1k5 resistor into the device under test. The capacitor would typically be charged to 2kV, 4kV or 8kV depending on the level of immunity we wish to test for.
FIGURE 1. In the Human Body Model for ESD a person is represented by a 100pF capacitor charged to a high voltage and discharged through a 1k5 resistor. This simulated the level of static charge a person may accumulate moving around in dry conditions. With a 4 kV source, the discharge current peaks at 2.7A.
When charged to 4kV, the HBM can inject a transient of 4kV with a peak current of 2.7A Fortunately, the spike is narrow, typically just a few hundred nanoseconds and contains a total energy of 800µJ. How could we protect a signal line against a transient such as this?
The simplest approach might be to use a simple Zener diode. Consider the general purpose BZT52H family. These are low cost 375mW devices in a surface mount package. They can handle a non-repetitive peak reverse current of around 6A for 100µs so would certainly do the job. There is however a downside—these devices have a capacitance in the order of 300pF to 400pF in the voltage ranges we are considering. This would be fine on a power supply line but this much capacitance will certainly kill high-speed signals like USB or HDMI. We clearly need to look a bit further.
Before we move to specialised TVS diodes, let's not forget that a bipolar junction transistor can be used as a zener diode since its base-emitter junction exhibits reverse breakdown at around 7V. Figure 2 shows how the transistor should be connected for best performance. A typical jelly-bean small signal transistor such as a 2N3904 can handle a peak reverse current of a bout 4A for 20µs and comes with a very respectable capacitance of just 7pF. Definitely worth considering.
FIGURE 2. The base-emitter junction of a standard bipolar junction transistor behaves like a Zener diode with a breakdown voltage of about 7V. The capacitance of the base-emitter is just a few picofarads. For best performance the collector should be connected to the base as shown.
FIGURE 3. This is the V-I curve for a typical TVS diode. In normal operation the reverse voltage should not exceed the stand-off voltage VR. Under transient conditions the breakdown voltage VBR is exceeded and the diode begins to break down, clamping the transient to less than VCL at the peak current IPP.
So, what about specialist TVS diodes? They are available in unidirectional types that only clamp voltages in one direction, or bidirectional types that clamp voltage symmetrically. They are also available in pairs or arrays as we shall see. Figure 3 shows the V-I characteristic curves for typical TVS diodes. Under normal operation the voltage applied to the device should not exceed the "reverse stand-off" voltage VRM. This is the voltage level at which the device is guaranteed not to break down.
Once the transient reaches the breakdown voltage VBR the device begins to conduct to shunt the voltage transient. The voltage will be clamped to no more than VCL at the maximum current IPP. A typical device, like the Toshiba DF2S5M4CT, has a reverse stand-off voltage of 3.6V (therefore suitable for 3V3 signal lines) and will clamp the transient voltage to less than 8V at a peak current of up to 8A. It has a maximum capacitance of 0.5pF making it suitable for very high-speed lines.
Finally, Figure 4 shows a TVS diode array designed for protecting USB 2.0 lines, in this case the D5V0F3B6LP20 from Diodes Inc. This device has one unidirectional 20V stand-off TVS diode to protect the VBUS line, and three bidirectional 5.5V stand-off TVS diodes to protect the signal lines. The unidirectional diode can handle an IPP of 9.5A and the bidirectional diodes can handle and IPP of 3.5A each. The capacitance of the signal lines is less than 0.5pF. All this comes in a 2mm x 2mm package and costs less than 50 cents.
FIGURE 4. The D5V0F3B6LP20 from Diodes Inc contains a unidirectional TVS diode to protect the USB VBUS line and three bidirectional TVS diodes to protect the data lines. The capacitance of the diodes on the signal lines is less than 0.5pf. The whole lot is contained in a tiny 2mm x 2mm package.
TVS diodes are cheap insurance against ESD damage and well worth considering for your next design.
Adamczyk, Bogdan. "Human-Body Model and Electrostatic Discharge (ESD) Tests." In Compliance Magazine (blog). https://incompliancemag.com/article/human-body-model-and-electrostatic-discharge-esd-tests
"Transient Voltage Suppressors (TVS) – STMicroelectronics." https://www.st.com/en/protections-and-emi-filters/transient-voltage-suppressors-tvs.html.
"DF2S5M4CT | TVS Diodes (ESD Protection Diodes) | Toshiba Electronic Devices & Storage Corporation | Asia-English." https://toshiba.semicon-storage.com/ap-en/semiconductor/product/diodes/tvs-diodes-esd-protection-diodes/detail.DF2S5M4CT.html
"D5V0F3B6LP20 USB2.0 and VBUS TVS Diode Array" https://www.diodes.com/assets/Datasheets/D5V0F3B6LP20.pdf
Sponsor this Article
Andrew Levido
Andrew Levido (andrew.levido@gmail.com) earned a bachelor's degree in Electrical Engineering in Sydney, Australia, in 1986. He worked for several years in R&D for power electronics and telecommunication companies before moving into management roles. Andrew has maintained a hands-on interest in electronics, particularly embedded systems, power electronics, and control theory in his free time. Over the years he has written a number of articles for various electronics publications and occasionally provides consulting services as time allows.
https://circuitcellar.com/author/andrew-levido/
Switch Debouncing
Early Effect
Analog Isolators
Logic Levels
diodes ESD HBM transient voltage suppressor TVS diodes
February Circuit Cellar: Sneak Preview
16-bit MCUs Target Car Actuator and Sensor Control
EE Tips • Resources
Arduino-Based DIY Voltage Booster (EE Tip #117)
Engineering Crossword #67
Electronics Grounding (EE Tip #107)
Resources • Workspaces
Workspace for Electromechanical Innovation
Professional's Profiles • Resources
John Peterson
One-Wire RS-232 Half Duplex (EE Tip #135)
by Andrew Levido time to read: 4 min
Quick Bits Rail to Rail Input Op Amps
Quick Bits Boolean Algebra


Each spring the Center for the Study of Southern Culture gives the Eudora Welty Award for Creative Writing to two Mississippi high school students for short stories or poetry written during the previous year. First place carries an award of $500, and second place an award of $250.
Schools may submit one entry in each category. Faculty from the University of Mississippi judge the entries and select the winners. The awards are presented during the University's Faulkner and Yoknapatawpha Conference in July. Winners are notified at least a month prior to the conference.
The 2019 deadline is Monday, May 20.
Click link on right to see a list of previous winners.
Fill out the online submission form below or download a submission form and email the completed form to Rebecca Lauck Cleary – rebeccac@go.olemiss.edu.


text:
Q: Is there a jQuery-like CSS/HTML selector that can be used in C#? I'm wondering if there's a jQuery-like css selector that can be used in C#.
Currently, I'm parsing some html strings using regex and thought it would be much nicer to have something like the css selector in jQuery to match my desired elements.

A: Update 10/18/2012
CsQuery is now in release 1.3. The latest release incorporates a C# port of the validator.nu HTML5 parser. As a result CsQuery will now produce a DOM that uses the HTML5 spec for invalid markup handling and is completely standards compliant.
Original Answer
Old question but new answer. I've recently released version 1.1 of CsQuery, a jQuery port  for .NET 4 written in C# that I've been working on for about a year. Also on NuGet as "CsQuery"
The current release implements all CSS2 & CSS3 selectors, all jQuery extensions, and all jQuery DOM manipulation methods. It's got extensive test coverage including all the tests from jQuery and sizzle (the jQuery CSS selection engine). I've also included some performance tests for direct comparisons with Fizzler; for the most part CsQuery dramatically outperforms it. The exception is actually loading the HTML in the first place where Fizzler is faster; I assume this is because fizzler doesn't build an index. You get that time back after your first selection, though.
There's documentation on the github site, but at a basic level it works like this:
Create from a string of HTML
CQ dom = CQ.Create(htmlString);

Load synchronously from the web
CQ dom = CQ.CreateFromUrl("http://www.jquery.com");

Load asynchronously (non-blocking)
CQ.CreateFromUrlAsync("http://www.jquery.com", responseSuccess => {
    Dom = response.Dom;
}, responseFail => {
    ..
});

Run selectors & do jQuery stuff
var childSpans = dom["div > span"];
childSpans.AddClass("myclass");

the CQ object is like thejQuery object. The property indexer used above is the default method (like $(...).
Output:
string html = dom.Render();

A: You should definitely see @jamietre's CsQuery. Check out his answer to this question!
Fizzler and Sharp-Query provide similar functionality, but the projects seem to be abandoned.

A: Not quite jQuery like, but this may help:
http://www.codeplex.com/htmlagilitypack

A: For XML you might use XPath...

A: I'm not entirely clear as to what you're trying to achieve, but if you have a HTML document that you're trying to extract data from, I'd recommend loading it with a parser, and then it becomes fairly trivial to query the object to pull desired elements.
The parser I linked above allows for use of XPath queries, which sounds like what you are looking for.
Let me know if I've misunderstood.

redpajama_set_name: RedPajamaStackExchange


text:
Nelson Rolihlahla Mandela (IPA xoˈliɬaɬa manˈdeːla; uitspraak in het Xhosa) (Mvezo, 18 juli 1918 – Johannesburg, 5 december 2013) was een Zuid-Afrikaans anti-apartheidsstrijder en politicus.

Vanaf 1944 was Mandela betrokken bij de strijd van het Afrikaans Nationaal Congres (ANC) tegen het apartheidsregime in Zuid-Afrika. Als leider van de militaire tak van het ANC werd hij in 1963 opgepakt en kreeg hij een levenslange gevangenisstraf opgelegd. In 1990 kwam hij vrij en werd het ANC gelegaliseerd. Samen met president F.W. de Klerk kreeg Mandela in 1993 de Nobelprijs voor de Vrede voor "hun inspanningen voor het vreedzaam einde van het apartheidsregime en het leggen van de funderingen voor een nieuw democratisch Zuid-Afrika".

Bij de eerste vrije, niet-raciale verkiezingen in 1994 werd de op dat moment 75-jarige Mandela gekozen tot president van de Republiek Zuid-Afrika. In 1999 trad hij af. In Zuid-Afrika wordt hij beschouwd als de "vader des vaderlands". Zijn bijnaam was Madiba, de naam in zijn clan voor Thembu-koningen.

Afkomst en jeugd

Mandela werd geboren in Mvezo, in de toenmalige Unie van Zuid-Afrika, en groeide op in Qunu, een klein dorp vlak bij Mthatha in de Oost-Kaap. Als voornaam kreeg hij de naam Rolihlahla, dat in het Xhosa de taal van de Xhosa letterlijk 'de tak van een boom trekken' betekent en als figuurlijke betekenis 'lastpost' heeft. Hij was een lid van de Ixhiba-clan, een zijtak van de koninklijke familie Thembu, die toentertijd heerste over de regio Transkei. Zijn vader was stamhoofd Gadla Henry Mphakanyiswa. Zijn moeder Nosekeni Fanny was de derde echtgenote van zijn vader. In totaal had zijn vader vier echtgenotes, bij wie hij vier zonen en negen dochters kreeg.

Scholing
Mandela's familie leverde vroeger adviseurs aan het hof van de koning. Zijn vader was een van hen. Mandela was het eerste lid uit de geschiedenis van zijn familie dat naar school ging. In 1927 stierf de vader van Mandela en kwam hij onder de voogdij van de regent van de Thembu. Hij kon zich inschrijven aan het College van de Universiteit van Fort Hare, wat de enige plaats was waar zwarten hoger onderwijs mochten volgen. Vanaf 1943 volgde Mandela de opleiding rechten aan de Universiteit van de Witwatersrand te Johannesburg.

Betrokkenheid bij ANC
In 1944 raakte Mandela betrokken bij de strijd van het Afrikaans Nationaal Congres (ANC) tegen de dominantie van de blanke etnische minderheid en de segregatiepolitiek. Als advocaat volgde hij het voorbeeld van satyagraha van Mohandas Gandhi.

In augustus 1953 opende Mandela samen met zijn vriend Oliver Tambo een eigen advocatenkantoor, Mandela en Tambo, in het centrum van Johannesburg. Het was indertijd het enige door zwarten geleide advocatenkantoor in Zuid-Afrika. Het was populair bij zwarte cliënten die zich beklaagden over politiegeweld. De overheid trok de vergunning in en dwong hen te verhuizen, waardoor de clientèle afnam. Door tijdgebrek werd het kantoor uiteindelijk opgeheven.

Aangezien de resultaten van de geweldloze acties achterbleven en het ANC in 1960 verboden werd, stichtte en leidde Mandela de militaire tak van het ANC, Umkhonto we Sizwe (Speer van de Natie). Die voerde sabotageacties uit tegen militaire en publieke installaties. Mandela en andere ANC-leden hadden deze vleugel opgericht, omdat ze dachten dat geweldloos verzet zinloos was aangezien het keer op keer met geweld werd neergeslagen. De aanslagen waren op overheidseigendommen gericht en werden 's nachts uitgevoerd. Ze hadden als doel de zwarte bevolking van Zuid-Afrika ertoe te bewegen in opstand te komen om een revolutie te bewerkstelligen.

Mandela zag iedereen die zich tegen de apartheid verzette als een vriend, waarbij de huidskleur, religie of politieke achtergrond er niet toe deed.

Bondgenoten
Mandela's ANC kreeg steun (politiek en militair) van bevrijdingsbewegingen in andere landen, met leiders als Robert Mugabe (Zimbabwe), Fidel Castro (Cuba), Yasser Arafat (Palestina) en Moammar al-Qadhafi (Libië). Mandela vergat zijn bondgenoten nooit en bleef hen vanwege hun steun steeds trouw, al kon hij hun latere gedrag soms ook wel kritiseren (Mugabe).

Rivoniaproces
In 1961 werd Mandela verdacht van hoogverraad, maar vrijgesproken. Op 5 augustus 1962 werd hij, na een tip van de CIA, echter opnieuw gearresteerd wegens zijn gewapende strijd tegen de apartheid. Met andere ANC-leiders werd hij in 1964 veroordeeld voor het voorbereiden van een guerrilla-oorlog, met de bedoeling het apartheidsregime met geweld omver te werpen. In het zogeheten Rivoniaproces kreeg hij een levenslange gevangenisstraf opgelegd. Voordat Mandela gevangengezet werd, was hij een voorstander van een samenwerking van het ANC met de South African Communist Party (SACP), die sterk onder invloed van de toenmalige Sovjet-Unie stond.

Gevangenschap

Nelson Mandela verbleef van 1964 tot 1982 in de gevangenis op Robbeneiland. Tijdens zijn gevangenschap werd de problematiek van de apartheid op internationaal niveau besproken. Mandela raakte daarbij internationaal bekend en werd het symbool van de wereldwijde anti-apartheidsbeweging.

De gevangenen op het eiland werden gedwongen tot arbeid in een plaatselijke kalkgroeve. Velen kregen last van hoornvliesontsteking als gevolg van stof en het felle zonlicht dat weerkaatst werd door de witte kalk. In het begin mocht Mandela geen zonnebril dragen. Hij liep daardoor schade aan zijn ogen op en moest aan een traanbuis geopereerd worden. Tijdens het verblijf in de gevangenis en het werk in de groeve, ontstonden hechte vriendschapsbanden tussen de gevangenen. Deze spelen nog altijd een grote rol in de Zuid-Afrikaanse politiek.

De gevangenen werden gescheiden op basis van huidskleur en zwarte gevangenen ontvingen kleinere rantsoenen dan kleurlingen en Indische personen. De categorie van politieke gevangenen, waartoe Nelson Mandela behoorde, werd afgescheiden en had minder rechten. De gevangenen moesten zich met koud zeewater wassen en Mandela sliep in een cel van 2,4 bij 2,1 meter op een slaapmat.

Mandela was officieel een gevangene van 'klasse D'. Gevangenen uit deze laagste klasse hadden slechts recht op één bezoek of brief per half jaar. Althans in theorie. In praktijk werden de spaarzame brieven lang vertraagd of gecensureerd.

Persoonlijke ontwikkeling
Robbeneiland volstond niet om de wil van Mandela te breken. Integendeel, die bleek alleen maar toe te nemen. Volgens de getuigenis van medegevangene Ahmed Kathrada aanvaardde Mandela geen enkele voorkeursbehandeling en leidde hij alle protestacties in de gevangenis. Mandela weigerde stelselmatig om zijn (Afrikaanstalige) bewakers met "baas" aan te spreken.

Terwijl veel gevangenen weigerden met hun bewakers te praten, probeerde Mandela hun situatie te analyseren. Hij besefte dat het gedrag van de Afrikaners geleid werd door een rabiate angst. Als de zwarte bevolking aan de macht zou komen, zou dit volgens hem tot een genocide kunnen leiden. Mandela gebruikte zijn jarenlange opsluiting om de geschiedenis van de Afrikaners en hun taal, het Afrikaans, te leren. Dit stelde hem in staat hun mentaliteit te begrijpen en in dialoog te gaan. In tegenstelling tot het ANC, dat de bezetting van zuidelijk Afrika door blanken beschouwde als een moderne versie van het Europese kolonialisme, zag Mandela de Afrikaners óók als rechtmatige inwoners van (Zuid-)Afrika. Hij realiseerde zich dat hij in dezelfde situatie mogelijk dezelfde drastische beslissingen had genomen.

Zicht op vrijlating
In 1976 ontving hij voor het eerst een delegatie van de Zuid-Afrikaanse regering. De minister van gevangenissen Jimmy Kruger stelde voor hem vrij te laten onder voorwaarde dat Mandela verhuisde naar het toenmalige thuisland Transkei. Mandela weigerde, stelde zijn eigen voorwaarden en eiste zijn vrijlating. Op 16 juni 1976 braken in de krottenwijk Soweto van Johannesburg rellen uit, een nieuwe stap in het protest en de repressie.

In 1982 werd Mandela met andere ANC-leiders overgeplaatst naar de Pollsmoor Maximum Security Prison in Tokai. Zes jaar later verhuisde hij naar de Victor Verster Prison, in de buurt van Paarl, waar hij een vrijstaande woning van een cipier kreeg toegewezen, evenals een privékok. Hij mocht veel bezoekers van buiten de gevangenis ontvangen.

In 1985 speelde ook Margaret Thatcher een rol bij het vrij krijgen van Mandela. Vanuit haar economisch liberalisme was zij eigenlijk niet zo voor apartheid , maar ze wilde het ook niet doen opheffen door internationale boycots of andere sancties. Daarom stuurde zij uiteindelijk een brief aan president Botha waarin ze schreef dat in haar opinie het vrijlaten van Mandela meer impact zou hebben dan vrijwel iedere andere handeling die Botha zou kunnen uitvoeren.

Mandela voerde vanaf 1987 in het geheim besprekingen met de minister van justitie Kobie Coetsee. In drie jaar werden elf ontmoetingen gehouden. Coetsee organiseerde vanaf mei 1988 onderhandelingen tussen Mandela en een overheidsdelegatie van vier personen. Uiteindelijk stemde de Zuid-Afrikaanse overheid ermee in dat Mandela en alle politieke gevangenen werden vrijgelaten en het ANC gelegaliseerd zou worden, op voorwaarde dat Mandela en het ANC voor altijd het geweld zouden afzweren, zouden breken met de communistische partij en zich niet zouden inzetten voor het omverwerpen van de blanke regering. Mandela weigerde dat en gaf aan dat het ANC alleen met de gewapende strijd zou stoppen, als de regering dat ook zou doen.

Vrij man

Vrijlating
Mandela's vrijlating op 11 februari 1990 geschiedde op verzoek van president Frederik de Klerk. Het zorgde wereldwijd voor opgetogenheid. Na zijn vrijlating ging Mandela meteen naar het ANC-hoofdkwartier in Kaapstad. Het verbod van het ANC werd opgeheven en Mandela werd in juli 1991 unaniem gekozen tot de nieuwe voorzitter van deze partij. Met de toenmalige regering voerde hij onderhandelingen over een zwart-blanke toekomst voor Zuid-Afrika. In september 1992 resulteerde dat in de haastige samenstelling van een tijdelijke regering die als taak had hervormingen door te voeren.

Direct na zijn vrijlating bezocht Mandela Fidel Castro. Diens Cubaanse Revolutie van 1959 was een bron van inspiratie voor hem geweest. Volgens hem had de Cubaanse steun aan Angola in de jaren zeventig en tachtig het Zuid-Afrikaanse regime verzwakt. "Wie trainde onze mensen", vroeg Mandela retorisch aan Castro. "Wie gaf ons middelen, wie trainde onze soldaten, onze dokters? U was nog nooit in ons land. Wanneer komt u?"

Ook bezocht hij na zijn vrijlating, ondanks een verbod van de VS, kolonel Khadaffi in Libië. Khadaffi liet hem niet alleen toen anderen in het Westen dat wel deden, was zijn argument.

Presidentschap
In februari 1994 werd besloten tot het houden van vrije, niet-raciale verkiezingen in de daaropvolgende winter, om te komen tot een nationale eenheidsregering. Alle partijen die meer dan twintig zetels zouden behalen, zouden worden uitgenodigd zitting te nemen in de nieuwe regering. Mandela nodigde uiteindelijk ook partijen uit die er minder hadden gekregen.

Mandela werd op 27 april 1994, op 75-jarige leeftijd, president van Zuid-Afrika, als opvolger van De Klerk, die al een aarzelend begin had gemaakt met afschaffing van apartheidsregels. Mandela stelde met hulp van onder meer de zwarte anglicaanse aartsbisschop Desmond Tutu de Waarheids- en Verzoeningscommissie in. In december 1997 trad hij af als leider ('president') van het ANC ten gunste van Thabo Mbeki. In 1999 besloot Mandela om zich niet opnieuw verkiesbaar te stellen als president. Mbeki volgde hem op.

Kritiek op het Westen
Mandela sprak zich herhaaldelijk kritisch uit over westerse landen. Zo verzette hij zich in 1999 heftig tegen de NAVO-interventie die leidde tot de Kosovo-oorlog. Hij noemde het een poging van machtige staten om de hele wereld te beheersen. In 2003 sprak hij zich uit tegen de plannen van de Verenigde Staten en het Verenigd Koninkrijk om Irak binnen te vallen. Mandela omschreef het als een "tragedie" en zei dat de Verenigde Staten meer verschrikkelijke misdaden begaan hadden dan welk ander land ook, daarmee refererend aan de atoombommen op Japan die aan het eind van de Tweede Wereldoorlog door de VS waren afgeworpen op Japan.

Mandela had in principe niets tegen het bestaan van Israël, dat het Apartheidsregime gesteund had, maar hij was tegen het bezet houden van Arabisch land na de Zesdaagse Oorlog van 1967. Ook was hij tegen de onvrijheid van het Palestijnse volk. Zelfbeschikkingsrecht, daar ging het hem om. Yasser Arafat noemde hij zijn "wapenbroeder" en ook zei hij: "Wij identificeren ons met de PLO". Verder zei hij: "Wij kunnen ons niet vrij voelen zolang het Palestijnse volk niet vrij is."

Pensioen
Sinds zijn aftreden als president was Mandela's publieke rol symbolisch en informeel. Zo was hij onder andere medeoprichter en lid van The Elders, een raad van voormalige wereldleiders en andere prominente personen. Hij was een groot voorstander van het naar Zuid-Afrika halen van het wereldkampioenschap voetbal 2010. Voorafgaand aan de finale reed hij met zijn echtgenote een ererondje over het veld, maar wegens zijn slechte gezondheid bekeek hij de wedstrijd thuis voor de televisie.

Privé

Huwelijken en kinderen
Mandela is drie keer getrouwd. In 1944 trouwde hij met Evelyn Ntoko Mase. Uit dit huwelijk werden vier kinderen geboren: zoon Madiba Thembekile, die in juli 1969 omkwam bij een verkeersongeval (Mandela bevond zich toen nog in gevangenschap en kreeg geen toestemming aanwezig te zijn op de begrafenis), zoon Makgatho en twee dochters die beiden Makaziwe heetten. Hun eerste dochter overleed toen zij negen maanden oud was. Naar haar is de tweede dochter vernoemd. Het huwelijk met Evelyn eindigde in 1957 in een echtscheiding.

Mandela huwde in 1958 voor de tweede keer met Nomzamo Winifred Madikizela (Winnie Mandela), een strijdbare mensenrechtenactiviste. Uit dit huwelijk werden twee dochters geboren: Zenani en Zindziswa. Na Mandela's vrijlating in 1990 volgde al snel een reeks onthullingen over Winnies rol en die van haar privéknokploeg met de naam 'Mandela United Football Club', bij het martelen en doden van opponenten, alsook bij het ontvoeren en vermoorden in Soweto van de 14-jarige tiener James Seipei, bekend geworden onder zijn schuilnaam Stompie Moeketsi. Sommige ANC-leiders drongen er bij Mandela op aan van haar te scheiden, maar hij besloot haar trouw te blijven totdat ze door een rechtbank schuldig zou worden verklaard. Na andere onthullingen over een vermeende buitenechtelijke relatie verliet Nelson Mandela haar in 1992. De echtscheiding werd in 1996 wettelijk bekrachtigd.

Met zijn derde echtgenote, Graça Machel, trouwde Mandela op zijn tachtigste verjaardag. Zij was tevens de achtentwintig jaar jongere weduwe van de voormalige president van Mozambique, Samora Machel (1933-1986).

Op 6 januari 2005 maakte Mandela bekend dat zijn zoon Makgatho overleden was aan aids. Enkele uren na Makgatho's overlijden belegde Mandela een persconferentie om het nieuws wereldkundig te maken en aan te dringen op meer openheid over aids.

Gezondheid
Mandela liep door een tbc-besmetting longschade op tijdens zijn gevangenschap op Robbeneiland. Zijn gezondheid bleef broos. In 2012 werd hij tweeënhalve week opgenomen in een ziekenhuis. Hij vertrok hierna uit Johannesburg naar zijn geboortedorp Qunu, waar hij in rust en vrede zijn laatste jaren wilde doorbrengen.

Eind maart 2013 werd hij tien dagen opgenomen in het ziekenhuis. Een maand lang kreeg hij bezoek van bekende politici, waaronder de Zuid-Afrikaanse president Jacob Zuma. Een zichtbaar verzwakte Mandela leek niet te beseffen wat hem overkwam. Dit leidde tot een storm van protest van de Zuid-Afrikaanse bevolking, die vond dat misbruik gemaakt werd van de politieke status van Mandela.

Begin juni 2013 werd hij opnieuw opgenomen met 'ernstige' longproblemen. Op 23 juni 2013 liet president Zuma weten dat Mandela's toestand kritiek was. Mandela verliet het ziekenhuis desondanks op 1 september 2013.

Overlijden
Op 5 december 2013 maakte president Zuma tijdens een persconferentie bekend dat Mandela op 95-jarige leeftijd was overleden in zijn woning in Johannesburg. In Zuid-Afrika werd een periode van nationale rouw afgekondigd. Zondag 8 december werd uitgeroepen tot een landelijke 'dag van gebed en bezinning' en op 10 december was er een massale herdenkingsbijeenkomst in Soccer City bij Soweto. Mandela werd op 15 december in Qunu begraven.

Nalatenschap

Zijn gevangenisnummer 46664 werd jaren later het symbool voor zijn aidsbestrijdingsproject.

Onderscheidingen
In totaal ontving hij zo'n tweehonderdvijftig onderscheidingen, waaronder de Nobelprijs voor de Vrede. In eigen land was hij de drager van de Orde van Mapungubwe voor 'exceptionele en unieke' verdienste. Hij was tot zijn overlijden de enige platinadrager. In Nederland en Luxemburg kreeg Mandela de Orde van de Gouden Leeuw van Nassau.

Publicaties
 De lange weg naar de vrijheid, de autobiografie van Nelson Mandela. Er is ook een ingekorte versie.
 In gesprek met mijzelf, ook een autobiografie.
 Nelson Mandela & Jennifer Crwys-Williams: Laat vrijheid regeren. A.W. Bruna Uitgevers, Utrecht, 1998.

In populaire media

Films
 Dennis Haysbert speelde Mandela in de film Goodbye Bafana uit 2007.
 Morgan Freeman speelde Mandela in de film Invictus uit 2009.
 Idris Elba speelde Mandela in de biografische film Mandela: Long Walk to Freedom die in 2013, een week voor het overlijden in de bioscoop uit kwam.

Muziek
 Free Nelson Mandela was een single van The Specials die in 1984 uitkwam.
 They Want To Be Free was een single die Joe Smooth voor CNN maakte naar aanleiding van zijn vrijlating.

Twitter
Oud Amerikaans president Barack Obama reageerde met een citaat van Mandela via Twitter op hevig geweld in Charlottesville in augustus 2017:

Literatuur
 Fatima Meer: Nelson Mandela, zijn leven. Uitgeverij De Geus, Breda, 1995.
 Adrian Hadland: Mandela, een leven. Uitgeverij Atrium, Rijswijk, 2008.
 Mike Nicol: Mandela, het geautoriseerde portret. Uitgeverij Terra, Arnhem. 2e druk, 2007.
 James Gregory en Bob Graham: Goodbye Bafana. Uitgeverij Lannoo, Tielt, 2007.
 Diverse auteurs: Nelson Mandela. De biografie. Het geautoriseerde stripverhaal, Uitgeverij Contact, Amsterdam/Antwerpen, 2009.
 Jos Damen: Nelson Mandela, symbool voor vrijheid en verbroedering. IVIO-Uitgeverij, Lelystad, 2008.
 Amandla! (Nelson Mandela in zijn eigen woorden). Uitgeverij Pandora, Amsterdam. 2e druk, 2008.
 Ineke van Kessel: Nelson Mandela in een notendop. Uitgeverij Bert Bakker, Amsterdam, 2010.
 Richard Stengel: Mandela over leven, liefde en leiderschap. Kosmos Uitgeverij 2010.

Zie ook
 Nelson Mandela-dag

Externe links

 Nelson Mandela Foundation
 Webdossier over Nelson Mandela door Afrika-Studiecentrum, Leiden
 Nelson Mandela en Nederland -Dossier IISG
 Boeren en Bantoes, AVRO, 30 januari 1961, met een interview met Nelson Mandela door G.B.J. Hiltermann

Apartheid
Gevangene
Humanitair activist
Zuid-Afrikaans mensenrechtenactivist
Geweldloosheidverdediger
President van Zuid-Afrika
Zuid-Afrikaans activist
Zuid-Afrikaans politicus
Zuid-Afrikaans revolutionair
Zuid-Afrikaans advocaat
Winnaar van de Nobelprijs voor de Vrede
Winnaar van de Sacharovprijs
Zuid-Afrikaans persoon in de 20e eeuw

redpajama_set_name: RedPajamaWikipedia


text:
Загнаний () — американський трилер 2003 року режисера Вільяма Фрідкіна.

Сюжет
Після безуспішних спроб зловити в лісах Орегона дуже небезпечного вбивцю агенти ФБР звертаються по допомогу до колишнього експерта з підготовки солдатів спеціальних військ Ел Ті Бонема. Досліджуючи місця злочину, той поступово починає розуміти, що вбивця — один із його найкращих учнів, Аарон Геллам. Тільки Бонем у силах вистежити і нейтралізувати свого учня, який уміє виживати в екстремальних умовах.

У ролях

Саундтрек

Примітки

Посилання

Фільми англійською мовою
Фільми-бойовики США
Фільми-трилери США
Фільми-драми США
Кримінальні фільми США
Фільми Вільяма Фрідкіна
Фільми, зняті в Портленді
Фільми про югославські війни
Фільми Lakeshore Entertainment
Фільми США 2003
Фільми про Портленд


text:
SezWho?
By Vidya Pradhan
An interesting article in the New York Times talks about how comments are becoming the new social currency on the web. "There are those who have blogs," goes the article, "and then there are those who leave comments on other people's blogs." While the 2 groups may intersect once in a while, there is still a large population of comment writers who roam the web communities leaving their virtual footprints behind. It is to recognize the impact of these unsung participants that Jitendra Gupta and his team developed SezWho, a "distributed context, rating and reputation system for social media sites like blogs, forums, wikis, video/picture sharing sites, discussion boards and anywhere else where people collaborate on the web." With the proliferation of social media sites, the quantity and democratization of user-generated content often makes it difficult for the lay reader to determine where to find the best quality. Who is adding value to the community and who is just venting? Jakob Nielsen's article on participation inequality suggests that a 90-9-1 rules applies – 90% of readers never participate, 9% participate occasionally and 1% of the users make up the bulk of the content. In real life community forums, the participation is likely to be much higher. SezWho's team suggests this is because in real life, there is an incentive to participate in the form of reputation building. In online forums, not only is this positive stroke missing, but since the threshold to participation can be quite high, it is harder to get people to comment. What is missing is a way to encourage online participation by offering a reward and this is where SezWho comes in. The SezWho product allows readers to review comment writers, thus building the writers' online reputation. The plug-in wraps each comment with a rating box and a profile of the writer, which gets updated every time the writer writes a comment and every time a comment gets rated. About 80% of the writer's overall rating comes from the ratings from readers while 20% comes from the number of comments the writer posts. This is to take care of the inequality between commenters who write well and those who just write a lot. While there are sites like Metafilter, which are almost exclusively devoted to people who comment, with the primary content taking a backseat to the comment generation, SezWho is meant for existing community and social media sites which would like to have this functionality to both encourage wider participation and increase traffic. How SezWho increases a site's traffic is rather convoluted but, interestingly, it is through the efforts of the comment writers. The idea is that good commenters will spur cross-site traffic as readers follow them from site to site. For social networking sites the benefit is more obvious, with reader ratings helping new users to locate quality within a mass of content. "The way the web is organized right now is very Web1.0," says Jitendra. "It is organized around sites rather than people." SezWho hopes to change that. By focusing on the writer rather than the site, SezWho hopes to build meaningful participation across communities. Providing a way to rate user-generated content also seems like a good idea and the company, which went public with its beta version only about 2 months ago, already has over 110,000 subscribers. In case you're wondering about the revenue model, SezWho plans to offer paid services which expand on this basic idea in the near future. Also in the works is a 'Red Carpet' feature that will allow the site to display the celebrity comment writers it has attracted. Water, No Ice has recently added this plug-in. Do check it out and let us have your feedback.
This entry was posted in Entrepreneurs on October 4, 2007 by vpdot.
← 'Outsourced' – the movie Earthquake 101 →
19 thoughts on "SezWho?"
Jitendra October 4, 2007 at 5:50 pm
Great piece…And great tie-in with the NYT piece and Jacob Nielsen piece. This is indeed a huge area for conversation in the blogosphere as well.
Alex October 8, 2007 at 12:56 am
Actually one of my friends first read this article and asked me to visit this page. This article has very useful information, it will be helpful for many. It's really amazing to read this description. Thank you so much for your help and for your efforts.
http://www.NobleHelp.org
sandeep gupta October 26, 2007 at 6:33 am
Good Article !!
gestroud November 15, 2007 at 11:44 pm
Sez Who i's an excellent addtion to any web site. Easy to install and implememt. It definitely encouraged my site's user to participate more.
gestroud
Like Ra November 23, 2007 at 11:56 pm
I really appreciate what Mr. Gupta and Co have created, but since you in your "great piece" (I second Jitendra here) asked for feedback, here it is. (I also published it here:
I can start with what I like about the widgets:
the idea is great
the filter and voting results look good (on the post/comment page)
And that's about it.
Now what I don't like:
synchronization does not work (pictures, results, etc.)
the profile is literally uneditable (e.g. you can't change the Blogs and Emails settings)
it does not keep userpic proportions, even if the picture is smaller than 80×100
RedCarpet shows irrelevant results (I even removed it from the site, but added it back today to see if there are any difference)
the more comments, the less the ratio. E.g. polite answers like "Thanks much for the info!" will never be rated, but will definitely reduce the rating
sometimes better a not valuable comment, than nothing. Have a look at this thread. Sandeep's comment is rated low. But he expressed his opinion I agree with. See previous comment
the posts and the original authors should also be included in the rating
users are not willing to give out their e-mail addresses
sezwho is mostly oriented for the site owners, ordinary readers are hardly interested
SezWho stimulates using same nicks/email addresses for all participating sites, thus reducing the privacy of the users
all user comments can be accessible from one point, thus reducing the privacy again
not widely accepted yet, so even less interesting
Probably I forgot something, but that covers almost everything.
In my opinion SezWho can become popular within communities, not across them.
Sorry for the broken formatting in my prev message – html tags (ul-li) are not supported here.
Like Ra November 24, 2007 at 12:43 am
Another bug. The rating of the posts resets after a page reload. E.g. the post rating (on the original blog) Sez: 2.5, the statistics page (on sezwho site): 3.4.
So, no synchronization again.
And todays it's the other way around? Hey, what's going on with SezWho? It's absolutely unpredictable!
vpdot Post author November 25, 2007 at 4:23 am
Interesting feedback Ra..have forwarded your comments to the SezWho team.
Proved! A user with one comment and one good rating is placed well above the users with lots of posts even if more than a half of them highly rated.
So, what's the point?
oh, pressed the Submit button too early…
Bottom line: The more comments, the lower rating. How is that model supposed to stimulate readers leave comments?
Like Ra November 29, 2007 at 7:20 pm
Also, it does not work with Internet Explorer 6.0.
Why not to follow the same "respect" principle used in many forums?
Had enough. Removing it from my site…
Jitendra December 4, 2007 at 4:53 am
Like Ra,
More comments do not lead to lower ratings…In fact, it should lead to higher ratings…Can you give me an example where this is happening?
Also thanks for the great feedback…We are reviewing it and will certainly implement a number of them.
Also can you send me an example for issues with IE6 as a screen shot?
Thanks, Jitendra
Like Ra, Sorry for being a scatter brain and leaving multiple comments but what do you mean that the Red Carpet does not work as expected…RC widget is supposed to show the highest rated commenters on your blog…Are you seeing something else?
Let me know?
zzrummer January 10, 2008 at 2:43 am
Nevada Savors Its Place as Maker of Momentum
Article Tools Sponsored By
By JENNIFER STEINHAUER
LAS VEGAS — Scores of college students fanned out in neighborhoods across this city Wednesday, phone banks buzzed with newly minted volunteers and endorsements were proffered as the Democratic presidential candidates ratcheted up the volume in this once-quiet caucus state.
Isaac Brekken for the New York Times
D. Taylor, the Secretary-Treasurer of Culinary Local 226, in Las Vegas Wednesday announcing the endorsement of Senator Barack Obama.
Back Story With The Times's Katharine Q. Seelye
The CaucusThe latest political news from around the nation. Join the discussion.
* Candidate Topic Pages
* More Politics News
Next in line on the Democratic calendar, Nevada was vaulted overnight into the position of breaking a tie, at least for now, after the victory of Senator Hillary Rodham Clinton in the New Hampshire primary on Tuesday. The campaigns of Mrs. Clinton and Senator Barack Obama, who won the Iowa caucuses last week, seemed poised for a sanguinary struggle in the Jan. 19 caucuses, and Mr. Obama was scheduled to arrive here on Friday.
The Clinton and Obama camps rushed in volunteers and staff members from Iowa, furiously opened new field offices and saturated the airwaves with radio advertisements in Spanish and television spots promoting their health care plans.
For Mrs. Clinton, efforts on her behalf in Nevada intensified last week after her third-place finish in Iowa. Campaign staff members here impressed upon volunteers that they were direly needed. With her victory in New Hampshire, Mrs. Clinton, who long ago collected the institutional support of her party here — and until recently enjoyed a double-digit lead in the polls — is now seeking to build on her newfound momentum.
"We always knew Nevada would be important as the first Western state," said Hilarie Grey, a spokeswoman for Mrs. Clinton here. "We can be the state that swings the momentum in an entirely different way."
Mr. Obama won an endorsement Wednesday morning from the highly influential Culinary Workers Union local at a raucous news conference here in Las Vegas, where more than 100 members began chanting and yelling at what quickly became an Obama rally.
After praising the other Democrats for fighting for "the Las Vegas dream," D. Taylor, the secretary and treasurer of the union and its public face, gave the nod to Mr. Obama.
Mr. Taylor celebrated something that Nevada residents have enjoyed for months, candidates who actually show up in the state. "It's been exciting," he said. "For the first time I know of in Nevada, dishwashers, cooks, house keepers, cocktail servers, bartenders from all different walks of life" had access to candidates.
The union, which has about 60,000 members, is extremely influential in the Democratic stronghold of Clark County, which includes Las Vegas, and hopes to play a major role in the race, where Mrs. Clinton has had the edge for months. Alluding to Nevada's racial diversity in relation to Iowa and New Hampshire, Mr. Taylor said, "We're not just white bread here; we got pumpernickel, we've got whole wheat and we've got rye."
Mr. Obama is counting on a highly organized cadre of enthusiastic supporters — he has nearly double the number of field offices of any other candidate — to edge him toward another victory.
In North Las Vegas on Wednesday, an Obama field office was buzzing with activities and people came in from the streets looking for yard signs and T-shirts. ("Tell Mama Vote Obama" remained on the wall, and there was not a sign for the taking.)
"Senator Obama has invested heavily into this state," said Shannon Gilson, a spokeswoman for his campaign here. "We aren't taking anything for granted."
Mrs. Clinton's campaign, perhaps trying to distract from the powerful union endorsement, made much hay Wednesday morning of its endorsement by Representative Shelley Berkley, whose Congressional district encompasses Las Vegas.
Mr. Obama, of Illinois, and Mrs. Clinton, of New York, have ventured into parts of Nevada that have traditionally shunned Democrats, like Elko in the north. Statewide, Mr. Obama has 11 offices total, Mrs. Clinton has six, including two she opened since the New Year here.
The efforts are boisterous extensions of what the Clinton and Obama campaigns have been quietly building as the rest of the nation kept its eyes on Iowa and New Hampshire.
Nevada, chosen by the Democratic Party to hold an early contest long before numerous other states decided to move their primaries to Feb. 5, has been largely overshadowed by Iowa, New Hampshire and, to a lesser degree, South Carolina.
(Republicans also have caucuses here on Jan. 19, but they are nonbinding and have been largely ignored by all but Mitt Romney and Representative Ron Paul.)
benbego February 15, 2008 at 2:39 pm
nice article. i will try it.
Piggy March 21, 2008 at 7:24 pm
I came across Sez Who a while ago and thought it looked interesting, then completely forgot to have a closer look a while later.
I might just do that now that I've 'rediscovered' it again, thanks to you.
Richard McLaughlin May 3, 2008 at 7:46 am
I agree that "primary content taking a backseat to the comment generation" seems to be the case, or at least the effort. I know people that use tools to track the top blogs, just so they can be the first poster. First in line gets you traffic back to your site and builds you rep.
Example: My being the 20th poster here has no rep value.

redpajama_set_name: RedPajamaCommonCrawl


"\He Cured The Leak And I Had Confidence In Him."
"Great And Fast Service With A Quality Job Done"
"He Was On Time, Didnt Waste Time And More Over Seemed Straightforward And Honest. Did A Good Job Too."
"Very Well. Quick, Efficient And Friendly Service"
"Clear Explanation And Resolution Quickly And Efficiently"
Need a Plumber in Manchester?


text:
Tag: taxes
FIRE Month Savings Progress Report for April 2022
Better late than never What happened this last month? The markets were down a lot in April, which negatively affected a lot of our numbers, except for the "number of times our annual expenses we'll have when we reach our goal number". That's mainly due to the fact that our expenses from doing the kitchen…
FIRE Month Savings Progress Report for March 2022
Beware the Ides of March… or not What happened this last month? Overall, March was a great month. The markets have improved from where they were the month prior and we continue to put away a significant amount of money each month. Last year, we had decided to go to Universal Studios Orlando, which bumped…
FIRE Progress Report through March 2020
Progress Report (Pandemic Edition) What's Happened and What's Happening Wow, what a month it has been! If I had 10 guesses, a pandemic or stay-at-home orders would not have been on that list. I know this is a scary time for a lot of people and many people have lost their jobs. I'm fortunate to…
Ohio's Ludicrous Tax on Hybrid Vehicles
I recently discovered that as part of Ohio's new bill to raise money for roads and bridges, they also passed a new $100 registration fee on hybrids and a $200 registration fee on electric cars ( https://www.cleveland.com/open/2019/05/ohio-owners-of-electric-hybrid-cars-say-new-taxes-fees-are-punitive.html). The reason for these fees is supposedly because these vehicles use less gasoline, so they therefore do not…
Is getting a tax refund a good thing?
We established in an earlier post that a lot of people will be getting a tax refund and it will average around $2800. That's quite a big chunk of change. But is getting a tax refund a good thing? A lot of people think that if they're getting a refund that it means they did something right…
What are you going to do with your tax refund?
According to the IRS, the average tax refund last year was about $2800. That's a lot of money. Let's look at that a couple different ways. $2800 is the same as: $233 a month $116 if you're paid twice a month $107 if you're paid bi-weekly $53 if you're paid weekly That would be a…


text:
import asyncio
import enum
import io
import json
import mimetypes
import os
import warnings
from abc import ABC, abstractmethod
from itertools import chain
from typing import (
    IO,
    TYPE_CHECKING,
    Any,
    ByteString,
    Dict,
    Iterable,
    Optional,
    Text,
    TextIO,
    Tuple,
    Type,
    Union,
)

from multidict import CIMultiDict

from . import hdrs
from .abc import AbstractStreamWriter
from .helpers import (
    PY_36,
    content_disposition_header,
    guess_filename,
    parse_mimetype,
    sentinel,
)
from .streams import DEFAULT_LIMIT, StreamReader
from .typedefs import JSONEncoder, _CIMultiDict

__all__ = ('PAYLOAD_REGISTRY', 'get_payload', 'payload_type', 'Payload',
           'BytesPayload', 'StringPayload',
           'IOBasePayload', 'BytesIOPayload', 'BufferedReaderPayload',
           'TextIOPayload', 'StringIOPayload', 'JsonPayload',
           'AsyncIterablePayload')

TOO_LARGE_BYTES_BODY = 2 ** 20  # 1 MB

if TYPE_CHECKING:  # pragma: no cover
    from typing import List  # noqa

class LookupError(Exception):
    pass

class Order(str, enum.Enum):
    normal = 'normal'
    try_first = 'try_first'
    try_last = 'try_last'

def get_payload(data: Any, *args: Any, **kwargs: Any) -> 'Payload':
    return PAYLOAD_REGISTRY.get(data, *args, **kwargs)

def register_payload(factory: Type['Payload'],
                     type: Any,
                     *,
                     order: Order=Order.normal) -> None:
    PAYLOAD_REGISTRY.register(factory, type, order=order)

class payload_type:

    def __init__(self, type: Any, *, order: Order=Order.normal) -> None:
        self.type = type
        self.order = order

    def __call__(self, factory: Type['Payload']) -> Type['Payload']:
        register_payload(factory, self.type, order=self.order)
        return factory

class PayloadRegistry:
    """Payload registry.

    note: we need zope.interface for more efficient adapter search
    """

    def __init__(self) -> None:
        self._first = []  # type: List[Tuple[Type[Payload], Any]]
        self._normal = []  # type: List[Tuple[Type[Payload], Any]]
        self._last = []  # type: List[Tuple[Type[Payload], Any]]

    def get(self,
            data: Any,
            *args: Any,
            _CHAIN: Any=chain,
            **kwargs: Any) -> 'Payload':
        if isinstance(data, Payload):
            return data
        for factory, type in _CHAIN(self._first, self._normal, self._last):
            if isinstance(data, type):
                return factory(data, *args, **kwargs)

        raise LookupError()

    def register(self,
                 factory: Type['Payload'],
                 type: Any,
                 *,
                 order: Order=Order.normal) -> None:
        if order is Order.try_first:
            self._first.append((factory, type))
        elif order is Order.normal:
            self._normal.append((factory, type))
        elif order is Order.try_last:
            self._last.append((factory, type))
        else:
            raise ValueError("Unsupported order {!r}".format(order))

class Payload(ABC):

    _default_content_type = 'application/octet-stream'  # type: str
    _size = None  # type: Optional[int]

    def __init__(self,
                 value: Any,
                 headers: Optional[
                     Union[
                         _CIMultiDict,
                         Dict[str, str],
                         Iterable[Tuple[str, str]]
                     ]
                 ] = None,
                 content_type: Optional[str]=sentinel,
                 filename: Optional[str]=None,
                 encoding: Optional[str]=None,
                 **kwargs: Any) -> None:
        self._encoding = encoding
        self._filename = filename
        self._headers = CIMultiDict()  # type: _CIMultiDict
        self._value = value
        if content_type is not sentinel and content_type is not None:
            self._headers[hdrs.CONTENT_TYPE] = content_type
        elif self._filename is not None:
            content_type = mimetypes.guess_type(self._filename)[0]
            if content_type is None:
                content_type = self._default_content_type
            self._headers[hdrs.CONTENT_TYPE] = content_type
        else:
            self._headers[hdrs.CONTENT_TYPE] = self._default_content_type
        self._headers.update(headers or {})

    @property
    def size(self) -> Optional[int]:
        """Size of the payload."""
        return self._size

    @property
    def filename(self) -> Optional[str]:
        """Filename of the payload."""
        return self._filename

    @property
    def headers(self) -> _CIMultiDict:
        """Custom item headers"""
        return self._headers

    @property
    def _binary_headers(self) -> bytes:
        return ''.join(
            [k + ': ' + v + '\r\n' for k, v in self.headers.items()]
        ).encode('utf-8') + b'\r\n'

    @property
    def encoding(self) -> Optional[str]:
        """Payload encoding"""
        return self._encoding

    @property
    def content_type(self) -> str:
        """Content type"""
        return self._headers[hdrs.CONTENT_TYPE]

    def set_content_disposition(self,
                                disptype: str,
                                quote_fields: bool=True,
                                **params: Any) -> None:
        """Sets ``Content-Disposition`` header."""
        self._headers[hdrs.CONTENT_DISPOSITION] = content_disposition_header(
            disptype, quote_fields=quote_fields, **params)

    @abstractmethod
    async def write(self, writer: AbstractStreamWriter) -> None:
        """Write payload.

        writer is an AbstractStreamWriter instance:
        """

class BytesPayload(Payload):

    def __init__(self,
                 value: ByteString,
                 *args: Any,
                 **kwargs: Any) -> None:
        if not isinstance(value, (bytes, bytearray, memoryview)):
            raise TypeError("value argument must be byte-ish, not (!r)"
                            .format(type(value)))

        if 'content_type' not in kwargs:
            kwargs['content_type'] = 'application/octet-stream'

        super().__init__(value, *args, **kwargs)

        self._size = len(value)

        if self._size > TOO_LARGE_BYTES_BODY:
            if PY_36:
                kwargs = {'source': self}
            else:
                kwargs = {}
            warnings.warn("Sending a large body directly with raw bytes might"
                          " lock the event loop. You should probably pass an "
                          "io.BytesIO object instead", ResourceWarning,
                          **kwargs)

    async def write(self, writer: AbstractStreamWriter) -> None:
        await writer.write(self._value)

class StringPayload(BytesPayload):

    def __init__(self,
                 value: Text,
                 *args: Any,
                 encoding: Optional[str]=None,
                 content_type: Optional[str]=None,
                 **kwargs: Any) -> None:

        if encoding is None:
            if content_type is None:
                real_encoding = 'utf-8'
                content_type = 'text/plain; charset=utf-8'
            else:
                mimetype = parse_mimetype(content_type)
                real_encoding = mimetype.parameters.get('charset', 'utf-8')
        else:
            if content_type is None:
                content_type = 'text/plain; charset=%s' % encoding
            real_encoding = encoding

        super().__init__(
            value.encode(real_encoding),
            encoding=real_encoding,
            content_type=content_type,
            *args,
            **kwargs,
        )

class StringIOPayload(StringPayload):

    def __init__(self,
                 value: IO[str],
                 *args: Any,
                 **kwargs: Any) -> None:
        super().__init__(value.read(), *args, **kwargs)

class IOBasePayload(Payload):

    def __init__(self,
                 value: IO[Any],
                 disposition: str='attachment',
                 *args: Any,
                 **kwargs: Any) -> None:
        if 'filename' not in kwargs:
            kwargs['filename'] = guess_filename(value)

        super().__init__(value, *args, **kwargs)

        if self._filename is not None and disposition is not None:
            if hdrs.CONTENT_DISPOSITION not in self.headers:
                self.set_content_disposition(
                    disposition, filename=self._filename
                )

    async def write(self, writer: AbstractStreamWriter) -> None:
        loop = asyncio.get_event_loop()
        try:
            chunk = await loop.run_in_executor(
                None, self._value.read, DEFAULT_LIMIT
            )
            while chunk:
                await writer.write(chunk)
                chunk = await loop.run_in_executor(
                    None, self._value.read, DEFAULT_LIMIT
                )
        finally:
            await loop.run_in_executor(None, self._value.close)

class TextIOPayload(IOBasePayload):

    def __init__(self,
                 value: TextIO,
                 *args: Any,
                 encoding: Optional[str]=None,
                 content_type: Optional[str]=None,
                 **kwargs: Any) -> None:

        if encoding is None:
            if content_type is None:
                encoding = 'utf-8'
                content_type = 'text/plain; charset=utf-8'
            else:
                mimetype = parse_mimetype(content_type)
                encoding = mimetype.parameters.get('charset', 'utf-8')
        else:
            if content_type is None:
                content_type = 'text/plain; charset=%s' % encoding

        super().__init__(
            value,
            content_type=content_type,
            encoding=encoding,
            *args,
            **kwargs,
        )

    @property
    def size(self) -> Optional[int]:
        try:
            return os.fstat(self._value.fileno()).st_size - self._value.tell()
        except OSError:
            return None

    async def write(self, writer: AbstractStreamWriter) -> None:
        loop = asyncio.get_event_loop()
        try:
            chunk = await loop.run_in_executor(
                None, self._value.read, DEFAULT_LIMIT
            )
            while chunk:
                await writer.write(chunk.encode(self._encoding))
                chunk = await loop.run_in_executor(
                    None, self._value.read, DEFAULT_LIMIT
                )
        finally:
            await loop.run_in_executor(None, self._value.close)

class BytesIOPayload(IOBasePayload):

    @property
    def size(self) -> int:
        position = self._value.tell()
        end = self._value.seek(0, os.SEEK_END)
        self._value.seek(position)
        return end - position

class BufferedReaderPayload(IOBasePayload):

    @property
    def size(self) -> Optional[int]:
        try:
            return os.fstat(self._value.fileno()).st_size - self._value.tell()
        except OSError:
            # data.fileno() is not supported, e.g.
            # io.BufferedReader(io.BytesIO(b'data'))
            return None

class JsonPayload(BytesPayload):

    def __init__(self,
                 value: Any,
                 encoding: str='utf-8',
                 content_type: str='application/json',
                 dumps: JSONEncoder=json.dumps,
                 *args: Any,
                 **kwargs: Any) -> None:

        super().__init__(
            dumps(value).encode(encoding),
            content_type=content_type, encoding=encoding, *args, **kwargs)

if TYPE_CHECKING:  # pragma: no cover
    from typing import AsyncIterator, AsyncIterable

    _AsyncIterator = AsyncIterator[bytes]
    _AsyncIterable = AsyncIterable[bytes]
else:
    from collections.abc import AsyncIterable, AsyncIterator

    _AsyncIterator = AsyncIterator
    _AsyncIterable = AsyncIterable

class AsyncIterablePayload(Payload):

    _iter = None  # type: Optional[_AsyncIterator]

    def __init__(self,
                 value: _AsyncIterable,
                 *args: Any,
                 **kwargs: Any) -> None:
        if not isinstance(value, AsyncIterable):
            raise TypeError("value argument must support "
                            "collections.abc.AsyncIterablebe interface, "
                            "got {!r}".format(type(value)))

        if 'content_type' not in kwargs:
            kwargs['content_type'] = 'application/octet-stream'

        super().__init__(value, *args, **kwargs)

        self._iter = value.__aiter__()

    async def write(self, writer: AbstractStreamWriter) -> None:
        if self._iter:
            try:
                # iter is not None check prevents rare cases
                # when the case iterable is used twice
                while True:
                    chunk = await self._iter.__anext__()
                    await writer.write(chunk)
            except StopAsyncIteration:
                self._iter = None

class StreamReaderPayload(AsyncIterablePayload):

    def __init__(self, value: StreamReader, *args: Any, **kwargs: Any) -> None:
        super().__init__(value.iter_any(), *args, **kwargs)

PAYLOAD_REGISTRY = PayloadRegistry()
PAYLOAD_REGISTRY.register(BytesPayload, (bytes, bytearray, memoryview))
PAYLOAD_REGISTRY.register(StringPayload, str)
PAYLOAD_REGISTRY.register(StringIOPayload, io.StringIO)
PAYLOAD_REGISTRY.register(TextIOPayload, io.TextIOBase)
PAYLOAD_REGISTRY.register(BytesIOPayload, io.BytesIO)
PAYLOAD_REGISTRY.register(
    BufferedReaderPayload, (io.BufferedReader, io.BufferedRandom))
PAYLOAD_REGISTRY.register(IOBasePayload, io.IOBase)
PAYLOAD_REGISTRY.register(StreamReaderPayload, StreamReader)
# try_last for giving a chance to more specialized async interables like
# multidict.BodyPartReaderPayload override the default
PAYLOAD_REGISTRY.register(AsyncIterablePayload, AsyncIterable,
                          order=Order.try_last)

redpajama_set_name: RedPajamaGithub


When Shadow wakes up in a stranger's home with a concussion, and no recollection of the events prior, he reluctantly lets her take care of him. But he soon finds that what happened to him may have a connection with his past--a past that, as much as he refuses to admit it, he can't face alone.
"For what purpose was I born into this world?" With his memories all over the place, Shadow finds himself back in Westopolis trying to leave his past behind and reconnect with old friends, one in particular being Rouge. When his past comes back to haunt him and a new threat arises, will Shadow put his emotions aside? Or will he succumb to the darkness within him? Shadouge.
The adventure continues for Sonic Underground; they head to Earth in search of clues about their father and the darkness along with hunting down Mr. X, Robotnik's Master, and more. Our heroes will make new friends and enemies, face new challenges like school. Also, Sonic and Nico find the girl from their dream but is it really her.
Find out this and more in 2017!
While the living member of their team regains her strength, Shadow and Omega have a late-night discussion about their team, their journey and...love?
Sonic is going on a date with Knuckles. Being the super competitive hedgehog he is, Shadow is determined to out-romance him. Sonic and Knuckles decide to have some fun with this.
Sonic,Sonia,and Manic prepare to end Robotnik's rule over Mobius, but the three royal hedgehogs will learn that they are not alone. Plus they will learn that Robotnik has dark secret that will put the universe in grave danger.
Shadow has been playing hooky from reporting to GUN HQ, so Rouge goes on a mission to find him.
A piece for metaknight on Tumblr!
Shadow and rouge were sent into the future for classified reasons and return ten years pater to find that the eggman empire has risen and south island completely deserted. The pair must team up with old frends(?) in order to track down the chaos emeralds and take back south island.
But along the way, they face many hardships such as disagreements, romantic feelings, and a really annoying yet mysterious man who claims to be Amy's soulmate. Will they save the day? Will they find Sonic?
This story is not a shipping story, despite containing tons of shipping. It is full of couples, and if you happen to see your favorite ship in here, you will probably find it disappointing.
My entry for the Character of the Month contest for October at TrueBlueAsylum on Deviantart.


text:
Q: map/set no deferenceable after using map.erase I am getting a map/set not dereferanceable debug assertion error in my code and I have no idea how to fix it, I have pinpointed the problem to the map.erase in my Shape::insert function however I have no idea how to stop the problem from happening any help is appreciated thanks
If I remove the erase function it works however I need it to erase the items from the map so that they aren't used by those functions anymore
ShapeDraw.h
#ifndef _SHAPE_
#define _SHAPE_
#include <Windows.h>
#include <cmath>
#include <math.h>
#include <stdlib.h>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <time.h>
#include <fstream>
#include <commdlg.h>
struct CardData
{
    int _x;
    int _y;
    LPCWSTR _filename;
    int _value;
    int _suit = 0; //0 - Hearts, 1 - Diamonds, 2 - Spaces, 3 - Clubs
    bool _face = 0; //0 - Face Down, 1 - Face Up <-- This bit is only used for adding the cards to the stacks and shit
};
struct cardStackList;
class Shape
{

public:
    cardStackList *stack[11];
    //extern cardStackList *stack[11];
    //static HBITMAP mBkg;
    int g_width = 10; //Default Pen Size is 10,
    int g_pen = PS_SOLID;
    int pCountMax = pCount;
    int pCount = 0; //Painting Count
    std::map<int, CardData> _cardMatrix;
    std::map<int, CardData>::iterator _rCardIter;
    cardStackList* make_stack();
    void insert(cardStackList *_stack);
    void CreateStacks();
    cardStackList* remove(cardStackList *_stack); //Remove the top most card
    cardStackList* search(cardStackList *_stack, int _value, int _suit);
    void display(cardStackList *_stack); //Draw Cards in descending order
    Shape()
    {
        for (int i = 0; i < 11; i++)
        {
            stack[i] = NULL;
        }
    }
};
#endif

ShapeDraw.cpp
#include "ShapeDraw.h"
struct cardStackList
{
    int _x;
    int _y;
    LPCWSTR _filename;
    int _value;
    int _suit;
    struct cardStackList *next;
    struct cardStackList *prev;
    bool _face; //0 - Face Down, 1 - Face Up
}*stack[11];
cardStackList* Shape::make_stack()
{
    int i;
    struct cardStackList *temp;
    temp = new(struct cardStackList);
    if (temp == NULL)
    {
        return 0;
    }
    else
    {
        i = rand() % (_cardMatrix.size());
        _rCardIter = _cardMatrix.find(i);
        temp->_x = _rCardIter->second._x;
        temp->_y = _rCardIter->second._y;
        temp->_filename = _rCardIter->second._filename;
        temp->_value = _rCardIter->second._value;
        temp->_suit = _rCardIter->second._suit;
        temp->_face = _rCardIter->second._face;
        temp->next = NULL;
        temp->prev = NULL;
        _cardMatrix.erase(_rCardIter);
        pCount--;
        pCountMax = _cardMatrix.size() + 1;
    }
    return temp;
}
void Shape::insert(cardStackList *_stack)
{
    struct cardStackList *temp, *s, *t;
    temp = make_stack();
    s = _stack;
    t = s;
    if (_stack == NULL)
    {
        _stack = temp;
        _stack->next = NULL;
        _stack->prev = NULL;
    }
    else
    {
        while (s != NULL)
        {
            t = s;
            s = s->next;
        }
        s = temp;
        s->prev = t;
        s->prev->next = s;
    }
}
cardStackList *Shape::remove(cardStackList *_stack)
{
    struct cardStackList *temp, *t, *return_card;
    temp = _stack;
    t = temp;
    while (temp != NULL)
    {
        t = temp;
        if (temp->next != NULL)
        {
            temp = temp->next;
        }
        else
        {
            temp = t;
        }
    }
    temp = t;
    return_card = temp->next;
    temp->next = temp->next->next;
    temp->next->prev = t;
    return return_card;
}
cardStackList *Shape::search(cardStackList *_stack, int _value, int _suit)
{
    struct cardStackList *temp;
    temp = _stack;
    while (temp->_value != _value && temp->_suit != _suit)
    {
        if (temp->next != NULL)
        {
            temp = temp->next;
        }
    }
    if (temp != NULL)
    {
        return temp;
    }
    return NULL; //Only reaches this if the _value and _suit does not exist in that specific stack
}
void Shape::display(cardStackList *_stack)
{

    struct cardStackList *_slot[11];
    /*
    slots 7 to 10 are the Ace Slots
    */
    for (int i = 0; i <= 10; i++)
    {
        _slot[i] = stack[i];
    }
    for (int i = 0; i <= 10; i++)
    {
        while (_slot[i] != NULL)
        {

        }
    }
}
void Shape::CreateStacks()
{
    for (int i = 0; i < 7; i++)
    {
        insert(stack[0]);
    }
    for (int i = 0; i < 6; i++)
    {
        insert(stack[1]);
    }
    for (int i = 0; i < 5; i++)
    {
        insert(stack[2]);
    }
    for (int i = 0; i < 4; i++)
    {
        insert(stack[3]);
    }
    for (int i = 0; i < 3; i++)
    {
        insert(stack[4]);
    }
    for (int i = 0; i < 2; i++)
    {
        insert(stack[5]);
    }
    for (int i = 0; i < 1; i++)
    {
        insert(stack[6]);
    }
    //Stuff that creates the 7 stacks here
}

A: The problem is in this line:
_rCardIter = _cardMatrix.find(i);

_cardMatrix is a map, but i is an index (count) of elements within the map.  The find will eventually fail to find the card with the ith index and return the end iterator.
As an example, I'll assume your matrix starts out with the card numbers 0..51.  The first card removed is the 23rd card, so the matrix has 51 cards 0..22 and 24..51.  The next time in, you again want the 23rd card.  find won't find that, since that card has been removed, and the iterator you will get will be _cardMatrix.end(), which can not be dereferenced.