Description
The library provides a Kalman engine for tracking purposes. In the
application described below, the CAMSHIFT color tracking algorithm is used
to provide measurements for the X-Y tracking of a face (or other colored
object). The CAMSHIFT algorithm implemented here just uses a simple 1-D Hue
histogram sampled from the object using an HSV color space. Therefore,
the color tracker may need some tuning as described below (see CAMSHIFT demo
description page for more details).
To test the filter you will need DirectShow SDK, that is a part of
DirectX SDK. Read FAQ on how
to install it properly.
Kalman Color Tracker Demo
You should setup or launch the following DirectShow filter graph edit (of
course, your capture source will depend on your camera):
Controls
The control panel for the filter (obtained by
right-clicking) the Kalman filter in the filter graph above looks like:
[1] This controls move the
sample window around when you are not tracking.
[2] This is the minimum saturation for a
Hue pixel to be accepted threshold.
[3] This is the minimum brightness for a
Hue pixel to be accepted threshold.
[4] This allows you to toggle between the
raw video image and the Hue histogram backprojected image.
[5] Sample color under box [1] and start
Kalman tracking.
[6] Stop Kalman tracking.
How to
Start Tracking
1. Select Normal view [4].
2. Set the thresholds to zero [2] & [3].
3. Move the sample box using [1] so that it covers the colored object to be tracked.
4. Press "Start Track" [5].
Tuning the tracking:
1. Select Back Project view [4]. The goal is to have the image
such as on the left below to look like the cleaner image on
right below.
2. Increase minimum saturation threshold [2] to clean up the image
without diminishing the object of interest too much.
3. Increase minimum brightness threshold [3] to finish the
"clean up" job. Don't turn too high or else bright
spots on the tracked object will become
"holes".
4. Turn normal view back on [4].
Display
The meaning of the normal view display is as follows with
reference to the figure below:
[A] Velocity direction and
magnitude estimation.
[B] Sample window if not
tracking, tracking window if tracking.
[C] Estimated location of
the object.


