A B C E F G I J L M N O P Q R S U V W misc
| alphabetFrequencyFromBam | Stack the read sequences stored in a GAlignments object or a BAM file |
| as.data.frame-method | GAlignmentPairs objects |
| as.data.frame-method | GAlignments objects |
| as.data.frame-method | OverlapEncodings objects |
| as.data.frame.OverlapEncodings | OverlapEncodings objects |
| bindROWS-method | GAlignmentPairs objects |
| bindROWS-method | GAlignments objects |
| c-method | (Legacy) GappedReads objects |
| cigar | GAlignments objects |
| cigar-method | GAlignments objects |
| cigar-method | GAlignmentsList objects |
| cigar-utils | CIGAR utility functions |
| cigarNarrow | CIGAR utility functions |
| cigarOpTable | CIGAR utility functions |
| cigarQNarrow | CIGAR utility functions |
| cigarRangesAlongPairwiseSpace | CIGAR utility functions |
| cigarRangesAlongQuerySpace | CIGAR utility functions |
| cigarRangesAlongReferenceSpace | CIGAR utility functions |
| cigarToRleList | CIGAR utility functions |
| cigarWidthAlongPairwiseSpace | CIGAR utility functions |
| cigarWidthAlongQuerySpace | CIGAR utility functions |
| cigarWidthAlongReferenceSpace | CIGAR utility functions |
| CIGAR_OPS | CIGAR utility functions |
| class:GAlignmentPairs | GAlignmentPairs objects |
| class:GAlignments | GAlignments objects |
| class:GAlignmentsList | GAlignmentsList objects |
| class:GappedReads | (Legacy) GappedReads objects |
| class:OverlapEncodings | OverlapEncodings objects |
| coerce-method | GAlignmentPairs objects |
| coerce-method | GAlignments objects |
| coerce-method | GAlignmentsList objects |
| coordinate-mapping-methods | Map range coordinates between reads and genome space using CIGAR alignments |
| countCompatibleOverlaps | Finding hits between reads and transcripts that are _compatible_ with the splicing of the transcript |
| countDumpedAlignments | Pairing the elements of a GAlignments object |
| coverage | Coverage of a GAlignments, GAlignmentPairs, or GAlignmentsList object |
| coverage-method | Coverage of a GAlignments, GAlignmentPairs, or GAlignmentsList object |
| coverage-methods | Coverage of a GAlignments, GAlignmentPairs, or GAlignmentsList object |
| elementMetadata-method | GAlignmentsList objects |
| elementMetadata<--method | GAlignmentsList objects |
| encodeOverlaps | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| encodeOverlaps-method | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| encodeOverlaps-methods | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| encodeOverlaps1 | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| encoding-method | OverlapEncodings objects |
| encodingHalves | OverlapEncodings objects |
| encodingHalves-method | OverlapEncodings objects |
| explodeCigarOpLengths | CIGAR utility functions |
| explodeCigarOps | CIGAR utility functions |
| extractAlignmentRangesOnReference | CIGAR utility functions |
| extractQueryStartInTranscript | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| extractSkippedExonRanks | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| extractSkippedExonRanks-method | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| extractSpannedExonRanks | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| extractSpannedExonRanks-method | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| extractSteppedExonRanks | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| extractSteppedExonRanks-method | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| findCompatibleOverlaps | Finding hits between reads and transcripts that are _compatible_ with the splicing of the transcript |
| findCompatibleOverlaps-method | Finding hits between reads and transcripts that are _compatible_ with the splicing of the transcript |
| findCompatibleOverlaps-methods | Finding hits between reads and transcripts that are _compatible_ with the splicing of the transcript |
| findMateAlignment | Pairing the elements of a GAlignments object |
| findOverlaps | Finding overlapping genomic alignments |
| findOverlaps-method | Finding overlapping genomic alignments |
| findOverlaps-methods | Finding overlapping genomic alignments |
| findSpliceOverlaps | Classify ranges (reads) as compatible with existing genomic annotations or as having novel splice events |
| findSpliceOverlaps-method | Classify ranges (reads) as compatible with existing genomic annotations or as having novel splice events |
| findSpliceOverlaps-methods | Classify ranges (reads) as compatible with existing genomic annotations or as having novel splice events |
| first | GAlignmentPairs objects |
| first-method | GAlignmentPairs objects |
| flippedQuery | OverlapEncodings objects |
| flippedQuery-method | OverlapEncodings objects |
| flipQuery | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| flushDumpedAlignments | Pairing the elements of a GAlignments object |
| GAlignmentPairs | GAlignmentPairs objects |
| GAlignmentPairs-class | GAlignmentPairs objects |
| GAlignments | GAlignments objects |
| GAlignments-class | GAlignments objects |
| GAlignmentsList | GAlignmentsList objects |
| GAlignmentsList-class | GAlignmentsList objects |
| GappedReads | (Legacy) GappedReads objects |
| GappedReads-class | (Legacy) GappedReads objects |
| getDumpedAlignments | Pairing the elements of a GAlignments object |
| getListElement-method | GAlignments objects |
| granges-method | GAlignmentPairs objects |
| granges-method | GAlignments objects |
| granges-method | GAlignmentsList objects |
| grglist-method | GAlignmentPairs objects |
| grglist-method | GAlignments objects |
| grglist-method | GAlignmentsList objects |
| IntersectionNotEmpty | Perform overlap queries between reads and genomic features |
| IntersectionStrict | Perform overlap queries between reads and genomic features |
| intra-range-methods | Intra range transformations of a GAlignments or GAlignmentsList object |
| invertStrand-method | GAlignmentPairs objects |
| is.unsorted-method | GAlignments objects |
| isCompatibleWithSkippedExons | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| isCompatibleWithSkippedExons-method | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| isCompatibleWithSplicing | OverlapEncodings objects |
| isCompatibleWithSplicing-method | OverlapEncodings objects |
| isProperPair | GAlignmentPairs objects |
| isProperPair-method | GAlignmentPairs objects |
| junctions | Extract junctions from genomic alignments |
| junctions-method | Extract junctions from genomic alignments |
| junctions-methods | Extract junctions from genomic alignments |
| last | GAlignmentPairs objects |
| last-method | GAlignmentPairs objects |
| Lencoding | OverlapEncodings objects |
| levels-method | OverlapEncodings objects |
| levels.OverlapEncodings | OverlapEncodings objects |
| Lnjunc | OverlapEncodings objects |
| Loffset | OverlapEncodings objects |
| Loffset-method | OverlapEncodings objects |
| makeGAlignmentPairs | Pairing the elements of a GAlignments object |
| mapFromAlignments | Map range coordinates between reads and genome space using CIGAR alignments |
| mapFromAlignments-method | Map range coordinates between reads and genome space using CIGAR alignments |
| mapToAlignments | Map range coordinates between reads and genome space using CIGAR alignments |
| mapToAlignments-method | Map range coordinates between reads and genome space using CIGAR alignments |
| names-method | GAlignmentPairs objects |
| names-method | GAlignments objects |
| names-method | GAlignmentsList objects |
| names<--method | GAlignmentPairs objects |
| names<--method | GAlignments objects |
| names<--method | GAlignmentsList objects |
| narrow-method | Intra range transformations of a GAlignments or GAlignmentsList object |
| NATURAL_INTRON_MOTIFS | Extract junctions from genomic alignments |
| njunc | GAlignments objects |
| njunc-method | GAlignmentPairs objects |
| njunc-method | GAlignments objects |
| njunc-method | GAlignmentsList objects |
| njunc-method | OverlapEncodings objects |
| order-method | GAlignments objects |
| OverlapEncodings | OverlapEncodings objects |
| OverlapEncodings-class | OverlapEncodings objects |
| parallelSlotNames-method | GAlignmentPairs objects |
| parallelSlotNames-method | GAlignments objects |
| parallelSlotNames-method | OverlapEncodings objects |
| pcompare-method | GAlignments objects |
| pileLettersAt | Pile the letters of a set of aligned reads on top of a set of genomic positions |
| pintersect | Set operations on GAlignments objects |
| pintersect-method | Set operations on GAlignments objects |
| pmapFromAlignments | Map range coordinates between reads and genome space using CIGAR alignments |
| pmapFromAlignments-method | Map range coordinates between reads and genome space using CIGAR alignments |
| pmapToAlignments | Map range coordinates between reads and genome space using CIGAR alignments |
| pmapToAlignments-method | Map range coordinates between reads and genome space using CIGAR alignments |
| qnarrow | Intra range transformations of a GAlignments or GAlignmentsList object |
| qnarrow-method | Intra range transformations of a GAlignments or GAlignmentsList object |
| qseq | (Legacy) GappedReads objects |
| qseq-method | (Legacy) GappedReads objects |
| queryLoc2refLoc | CIGAR utility functions |
| queryLocs2refLocs | CIGAR utility functions |
| qwidth | GAlignments objects |
| qwidth-method | GAlignments objects |
| qwidth-method | GAlignmentsList objects |
| qwidth-method | (Legacy) GappedReads objects |
| ranges-method | GAlignmentPairs objects |
| ranges-method | GAlignments objects |
| ranges-method | GAlignmentsList objects |
| rank-method | GAlignments objects |
| readGAlignmentPairs | Reading genomic alignments from a file |
| readGAlignmentPairs-method | Reading genomic alignments from a file |
| readGAlignments | Reading genomic alignments from a file |
| readGAlignments-method | Reading genomic alignments from a file |
| readGAlignmentsList | Reading genomic alignments from a file |
| readGAlignmentsList-method | Reading genomic alignments from a file |
| readGappedReads | Reading genomic alignments from a file |
| readGappedReads-method | Reading genomic alignments from a file |
| readSTARJunctions | Extract junctions from genomic alignments |
| readTopHatJunctions | Extract junctions from genomic alignments |
| relistToClass-method | GAlignmentsList objects |
| Rencoding | OverlapEncodings objects |
| rglist-method | GAlignments objects |
| rglist-method | GAlignmentsList objects |
| rname | GAlignments objects |
| rname-method | GAlignments objects |
| rname-method | GAlignmentsList objects |
| rname<- | GAlignments objects |
| rname<--method | GAlignments objects |
| rname<--method | GAlignmentsList objects |
| Rnjunc | OverlapEncodings objects |
| Roffset | OverlapEncodings objects |
| Roffset-method | OverlapEncodings objects |
| second | GAlignmentPairs objects |
| second-method | GAlignmentPairs objects |
| selectEncodingWithCompatibleStrand | Encode the overlaps between RNA-seq reads and the transcripts of a gene model |
| seqinfo-method | GAlignmentPairs objects |
| seqinfo-method | GAlignments objects |
| seqinfo-method | GAlignmentsList objects |
| seqinfo<--method | GAlignmentPairs objects |
| seqinfo<--method | GAlignments objects |
| seqinfo<--method | GAlignmentsList objects |
| seqlevelsInUse-method | GAlignmentPairs objects |
| seqnames-method | GAlignmentPairs objects |
| seqnames-method | GAlignments objects |
| seqnames-method | GAlignmentsList objects |
| seqnames<--method | GAlignments objects |
| seqnames<--method | GAlignmentsList objects |
| sequenceLayer | Lay read sequences alongside the reference space, using their CIGARs |
| setops-methods | Set operations on GAlignments objects |
| show-method | GAlignmentPairs objects |
| show-method | GAlignments objects |
| show-method | GAlignmentsList objects |
| show-method | OverlapEncodings objects |
| sort-method | GAlignments objects |
| stackStringsFromBam | Stack the read sequences stored in a GAlignments object or a BAM file |
| stackStringsFromGAlignments | Stack the read sequences stored in a GAlignments object or a BAM file |
| start-method | GAlignments objects |
| strand-method | GAlignmentPairs objects |
| strand-method | GAlignments objects |
| strand-method | GAlignmentsList objects |
| strand<--method | GAlignments objects |
| strand<--method | GAlignmentsList objects |
| strandMode | GAlignmentPairs objects |
| strandMode-method | GAlignmentPairs objects |
| strandMode<- | GAlignmentPairs objects |
| strandMode<--method | GAlignmentPairs objects |
| summarizeJunctions | Extract junctions from genomic alignments |
| summarizeOverlaps | Perform overlap queries between reads and genomic features |
| summarizeOverlaps-method | Perform overlap queries between reads and genomic features |
| summarizeOverlaps-methods | Perform overlap queries between reads and genomic features |
| Union | Perform overlap queries between reads and genomic features |
| unlist-method | GAlignmentPairs objects |
| update-method | GAlignments objects |
| updateObject-method | GAlignments objects |
| validCigar | CIGAR utility functions |
| width-method | GAlignments objects |
| windows-method | Intra range transformations of a GAlignments or GAlignmentsList object |
| [[-method | GAlignmentPairs objects |


Solaire of Astora
Job: Warrior of Sunlight
Profesional Summary:
(Literally just an excerpt from the Dark Souls Wiki)
An exceptionally skilled warrior who purposefully became Undead so he could visit Lordran in his quest to find a sun of his own
Skills
- Good with a greatsword
- Able to engage in jolly cooperation
- Can throw freaking lightning
Reasons You Should Hire Me
- I can be summoned for difficult battles
- I'll have my very own sun someday
- I have a strong desire to be grosly incandescent
Image Link.


DCAE DMaaP Bus Controller
The full artifact implements an HTTP Server that supports the Bus Controller API.
The complete implementation is documented in Javadocs.
DCAE DMaaP Bus Controller API
This server provides the following representations of the Bus Controller API:
- description of the API:
- presented in the swagger UI.
This provides a more dynamic presentation of the API, with ability to "Try it out!" interface.
Like a game, you may need to experiment with where to click...
- presented in a hardcopy pdf. This is a Print-to-File output from swagger editor preview pane.
- implementation - this server also is the root URL for a "working" implementation.
- test suite - TBD
- GUI - TBD
This feature is delivered to GitLab Repo under project org.openecomp.dmaapbc


EducationMania
Home
About Us
Study Material
Online Editor
Games
Login
Register
OUR TEAM
"Talent wins games, but teamwork and intelligence win championships." --Michael Jordan..
DHANRAJ CHAURASIA
DESIGNER
ASHUTOSH SUTHAR
Designer
DE-NANDAN
DESIGNER
KUNAL
Designer


In many cultures, certain items of clothing and/or accessories are used as visual cues to indicate whether or not a person is in a relationship. If they're single, this can be done to make clear their availability, whether for a long-term relationship or a simple hookup, and can extend to indicating gender and/or sexual preferences. On the other hand, if the person is in a relationship, this can indicate the level of the relationship. In either case, what is worn and how it's worn can take on different meanings depending on what's being intended.
Coordinated Clothes is a common way to show this. Her Boyfriend's Jacket is a specific application.
Compare:
- Ready for Lovemaking, when a person dresses provocatively to make clear that they are feeling amorous.
- Diamonds in the Buff, when nothing is worn except strategically-placed jewelry.
- Virgin in a White Dress, where a girl or a woman wears white to show that she is a virgin, or where people make that assumption about her.
- Visual Development, when appearance changes are used to indicate inner changes in a character.
- Widow's Weeds, when someone wears black clothes or a black accessory to show mourning.
Contrast Wedding Ring Defense, when someone who's single wears a wedding or engagement ring to fend off potential suitors.
Examples
- In the Silver Age of Hawkman, as a Thanagarian Hawkgirl wore earrings to signify her status as a married woman. Mavis Trent believed that since Hawkgirl didn't wear a wedding ring, Hawkman was single, and often flirted with him.
- In the My Little Pony: Friendship Is Magic fic Broken Symmetry, it's mentioned in passing that single unicorns will file their horns to a point to advertise that they're available.
- A Changed World briefly mentions that Eleya and Gaarra have exchanged chain links from their earrings, which the later story "Alls Fair In Love And War" clarifies to be the Bajoran equivalent of wedding rings, confirming that they got married off-screen.
- In Xenophilia, Lero makes his relationship with Rainbow Dash public by wearing one of her flight feathers in his hair.
- In the Star Wars prequels, Padmé uses her disguises to throw people off about her availability. In Attack of the Clones she dons the dress of a young matron from the Thousand Moons system as her refugee disguise. In Revenge of the Sith she starts by wearing a hairdo meant to announce one's desire for a husband when she's desperately trying to hide the fact that she's already married.
- In the Heralds of Valdemar novels, Hawkbrothers indicate they're in a serious relationship by wearing a feather from their partner's bondbird as a hair ornament.
- In Kris Longknife: Defiant, Kris attends a celebration on Hikila, a Polynesian-descended colony, wearing nothing but strategically placed garlands and body paint. The Hikilans consider this appropriate formal wear for a "virgin" (she technically isn't, but in context, it refers to any young single woman, which she is).
- In Star Trek: The Motion Picture, Cmdr. Decker tries to get through to the Ilia probe by putting a headband on her that he'd given to the real Ilia when they were in a relationship. The novelization reveals that wearing this headband is a sign of being in a marriage-like relationship, a significant cue for the hypersexual Deltan race. Decker just thought it would look nice on her.
- In Esther Friesner's The Sword of Mary (part of the Becca of Wiserways series), Becca is tricked into wearing a paper flower that indicates she's a lesbian, potentially getting her in trouble with the law. Different flower colors indicate different interests at an underground bar.
- In the Vorkosigan Saga, Betans wear earrings that mark their sexual preferences and availability.
- The Wheel of Time:
- Women of Malkier paint a dot on their forehead called the ki'sain, a practice that Nynaeve adopts when she marries Lan. While the ki'sain itself signifies a familial pledge to fight the Shadow in the Malkieri's Proud Warrior Race tradition, its colour indicates whether the woman is single, married, or widowed.
- In the city of Ebou Dar, a husband gifts his wife an ornamental "marriage knife" necklace on their wedding day, which is later ornamented with a precious stone for each of their children. Ostensibly, it also confers the right for the wife to use the knife on her husband if he displeases her, as a nod to the city's robust dueling culture.
- In the Landish/Winters series Highest Bidder , a BDSM club provides coloured armbands to its entrants. The colour symbolizes whether its wearer is interested in sex, where their limits are, what fetishes they have, etc. There is also a tradition of giving one's submissive a personalized collar (or more subtle collar-like necklace), which, if accepted, indicates the submissive is in a committed relationship.
- The Bridge Kingdom Archives: A woman from Maridrina gets a pair of marriage knives on the day of her wedding ceremony. They are supposed to be used by her husband to defend her honor and they are more often than not very decorative (jewel-studded hilts and sheaths and so on) but not very practical (or even sharp).
- Toyed with in the short-lived TV series Good Sports, when former jock Bobby Tannen tries wearing a single earring for the daily broadcast. His co-host, Gayle Roberts, cattily quips, "Ever thought of wearing that in the straight ear?" This gives Bobby pause for thought.
- The Jeffersons: When the main characters take a group vacation to Hawaii, Florence makes a point of wearing a flower behind her right ear to indicate that she's looking for love.
- In Star Trek: Deep Space Nine the Bajorans use "pledge bracelets" to mark a relationship somewhere below engagement ("betrothal bracelets" also exist). (One of) Gul Dukat's mistresses, Tora Naprem, wore one.
- In Dragon Age II, three of four love interests will change their outfits if they enter a committed relationship with Hawke. While Isabela and Fenris' wardrobe changes are pretty minor, Merrill goes from the black-green rags of a Dalish outcast to a gorgeous white-and-silver piece appropriate for the significant other of the Champion of Kirkwall.
- In The Elder Scrolls V: Skyrim, wearing an Amulet of Mara, the goddess of marriage and romantic love, signifies that you're looking for a spouse.
- In El Goonish Shive, early on, Justin wore an earring in an attempt to advertise he was gay. He stopped wearing it after a while but wore it again to gain the attention of one guy whom he's sure is gay. This attempt failed.
- In Tales of MU, "middling"note elven females wear a veil over the lower half of their face to indicate that boys are off-limits. They can also gift this veil (as well as other things, such as underwear) to someone to indicate their interest in them, which is how Grace and Nicki's relationship begins.
- This is a custom around the world.
- At least in Western culture, engagement and wedding rings are two of the most ubiquitous ways to show that you are in a committed relationship. However, not everyone wears their ring(s) as intended; for instance, a man who works with heavy machinery might have his ring on a necklace under his shirt as a safety precaution. Some married people don't wear their rings at all for whatever reason. Also, a divorcee, widow, or widower might not wear their ring anymore, the rubbed-smooth skin on their ring finger being a sign that they're possibly available again.
- It's generally believed that if a Hawaiian girl wears a flower behind her right ear, it means she's single; behind the left ear means she's taken.
- The traditional Irish Claddagh Ring can be worn 4 ways to indicate "single", "in a relationship", "engaged" or "married".
- In Victorian England, green ties were worn as code to indicate homosexuality.
- The "hanky code" from the 1970s gay leather bar scene was an intricate code of colored bandanas worn in the back pocket. The color/pattern and which side it was worn on would indicate specific fetish and dominant/submissive preferences.
- The apron that goes with the Bavarian dirndl-dress. The side on which the ribbon is located indicates whether a woman is single or married, or a widow. Most commonly seen on the Oktoberfest nowadays.
- The typical hats of some regions of the Black Forest: Black means married, red means unmarried. At the time when the custom originated, unmarried women would have been looking for a husband by default.
- Orthodox Jewish law requires women to wear head coverings after they get married.
- Nuns originally wore a veil to signal that they were symbolically married to Christ, thus not looking for a spouse.
- In the mid- to late 2000s, colored gel bracelets were a fad among schoolgirls. This led to a scare about the possibility that the bracelets were a code to what they'd be willing to do with guys, which was debunked by Snopes.
- Snopes also debunked the modern fashion of sagging pants supposedly originating in prison via inmates using it to display their sexual availability.
- Bewitched actress Elizabeth Montgomery wore a heart-shaped locket (both in Real Life, and on-screen as Samantha) as a symbol of her marriage with her third husband, William Asher. After they divorced, she no longer wore the locket.
- Jane Austen allegedly took to wearing a bonnet, the mark of a married woman, once she decided to remain a spinster.
- The notoriously louche Duke Karl Eugen of Württemberg was notorious for holding parties at which any woman who was willing to have sex with him could signal it by wearing blue shoes.
- In feudal times in Japan (and even today in some traditional towns and in the Geisha culture), the sleeves of women's kimono indicates the single/married status. Larger sleeves indicate a single woman, while shorter sleeves (only a bit larger than men's haori) indicate a married woman. The in-between sizes are referred also to an older single woman, dating a man and engaged, in order to large-to-short.


--- title: 'How To Enter Emerging Markets: Mobile from PhoneGap Day EU 2012' author: Steve Gill format: html tags: - PhoneGap Day - Video ---
Thank you to everyone who attended PhoneGap Day EU and made it such a huge success. We're sharing videos from the event for those of you who weren't able to attend.
Our next video is from Joe McCann, who presented on how to enter emerging markets for mobile at PhoneGap Day EU. Joe talks about how important it is to target emerging markets, especially BRIC (Brazil, Russia, India, China). You can view the slides from the presentation on Joe's Dropbox and view the recording from PhoneGap Day EU below!


ONE Championship: Ilias Ennahachi, Roman Kryklya leave Beijing with Super Series Kickboxing titles
by Peter CarrollIlias Ennahachi successfully defended his Super Series flyweight kickboxing title in the main event of ONE Championship: Age of Dragons on Saturday in Beijing, China with a unanimous decision win over Wenfeng Wang.
Buoyed by his home support, Wang waded into the exchanges in the final two rounds, but the Dutch fighter had likely already made an impact on the judges’ scoring card with his pinpoint striking from a multitude of angles over the opening three rounds.
“This was not my best fight, but sometimes you have a good fight…the best fight…but this time I still won the fight,” the champion said following his victory.
In the co-main event, Roman Kryklya claimed the ONE Super Series light heavyweight kickboxing world title after surviving an early storm from opponent Tarik Khbabez. As soon as the second round started, Kryklya prompted the referee to get involved twice as he unloaded on his smaller counterpart. After the second pause in action, the towering Ukrainian could taste blood and forced the stoppage with a hard-hitting flurry on the restart.
In his promotional debut, short notice stand-in Jamal Yusupov pulled off the biggest upset of the card when he toppled Muay Thai royalty Yodsanklai Iwe in the second round of their Super Series clash. The Russian’s win marked the first time that the infamous Thai boxer has been stopped in over a decade.
The fighter who owns the sole defeat on UFC champion Weili Zhang’s record, Meng Bo, opened her ONE account with knockout victory after she planted Laura Balin to the ground with a with right-left combination, prompting the referee to stop the action in the first round.
Commonwealth gold medalist and daughter of legendary Indian wrestler Mahavir Singh Phogat, Ritu Phogat, put on a dominant showing in her MMA debut. After claiming side control, Phogot landed heavy ground-and-pound until the referee stepped in to stop the action in the first round.
Opening the main card, Jeremy Miado stunned the audience with a devastating knee knockout of Li Tao Miao after some spirited back-and-forth grappling between the duo. Miado has claimed all three of his victories under the ONE banner via knockout.
Full results:
- Ilias Ennahachi def. Wenfeng Wang via unanimous decision [Kickboxing]
- Roman Kryklya def. Tarik Khbabez via TKO (punches) in R2 [Kickboxing]
- Jamal Yusupov def. Yodsanklai IWE via KO (punches) in R2 [Muay Thai]
- Meng Bo def. Laura Balin via KO (punch) in R1
- Ritu Phogat def. Nam Hee Kim via TKO (punches) in R1
- Jeremy Miado def. Li Tao Miao via KO (knee) in R1
- Christina Breuer def. Jorina Baars via split decision [Kickboxing]
- Kai Tang def. Edward Kelly via unanimous decision
- Yusup Saadulaev def. Daichi Takenaka via unanimous decision
- Enriko Kehl def. Armen Petrosyan via TKO in R2 [Muay Thai]
- Hexigetu def. Ramon Gonzales via unanimous decision


'Class signing' - Aston Villa fans make West Ham and Sheffield United transfer demand
Aston Villa transfer news | Dean Smith's side have been linked with a move for Argentina international Nicolas Gaitan with their Premier League rivals also said to be interested
by Richard CusackAston Villa fans have had their say on transfer speculation linking them with a move for Nicolas Gaitan.
Gaitan is a free agent with his contract at MLS side Chicago Fire up in December although there is an option for him to stay on for the 2020 season.
Villa will be hoping to bolster their options in the New Year when the January transfer window opens, but they could sign Gaitan sooner with the 31-year-old Boca Juniors academy product set to be unattached when his contract expires in Chicago.
West Ham United and Sheffield United are also said to be interested in the former Dalian Yifang man, with Manuel Pellegrini's side reported to have held talks with Gaitan's representatives .
Aston Villa latest
This is your round up of all things Villa; the one-stop shop that will keep you updated on the latest goings on at the club and beyond.
Transfers, injuries, match-days and managers, we’ve got you covered.
We’ll be bringing the very latest on the Villains throughout the week and around the clock.
Make sure you keep yourself updated with our handy daily catch up...
Must reads...
- Director reveals John McGinn's reaction to failed transfer
- Martin Keown fires puzzling criticism at Tyrone Mings
- What Jarrad Branthwaite has said about Villa interest
- Dean Smith urged to have a 'quiet word' with Frederic Guilbert
For all your latest AVFC news, opinion, analysis and transfer gossip, click here
You can follow our Villa reporter Ashley Preece on Twitter, and his email address is<EMAIL_ADDRESS>Naturally any talk of transfer activity gets fans chattering and Villans have been having their say on today's developments.
Heres's the pick of the reaction on social media...
@ PrashAVFC : Has West Ham written all over it.
@ Kevinpalmervill : At 31 years young I'd say it dont fit with our transfer model
@ Skullclubco : I very much doubt that
@ LH__ten : That’d be nice
@ FifeiroV : Hard to believe , he's 31 yo , playing for MLS .
@ bradavfc_9 : Class signing if it happens.
@ mcartlidge275 : If he’s got the talent then it’s still a good deal, can’t have a full team of young players.


>>> Calling all Pythonistas!
September 15 — 17, 2018 Lagos, Nigeria
For pupils, undergraduate students interested in Python
Early Bird Pricing
For hobbyist python developers and interested individuals
Early Bird Pricing
For the working class who are python experts in the industry
Early Bird Pricing
You can pay with MasterCard, Visa or Verve Cards. Tickets are invoiced by the Python Software Community.
Purchasing tickets to the PyCon Event gives you access to the following awesome stuff:
More than 20 talks and exciting keynotes
Light Breakfast, One buffet lunch and two coffee breaks
Free Wi-Fi Internet Connectivity throughout
Get discovered by companies looking to hire
Receive awesome gadgets offered by our sponsors
Lots of fun, activities and networking.


There is a small but very important difference between constructors and destructors in C++, and the __construct() and __destruct() methods in PHP.
A C++ constructor is called on an object that is being initialized, but that is not in an initialized state yet. You can experience this by calling a virtual method from the constructor. Even when this virtual method was overridden in a derived class, this will always execute the method of the class itselves, and not the overridden implementation. The reason for this is that during the call to the C++ constructor the object is not yet fully initialized, and the object is not yet aware of it's position in the class hierarchy. The call to the virtual method can thus not be passed on to the derived object.
In PHP however, the __construct() method has a different behavior. When it gets called, the object is already initialized and it is perfectly legal to make calls to even abstract methods that are implemented in derived classes. The following PHP script is completely valid - but it is impossible to do a similar thing in C++.
<?php
// base class in PHP, in which the an abstract method is called
abstract class BASE
{
// constructor
public function __construct()
{
// call abstract method
$this->doSomething();
}
// abstract method to be implemented by derived classes
public abstract function doSomething();
}
// the derived class
class DERIVED extends BASE
{
// implement the abstract method
public function doSomething()
{
echo("doSomething()\n");
}
}
// create an instance of the derived class
$d = new DERIVED();
?>
This script outputs 'doSomething()'. In fact, __construct() is not a constructor at all, but a very normal method that just happens to be the first method that is called, and that is called automatically after the object is constructed.
This difference is important for you as a C++ programmer, because you should never confuse your C++ constructor with the PHP __construct() method. In the C++ constructor, the object is being constructed and the PHP object does not yet exist. After the constructor is finished, the PHP engine takes over control and creates the PHP object, and the PHP-CPP library then links that PHP object to your C++ object. Only after both the PHP object and the C++ object are fully constructed, the __construct() method is called - just like a normal method. It is therefore not uncommon to have both a C++ constructor and a __construct() method in your class. The C++ constructor to initialize the member variables, and __construct() to activate the object.
#include <phpcpp.h>
// actual class implementation
class Counter : public Php::Base
{
private:
int _value = 0;
public:
// c++ constructor
Counter() {}
// c++ destructor
virtual ~Counter() {}
// php "constructor"
void __construct(Php::Parameters ¶ms)
{
// copy first parameter (if available)
if (params.size() > 0) _value = params[0];
}
// functions to increment and decrement
Php::Value increment() { return ++_value; }
Php::Value decrement() { return --_value; }
Php::Value value() const { return _value; }
};
extern "C" {
PHPCPP_EXPORT void *get_module() {
static Php::Extension myExtension("my_extension", "1.0");
// description of the class so that PHP knows which methods are accessible
Php::Class<Counter> counter("Counter");
counter.method("__construct", &Counter::__construct);
counter.method("increment", &Counter::increment);
counter.method("decrement", &Counter::decrement);
counter.method("value", &Counter::value);
// add the class to the extension
myExtension.add(std::move(counter));
// return the extension
return myExtension;
}
}
The code above shows that __construct() is registered as if it was a regular method - and that's what it is. The example that we've used before (the one with the Counter class) is now extended so that it is possible to give it an initial value to the counter by passing a value to the "constructor".
<?php
$counter = new Counter(10);
$counter->increment();
echo($counter->value()."\n");
?>
Just like any other method, the __construct() method can also be marked as being private or protected. If you do this, you will make it impossible to create instances of your class from PHP scripts. It is important to realize that the C++ constructor and C++ destructor still get called in such situations, because it is the __construct() call that is going to fail - and not the actual object construction.
#include <phpcpp.h>
extern "C" {
PHPCPP_EXPORT void *get_module() {
static Php::Extension myExtension("my_extension", "1.0");
// description of the class so that PHP knows which methods are accessible
Php::Class<Counter> counter("Counter");
// add a private __construct and __clone method to the class, so that
// objects can not be constructed or cloned from PHP scripts. Be aware
// that the C++ constructer does get called - it will be the call to
// the first __construct() function that will fail!
counter.method("__construct", &Counter::__construct, Php::Private);
counter.method("__clone", &Counter::__construct, Php::Private);
...
}
}
The same happens when you add a private __clone() method. It will then not be possible to clone the object from PHP code, although your C++ class still needs a copy constructor, which is called when a "clone $object" instruction is given in a PHP script.
The Php::Value class can be used as a regular PHP $variable, and you can therefore also use it for storing object instances. But how do you create brand new objects? For this we have the Php::Object class - which is simply an overridden Php::Value class with alternative constructors, and some additional checks to prevent that you will ever use a Php::Object object to store values other than objects.
// new variable holding the string "Counter"
Php::Value counter0("Counter");
// new variable holding a newly created object of type "Counter",
// the __construct() gets called without parameters
Php::Object counter1("Counter");
// new variable holding a newly created object, and
// the __construct() is being called with value 10
Php::Object counter2("Counter", 10);
// new built-in DateTime object, constructed with "now"
Php::Object time("DateTime", "now");
// valid, a Php::Object is an extended Php::Value, and
// can thus be assigned to a base Php::Value object
Php::Value copy1 = counter1;
// invalid statement, a Php::Object can only be used for storing objects
Php::Object copy2 = counter0;
The constructor of a Php::Object takes the name of a class, and an optional list of parameters that will be passed to the __construct() function. You can use names from built-in PHP classes and other extensions (like DateTime), classes from your extension (like Counter), and even classes from PHP user space.
The Php::Object class can also be used if you want to construct an instance of your own C++ class without calling the __construct() function. This can for example be useful when the __construct() method is private, or when you want to bypass a call to your own __construct() method.
#include <phpcpp.h>
// actual class implementation
class Counter : public Php::Base
{
private:
int _value = 0;
public:
// c++ constructor
Counter(int value) : _value(value) {}
// c++ destructor
virtual ~Counter() {}
// php "constructor"
void __construct() {}
// functions to increment and decrement
Php::Value value() const { return _value; }
};
// function to create a new timer
Php::Value createTimer()
{
return Php::Object("Counter", new Counter(100));
}
extern "C" {
PHPCPP_EXPORT void *get_module() {
static Php::Extension myExtension("my_extension", "1.0");
// description of the class so that PHP knows which methods are accessible,
// the __construct method is private because PHP scripts are not allowed
// to create Counter instances
Php::Class<Counter> counter("Counter");
counter.method("__construct", &Counter::__construct, Php::Private);
counter.method("value", &Counter::value);
// add the class to the extension
myExtension.add(std::move(counter));
// add the factory function to create a timer to the extension
myExtension.add("createTimer", createTimer);
// return the extension
return myExtension;
}
}
In the code above we made the __construct() function of the Counter class private. This makes it impossible to create instances of this class - both from PHP user scripts, and via calls to Php::Object("Counter") - because constructing objects in these ways will eventually result in a forbidden __construct() call.
The Php::Object does have an alternative syntax that takes a pointer to a C++ class (allocated on the heap, with operator new!) and that turns this pointer into a PHP variable without calling the __construct() method. Notice that you must also specify the classname, because C++ classes do not hold any information about themselves (like their name), while in PHP such information is required to handle reflection and functions like get_class().
The __construct() and __destruct() methods are essentially regular methods that get automatically called by PHP in certain situations. The same is true for other magic methods like __toString(), __get(), __set(), et cetera. You can implement these methods in the same was as you would do for other methods. Let's add a __toString() method to our Counter class:
#include <phpcpp.h>
// actual class implementation
class Counter : public Php::Base
{
private:
int _value = 0;
public:
// c++ constructor
Counter() {}
// c++ destructor
virtual ~Counter() {}
// functions to increment and decrement
Php::Value increment() { return ++_value; }
Php::Value decrement() { return --_value; }
Php::Value value() const { return _value; }
// convert to string
Php::Value toString() const { return std::to_string(_value); }
};
extern "C" {
PHPCPP_EXPORT void *get_module() {
static Php::Extension myExtension("my_extension", "1.0");
// description of the class so that PHP knows which methods are accessible
Php::Class<Counter> counter("Counter");
counter.method("__construct", &Counter::__construct);
counter.method("increment", &Counter::increment);
counter.method("decrement", &Counter::decrement);
counter.method("value", &Counter::value);
counter.method("__toString", &Counter::toString);
// add the class to the extension
myExtension.add(std::move(counter));
// return the extension
return myExtension;
}
}
You can also see that it is not necessary to use the same method names in the C++ class as in PHP. The C++ method "toString" was used, and mapped to the PHP function __toString().


Juno <IP_ADDRESS> is a minor update.
Core API changes
-
Relaxed method naming conventions when using
@BeanProperty annotation.
Methods with zero parameters are interpreted as getters, and methods with one parameter are interpreted as setters.
Eliminated the BeanProperty.method annotation, since it's now unnecessary.
REST server API changes
-
Significantly improved response error messages.
Older messages were rather cryptic. Error conditions should be much easier to debug now.
-
New PlainTextRestSerializer class for serializing "plain/text" requests.
Useful for debugging purposes.
-
Readers and InputStreams can now be passed in as
@Content parameters if you need direct access to the HTTP body content without involving the parsers.
Equivalent to previously calling {@link oajr.RestRequest#getInputStream()} and {@link oajr.RestRequest#getReader()}.
-
Improved support for the ?debug parameter.
Dumps better information to the log file, such as all header parameters.


WordApi
This is the WordApi API
getExamples
URL
http://api.wordnik.com/v4/word.{format}/{word}/examples
HTTP Method
GET
Response Type
Parameters
Word to return examples for
This is the WordApi API
http://api.wordnik.com/v4/word.{format}/{word}/examples
GET
Word to return examples for
Show duplicate examples from different sources
If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
Results to skip
Maximum number of results to return
http://api.wordnik.com/v4/word.{format}/{word}
GET
String value of WordObject to return
If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
Return suggestions (for correct spelling, case variants, etc.)
http://api.wordnik.com/v4/word.{format}/{word}/definitions
GET
Word to return definitions for
CSV list of part-of-speech types
Source dictionary to return definitions from. If 'all' is received, results are returned from all sources. If multiple values are received (e.g. 'century,wiktionary'), results are returned from the first specified dictionary that has definitions. If left blank, results are returned from the first dictionary that has definitions. By default, dictionaries are searched in this order: ahd, wiktionary, webster, century, wordnet
Maximum number of results to return
Return related words with definitions
If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
Return a closed set of XML tags in response
http://api.wordnik.com/v4/word.{format}/{word}/topExample
GET
Word to fetch examples for
If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
http://api.wordnik.com/v4/word.{format}/{word}/relatedWords
GET
Word to fetch relationships for
Limits the total results per type of relationship type
If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
Restrict to the supplied relatinship types
http://api.wordnik.com/v4/word.{format}/{word}/pronunciations
GET
Word to get pronunciations for
Get from a single dictionary
Text pronunciation type
If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
Maximum number of results to return
http://api.wordnik.com/v4/word.{format}/{word}/hyphenation
GET
Word to get syllables for
Get from a single dictionary. Valid options: ahd, century, wiktionary, webster, and wordnet.
If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
Maximum number of results to return
http://api.wordnik.com/v4/word.{format}/{word}/frequency
GET
Word to return
If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
Starting Year
Ending Year
http://api.wordnik.com/v4/word.{format}/{word}/phrases
GET
Word to fetch phrases for
Maximum number of results to return
Minimum WLMI for the phrase
If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
http://api.wordnik.com/v4/word.{format}/{word}/etymologies
GET
Word to return
If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
The metadata includes a time-expiring fileUrl which allows reading the audio file directly from the API. Currently only audio pronunciations from the American Heritage Dictionary in mp3 format are supported.
http://api.wordnik.com/v4/word.{format}/{word}/audio
GET
Word to get audio for.
Use the canonical form of the word
Maximum number of results to return
http://api.wordnik.com/v4/word.{format}/{word}/scrabbleScore
GET
Word to get scrabble score for.


Header file containing the Bluetooth low energy device manager class.
More...
#import <CoreBluetooth/CoreBluetooth.h>
#import <Foundation/Foundation.h>
#import "AppDelegate.h"
#import "UserProfile.h"
#import "Protocol.h"
#import "Settings.h"
Go to the source code of this file.
|
| enum | CON_STATE : NSInteger {
CON_STATE_BOOT_UP,
CON_STATE_SETTING_PROFILE,
CON_STATE_NORMAL_MODE,
CON_STATE_BLURRING,
CON_STATE_CALIBRATION_INCOMING_DATA,
CON_STATE_CALIBRATION
} |
| | This enumeration contains the connection state the device manger is currently in. More...
|
| |
| enum | USER_NOTIFICATION : NSInteger {
USER_NOTIFICATION_DEVICE_FOUND,
USER_NOTIFICATION_DEVICE_CONNECTED,
USER_NOTIFICATION_DEVICE_DISCONNECTED,
USER_NOTIFICATION_PROFILE_SET,
USER_NOTIFICATION_CALIBRATION_DONE,
USER_NOTIFICATION_BLE_NOT_SUPPORTED
} |
| | This enumeration contains the different user notification identifiers. More...
|
| |
Header file containing the Bluetooth low energy device manager class.
- Author
- Benjamin Thiemann
- Date
- 2017/01/21
- Copyright
- MIT License, Copyright (c) 2017 University of Freiburg im Breisgau, Germany,
Marlene Fiedler fiedl.nosp@m.erm@.nosp@m.infor.nosp@m.mati.nosp@m.k.uni.nosp@m.-fre.nosp<EMAIL_ADDRESS>Lorenz Miething mieth.nosp@m.inl@.nosp@m.infor.nosp@m.mati.nosp@m.k.uni.nosp@m.-fre.nosp<EMAIL_ADDRESS>Benjamin Thiemann benja.nosp@m.min..nosp@m.thiem.nosp@m.ann@.nosp@m.neptu.nosp@m.n.un.nosp@m.i-fre.nosp<EMAIL_ADDRESS>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
◆ CON_STATE
This enumeration contains the connection state the device manger is currently in.
This enumeration contains the different states the calibration window can be in.
| Enumerator |
|---|
| CON_STATE_BOOT_UP | Boot up. Device freshly connected.
|
| CON_STATE_SETTING_PROFILE | Currently sending the profile to the RFDuino.
|
| CON_STATE_NORMAL_MODE | Normal mode. Waiting for user to blink.
|
| CON_STATE_BLURRING | Screen is blurred, too long without blinking.
|
| CON_STATE_CALIBRATION_INCOMING_DATA | Calibration mode. Data is coming in.
|
| CON_STATE_CALIBRATION | Calibration mode. Data has been sent. Visual calibration is in progress.
|
◆ USER_NOTIFICATION
This enumeration contains the different user notification identifiers.
| Enumerator |
|---|
| USER_NOTIFICATION_DEVICE_FOUND | Devices found.
|
| USER_NOTIFICATION_DEVICE_CONNECTED | Device connected.
|
| USER_NOTIFICATION_DEVICE_DISCONNECTED | Device disconnected.
|
| USER_NOTIFICATION_PROFILE_SET | Profile successfully sent to RFDuino.
|
| USER_NOTIFICATION_CALIBRATION_DONE | Calibration process completed.
|
| USER_NOTIFICATION_BLE_NOT_SUPPORTED | Bluetooth Low Energy not supported.
|


--- layout: post title: Handle exceptions gracefully author: tthuon date: '2016-11-17 16:22:32 +0100' date_gmt: '2016-11-17 15:22:32 +0100' categories: - Non classé tags: - php - best practice - exception --- {% raw %}
Hello everyone! Today I would like to speak about a subject too little discussed in php: the exceptions. An exception is an alert issued when the code is executed, to indicate that something has not happened as expected. It can be a bad connection identifier to the database, or an operation on a file that is not allowed, or a division by zero for example.
Once this alert is raised, you have to do something about it. Either I leave it under the carpet and I pass it over in silence, or I manage it correctly so that my application continues to function normally even after this error.
In this article, I will focus on two axes:
Let's start with the beginning, there is an exception because at some point in the application or one of the components, a condition or operation could not be fulfilled.
There are some good practices on creating exceptions. I will focus on two in particular: naming and context.
It is easier to name the exception by its location than by the problem itself. This is not a good practice because the returned message will not be able to identify the cause quickly and simply. For example, a divide by zero operation generates an exception. Raising an exception OperationNotPossibleException gives little indication of the origin of the error. With this name: DivisionByZeroException, the error is clear and precise.
An exception must describe as simply as possible the problem encountered.
<?php class Filesystem { public function copy($originFile, $targetFile, $overwriteNewerFiles = false) { if (stream_is_local($originFile) && !is_file($originFile)) { throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile); } (...) } } // https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Filesystem/Filesystem.php#L41
In this example, the copy could not be performed because of the original file not found. The exception is named by the cause of the error and not by the issuer: here the copy() method. If I had named the exception by the issuer, it could be CouldNotCopyFileException.
The name of the exception is used to understand the cause. To enrich it, it may be interesting to add a context.
Basic PHP exceptions do not identify the context of the error. With the SPL extension, there are 13 additional exceptions. They are grouped into two groups: logical exceptions and runtime exceptions.
A logical exception shows a problem with the code. For example, the exception \InvalidArgumentException gives an indication to the developer about an error in the code: an expected argument is invalid. In addition to being named according to the cause, I know it is in the context of a logical exception. This means that as a developer, I did not pass a good argument to the method.
<?php class Constraint { public static function getErrorName($errorCode) { if (!isset(static::$errorNames[$errorCode])) { throw new InvalidArgumentException(sprintf( 'The error code "%s" does not exist for constraint of type "%s".', $errorCode, get_called_class() )); } return static::$errorNames[$errorCode]; } } // https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraint.php#L80
Exceptions taken at the runtime execution can not be detected before their interpretation. These are the following exceptions: OutOfBoundsException, OverflowException, RangeException, UnderflowException, UnexpectedValueException. Unlike a logical exception, it is not an error related to the code or its misuse, but linked to an error when executing the code.
Take the OutOfBoundsException example. This exception indicates that the index has no valid value in an array.
<?php class PropertyPath { public function getElement($index) { if (!isset($this->elements[$index])) { throw new OutOfBoundsException(sprintf('The index %s is not within the property path', $index)); } return $this->elements[$index]; } } // https://github.com/symfony/symfony/blob/master/src/Symfony/Component/PropertyAccess/PropertyPath.php#L188
Here, the size of the array varies depending on the execution of the code. Occasionally, the selected index does not exist in the array. This exception protects the application against a fatal error that could stop code interpretation.
These two groups of exceptions can be extended to describe their own errors. With the principle of segregating interfaces, it is possible to describe more precisely the errors that can occur when using a library. This makes it possible to know which component causes the error.
<?php class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } // https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Exception/InvalidArgumentException.php
It is tempting to catch any errors that may arise. But it is better to only catch the exceptions that the application is able to handle. Otherwise, it is better to let them spread to the highest level. With the use of a framework such as Symfony, an exception that is not caught in the application will be managed by the framework (and will display a nice page 500).
In a modern application, the code is stacked like Russian dolls. An exception thrown at a place, even in depth, will go up all the layers if it is not caught.
With this principle, the developer has the ability to control some of the exceptions that can be removed. If he can not manage them, he will let them spread in the upper layers.
Let's take an example for a manageable error. In my application, I need to contact an API to create a user or update it. I do not know in advance whether this user exists or not. I will first make a GET query to find out. The API returns either an error 404 to say that the user does not exist, or an error 200 otherwise. To make these queries, I use a library: Guzzle. In the case of a 404, I have a RequestException.
<?php
<?php public function actionType($username) { try { $user = $client->get(sprintf("/api/user/%s", $username)); } catch (RequestException $e) { if (404 === $e->getResponse()->getStatusCode()) { return "create"; } throw $e; } return "update"; }
In this example, I only manage the case of the 404. For the other types, I do not manage them, I re-throw the exception to let the other layers of the application manage it.
As we have just seen in the previous example, I have managed only the exception I need. For the other cases, I let the exception spread so that it goes up in the highest layers.
An application is a nesting of components, which when assembled together make it possible to construct a functionality. An exception thrown at the component level, and therefore at the bottom of the application layer, does not make sense on its own. There is a functional set related to this exception. It is this functional chain that is able to take care of this exception. As in the previous example. It is the functionality that managed this exception, not the Guzzle component. The component only threw the exception to the top.
For a framework, such as Symfony, it's the same principle. If the developer does not know what to do with the exception, he will let it go up to a listener able to manage it. And at the top, there's this listener: src\Symfony\Component\HttpKernel\EventListener\ExceptionListener.
An exception, as its name suggests, is an event that happens at an exceptional moment in the life of the application. It happens because an operation went wrong, or a developer misused a component. Whatever the reason is, the exception must be as explicit as possible. Its good understanding makes it possible to repair it as quickly as possible. It is important to lift the exception at the right time.
On the other hand, the exception should not be placed under the mat, but it should be handled properly. Good management of the exception requires a good understanding of the expected functionality and its perimeter. Catching all exceptions with a `try {catch (\ Exception $ e)` is a very bad practice. This would mask an even more serious exception.
An exception well launched and managed correctly allows your application to be easily maintainable and makes the diagnosis of an error simpler and faster.


This contains the python bottle.py file as well as the Materialize css and js files and Material Google Fonts. This is fully self contained and can be used in a fully offline environment.
Here is a fresh GUID for you:
{{GUID}}
Materialize 1.0.0 - https://materializecss.com/
License: MIT
Copyright (c) 2014-2018 Materialize
Bottle 0.12.17 - https://bottlepy.org/
License: MIT
Copyright (c) 2016, Marcel Hellkamp.


We would like to thank the GISAID Initiative and are grateful to all of the data contributors, i.e. the Authors, the Originating laboratories responsible for obtaining the specimens, and the Submitting laboratories for generating the genetic sequence and metadata and sharing via the GISAID Initiative, on which this research is based.
Elbe, S., and Buckland-Merrett, G. (2017) Data, disease and diplomacy: GISAID's innovative contribution to global health. Global Challenges, 1:33-46.
DOI: 10.1002/gch2.1018 PMCID: 31565258
Note: When using results from these analyses in your manuscript, ensure that you also acknowledge the Contributors of data, i.e. "We gratefully acknowledge all the Authors, the Originating laboratories responsible for obtaining the specimens, and the Submitting laboratories for generating the genetic sequence and metadata and sharing via the GISAID Initiative, on which this research is based."
Also, cite the following reference:
Shu, Y., McCauley, J. (2017) GISAID: From vision to reality. EuroSurveillance, 22(13)
DOI: 10.2807/1560-7917.ES.2<IP_ADDRESS>494 PMCID: PMC5388101


Common Interface Functionality#
See the examples in the other sections for how to use specific interfaces. The interface classes all derive from the generic interface that is described in this section.
AUTHORS:
William Stein (2005): initial version
William Stein (2006-03-01): got rid of infinite loop on startup if client system missing
Felix Lawrence (2009-08-21): edited ._sage_() to support lists and float exponents in foreign notation.
Simon King (2010-09-25): Expect._local_tmpfile() depends on Expect.pid() and is cached; Expect.quit() clears that cache, which is important for forking.
Jean-Pierre Flori (2010,2011): Split non Pexpect stuff into a parent class.
Simon King (2015): Improve pickling for InterfaceElement
- class sage.interfaces.interface.AsciiArtString#
Bases:
str
- class sage.interfaces.interface.Interface(name)#
Bases:
WithEqualityById
,ParentWithBase
Interface interface object.
Note
Two interfaces compare equal if and only if they are identical objects (this is a critical constraint so that caching of representations of objects in interfaces works correctly). Otherwise they are never equal.
- call(function_name, *args, **kwds)#
- clear(var)#
Clear the variable named var.
- console()#
- cputime()#
CPU time since this process started running.
- eval(code, **kwds)#
Evaluate code in an interface.
This method needs to be implemented in sub-classes.
Note that it is not always to be expected that it returns a non-empty string. In contrast,
get()
is supposed to return the result of applying a print command to the object so that the output is easier to parse.Likewise, the method
_eval_line()
for evaluation of a single line, often makes sense to be overridden.
- execute(*args, **kwds)#
- function_call(function, args=None, kwds=None)#
EXAMPLES:
sage: maxima.quad_qags(x, x, 0, 1, epsrel=1e-4) [0.5,5.5511151231257...e-15,21,0] sage: maxima.function_call('quad_qags', [x, x, 0, 1], {'epsrel':'1e-4'}) [0.5,5.5511151231257...e-15,21,0]
- get(var)#
Get the value of the variable var.
Note that this needs to be overridden in some interfaces, namely when getting the string representation of an object requires an explicit print command.
- get_seed()#
Return the seed used to set the random number generator in this interface.
The seed is initialized as
None
but should be set when the interface starts.EXAMPLES:
sage: s = Singular() sage: s.set_seed(107) 107 sage: s.get_seed() 107
- get_using_file(var)#
Return the string representation of the variable var in self, possibly using a file. Use this if var has a huge string representation, since it may be way faster.
Warning
In fact unless a special derived class implements this, it will not be any faster. This is the case for this class if you’re reading it through introspection and seeing this.
- help(s)#
- interact()#
This allows you to interactively interact with the child interpreter.
Press Ctrl + D or type ‘quit’ or ‘exit’ to exit and return to Sage.
Note
This is completely different than the console() member function. The console function opens a new copy of the child interpreter, whereas the interact function gives you interactive access to the interpreter that is being used by Sage. Use sage(xxx) or interpretername(xxx) to pull objects in from sage to the interpreter.
- name(new_name=None)#
- new(code)#
- rand_seed()#
Return a random seed that can be put into
set_seed
function for any interpreter.This should be overridden if the particular interface needs something other than a small positive integer.
EXAMPLES:
sage: from sage.interfaces.interface import Interface sage: i = Interface("") sage: i.rand_seed() # random 318491487 sage: s = Singular() sage: s.rand_seed() # random 365260051
- read(filename)#
EXAMPLES:
sage: filename = tmp_filename() sage: f = open(filename, 'w') sage: _ = f.write('x = 2\n') sage: f.close() sage: octave.read(filename) # optional - octave sage: octave.get('x') # optional - octave ' 2' sage: import os sage: os.unlink(filename)
- set(var, value)#
Set the variable var to the given value.
- set_seed(seed=None)#
Set the random seed for the interpreter and return the new value of the seed.
This is dependent on which interpreter so must be implemented in each separately. For examples see gap.py or singular.py.
If seed is
None
then should generate a random seed.EXAMPLES:
sage: s = Singular() sage: s.set_seed(1) 1 sage: [s.random(1,10) for i in range(5)] [8, 10, 4, 9, 1] sage: from sage.interfaces.interface import Interface sage: i = Interface("") sage: i.set_seed() Traceback (most recent call last): ... NotImplementedError: This interpreter did not implement a set_seed function
- class sage.interfaces.interface.InterfaceElement(parent, value, is_name=False, name=None)#
Bases:
Element
Interface element.
- attribute(attrname)#
If this wraps the object x in the system, this returns the object x.attrname. This is useful for some systems that have object oriented attribute access notation.
EXAMPLES:
sage: g = gap('SO(1,4,7)') sage: k = g.InvariantQuadraticForm() sage: k.attribute('matrix') [ [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ]
sage: e = gp('ellinit([0,-1,1,-10,-20])') sage: e.attribute('j') -122023936/161051
- bool()#
Convert this element to a boolean.
EXAMPLES:
sage: singular(0).bool() False sage: singular(1).bool() True
- gen(n)#
- get_using_file()#
Return this element’s string representation using a file. Use this if self has a huge string representation. It’ll be way faster.
EXAMPLES:
sage: a = maxima(str(2^1000)) sage: a.get_using_file() '10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376'
- hasattr(attrname)#
Returns whether the given attribute is already defined by this object, and in particular is not dynamically generated.
EXAMPLES:
sage: m = maxima('2') sage: m.hasattr('integral') True sage: m.hasattr('gcd') False
- is_string()#
Tell whether this element is a string.
By default, the answer is negative.
- name(new_name=None)#
Returns the name of self. If new_name is passed in, then this function returns a new object identical to self whose name is new_name.
Note that this can overwrite existing variables in the system.
EXAMPLES:
sage: x = r([1,2,3]); x # optional - rpy2 [1] 1 2 3 sage: x.name() # optional - rpy2 'sage...' sage: x = r([1,2,3]).name('x'); x # optional - rpy2 [1] 1 2 3 sage: x.name() # optional - rpy2 'x'
sage: s5 = gap.SymmetricGroup(5).name('s5') sage: s5 SymmetricGroup( [ 1 .. 5 ] ) sage: s5.name() 's5'
- sage(*args, **kwds)#
Attempt to return a Sage version of this object.
This method does nothing more than calling
_sage_()
, simply forwarding any additional arguments.EXAMPLES:
sage: gp(1/2).sage() 1/2 sage: _.parent() Rational Field sage: singular.lib("matrix") sage: R = singular.ring(0, '(x,y,z)', 'dp') sage: singular.matrix(2,2).sage() [0 0] [0 0]
- class sage.interfaces.interface.InterfaceFunction(parent, name)#
Bases:
SageObject
Interface function.
- class sage.interfaces.interface.InterfaceFunctionElement(obj, name)#
Bases:
SageObject
Interface function element.
- help()#
- sage.interfaces.interface.is_InterfaceElement(x)#
Return True if
x
is of typeInterfaceElement
.EXAMPLES:
sage: from sage.interfaces.interface import is_InterfaceElement sage: is_InterfaceElement(2) doctest:...: DeprecationWarning: the function is_InterfaceElement is deprecated; use isinstance(x, sage.interfaces.abc.InterfaceElement) instead See https://github.com/sagemath/sage/issues/34804 for details. False


This is a useful port in the Firth of Clyde and is easy to enter at all states of the tide and provides a good base for exploring this part of Scotland. The old paddle steamers Waverley and Balmoral are often based here during the summer and the harbour is a busy ferry port.
There is good shelter here in both the inner and outer harbours, as well as on the pontoons south of West Arm. Beware of the strong current sweeping towards the rocks on the eastern side of the harbour.
All the berths in the marina are for visitors. Most facilities available, but no haul or lift-out options.
There are 35 good mooring buoys just outside the harbour entrance. The are pink and marked BBC
(Bute Berthing Co.).
The shower and toilet facilities are in an immaculate, if cramped, victorian building by the harbour. They close at 2030.
Last updated July 2009.


This is a knowledge base which stores limited number of characters. Simply dividing into 3 categories - Know, How and Example.


Photographer: Ben Shahn
Date: October, 1935
Location: Huntingdon, Tennessee
Medium: 35mmNitrate Negative


#include <sys/ptrace.h> long ptrace(enum __ptrace_request request, pid_t pid, void *addr, void *data);
A tracee first needs to be attached to the tracer. Attachment and subsequent commands are per thread: in a multithreaded process, every thread can be individually attached to a (potentially different) tracer, or left not attached and thus not debugged. Therefore, "tracee" always means "(one) thread", never "a (possibly multithreaded) process". Ptrace commands are always sent to a specific tracee using a call of the form
ptrace(PTRACE_foo, pid, ...)
where pid is the thread ID of the corresponding Linux thread.
(Note that in this page, a "multithreaded process" means a thread group consisting of threads created using the clone(2) CLONE_THREAD flag.)
A process can initiate a trace by calling fork(2) and having the resulting child do a PTRACE_TRACEME, followed (typically) by an execve(2). Alternatively, one process may commence tracing another process using PTRACE_ATTACH or PTRACE_SEIZE.
While being traced, the tracee will stop each time a signal is delivered, even if the signal is being ignored. (An exception is SIGKILL, which has its usual effect.) The tracer will be notified at its next call to waitpid(2) (or one of the related "wait" system calls); that call will return a status value containing information that indicates the cause of the stop in the tracee. While the tracee is stopped, the tracer can use various ptrace requests to inspect and modify the tracee. The tracer then causes the tracee to continue, optionally ignoring the delivered signal (or even delivering a different signal instead).
If the PTRACE_O_TRACEEXEC option is not in effect, all successful calls to execve(2) by the traced process will cause it to be sent a SIGTRAP signal, giving the parent a chance to gain control before the new program begins execution.
When the tracer is finished tracing, it can cause the tracee to continue executing in a normal, untraced mode via PTRACE_DETACH.
The value of request determines the action to be performed:
struct ptrace_peeksiginfo_args { u64 off; /* Ordinal position in queue at which to start copying signals */ u32 flags; /* PTRACE_PEEKSIGINFO_SHARED or 0 */ s32 nr; /* Number of signals to copy */ };
Currently, there is only one flag, PTRACE_PEEKSIGINFO_SHARED, for dumping signals from the process-wide signal queue. If this flag is not set, signals are read from the per-thread queue of the specified thread.
status>>8 == (SIGTRAP | (PTRACE_EVENT_CLONE<<8))
The PID of the new process can be retrieved with PTRACE_GETEVENTMSG.
status>>8 == (SIGTRAP | (PTRACE_EVENT_EXEC<<8))
If the execing thread is not a thread group leader, the thread ID is reset to thread group leader's ID before this stop. Since Linux 3.0, the former thread ID can be retrieved with PTRACE_GETEVENTMSG.
status>>8 == (SIGTRAP | (PTRACE_EVENT_EXIT<<8))
The tracee's exit status can be retrieved with PTRACE_GETEVENTMSG.
status>>8 == (SIGTRAP | (PTRACE_EVENT_FORK<<8))
The PID of the new process can be retrieved with PTRACE_GETEVENTMSG.
status>>8 == (SIGTRAP | (PTRACE_EVENT_VFORK<<8))
The PID of the new process can be retrieved with PTRACE_GETEVENTMSG.
status>>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONE<<8))
The PID of the new process can (since Linux 2.6.18) be retrieved with PTRACE_GETEVENTMSG.
Note that the killing signal will first cause signal-delivery-stop (on one tracee only), and only after it is injected by the tracer (or after it was dispatched to a thread which isn't traced), will death from the signal happen on all tracees within a multithreaded process. (The term "signal-delivery-stop" is explained below.)
SIGKILL does not generate signal-delivery-stop and therefore the tracer can't suppress it. SIGKILL kills even within system calls (syscall-exit-stop is not generated prior to death by SIGKILL). The net effect is that SIGKILL always kills the process (all its threads), even if some threads of the process are ptraced.
When the tracee calls _exit(2), it reports its death to its tracer. Other threads are not affected.
When any thread executes exit_group(2), every tracee in its thread group reports its death to its tracer.
If the PTRACE_O_TRACEEXIT option is on, PTRACE_EVENT_EXIT will happen before actual death. This applies to exits via exit(2), exit_group(2), and signal deaths (except SIGKILL), and when threads are torn down on execve(2) in a multithreaded process.
The tracer cannot assume that the ptrace-stopped tracee exists. There are many scenarios when the tracee may die while stopped (such as SIGKILL). Therefore, the tracer must be prepared to handle an ESRCH error on any ptrace operation. Unfortunately, the same error is returned if the tracee exists but is not ptrace-stopped (for commands which require a stopped tracee), or if it is not traced by the process which issued the ptrace call. The tracer needs to keep track of the stopped/running state of the tracee, and interpret ESRCH as "tracee died unexpectedly" only if it knows that the tracee has been observed to enter ptrace-stop. Note that there is no guarantee that waitpid(WNOHANG) will reliably report the tracee's death status if a ptrace operation returned ESRCH. waitpid(WNOHANG) may return 0 instead. In other words, the tracee may be "not yet fully dead", but already refusing ptrace requests.
The tracer can't assume that the tracee always ends its life by reporting WIFEXITED(status) or WIFSIGNALED(status); there are cases where this does not occur. For example, if a thread other than thread group leader does an execve(2), it disappears; its PID will never be seen again, and any subsequent ptrace stops will be reported under the thread group leader's PID.
There are many kinds of states when the tracee is stopped, and in ptrace discussions they are often conflated. Therefore, it is important to use precise terms.
In this manual page, any stopped state in which the tracee is ready to accept ptrace commands from the tracer is called ptrace-stop. Ptrace-stops can be further subdivided into signal-delivery-stop, group-stop, syscall-stop, and so on. These stopped states are described in detail below.
When the running tracee enters ptrace-stop, it notifies its tracer using waitpid(2) (or one of the other "wait" system calls). Most of this manual page assumes that the tracer waits with:
pid = waitpid(pid_or_minus_1, &status, __WALL);
Ptrace-stopped tracees are reported as returns with pid greater than 0 and WIFSTOPPED(status) true.
The __WALL flag does not include the WSTOPPED and WEXITED flags, but implies their functionality.
Setting the WCONTINUED flag when calling waitpid(2) is not recommended: the "continued" state is per-process and consuming it can confuse the real parent of the tracee.
Use of the WNOHANG flag may cause waitpid(2) to return 0 ("no wait results available yet") even if the tracer knows there should be a notification. Example:
errno = 0; ptrace(PTRACE_CONT, pid, 0L, 0L); if (errno == ESRCH) { /* tracee is dead */ r = waitpid(tracee, &status, __WALL | WNOHANG); /* r can still be 0 here! */ }
The following kinds of ptrace-stops exist: signal-delivery-stops, group-stops, PTRACE_EVENT stops, syscall-stops. They all are reported by waitpid(2) with WIFSTOPPED(status) true. They may be differentiated by examining the value status>>8, and if there is ambiguity in that value, by querying PTRACE_GETSIGINFO. (Note: the WSTOPSIG(status) macro can't be used to perform this examination, because it returns the value (status>>8) & 0xff.)
Signal-delivery-stop is observed by the tracer as waitpid(2) returning with WIFSTOPPED(status) true, with the signal returned by WSTOPSIG(status). If the signal is SIGTRAP, this may be a different kind of ptrace-stop; see the "Syscall-stops" and "execve" sections below for details. If WSTOPSIG(status) returns a stopping signal, this may be a group-stop; see below.
ptrace(PTRACE_restart, pid, 0, sig)
where PTRACE_restart is one of the restarting ptrace requests. If sig is 0, then a signal is not delivered. Otherwise, the signal sig is delivered. This operation is called signal injection in this manual page, to distinguish it from signal-delivery-stop.
The sig value may be different from the WSTOPSIG(status) value: the tracer can cause a different signal to be injected.
Note that a suppressed signal still causes system calls to return prematurely. In this case, system calls will be restarted: the tracer will observe the tracee to reexecute the interrupted system call (or restart_syscall(2) system call for a few system calls which use a different mechanism for restarting) if the tracer uses PTRACE_SYSCALL. Even system calls (such as poll(2)) which are not restartable after signal are restarted after signal is suppressed; however, kernel bugs exist which cause some system calls to fail with EINTR even though no observable signal is injected to the tracee.
Restarting ptrace commands issued in ptrace-stops other than signal-delivery-stop are not guaranteed to inject a signal, even if sig is nonzero. No error is reported; a nonzero sig may simply be ignored. Ptrace users should not try to "create a new signal" this way: use tgkill(2) instead.
The fact that signal injection requests may be ignored when restarting the tracee after ptrace stops that are not signal-delivery-stops is a cause of confusion among ptrace users. One typical scenario is that the tracer observes group-stop, mistakes it for signal-delivery-stop, restarts the tracee with
ptrace(PTRACE_restart, pid, 0, stopsig)
with the intention of injecting stopsig, but stopsig gets ignored and the tracee continues to run.
The SIGCONT signal has a side effect of waking up (all threads of) a group-stopped process. This side effect happens before signal-delivery-stop. The tracer can't suppress this side effect (it can only suppress signal injection, which only causes the SIGCONT handler to not be executed in the tracee, if such a handler is installed). In fact, waking up from group-stop may be followed by signal-delivery-stop for signal(s) other than SIGCONT, if they were pending when SIGCONT was delivered. In other words, SIGCONT may be not the first signal observed by the tracee after it was sent.
Stopping signals cause (all threads of) a process to enter group-stop. This side effect happens after signal injection, and therefore can be suppressed by the tracer.
In Linux 2.4 and earlier, the SIGSTOP signal can't be injected.
PTRACE_GETSIGINFO can be used to retrieve a siginfo_t structure which corresponds to the delivered signal. PTRACE_SETSIGINFO may be used to modify it. If PTRACE_SETSIGINFO has been used to alter siginfo_t, the si_signo field and the sig parameter in the restarting command must match, otherwise the result is undefined.
Group-stop is observed by the tracer as waitpid(2) returning with WIFSTOPPED(status) true, with the stopping signal available via WSTOPSIG(status). The same result is returned by some other classes of ptrace-stops, therefore the recommended practice is to perform the call
ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)
The call can be avoided if the signal is not SIGSTOP, SIGTSTP, SIGTTIN, or SIGTTOU; only these four signals are stopping signals. If the tracer sees something else, it can't be a group-stop. Otherwise, the tracer needs to call PTRACE_GETSIGINFO. If PTRACE_GETSIGINFO fails with EINVAL, then it is definitely a group-stop. (Other failure codes are possible, such as ESRCH ("no such process") if a SIGKILL killed the tracee.)
If tracee was attached using PTRACE_SEIZE, group-stop is indicated by PTRACE_EVENT_STOP: status>>16 == PTRACE_EVENT_STOP. This allows detection of group-stops without requiring an extra PTRACE_GETSIGINFO call.
As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until it restarts or kills it, the tracee will not run, and will not send notifications (except SIGKILL death) to the tracer, even if the tracer enters into another waitpid(2) call.
The kernel behavior described in the previous paragraph causes a problem with transparent handling of stopping signals. If the tracer restarts the tracee after group-stop, the stopping signal is effectively ignored---the tracee doesn't remain stopped, it runs. If the tracer doesn't restart the tracee before entering into the next waitpid(2), future SIGCONT signals will not be reported to the tracer; this would cause the SIGCONT signals to have no effect on the tracee.
Since Linux 3.4, there is a method to overcome this problem: instead of PTRACE_CONT, a PTRACE_LISTEN command can be used to restart a tracee in a way where it does not execute, but waits for a new event which it can report via waitpid(2) (such as when it is restarted by a SIGCONT).
PTRACE_EVENT stops are observed by the tracer as waitpid(2) returning with WIFSTOPPED(status), and WSTOPSIG(status) returns SIGTRAP. An additional bit is set in the higher byte of the status word: the value status>>8 will be
(SIGTRAP | PTRACE_EVENT_foo << 8).
The following events exist:
For all four stops described above, the stop occurs in the parent (i.e., the tracee), not in the newly created thread. PTRACE_GETEVENTMSG can be used to retrieve the new thread's ID.
PTRACE_GETSIGINFO on PTRACE_EVENT stops returns SIGTRAP in si_signo, with si_code set to (event<<8) | SIGTRAP.
Other possibilities are that the tracee may stop in a PTRACE_EVENT stop, exit (if it entered _exit(2) or exit_group(2)), be killed by SIGKILL, or die silently (if it is a thread group leader, the execve(2) happened in another thread, and that thread is not traced by the same tracer; this situation is discussed later).
Syscall-enter-stop and syscall-exit-stop are observed by the tracer as waitpid(2) returning with WIFSTOPPED(status) true, and WSTOPSIG(status) giving SIGTRAP. If the PTRACE_O_TRACESYSGOOD option was set by the tracer, then WSTOPSIG(status) will give the value (SIGTRAP | 0x80).
Syscall-stops can be distinguished from signal-delivery-stop with SIGTRAP by querying PTRACE_GETSIGINFO for the following cases:
However, syscall-stops happen very often (twice per system call), and performing PTRACE_GETSIGINFO for every syscall-stop may be somewhat expensive.
Some architectures allow the cases to be distinguished by examining registers. For example, on x86, rax == -ENOSYS in syscall-enter-stop. Since SIGTRAP (like any other signal) always happens after syscall-exit-stop, and at this point rax almost never contains -ENOSYS, the SIGTRAP looks like "syscall-stop which is not syscall-enter-stop"; in other words, it looks like a "stray syscall-exit-stop" and can be detected this way. But such detection is fragile and is best avoided.
Using the PTRACE_O_TRACESYSGOOD option is the recommended method to distinguish syscall-stops from other kinds of ptrace-stops, since it is reliable and does not incur a performance penalty.
Syscall-enter-stop and syscall-exit-stop are indistinguishable from each other by the tracer. The tracer needs to keep track of the sequence of ptrace-stops in order to not misinterpret syscall-enter-stop as syscall-exit-stop or vice versa. The rule is that syscall-enter-stop is always followed by syscall-exit-stop, PTRACE_EVENT stop or the tracee's death; no other kinds of ptrace-stop can occur in between.
If after syscall-enter-stop, the tracer uses a restarting command other than PTRACE_SYSCALL, syscall-exit-stop is not generated.
PTRACE_GETSIGINFO on syscall-stops returns SIGTRAP in si_signo, with si_code set to SIGTRAP or (SIGTRAP|0x80).
When the tracee is in ptrace-stop, the tracer can read and write data to the tracee using informational commands. These commands leave the tracee in ptrace-stopped state:
ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0); ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val); ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct); ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct); ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov); ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov); ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo); ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo); ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var); ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);
Note that some errors are not reported. For example, setting signal information (siginfo) may have no effect in some ptrace-stops, yet the call may succeed (return 0 and not set errno); querying PTRACE_GETEVENTMSG may succeed and return some random value if current ptrace-stop is not documented as returning a meaningful event message.
The call
ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);
affects one tracee. The tracee's current flags are replaced. Flags are inherited by new tracees created and "auto-attached" via active PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, or PTRACE_O_TRACECLONE options.
Another group of commands makes the ptrace-stopped tracee run. They have the form:
ptrace(cmd, pid, 0, sig);
where cmd is PTRACE_CONT, PTRACE_LISTEN, PTRACE_DETACH, PTRACE_SYSCALL, PTRACE_SINGLESTEP, PTRACE_SYSEMU, or PTRACE_SYSEMU_SINGLESTEP. If the tracee is in signal-delivery-stop, sig is the signal to be injected (if it is nonzero). Otherwise, sig may be ignored. (When restarting a tracee from a ptrace-stop other than signal-delivery-stop, recommended practice is to always pass 0 in sig.)
ptrace(PTRACE_ATTACH, pid, 0, 0);
or
ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);
PTRACE_ATTACH sends SIGSTOP to this thread. If the tracer wants this SIGSTOP to have no effect, it needs to suppress it. Note that if other signals are concurrently sent to this thread during attach, the tracer may see the tracee enter signal-delivery-stop with other signal(s) first! The usual practice is to reinject these signals until SIGSTOP is seen, then suppress SIGSTOP injection. The design bug here is that a ptrace attach and a concurrently delivered SIGSTOP may race and the concurrent SIGSTOP may be lost.
Since attaching sends SIGSTOP and the tracer usually suppresses it, this may cause a stray EINTR return from the currently executing system call in the tracee, as described in the "Signal injection and suppression" section.
Since Linux 3.4, PTRACE_SEIZE can be used instead of PTRACE_ATTACH. PTRACE_SEIZE does not stop the attached process. If you need to stop it after attach (or at any other time) without sending it any signals, use PTRACE_INTERRUPT command.
The request
ptrace(PTRACE_TRACEME, 0, 0, 0);
turns the calling thread into a tracee. The thread continues to run (doesn't enter ptrace-stop). A common practice is to follow the PTRACE_TRACEME with
raise(SIGSTOP);
and allow the parent (which is our tracer now) to observe our signal-delivery-stop.
If the PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, or PTRACE_O_TRACECLONE options are in effect, then children created by, respectively, vfork(2) or clone(2) with the CLONE_VFORK flag, fork(2) or clone(2) with the exit signal set to SIGCHLD, and other kinds of clone(2), are automatically attached to the same tracer which traced their parent. SIGSTOP is delivered to the children, causing them to enter signal-delivery-stop after they exit the system call which created them.
Detaching of the tracee is performed by:
ptrace(PTRACE_DETACH, pid, 0, sig);
PTRACE_DETACH is a restarting operation; therefore it requires the tracee to be in ptrace-stop. If the tracee is in signal-delivery-stop, a signal can be injected. Otherwise, the sig parameter may be silently ignored.
If the tracee is running when the tracer wants to detach it, the usual solution is to send SIGSTOP (using tgkill(2), to make sure it goes to the correct thread), wait for the tracee to stop in signal-delivery-stop for SIGSTOP and then detach it (suppressing SIGSTOP injection). A design bug is that this can race with concurrent SIGSTOPs. Another complication is that the tracee may enter other ptrace-stops and needs to be restarted and waited for again, until SIGSTOP is seen. Yet another complication is to be sure that the tracee is not already ptrace-stopped, because no signal delivery happens while it is---not even SIGSTOP.
If the tracer dies, all tracees are automatically detached and restarted, unless they were in group-stop. Handling of restart from group-stop is currently buggy, but the "as planned" behavior is to leave tracee stopped and waiting for SIGCONT. If the tracee is restarted from signal-delivery-stop, the pending signal is injected.
All of the above effects are the artifacts of the thread ID change in the tracee.
The PTRACE_O_TRACEEXEC option is the recommended tool for dealing with this situation. First, it enables PTRACE_EVENT_EXEC stop, which occurs before execve(2) returns. In this stop, the tracer can use PTRACE_GETEVENTMSG to retrieve the tracee's former thread ID. (This feature was introduced in Linux 3.0). Second, the PTRACE_O_TRACEEXEC option disables legacy SIGTRAP generation on execve(2).
When the tracer receives PTRACE_EVENT_EXEC stop notification, it is guaranteed that except this tracee and the thread group leader, no other threads from the process are alive.
On receiving the PTRACE_EVENT_EXEC stop notification, the tracer should clean up all its internal data structures describing the threads of this process, and retain only one data structure---one which describes the single still running tracee, with
thread ID == thread group ID == process ID.
Example: two threads call execve(2) at the same time:
*** we get syscall-enter-stop in thread 1: ** PID1 execve("/bin/foo", "foo" <unfinished ...> *** we issue PTRACE_SYSCALL for thread 1 ** *** we get syscall-enter-stop in thread 2: ** PID2 execve("/bin/bar", "bar" <unfinished ...> *** we issue PTRACE_SYSCALL for thread 2 ** *** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL ** *** we get syscall-exit-stop for PID0: ** PID0 <... execve resumed> ) = 0
If the PTRACE_O_TRACEEXEC option is not in effect for the execing tracee, the kernel delivers an extra SIGTRAP to the tracee after execve(2) returns. This is an ordinary signal (similar to one which can be generated by kill -TRAP), not a special kind of ptrace-stop. Employing PTRACE_GETSIGINFO for this signal returns si_code set to 0 (SI_USER). This signal may be blocked by signal mask, and thus may be delivered (much) later.
Usually, the tracer (for example, strace(1)) would not want to show this extra post-execve SIGTRAP signal to the user, and would suppress its delivery to the tracee (if SIGTRAP is set to SIG_DFL, it is a killing signal). However, determining which SIGTRAP to suppress is not easy. Setting the PTRACE_O_TRACEEXEC option and thus suppressing this extra SIGTRAP is the recommended approach.
Many of these bugs have been fixed, but as of Linux 2.6.38 several still exist; see BUGS below.
As of Linux 2.6.38, the following is believed to work correctly:
On error, all requests return -1, and errno is set appropriately. Since the value returned by a successful PTRACE_PEEK* request may be -1, the caller must clear errno before the call, and then check it afterward to determine whether or not an error occurred.
In Linux kernels before 2.6.26, init(8), the process with PID 1, may not be traced.
The layout of the contents of memory and the USER area are quite operating-system- and architecture-specific. The offset supplied, and the data returned, might not entirely match with the definition of struct user.
The size of a "word" is determined by the operating-system variant (e.g., for 32-bit Linux it is 32 bits).
This page documents the way the ptrace() call works currently in Linux. Its behavior differs significantly on other flavors of UNIX. In any case, use of ptrace() is highly specific to the operating system and architecture.
Group-stop notifications are sent to the tracer, but not to real parent. Last confirmed on <IP_ADDRESS>.
If a thread group leader is traced and exits by calling _exit(2), a PTRACE_EVENT_EXIT stop will happen for it (if requested), but the subsequent WIFEXITED notification will not be delivered until all other threads exit. As explained above, if one of other threads calls execve(2), the death of the thread group leader will never be reported. If the execed thread is not traced by this tracer, the tracer will never know that execve(2) happened. One possible workaround is to PTRACE_DETACH the thread group leader instead of restarting it in this case. Last confirmed on <IP_ADDRESS>.
A SIGKILL signal may still cause a PTRACE_EVENT_EXIT stop before actual signal death. This may be changed in the future; SIGKILL is meant to always immediately kill tasks even under ptrace. Last confirmed on <IP_ADDRESS>.
Some system calls return with EINTR if a signal was sent to a tracee, but delivery was suppressed by the tracer. (This is very typical operation: it is usually done by debuggers on every attach, in order to not introduce a bogus SIGSTOP). As of Linux 3.2.9, the following system calls are affected (this list is likely incomplete): epoll_wait(2), and read(2) from an inotify(7) file descriptor. The usual symptom of this bug is that when you attach to a quiescent process with the command
strace -p <process-ID>
then, instead of the usual and expected one-line output such as
restart_syscall(<... resuming interrupted call ...>_or
select(6, [5], NULL, [5], NULL_('_' denotes the cursor position), you observe more than one line. For example:
clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0 epoll_wait(4,_What is not visible here is that the process was blocked in epoll_wait(2) before strace(1) has attached to it. Attaching caused epoll_wait(2) to return to user space with the error EINTR. In this particular case, the program reacted to EINTR by checking the current time, and then executing epoll_wait(2) again. (Programs which do not expect such "stray" EINTR errors may behave in an unintended way upon an strace(1) attach.)


Title
With supporting text below as a natural lead-in to additional content.
Go somewhereTitle
With supporting text below as a natural lead-in to additional content.
Go somewhereWith supporting text below as a natural lead-in to additional content.
Go somewhereWith supporting text below as a natural lead-in to additional content.
Go somewhere


Downloading Pharo Launcher
You can get Pharo Launcher from the Pharo website. The default download is a 64-bit version.
Windows MacOS GNU/Linux GNU/Linux (32bit)
Install on Mac OS X
Double-click on the dmg file and drop Pharo Launcher app in Applications folder.
Before being able to run Pharo Launcher, you may need to update temporarily your security settings: if you have Mac OS X 10.8 or higher then you might get the following message:
This is due to the OS X Gatekeeper feature that is designed to discourage users from downloading apps from random locations and possibly installing something bad. Assuming you've downloaded Pharo Launcher from Pharo web site, then you have nothing to worry about, and you just need to bypass this warning:
- Recommended - Right click (or command+click) the application icon and select "open"
- Advanced - Enable all application downloads
- In OS X go to the Apple Menu -> System Preferences -> Security & Privacy -> General
- Unlock the padlock at the bottom of the window, which will require a computer admin password
- Where it says "Allow applications downloaded from:" select "Anywhere"
- OS X will give you a scary warning that is a bit exaggerated. If you're not comfortable with this, use the "right click" method mentioned above.
In all cases OS X will still ask you if you want to open an "unsigned" application the first time it is opened, so new applications that are downloaded can't just start by themselves. Just click on "Open".
Warning: There is a high probability that the very first run of Pharo Launcher does nothing. In this case, just run it a second time and Pharo Launcher will open.
Install on Windows
Run the installer and follow instructions. Be sure to install Pharo Launcher in a place where you have write privileges. The installer wil create a shorcut on the Desktop as well as an application entry in the Windows menu.
Installation on Windows WSL (Windows Linux Subsystem)
Install on GNU/Linux
Unzip the archive in a place where you have write privileges.
unzip PharoLauncher-linux-*.zip
Run Pharo Launcher
./pharolauncher/pharo-launcher