rmdirtest
OS/161 Reference Manual
Name
rmdirtest - test removing in-use directories
Synopsis
/testbin/rmdirtest
Description
rmdirtest creates a test directory, goes into it, removes it, and
attempts to do various operations on it. It tries to check that the
right things happen, although some cases are beyond its ability to
test directly (such as whether storage is leaked).
Note that while it is not legal to remove the `.' entry in a
directory, it is perfectly legal to remove a directory by name that
happens to be some process's (or your own) current working directory.
Requirements
rmdirtest uses the following system calls:
rmdirtest should run correctly once assignment 4 is complete.


Egwene returned a graceful nod to the respectful bow of the ship’s crewman who padded past her, barefoot, on his way to pull a rope that already seemed taut, possibly shifting a trifle the way one of the big square sails set. As he trotted back toward where the round-faced captain stood by the tillerman, he bowed again, and she nodded once more before returning her attentions to the forested Cairhien shore, separated from the Blue Crane by less than twenty spans of water.
A village was sliding past, or what had been a village once. Half the houses were only smoldering piles of rubble with chimneys sticking starkly out of the ruins. On the other houses, doors swung with the wind, and pieces of furniture, bits of clothing and houseware littered the dirt street, tumbled about as if thrown. Nothing living moved in the village except for one half-starved dog that ignored the passing ship as it trotted out of sight behind the toppled walls of what appeared to have been an inn. She could never see such a sight without a queasiness settling in her belly, but she tried to maintain the dispassionate serenity she thought an Aes Sedai might have. It did not help much. Beyond the village, a thick plume of smoke was rising into the sky. Three or four miles off, she estimated.
This was not the first such plume of smoke she had seen since the Erinin began to flow along the border of Cairhien, nor the first such village. At least this time there were no bodies in sight. Captain Ellisor sometimes had to sail close to the Cairhienin shore because of mudflats—he said they shifted in this part of the river—but however close he came, she had not seen a single living person.
The village and the smoke plume slipped away behind the ship, but already another column of smoke was coming into view ahead, further from the river. The forest was thinning, ash and leatherleaf and black elder giving way to willow and whitewood and wateroak, and some she did not recognize.
The wind caught her cloak, but she let it stream, feeling the cold cleanness of the air, feeling the freedom of wearing brown instead of any sort of white, though it had not been her first choice. Yet dress and cloak were of the best wool, well cut and well sewn.
Another sailor trotted by, bowing as he went. She vowed to learn at least some of what it was they were doing; she did not like feeling ignorant. Wearing her Great Serpent ring on her right hand made for a good deal of bowing with a captain and crew born mainly in Tar Valon.
She had won that argument with Nynaeve, though Nynaeve had been sure she herself was the only one of the three of them old enough for people to believe she was Aes Sedai. But Nynaeve had been wrong. Egwene was ready to admit that both she and Elayne had received startled looks on boarding the Blue Crane that afternoon at Southharbor, and Captain Ellisor’s eyebows had climbed almost to where his hair would have begun had he had any, but he had been all smiles and bows.
“An honor, Aes Sedai. Three Aes Sedai to travel on my vessel? An honor indeed. I promise you a quick journey as far as you wish. And no trouble with Cairhienin brigands. I no longer put in on that side of the river. Unless you wish it, of course, Aes Sedai. Andoran soldiers do hold a few towns on the Cairhienin side. An honor, Aes Sedai.”
His eyebrows had shot up again when they asked for just one cabin among them—not even Nynaeve wanted to be alone at night if she did not have to be. Each could have a cabin to herself at no extra charge, he told them; he had no other passengers, his cargo was aboard, and if Aes Sedai had urgent business downriver, he would not wait even an hour for anyone else who might want passage. They said again that one cabin would be sufficient.
He was startled, and it had been plain from his face that he did not understand, but Chin Ellisor, born and bred in Tar Valon, was not one to question Aes Sedai once they made their intentions clear. If two of them seemed very young, well, some Aes Sedai were young.
The abandoned ruins vanished behind Egwene. The column of smoke drew closer, and there was a hint of another much further still from the riverbank. The forest was turning to low, grassy hills dotted with thickets. Trees that made flowers in the spring had them, tiny white blossoms on snowberry and bright red sugarberry. One tree she did not know was covered in round white flowers bigger than her two hands together. Occasionally a climbing wildrose put swaths of yellow or white through branches thick with the green of leaves and the red of new growth. It was all too sharp a contrast to the ashes and rubble to be entirely pleasant.
Egwene wished she had an Aes Sedai to question herself right then. One she could trust. Brushing her pouch with her fingers, she could barely feel the twisted stone ring of the ter’angreal inside.
She had tried it every night but two since leaving Tar Valon, and it had not worked the same way twice. Oh, she always found herself in Tel’aran’rhiod, but the only thing she saw that might have been any use was the Heart of the Stone again, each time without Silvie to tell her things. There was certainly nothing about the Black Ajah.
Her own dreams, without the ter’angreal, had been filled with images that seemed almost like glimpses of the Unseen World. Rand holding a sword that blazed like the sun, till she could hardly see that it was a sword, could hardly make out that it was him at all. Rand threatened in a dozen ways, none of them the least bit real. In one dream he had been on a huge stones board, the black and white stones as big as boulders, and him dodging the monstrous hands that moved them and seemed to try to crush him under them. It could have meant something. It very probably did, but beyond the fact that Rand was in danger from someone, or two someones—she thought that much was clear—beyond that, she simply did not know. I cannot help him, now. I have my own duty. I don’t even know where he is, except that it is probably five hundred leagues from here.
She had dreamed of Perrin with a wolf, and with a falcon, and a hawk—and the falcon and the hawk fighting—of Perrin running from someone deadly, and Perrin stepping willingly over the edge of a towering cliff while saying, “It must be done. I must learn to fly before I reach the bottom.” There had been one dream of an Aiel, and she thought that had to do with Perrin, too, but she was not sure. And a dream of Min, springing a steel trap but somehow walking through it without so much as seeing it. There had been dreams of Mat, too. Of Mat with dice spinning ’round him—she felt she knew where that one came from—of Mat being followed by a man who was not there—she still did not understand that; there was a man following, or maybe more than one, but in some way there was no one there—of Mat riding desperately toward something unseen in the distance that he had to reach, and Mat with a woman who seemed to be tossing fireworks about. An Illuminator, she assumed, but that made no more sense than anything else.
She had had so many dreams that she was beginning to doubt them all. Maybe it had to do with using the ter’angreal so often, or maybe with just carrying it. Maybe she was finally learning what a Dreamer did. Frantic dreams, hectic dreams. Men and women breaking out of a cage, then putting on crowns. A woman playing with puppets, and another dream where the strings on puppets led to the hands of larger puppets, and their strings led to still greater puppets, on and on until the last strings vanished into unimaginable heights. Kings dying, queens weeping, battles raging. Whitecloaks ravaging the Two Rivers. She had even dreamed of the Seanchan again. More than once. Those she shut away in a dark corner; she would not let herself think of them. Her mother and father, every night.
She was certain what that meant, at least, or thought she was. It means I’m off hunting the Black Ajah, and I do not know what my dreams mean or how to make the fool ter’angreal do what it should, and I’m frightened, and . . . And homesick. For an instant she thought how good it would be to have her mother send her up to bed knowing everything would be better in the morning. Only mother can’t solve my problems for me anymore, and father can’t promise to chase away monsters and make me believe it. I have to do it myself now.
How far in the past all that was, now. She did not want it back, not really, but it had been a warm time, and it seemed so long ago. It would be wonderful just to see them again, to hear their voices. When I wear this ring on the finger I choose by right.
She had finally let Nynaeve and Elayne each try sleeping one night with the stone ring—surprised at how reluctant she had been to let it out of her own hands—and they had awakened to speak of what was surely Tel’aran’rhiod, but neither had seen more than a glimpse of the Heart of the Stone, nothing that was of any use.
The thick column of smoke now lay abreast of the Blue Crane. Perhaps five or six miles from the river, she thought. The other was only a smudge on the horizon. It could almost have been a cloud, but she was sure it was not. Small thickets grew tight along the riverbank in some places, and between them the grass came right down to the water except where an undercut bank had fallen in.
Elayne came on deck and joined her at the rail, the wind whipping her dark cloak as well. She wore sturdy wool, too. That had been one argument Nynaeve won. Their clothes. Egwene had maintained that Aes Sedai always wore the best, even when they traveled—she had been thinking of the silks she wore in Tel’aran’rhiod—but Nynaeve pointed out that even with as much gold as the Amyrlin had left in the back of her wardrobe, and it was a fat purse, they still had no idea how much things would cost downriver. The servants said Mat had been right about the civil war in Cairhien, and what it had done to prices. To Egwene’s surprise, Elayne had pointed out that Brown sisters wore wool more often than silk. Elayne had been so eager to be away from the kitchen, Egwene thought, she would have worn rags.
I wonder how Mat is doing? No doubt trying to dice with the captain for whatever ship he’s traveling on.
“Terrible,” Elayne murmured. “It is so terrible.”
“What is?” Egwene said absently. I hope he isn’t showing that paper we gave him around too freely.
Elayne gave her a startled look, and then a frown. “That!” She gestured toward the distant smoke. “How can you ignore it?”
“I can ignore it because I do not want to think of what the people are going through, because I cannot do anything about it, and because we have to reach Tear. Because what we’re hunting is in Tear.” She was surprised at her own vehemence. I can’t do anything about it. And the Black Ajah is in Tear.
The more she thought of it, the more certain she became that they would have to find a way into the Heart of the Stone. Perhaps no one but the High Lords of Tear were allowed into it, but she was becoming convinced that the key to springing the Black Ajah’s trap and thwarting them lay in the Heart of the Stone.
“I know all of that, Egwene, but it does not stop me feeling for the Cairhienin.”
“I have heard lectures about the wars Andor fought with Cairhien,” Egwene said dryly. “Bennae Sedai says you and Cairhien have fought more often than any two nations except Tear and Illian.”
The other woman gave her a sidelong look. Elayne had never gotten used to Egwene’s refusal to admit she was Andoran herself. At least, lines on maps said the Two Rivers was part of Andor, and Elayne believed the maps.
“We have fought wars against them, Egwene, but since the damage they suffered in the Aiel War, Andor has sold them nearly as much grain as Tear has. The trade has stopped, now. With every Cairhienin House fighting every other for the Sun Throne, who would buy the grain, or see it distributed to the people? If the fighting is as bad as what we’ve seen on the banks . . . Well. You cannot feed a people for twenty years and feel nothing for them when they must be starving.”
“A Gray Man,” Egwene said, and Elayne jumped, trying to look in every direction at once. The glow of saidar surrounded her.
“Where?”
Egwene took a slower look around the decks, but to make sure no one was close enough to overhear. Captain Ellisor still stood in the stern, by the shirtless man holding the long tiller. Another sailor was up in the very bow, scanning the waters ahead for signs of submerged mudbanks, and two more padded about the deck, now and again adjusting a rope to the sails. The rest of the crew were all below. One of the pair stopped to check the lashings on the rowboat tied upside down on the deck; she waited for him to go on before speaking.
“Fool!” she muttered softly. “Me, Elayne, not you, so don’t glower at me like that.” She continued in a whisper. “A Gray Man is after Mat, Elayne. That must be what that dream meant, but I never saw it. I am a fool!”
The glow around Elayne vanished. “Do not be so hard on yourself,” she whispered back. “Perhaps it does mean that, but I did not see it, and neither did Nynaeve.” She paused; red-gold curls swung as she shook her head. “But it doesn’t make sense, Egwene. Why would a Gray Man be after Mat? There is nothing in my letter to my mother that could harm us in the slightest.”
“I do not know why.” Egwene frowned. “There has to be a reason. I am sure that is what that dream means.”
“Even if you are right, Egwene, there is nothing you can do about it.”
“I know that,” Egwene said bitterly. She did not even know whether he was ahead of them or behind. Ahead, she suspected; Mat would have left without any delay. “Either way,” she muttered to herself, “it does no good. I finally know what one of my dreams means, and it doesn’t help a hemstitch worth!”
“But if you know one meaning,” Elayne told her, “perhaps now you will know others. If we sit down and talk them over, perhaps—”
The Blue Crane gave a shuddering lurch, throwing Elayne to the deck and Egwene on top of her. When Egwene struggled to her feet, the shoreline no longer slid by. The vessel had halted, with the bow raised and the deck canted to one side. The sails flapped noisily in the wind.
Chin Ellisor pushed himself to his feet and ran for the bow, leaving the tillerman to rise on his own. “You blind worm of a farmer!” he roared toward the man in the bow, who was clinging to the rail to keep from falling the rest of the way over. “You dirt-grubbing get of a goat! Haven’t you been on the river long enough yet to recognize how the water ruffles over a mudflat?” He seized the man on the rail by the shoulders and pulled him back onto the deck, but only to shove him out of the way so he could peer down over the bow himself.
The other crewmen were clambering to their feet, now, and more came scrambling up from below. They all ran to cluster around the captain.
Nynaeve appeared at the head of the ladder that led down to the passenger cabins, still straightening her skirts. With a sharp tug at her braid, she frowned at the knot of men in the bow, then strode to Egwene and Elayne. “He ran us onto something, did he? After all his talk of knowing the river as well as he knows his wife. The woman probably never receives as much as a smile from him.” She jerked the thick braid again and went forward, pushing her way through the sailors to reach the captain. They were all intent on the water below.
There was no point in joining her. He will have us off faster if he’s left to it. Nynaeve was probably telling him how to do the work. Elayne seemed to feel the same way, from the rueful shake of head she gave as she watched the captain and crewmen all turn their attention respectfully from whatever was under the bow to Nynaeve.
A ripple of agitation ran through the men, and grew stronger. For a moment the captain’s hands could be seen, waving in protest over the other men’s heads, and then Nynaeve was striding away from them—they made way, bowing now—with Ellisor hurrying beside her and mopping his round face with a large red handkerchief. His anxious voice became audible as they drew near.
“ . . . a good fifteen miles to the next village on the Andor side, Aes Sedai, and at least five or six miles downriver on the Cairhien side! Andoran soldiers hold it, it is true, but they do not hold the miles from here to there!” He wiped at his face as if he were dripping sweat.
“A sunken ship,” Nynaeve told the other two women. “The work of river brigands, the captain thinks. He means to try backing off it with the sweeps, but he does not seem to think that will work.”
“We were running fast when we hit, Aes Sedai. I wanted to make good speed for you.” Ellisor rubbed even harder at his face. He was afraid the Aes Sedai would blame him, Egwene realized. “We are stuck hard. But I do not think we are taking water, Aes Sedai. There is no need to worry. Another ship will be along. Two sets of sweeps will surely get us free. There is no need for you to be put ashore, Aes Sedai. I do swear it, by the Light.”
“You were thinking of leaving the ship?” Egwene asked. “Do you think that is wise?”
“Of course, it’s—!” Nynaeve stopped and frowned at her. Egwene returned the frown with a level stare. Nynaeve went on in a calmer tone, if still a tight one. “The captain says it may be an hour before another ship comes along. One with enough sweeps to make a difference. Or a day. Or two, maybe. I do not think we can afford to waste a day or two waiting. We can be in this village—what did you call it, Captain? Jurene?—we can walk to Jurene in two hours or less. If Captain Ellisor frees his vessel as quickly as he hopes, we can reboard then. He says he will stop to see if we are there. If he does not get free, though, we can take ship from Jurene. We may even find a vessel waiting. The captain says traders do stop there, because of the Andoran soldiers.” She drew a deep breath, but her voice grew tighter. “Have I explained my reasoning fully enough? Do you need more?”
“It is clear to me,” Elayne put in quickly before Egwene could speak. “And it sounds a good idea. You think it is a good idea, too, don’t you, Egwene?”
Egwene gave a grudging nod. “I suppose it is.”
“But, Aes Sedai,” Ellisor protested, “at least go to the Andor bank. The war, Aes Sedai. Brigands, and every sort of ruffian, and the soldiers not much better. The very wreck under our bow shows the sort of men they are.”
“We have not seen a living soul on the Cairhien side,” Nynaeve said, “and in any case, we are far from defenseless, Captain. And I will not walk fifteen miles when I can walk six.”
“Of course, Aes Sedai.” Ellisor really was sweating, now. “I did not mean to suggest . . . Of course you are not defenseless, Aes Sedai. I did not mean to suggest it.” He wiped his face furiously, but it still glistened.
Nynaeve opened her mouth, glanced at Egwene, and seemed to change what she had intended to say. “I am going below for my things,” she told the air halfway between Egwene and Elayne, then turned on Ellisor. “Captain, make your rowboat ready.” He bowed and scurried away even before she turned for the hatch, and was shouting for men to put the boat over the side before she was below.
“If one of you says ‘up,’ ” Elayne murmured, “the other says ‘down.’ If you do not stop it, we may not reach Tear.”
“We will reach Tear,” Egwene said. “And sooner once Nynaeve realizes she is not the Wisdom any longer. We are all”—she did not say Accepted; there were two many men hurrying about—“on the same level, now.” Elayne sighed.
In short order the rowboat had ferried them ashore, and they were standing on the bank with walking staffs in hand, their belongings in bundles on their backs, and hung about them in pouches and scripts. Rolling grassland and scattered copses surrounded them, though the hills were forested a few miles in from the river. The sweeps on the Blue Crane were cutting up froth, but failing to budge the vessel. Egwene turned and started south without another glance. And before Nynaeve could take the lead.
When the others caught up to her, Elayne gave her a reproving look. Nynaeve walked staring straight ahead. Elayne told Nynaeve what Egwene had said about Mat and a Gray Man, but the older woman listened in silence and only said, “He’ll have to look after himself,” without pausing in her stride. After a time, the Daughter-Heir gave up trying to make the other two talk, and they all walked in silence.
Clumps of trees close along the riverbank soon hid the Blue Crane, thick growths of wateroak and willow. They did not go through the copses, small as they were, for anything at all might be hiding in the shadows under their branches. A few low bushes grew scattered between the thickets here close to the river, but they were too sparse to hide a child, much less a brigand, and they were widely spaced.
“If we do see brigands,” Egwene announced, “I am going to defend myself. There is no Amyrlin looking over our shoulders here.”
Nynaeve’s mouth thinned. “If need be,” she told the air in front of her, “we can frighten off any brigands the way we did those Whitecloaks. If we can find no other way.”
“I wish you would not talk of brigands,” Elayne said. “I would like to reach this village without—”
A figure in brown and gray rose from behind a bush standing by itself almost in front of them.


--- layout: archive title: Zulip Chat Archive permalink: /stream/144837-PR-reviews/topic/.23593.20Add.20default.20setup.20for.20VS.20Code.html ---
I would like to propose to add a .vscode/settings.json
file. @Gabriel Ebner mentioned that this may be a problem if somebody uses this file for their own personal mathlib
settings. Is anybody using it?
I don't use this. I do have a snippet file in my ~/.config/Code/User/snippets/lean.json
. The things I use most often is my proof
snippet that I posted last week, and snippets that write options for me, like #implicit
that writes "set_option pp.implicit true
. An important thing while choosing the prefix is to choose something that we wouldn't normally type, so that the snippet is VScode's first proposal. For instance begin
is not a good prefix in order to insert a proof snippet because VScode then has to choose between completing the word "begin" and inserting the prefix. That's why I started my set_option prefixes #implicit
, #rewrite
, #all
, #instance
with a "#".
Reading the actual PR discussion I'm confused. Would this mathlib/.vscode/settings.json
take precedence over my $HOME/.config/Code/User/settings.json
? If yes then of course we can't do that.
Yes, the folder configuration in mathlib/.vscode/settings.json
takes precedence. That's the whole point of it: you can override your default settings with project-specific settings.
I have no idea if it also overrides workspace settings.
Ok, then we need to be very careful. But in the PR I see only things that are mathlib's style rules, nothing setting the leader key (\
vs ,
) or custom translations, so we should be ok, right?
Patrick, are there specific settings you don't want overridden? Maybe tabSize
or rulers
?
I guess we agree that overriding files.encoding
is correct, for example?
I guess we should have only stuff that alter what is sent to mathlib, but nothing about how we produce it. So enforcing end of lines and encoding is ok, but editor.rulers
isn't. I'm not sure what tabSize
does. Is it only about how tab are displayed? Or do tabs get physically replaced by spaces?
I was wondering about what tabSize
does too
tabSize
is the amount of spaces inserted when pressing tab. Which is also the indentation we use in mathlib
Ok, then this should be in the enforced things. But I think rulers shouldn't
Okay, I just needed to merge another PR which had the wrong file endings. I will merge the current setup, and adopt it when people start complaining about it
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Contents
A program to check the status of a refinement.
qr.status can be executed in a folder where a refinement has been running.
None


Driver arraigned for beating FRSC officials
by Bola BamigbolaBola Bamigbola, Osogbo.
A 31-year-old man, Olasina Olanrewaju, who allegedly beat two officials of the Federal Road Safety Corps and inflicted injuries on them, was on Friday arraigned before an Ile-Ife magistrates’ court in Osun State.
Olanrewaju was said to have beaten the two officials with a cable.
Addressing the court, police prosecutor, Sunday Osanyintuyi, said the defendant committed the offence on November 22, 2019, at Ajebamidele, Ile-Ife.
He added that the defendant and others yet to be apprehended, threatened the FRSC officials performing their lawful duty.
He said the defendant unlawfully assaulted Taiwo Alonge and Bello Ishola, using a cable.
The prosecutor further explained that the defendant also tore uniforms of the officials.
The offences contravened sections 356(3), 451 and 516 (1) of the Criminal Code, 2002.
The Defence Counsel, Mr Ben Adirieje, applied for bail for his client and assured the court that he would not jump bail.
In her ruIing, Magistrate Bose Idowu, admitted the defendant to bail in the sum N100,000 with two sureties each in like sum and adjourned the case until December 6, for hearing.
Copyright PUNCH.
All rights reserved. This material, and other digital content on this website, may not be reproduced, published, broadcast, rewritten or redistributed in whole or in part without prior express written permission from PUNCH.
Contact: theeditor@punchng.com


Goal
Provide a simple way to create XML markup and data structures.
Classes
| Builder::XmlMarkup | Generate XML markup notiation |
| Builder::XmlEvents | Generate XML events (i.e. SAX-like) |
| Notes |
An Builder::XmlTree class to generate XML tree (i.e. DOM-like) structures is also planned, but not yet implemented. Also, the events builder is currently lagging the markup builder in features.
Usage
require 'rubygems' require_gem 'builder', '~> 2.0' builder = Builder::XmlMarkup.new xml = builder.person { |b| b.name("Jim"); b.phone("555-1234") } xml #=> <person><name>Jim</name><phone>555-1234</phone></person>
or
require 'rubygems' require_gem 'builder' builder = Builder::XmlMarkup.new(:target=>STDOUT, :indent=>2) builder.person { |b| b.name("Jim"); b.phone("555-1234") } # # Prints: # <person> # <name>Jim</name> # <phone>555-1234</phone> # </person>
Compatibility
Version 2.0.0 Compatibility Changes
Version 2.0.0 introduces automatically escaped attribute values for the first time. Versions prior to 2.0.0 did not insert escape characters into attribute values in the XML markup. This allowed attribute values to explicitly reference entities, which was occasionally used by a small number of developers. Since strings could always be explicitly escaped by hand, this was not a major restriction in functionality.
However, it did suprise most users of builder. Since the body text is normally escaped, everybody expected the attribute values to be escaped as well. Escaped attribute values were the number one support request on the 1.x Builder series.
Starting with Builder version 2.0.0, all attribute values expressed as strings will be processed and the appropriate characters will be escaped (e.g. “&” will be tranlated to “&”). Attribute values that are expressed as Symbol values will not be processed for escaped characters and will be unchanged in output. (Yes, this probably counts as Symbol abuse, but the convention is convenient and flexible).
Example:
xml = Builder::XmlMarkup.new xml.sample(:escaped=>"This&That", :unescaped=>:"Here&There") xml.target! => <sample escaped="This&That" unescaped="Here&There"/>
Version 1.0.0 Compatibility Changes
Version 1.0.0 introduces some changes that are not backwards compatible with earlier releases of builder. The main areas of incompatibility are:
Keyword based arguments to new (rather than positional based). It was found that a developer would often like to specify indentation without providing an explicit target, or specify a target without indentation. Keyword based arguments handle this situation nicely.
Builder must now be an explicit target for markup tags. Instead of writing
xml_markup = Builder::XmlMarkup.new xml_markup.div { strong("text") }
you need to write
xml_markup = Builder::XmlMarkup.new xml_markup.div { xml_markup.strong("text") }
The builder object is passed as a parameter to all nested markup blocks. This allows you to create a short alias for the builder object that can be used within the block. For example, the previous example can be written as:
xml_markup = Builder::XmlMarkup.new xml_markup.div { |xml| xml.strong("text") }
If you have both a pre-1.0 and a post-1.0 gem of builder installed, you can choose which version to use through the RubyGems require_gem facility.
require_gem 'builder', "~> 0.0" # Gets the old version require_gem 'builder', "~> 1.0" # Gets the new version
Features
XML Comments are supported …
xml_markup.comment! "This is a comment" #=> <!-- This is a comment -->
XML processing instructions are supported …
xml_markup.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8" #=> <?xml version="1.0" encoding="UTF-8"?>
If the processing instruction is omitted, it defaults to “xml”. When the processing instruction is “xml”, the defaults attributes are:
version 1.0
encoding “UTF-8“
(NOTE: if the encoding is set to “UTF-8” and $KCODE is set to “UTF8”, then Builder will emit UTF-8 encoded strings rather than encoding non-ASCII characters as entities.)
XML entity declarations are now supported to a small degree.
xml_markup.declare! :DOCTYPE, :chapter, :SYSTEM, "../dtds/chapter.dtd" #=> <!DOCTYPE chapter SYSTEM "../dtds/chapter.dtd">
The parameters to a declare! method must be either symbols or strings. Symbols are inserted without quotes, and strings are inserted with double quotes. Attribute-like arguments in hashes are not allowed.
If you need to have an argument to declare! be inserted without quotes, but the arguement does not conform to the typical Ruby syntax for symbols, then use the :“string” form to specify a symbol.
For example:
xml_markup.declare! :ELEMENT, :chapter, :"(title,para+)" #=> <!ELEMENT chapter (title,para+)>
Nested entity declarations are allowed. For example:
@xml_markup.declare! :DOCTYPE, :chapter do |x| x.declare! :ELEMENT, :chapter, :"(title,para+)" x.declare! :ELEMENT, :title, :"(#PCDATA)" x.declare! :ELEMENT, :para, :"(#PCDATA)" end #=> <!DOCTYPE chapter [ <!ELEMENT chapter (title,para+)> <!ELEMENT title (#PCDATA)> <!ELEMENT para (#PCDATA)> ]>
Some support for XML namespaces is now available. If the first argument to a tag call is a symbol, it will be joined to the tag to produce a namespace:tag combination. It is easier to show this than describe it.
xml.SOAP :Envelope do ... end
Just put a space before the colon in a namespace to produce the right form for builder (e.g. “SOAP:Envelope“ => “xml.SOAP :Envelope“)
String attribute values are now escaped by default by Builder (NOTE: this is new behavior as of version 2.0).
However, occasionally you need to use entities in attribute values. Using a symbols (rather than a string) for an attribute value will cause Builder to not run its quoting/escaping algorithm on that particular value.
(Note: The escape_attrs option for builder is now obsolete).
Example:
xml = Builder::XmlMarkup.new xml.sample(:escaped=>"This&That", :unescaped=>:"Here&There") xml.target! => <sample escaped="This&That" unescaped="Here&There"/>
UTF-8 Support
Builder correctly translates UTF-8 characters into valid XML. (New in version 2.0.0). Thanks to Sam Ruby for the translation code.
Example:
xml = Builder::Markup.new xml.sample("Iñtërnâtiônàl") xml.target! => "<sample>Iñtërnâtiônàl</sample>"
You can get UTF-8 encoded output by making sure that the XML encoding is set to “UTF-8” and that the $KCODE variable is set to “UTF8”.
$KCODE = 'UTF8' xml = Builder::Markup.new xml.instruct!(:xml, :encoding => "UTF-8") xml.sample("Iñtërnâtiônàl") xml.target! => "<sample>Iñtërnâtiônàl</sample>"
Links
| Documents | |
| Github Clone | git://github.com/jimweirich/builder.git |
| Issue Tracking | |
| Bug Reports |
Contact
| Author | Jim Weirich |
<EMAIL_ADDRESS>| |
| Home Page | |
| License | MIT Licence (www.opensource.org/licenses/mit-license.html) |


| Package | org.igniterealtime.xiff.data.forms |
| Class | public class FormField |
| Inheritance | FormField XMLStanza ExtensionContainer |
| Implements | ISerializable |
See also
| Property | Defined by | ||
|---|---|---|---|
| _exts : Object | ExtensionContainer | ||
| label : String
The label of this field used by user interfaces to render a descriptive
title of this field
| FormField | ||
| name : String
The name of this field used by the application or server.
| FormField | ||
| type : String
The type of this field used by user interfaces to render an approprite
control to represent this field.
| FormField | ||
| value : String
The chosen value for this field.
| FormField | ||
| XMLData : XML [static]
| XMLStanza | ||
| XMLFactory : XMLDocument [static]
| XMLStanza |
| Method | Defined by | ||
|---|---|---|---|
| FormField | |||
| ExtensionContainer | |||
|
addTextNode(parent:XMLNode, elementName:String, value:String):XMLNode
Adds a simple text node to the parent node specified.
| XMLStanza | ||
|
deserialize(node:XMLNode):Boolean
Deserializes the FormField data.
| FormField | ||
|
ensureNode(node:XMLNode, elementName:String):XMLNode
Ensures that a node with a specific element name exists in the stanza.
| XMLStanza | ||
|
exists(value:*):Boolean
[static]
A helper method to determine if a value is both not null
and not undefined.
| XMLStanza | ||
|
getAllExtensions():Array
| ExtensionContainer | ||
|
getAllExtensionsByNS(ns:String):Array
| ExtensionContainer | ||
|
getAllOptions():Array
If options are provided for possible selections of the value they are listed
here.
| FormField | ||
|
getAllValues():Array
The values for this multiple field.
| FormField | ||
|
getExtension(name:String):Extension
| ExtensionContainer | ||
|
getNode():XMLNode
| XMLStanza | ||
|
removeAllExtensions(ns:String):void
| ExtensionContainer | ||
|
removeExtension(ext:IExtension):Boolean
| ExtensionContainer | ||
|
replaceTextNode(parent:XMLNode, original:XMLNode, elementName:String, value:String):XMLNode
Replaces one node in the stanza with another simple text node.
| XMLStanza | ||
|
serialize(parent:XMLNode):Boolean
Serializes the FormField data to XML for sending.
| FormField | ||
|
setAllOptions(value:Array):void
Sets all the options available from an array of objects
| FormField | ||
|
setAllValues(value:Array):void
Sets all the values of this field from an array of strings
| FormField | ||
|
setNode(node:XMLNode):Boolean
Sets the XML node that should be used for this stanza's internal XML representation.
| XMLStanza |
| Constant | Defined by | ||
|---|---|---|---|
| ELEMENT_NAME : String = "field" [static]
| FormField |
| label | property |
label:String
[read-write]The label of this field used by user interfaces to render a descriptive title of this field
Implementation public function get label():String
public function set label(value:String):void
| name | property |
name:String
[read-write]
The name of this field used by the application or server.
Note: this serializes to the var
attribute on the
field node. Since var
is a reserved word in ActionScript
this field uses name
to describe the name of this field.
public function get name():String
public function set name(value:String):void
| type | property |
type:String
[read-write]
The type of this field used by user interfaces to render an approprite
control to represent this field.
May be one of the following:
FormExtension.FIELD_TYPE_BOOLEAN
FormExtension.FIELD_TYPE_FIXED
FormExtension.FIELD_TYPE_HIDDEN
FormExtension.FIELD_TYPE_JID_MULTI
FormExtension.FIELD_TYPE_JID_SINGLE
FormExtension.FIELD_TYPE_LIST_MULTI
FormExtension.FIELD_TYPE_LIST_SINGLE
FormExtension.FIELD_TYPE_TEXT_MULTI
FormExtension.FIELD_TYPE_TEXT_PRIVATE
FormExtension.FIELD_TYPE_TEXT_SINGLE
public function get type():String
public function set type(value:String):void
See also
| value | property |
value:String
[read-write]
The chosen value for this field. In forms with a type
FormExtension.TYPE_REQUEST
this is typically the default
value of the field.
Applies to the following field types:
FormExtension.FIELD_TYPE_BOOLEAN
FormExtension.FIELD_TYPE_FIXED
FormExtension.FIELD_TYPE_HIDDEN
FormExtension.FIELD_TYPE_JID_SINGLE
FormExtension.FIELD_TYPE_LIST_SINGLE
FormExtension.FIELD_TYPE_LIST_MULTI
FormExtension.FIELD_TYPE_TEXT_PRIVATE
FormExtension.FIELD_TYPE_TEXT_SINGLE
Suggested values can typically be retrieved in getAllOptions
public function get value():String
public function set value(value:String):void
| FormField | () | constructor |
public function FormField()
| deserialize | () | method |
public function deserialize(node:XMLNode):Boolean
Deserializes the FormField data.
Parametersnode:XMLNode — The XML node associated this data
|
Boolean — An indicator as to whether deserialization was successful
|
| getAllOptions | () | method |
public function getAllOptions():Array
If options are provided for possible selections of the value they are listed
here.
Applies to the following field types:
FormExtension.FIELD_TYPE_JID_MULTI
FormExtension.FIELD_TYPE_JID_SINGLE
FormExtension.FIELD_TYPE_LIST_MULTI
FormExtension.FIELD_TYPE_LIST_SINGLE
Array — Array of objects with the properties label and value
|
| getAllValues | () | method |
public function getAllValues():Array
The values for this multiple field. In forms with a type
FormExtension.TYPE_REQUEST
these are typically the existing
values of the field.
Applies to the following field types:
FormExtension.FIELD_TYPE_JID_MULTI
FormExtension.FIELD_TYPE_LIST_MULTI
FormExtension.FIELD_TYPE_TEXT_MULTI
Array — Array containing strings representing the values of this field
|
| serialize | () | method |
public function serialize(parent:XMLNode):Boolean
Serializes the FormField data to XML for sending.
Parametersparent:XMLNode — The parent node that this item should be serialized into
|
Boolean — An indicator as to whether serialization was successful
|
| setAllOptions | () | method |
public function setAllOptions(value:Array):void
Sets all the options available from an array of objects
Parametersvalue:Array — containing objects with the properties label and
value
|
| setAllValues | () | method |
public function setAllValues(value:Array):void
Sets all the values of this field from an array of strings
Parametersvalue:Array — Array of Strings
|
| ELEMENT_NAME | constant |
public static const ELEMENT_NAME:String = "field"


Computer Science
University of Illinois at Urbana-Champaign
Computer Science
University of Illinois at Urbana-Champaign
Computer Science
University of Illinois at Urbana-Champaign
Computer Science
University of Illinois at Urbana-Champaign


Unchanged slider value!


This election crash course will give you a brief overview of the voting process and the candidates. Select which subject you would like to read about.
Voting 101 Meet the CandidatesThe general election takes place every four years on the first Tuesday of November.
The presidency is rewarded to the candidate that receives the most electoral votes.
When many head to the polls, they think that their vote will directly determine the next president of the United States.
However, that is not true.
Your vote determines the number of electoral votes a candidate receives..
A.K.A
If one candidate receives more votes than the other, they receive all the delegates (electoral votes) from that state.
Your popular vote goes towards the recepient of ALL the electoral votes in that particular state.
You may think that your vote can't make a difference because you only represent one vote, but many of people have this exact same mindset. If large amount of people have this mindset this, the decision is left in the hands of others who aren't garunteed to have the same opinion as yours.
Click on the arrows below to view information on each candidate!


The Astropy Project is a community effort to develop a core package for astronomy using the Python programming language and improve usability, interoperability, and collaboration between astronomy Python packages. The core astropy package contains functionality aimed at professional astronomers and astrophysicists, but may be useful to anyone developing astronomy software. The Astropy Project also includes "affiliated packages," Python packages that are not necessarily developed by the core development team, but share the goals of Astropy, and often build from the core package's code and infrastructure.
Aside from the actual code, Astropy is also a community of astronomy- associated users and developers that agree that sharing utilities is healthy for the community and the science it produces. This community is of course central to accomplishing anything with the code itself. We welcome anyone who wishes to contribute to the project and expect everyone in our community to follow the code of conduct when interacting with others.
For more details on background of the project, you can read the original vision from when the project was founded.
The astropy package (alternatively known as the "core" package) contains various classes, utilities, and a packaging framework intended to provide commonly-used astronomy tools. It is divided into a variety of sub-packages, which are described in detail in the documentation.
The core also provides this documentation, and a variety of utilities that simplify starting other python astronomy/astrophysics packages. As described in the following section, these simplify the process of creating affiliated packages.
The Astropy project includes the concept of "affiliated packages." An affiliated package is an astronomy-related python package that is not part of the astropy core source code, but has requested to be included in the general community effort of the Astropy project. Such a package may be a candidate for eventual inclusion in the main astropy package (although this is not required). Until then, however, it is a separate package, and may not be in the astropy namespace.
The authoritative list of current affiliated packages is available at http://affiliated.astropy.org, including a machine-readable JSON file.
If you are interested in starting an affiliated package, or have a package you are interested in making more compatible with astropy, the astropy core package includes features that simplify and homogenize package management. Astropy provides a package template that provides a common way to organize a package, to make your life simpler. You can use this template either with a new package you are starting or an existing package to give it most of the organizational tools Astropy provides, including the documentation, testing, and Cython-building tools. See the usage instructions in the template for further details.
To then get your package listed on the registry, take a look at the guidelines for becoming an affiliated package , and then post your intent on the astropy-dev mailing list. The Astropy coordination committee, in consultation with the community, will provide you feedback on the package, and will add it to the registry when it is approved.
Astropy is licensed under a three-clause BSD license. For details, see the LICENSE.rst file in the astropy repository.
Astropy is a Sponsored Project of NumFOCUS, a 501(c)(3) nonprofit charity in the United States. NumFOCUS provides Astropy with fiscal, legal, and administrative support to help ensure the health and sustainability of the project. Visit numfocus.org for more information.


"BEELZEBUB "(Gr. form Beel’zebul), the name given to Satan, and found only in the New Testament (Matthew 10:25; 12:24, 27; Mark 3:22). It is probably the same as Baalzebub (q.v.), the God of Ekron, meaning “the Lord of flies,” or, as others think, “the Lord of dung,” or “the dung-God.”
"BEELZEBUB "(Gr. form Beel’zebul), the name given to Satan, and found only in the New Testament (Matthew 10:25; 12:24, 27; Mark 3:22). It is probably the same as Baalzebub (q.v.), the God of Ekron, meaning “the Lord of flies,” or, as others think, “the Lord of dung,” or “the dung-God.”


Entities describe persons and companies that will be cross-referenced with documents, and connect to investigative networks.
You can allow colleagues to see the documents and entities in this collection, or make it public.