Rand walked stiff-legged and nervous at first, beside the Warder. Face it on your feet. It was easy for Lan to say. He had not been summoned by the Amyrlin Seat. He was not wondering if he would be gentled before the day was done, or worse. Rand felt as if he had something caught in his throat; he could not swallow, and he wanted to, badly.
The corridors bustled with people, servants going about their morning chores, warriors wearing swords over lounging robes. A few young boys carrying small practice swords stayed near their elders, imitating the way they walked. No sign remained of the fighting, but an air of alertness clung even to the children. Grown men looked like cats waiting for a pack of rats.
Ingtar gave Rand and Lan a peculiar look, almost troubled, opening his mouth, then saying nothing as they passed him. Kajin, tall and lean and sallow, pumped his fists over his head and shouted, “Tai’shar Malkier! Tai’shar Manetheren!” True blood of Malkier. True blood of Manetheren.
Rand jumped. Light, why did he say that? Don’t be a fool, he told himself. They all know about Manetheren here. They know every old story, if it has fighting in it. Burn me, I have to take a rein on myself.
Lan raised his fists in reply. “Tai’shar Shienar!”
If he made a run for it, could he lose himself in the crowd long enough to reach his horse? If she sends trackers after me . . . With every step he grew more tense.
As they approached the women’s apartments, Lan suddenly snapped, “Cat Crosses the Courtyard!”
Startled, Rand instinctively assumed the walking stance as he had been taught, back straight but every muscle loose, as if he hung from a wire at the top of his head. It was a relaxed, almost arrogant, saunter. Relaxed on the outside; he certainly did not feel it inside. He had no time to wonder what he was doing. They rounded the last corridor in step with each other.
The women at the entrance to the women’s apartments looked up calmly as they came closer. Some sat behind slanted tables, checking large ledgers and sometimes making an entry. Others were knitting, or working with needle and embroidery hoop. Ladies in silks kept this watch, as well as women in livery. The arched doors stood open, unguarded except for the women. No more was needed. No Shienaran man would enter uninvited, but any Shienaran man stood ready to defend that door if needed, and he would be aghast at the need.
Rand’s stomach churned, harsh and acid. They’ll take one look at our swords and turn us away. Well, that’s what I want, isn’t it? If they turn us back, maybe I can still get away. If they don’t call the guards down on us. He clung to the stance Lan had given him as he would have to a floating branch in a flood; holding it was the only thing that kept him from turning tail and running.
One of the Lady Amalisa’s attendants, Nisura, a round-faced woman, put aside her embroidery and stood as they came to a stop. Her eyes flickered across their swords, and her mouth tightened, but she did not mention them. All the women stopped what they were doing to watch, silent and intent.
 She glanced at Rand, so quickly he was almost not sure he had seen it; it reminded him of what Perrin had said. “The Amyrlin Seat awaits you.” She motioned, and two other ladies—not servants; they were being honored—stepped forward for escorts. The women bowed, a hair more than Nisura had, and motioned them through the archway. They both gave Rand a sidelong glance, then did not look at him again.
Were they looking for all of us, or just me? Why all of us?
Inside, they got the looks Rand expected—two men in the women’s apartments where men were rare—and their swords caused more than one raised eyebrow, but none of the women spoke. The two men left knots of conversation in their path, soft murmurs too low for Rand to make out. Lan strode along as if he did not even notice. Rand kept pace behind their escorts and wished he could hear.
And then they reached the Amyrlin Seat’s chambers, with three Aes Sedai in the hall outside the door. The tall Aes Sedai, Leane, held her golden-flamed staff. Rand did not know the other two, one of the White Ajah and one Yellow by their fringe. He remembered their faces, though, staring at him as he had run through these same halls. Smooth Aes Sedai faces, with knowing eyes. They studied him with arched eyebrows and pursed lips. The women who had brought Lan and Rand curtsied, handing them over to the Aes Sedai.
Leane looked Rand over with a slight smile. Despite the smile, her voice had a snap to it. “What have you brought the Amyrlin Seat today, Lan Gaidin? A young lion? Better you don’t let any Greens see this one, or one of them will bond him before he can take a breath. Greens like to bond them young.”
Rand wondered if it was really possible to sweat inside your skin. He felt as if he was. He wanted to look at Lan, but he remembered this part of the Warder’s instructions. “I am Rand al’Thor, son of Tam al’Thor, of the Two Rivers, which once was Manetheren. As I have been summoned by the Amyrlin Seat, Leane Sedai, so do I come. I stand ready.” He was surprised that his voice did not shake once.
Leane blinked, and her smile faded to a thoughtful look. “This is supposed to be a shepherd, Lan Gaidin? He was not so sure of himself this morning.”
“He is a man, Leane Sedai,” Lan said firmly, “no more, and no less. We are what we are.”
The Aes Sedai shook her head. “The world grows stranger every day. I suppose the blacksmith will wear a crown and speak in High Chant. Wait here.” She vanished inside to announce them.
She was only gone a few moments, but Rand was uncomfortably aware of the eyes of the remaining Aes Sedai. He tried to return their gaze levelly, the way Lan had told him to, and they put their heads together, whispering. What are they saying? What do they know? Light, are they going to gentle me? Was that what Lan meant about facing whatever comes?
Leane returned, motioning Rand to go in. When Lan started to follow, she thrust her staff across his chest, stopping him. “Not you, Lan Gaidin. Moiraine Sedai has a task for you. Your lion cub will be safe enough by himself.”
The door swung shut behind Rand, but not before he heard Lan’s voice, fierce and strong, but low for his ear alone. “Tai’shar Manetheren!”
Moiraine sat to one side of the room, and one of the Brown Aes Sedai he had seen in the dungeon sat to the other, but it was the woman in the tall chair behind the wide table who held his eyes. The curtains had been partially drawn over the arrowslits, but the gaps let in enough light behind her to make her face hard to see clearly. He still recognized her, though. The Amyrlin Seat.
Quickly he dropped to one knee, left hand on sword hilt, right fist pressed to the patterned rug, and bowed his head. “As you have summoned me, Mother, so have I come. I stand ready.” He lifted his head in time to see her eyebrows rise.
“Do you now, boy?” She sounded almost amused. And something else he could not make out. She certainly did not look amused. “Stand up, boy, and let me have a look at you.”
He straightened and tried to keep his face relaxed. It was an effort not to clench his hands. Three Aes Sedai. How many does it take to gentle a man? They sent a dozen or more after Logain. Would Moiraine do that to me? He met the Amyrlin Seat’s look eye to eye. She did not blink.
“Sit, boy,” she said finally, gesturing to a ladder-back chair that had been pulled around squarely in front of the table. “This will not be short, I fear.”
“Thank you, Mother.” He bowed his head, then, as Lan had told him, glanced at the chair and touched his sword. “By your leave, Mother, I will stand. The watch is not done.”
The Amyrlin Seat made an exasperated sound and looked at Moiraine. “Have you let Lan at him, Daughter? This will be difficult enough without him picking up Warder ways.”
“Lan has been teaching all the boys, Mother,” Moiraine replied calmly. “He has spent a little more time with this one than the others because he carries a sword.”
The Brown Aes Sedai shifted on her chair. “The Gaidin are stiff-necked and proud, Mother, but useful. I would not be without Tomas, as you would not lose Alric. I have even heard a few Reds say they sometimes wish for a Warder. And the Greens, of course . . . ”
The three Aes Sedai were all ignoring him, now. “This sword,” the Amyrlin Seat said. “It appears to be a heron-mark blade. How did he come by that, Moiraine?”
“Tam al’Thor left the Two Rivers as a boy, Mother. He joined the army of Illian, and served in the Whitecloak War and the last two wars with Tear. In time he rose to be a blademaster and the Second Captain of the Companions. After the Aiel War, Tam al’Thor returned to the Two Rivers with a wife from Caemlyn and an infant boy. It would have saved much, had I known this earlier, but I know it now.”
Rand stared at Moiraine. He knew Tam had left the Two Rivers and come back with an outlander wife and the sword, but the rest . . . Where did you learn all that? Not in Emond’s Field. Unless Nynaeve told you more than she’s ever told me. An infant boy. She doesn’t say his son. But I am.
“Against Tear.” The Amyrlin Seat frowned slightly. “Well, there was blame enough on both sides in those wars. Fool men who would rather fight than talk. Can you tell if the blade is authentic, Verin?”
“There are tests, Mother.”
“Then take it and test it, Daughter.”
The three women were not even looking at him. Rand stepped back, gripping the hilt hard. “My father gave this sword to me,” he said angrily. “Nobody is taking it from me.” It was only then that he realized Verin had not moved from her chair. He looked at them in confusion, trying to recover his equilibrium.
“So,” the Amyrlin Seat said, “you have some fire in you besides whatever Lan put in. Good. You will need it.”
“I am what I am, Mother,” he managed smoothly enough. “I stand ready for what comes.”
The Amyrlin Seat grimaced. “Lan has been at you. Listen to me, boy. In a few hours, Ingtar will leave to find the stolen Horn. Your friend, Mat, will go with him. I expect that your other friend—Perrin?—will go, also. Do you wish to accompany them?”
“Mat and Perrin are going? Why?” Belatedly he remembered to add a respectful, “Mother.”
“You know of the dagger your friend carried?” A twist of her mouth showed what she thought of the dagger. “That was taken, too. Unless it is found, the link between him and the blade cannot be broken completely, and he will die. You can ride with them, if you want. Or you can stay here. No doubt Lord Agelmar will let you remain as a guest as long as you wish. I will be leaving today, as well. Moiraine Sedai will accompany me, and so will Egwene and Nynaeve, so you will stay alone, if you stay. The choice is yours.”
Rand stared at her. She is saying I can go as I want. Is that what she brought me here for? Mat is dying! He glanced at Moiraine, sitting impassively with her hands folded in her lap. She looked as if nothing in the world could concern her less than where he went. Which way are you trying to push me, Aes Sedai? Burn me, but I’ll go another. But if Mat’s dying . . . I can’t abandon him. Light, how are we going to find that dagger?
“You do not have to make the choice now,” the Amyrlin said. She did not seem to care, either. “But you will have to choose before Ingtar leaves.”
“I will ride with Ingtar, Mother.”
The Amyrlin Seat nodded absently. “Now that that is dealt with, we can move on to important matters. I know you can channel, boy. What do you know?”
Rand’s mouth fell open. Caught up in worrying about Mat, her casual words hit him like a swinging barn door. All of Lan’s advice and instructions went spinning. He stared at her, licking his lips. It was one thing to think she knew, entirely another to find out she really did. The sweat finally seeped out on his forehead.
She leaned forward in her seat, waiting for his answer, but he had the feeling she wanted to lean back. He remembered what Lan had said. If she’s afraid of you . . . He wanted to laugh. If she was afraid of him.
“No, I can’t. I mean . . . I didn’t do it on purpose. It just happened. I don’t want to—to channel the Power. I won’t ever do it again. I swear it.”
“You don’t want to,” the Amyrlin Seat said. “Well, that’s wise of you. And foolish, too. Some can be taught to channel; most cannot. A few, though, have the seed in them at birth. Sooner or later, they wield the One Power whether they want to or not, as surely as roe makes fish. You will continue to channel, boy. You can’t help it. And you had better learn to channel, learn to control it, or you will not live long enough to go mad. The One Power kills those who cannot control its flow.”
“How am I supposed to learn?” he demanded. Moiraine and Verin just sat there, unruffled, watching him. Like spiders. “How? Moiraine claims she can’t teach me anything, and I don’t know how to learn, or what. I don’t want to, anyway. I want to stop. Can’t you understand that? To stop!”
“I told you the truth, Rand,” Moiraine said. She sounded as if they were having a pleasant conversation.  No Aes Sedai living can teach you to touch saidin any more than you could learn to touch saidar. A bird cannot teach a fish to fly, nor a fish teach a bird to swim.”
“I have always thought that was a bad saying,” Verin said suddenly. “There are birds that dive and swim. And in the Sea of Storms are fish that fly, with long fins that stretch out as wide as your outstretched arms, and beaks like swords that can pierce . . . ” Her words trailed off and she became flustered. Moiraine and the Amyrlin Seat were staring at her without expression.
Rand took the interruption to try to regain some control of himself. As Tam had taught him long ago, he formed a single flame in his mind and fed his fears into it, seeking emptiness, the stillness of the void. The flame seemed to grow until it enveloped everything, until it was too large to contain or imagine any longer. With that it was gone, leaving in its place a sense of peace. At its edges, emotions still flickered, fear and anger like black blotches, but the void held. Thought skimmed across its surface like pebbles across ice. The Aes Sedai’s attention was only off him for a moment, but when they turned back his face was calm.
“Why are you talking to me like this, Mother?” he asked. “You should be gentling me.”
The Amyrlin Seat frowned and turned to Moiraine. “Did Lan teach him this?”
“No, Mother. He had it from Tam al’Thor.”
“Why?” Rand demanded again.
The Amyrlin Seat looked him straight in the eye and said, “Because you are the Dragon Reborn.”
The void rocked. The world rocked. Everything seemed to spin around him. He concentrated on nothing, and the emptiness returned, the world steadied. “No, Mother. I can channel, the Light help me, but I am not Raolin Darksbane, nor Guaire Amalasin, nor Yurian Stonebow. You can gentle me, or kill me, or let me go, but I will not be a tame false Dragon on a Tar Valon leash.”
He heard Verin gasp, and the Amyrlin’s eyes widened, a gaze as hard as blue rock. It did not affect him; it slid off the void within.
“Where did you hear those names?” the Amyrlin demanded. “Who told you Tar Valon pulls the lines on any false Dragon?”
“A friend, Mother,” he said. “A gleeman. His name was Thom Merrilin. He’s dead, now.” Moiraine made a sound, and he glanced at her. She claimed Thom was not dead, but she had never offered any proof, and he could not see how any man could survive grappling hand-to-hand with a Fade. The thought was extraneous, and it faded away. There was only the void and the oneness now.
“You are not a false Dragon,” the Amyrlin said firmly. “You are the true Dragon Reborn.”
“I am a shepherd from the Two Rivers, Mother.”
“Daughter, tell him the story. A true story, boy. Listen well.”
Moiraine began speaking. Rand kept his eyes on the Amyrlin’s face, but he heard.
 They ravaged through Cairhien, destroyed every army sent against them, burned the city of Cairhien itself, and fought all the way to Tar Valon. It was winter and snowing, but cold or heat mean little to an Aiel. The final battle, the last that counted, was fought outside the Shining Walls, in the shadow of Dragonmount. In three days and three nights of fighting, the Aiel were turned back. Or rather they turned back, for they had done what they came to do, which was to kill King Laman of Cairhien, for his sin against the Tree. It is then that my story begins. And yours.”
They came over the Dragonwall like a flood. All the way to the Shining Walls. Rand waited for the memories to fade, but it was Tam’s voice he heard, Tam sick and raving, pulling up secrets from his past. The voice clung outside the void, clamoring to get in.
“I was one of the Accepted, then,” Moiraine said, “as was our Mother, the Amyrlin Seat. We were soon to be raised to sisterhood, and that night we stood attendance on the then Amyrlin. Her Keeper of the Chronicles, Gitara Moroso, was there. Every other full sister in Tar Valon was out Healing as many wounded as she could find, even the Reds. It was dawn. The fire on the hearth could not keep the cold out. The snow had finally stopped, and in the Amyrlin’s chambers in the White Tower we could smell the smoke of outlying villages burned in the fighting.”
Battles are always hot, even in the snow. Had to get away from the stink of death. Tam’s delirious voice clawed at the empty calm inside Rand. The void trembled and shrank, steadied, then wavered again. The Amyrlin’s eyes bored at him. He felt sweat on his face again. “It was all a fever dream,” he said. “He was sick.” He raised his voice. “My name is Rand al’Thor. I am a shepherd. My father is Tam al’Thor, and my mother was—”
Moiraine had paused for him, but now her unchanging voice cut him off, soft and relentless. “The Karaethon Cycle, the Prophecies of the Dragon, says that the Dragon will be reborn on the slopes of Dragonmount, where he died during the Breaking of the World. Gitara Sedai had the Foretelling sometimes. She was old, her hair as white as the snow outside, but when she had the Foretelling, it was strong. The morning light through the windows was strengthening as I handed her a cup of tea. The Amyrlin Seat asked me what news there was from the field of battle. And Gitara Sedai started up out of her chair, her arms and legs rigid, trembling, her face as if she looked into the Pit of Doom at Shayol Ghul, and she cried out, ‘He is born again! I feel him! The Dragon takes his first breath on the slope of Dragonmount! He is coming! He is coming! Light help us! Light help the world! He lies in the snow and cries like the thunder! He burns like the sun!’ And she fell forward into my arms, dead.”
Slope of the mountain. Heard a baby cry. Gave birth there alone, before she died. Child blue with the cold. Rand tried to force Tam’s voice away. The void grew smaller. “A fever-dream,” he gasped. I couldn’t leave a child. “I was born in the Two Rivers.” Always knew you wanted children, Kari. He pulled his eyes away from the Amyrlin’s gaze. He tried to force the void to hold. He knew that was not the way, but it was collapsing in him. Yes, lass. Rand is a good name. “I—am—Rand—al’Thor!” His legs trembled.
“And so we knew the Dragon was Reborn,” Moiraine went on. “The Amyrlin swore us to secrecy, we two, for she knew not all the sisters would see the Rebirth as it must be seen. She set us to searching. There were many fatherless children after that battle. Too many. But we found a story, that one man had found an infant on the mountain. That was all.  So we searched on. For years we searched, finding other clues, poring over the Prophecies. ‘He will be of the ancient blood, and raised by the old blood.’ That was one; there were others. But there are many places where the old blood, descended from the Age of Legends, remains strong. Then, in the Two Rivers, where the old blood of Manetheren seethes still like a river in flood, in Emond’s Field, I found three boys whose namedays were within weeks of the battle at Dragonmount. And one of them can channel. Did you think Trollocs came after you just because you are ta’veren? You are the Dragon Reborn.”
Rand’s knees gave way; he dropped to a squat, hands slapping the rug to catch himself from falling on his face. The void was gone, the stillness shattered. He raised his head, and they were looking at him, the three Aes Sedai. Their faces were serene, smooth as unruffled ponds, but their eyes did not blink. “My father is Tam al’Thor, and I was born . . . ” They stared at him, unmoving. They’re lying. I am not . . . what they say! Some way, somehow, they’re lying, trying to use me. “I will not be used by you.”
“An anchor is not demeaned by being used to hold a boat,” the Amyrlin said. “You were made for a purpose, Rand al’Thor. ‘When the winds of Tarmon Gai’don scour the earth, he will face the Shadow and bring forth Light again in the world.’ The Prophecies must be fulfilled, or the Dark One will break free and remake the world in his image. The Last Battle is coming, and you were born to unite mankind and lead them against the Dark One.”
“Ba’alzamon is dead,” Rand said hoarsely, and the Amyrlin snorted like a stablehand.
 Many there believe he is dead, or say they do, but I notice they still won’t risk naming him. The Dark One lives, and he is breaking free. You will face the Dark One. It is your destiny.”
It is your destiny. He had heard that before, in a dream that had maybe not been entirely a dream. He wondered what the Amyrlin would say if she knew Ba’alzamon had spoken to him in dreams. That’s done with. Ba’alzamon is dead. I saw him die.
Suddenly it came to him that he was crouching like a toad, huddling under their eyes. He tried to form the void again, but voices whirled through his head, sweeping away every effort. It is your destiny. Babe lying in the snow. You are the Dragon Reborn. Ba’alzamon is dead. Rand is a good name, Kari. I will not be used! Drawing on his own native stubbornness, he forced himself back upright. Face it on your feet. You can keep your pride, at least. The three Aes Sedai watched with no expression.
“What . . . ” With an effort he steadied his voice. “What are you going to do to me?”
“Nothing,” the Amyrlin said, and he blinked. It was not the answer he had expected, the one he had feared. “You say you want to accompany your friend with Ingtar, and you may. I have not marked you out in any way. Some of the sisters may know you are ta’veren, but no more.  Your friend Perrin will be brought to me, as you were, and I will visit your other friend in the infirmary. You may go as you will, without fear that we will set the Red sisters on you.”
 Anger flared up in him, hot and corrosive. He forced it to stay inside, hidden. “Why?”
“The Prophecies must be fulfilled.  Mark me, not all Aes Sedai feel the same.  But then, there are men who’ve no doubt laughed with you who would do the same, if they knew. Have a care, Rand al’Thor, Dragon Reborn.”
He looked at each of them in turn. Your Prophecies are no part of me. They returned his gaze so calmly it was hard to believe they were trying to convince him he was the most hated, the most feared man in the history of the world. He had gone right through fear and come out the other side in some place cold. Anger was all that kept him warm. They could gentle him, or burn him to a crisp where he stood, and he no longer cared.
A part of Lan’s instructions came back to him. Left hand on the hilt, he twisted the sword behind him, catching the scabbard in his right, then bowed, arms straight. “By your leave, Mother, may I depart this place?”
“I give you leave to go, my son.”
Straightening, he stood there a moment longer. “I will not be used,” he told them. There was a long silence as he turned and left.
The silence stretched on in the room after Rand left until it was broken by a long breath from the Amyrlin. “I cannot make myself like what we just did,” she said. “It was necessary, but . . . Did it work, Daughters?”
Moiraine shook her head, just the slightest movement. “I do not know. But it was necessary, and is.”
“Necessary,” Verin agreed. She touched her forehead, then peered at the dampness on her fingers. “He is strong. And as stubborn as you said, Moiraine. Much stronger than I expected. We may have to gentle him after all before . . . ” Her eyes widened. “But we cannot, can we? The Prophecies. The Light forgive us for what we are loosing on the world.”
“The Prophecies,” Moiraine said, nodding. “Afterwards, we will do as we must. As we do now.”
“As we must,” the Amyrlin said. “Yes. But when he learns to channel, the Light help us all.”
The silence returned.
There was a storm coming. Nynaeve felt it. A big storm, worse than she had ever seen. She could listen to the wind, and hear what the weather would be. All Wisdoms claimed to be able to do that, though many could not. Nynaeve had felt more comfortable with the ability before learning it was a manifestation of the Power. Any woman who could listen to the wind could channel, though most were probably as she had been, unaware of what she was doing, getting it only in fits and starts.
This time, though, something was wrong. Outside, the morning sun was a golden ball in a clear blue sky, and birds sang in the gardens, but that was not it. There would have been nothing to listening to the wind if she could not foretell the weather before the signs were visible. There was something wrong with the feeling this time, something not quite the way it usually was. The storm felt distant, too far off for her to feel at all. Yet it felt as if the sky above should have been pouring down rain, and snow, and hail, all at the same time, with winds howling to shake the stones of the keep. And she could feel the good weather, too, lasting for days yet, but that was muted under the other.
A bluefinch perched in an arrowslit like a mockery of her weather sense, peering into the hallway. When it saw her, it vanished in a flash of blue and white feathers.
She stared at the spot where the bird had been. There is a storm, and there isn’t. It means something. But what?
Far down the hall full of women and small children she saw Rand striding away, his escort of women half running to keep up. Nynaeve nodded firmly. If there was a storm that was not a storm, he would be the center of it. Gathering her skirts, she hurried after him.
Women with whom she had grown friendly since coming to Fal Dara tried to speak to her; they knew Rand had come with her and that they were both from the Two Rivers, and they wanted to know why the Amyrlin had summoned him. The Amyrlin Seat! Ice in the pit of her belly, she broke into a run, but before she left the women’s apartments, she had lost him around too many corners and beyond too many people.
“Which way did he go?” she asked Nisura. There was no need to say who. She heard Rand’s name in the conversation of the other women clustered around the arched doors.
“I don’t know, Nynaeve. He came out as fast as if he had Heartsbane himself at his heels. As well he might, coming here with a sword at his belt. The Dark One should be the least of his worries after that. What is the world coming to? And him presented to the Amyrlin in her chambers, no less. Tell me, Nynaeve, is he really a prince in your land?” The other women stopped talking and leaned closer to listen.
Nynaeve was not sure what she answered. Something that made them let her go on. She hurried away from the women’s apartments, head swiveling at every crossing corridor to look for him, fists clenched. Light, what have they done to him? I should have gotten him away from Moiraine somehow, the Light blind her. I’m his Wisdom.
 You’ve abandoned Emond’s Field to fend for itself. Can you still call yourself their Wisdom?
I did not abandon them, she told herself fiercely. I brought Mavra Mallen up from Deven Ride to look after matters till I get back. She can deal well enough with the Mayor and the Village Council, and she gets on well with the Women’s Circle.
Mavra will have to get back to her own village. No village can do without its Wisdom for long. Nynaeve cringed inside. She had been gone months from Emond’s Field.
“I am the Wisdom of Emond’s Field!” she said aloud.
A liveried servant carrying a bolt of cloth blinked at her, then bowed low before scurrying off. By his face he was eager to be anywhere else.
Blushing, Nynaeve looked around to see if anyone had noticed. There were only a few men in the hall, engrossed in their own conversations, and some women in black-and-gold going about their business, giving her a bow or curtsy as she passed. She had had that argument with herself a hundred times before, but this was the first time it had come to talking to herself out loud. She muttered under her breath, then pressed her lips firmly together when she realized what she was doing.
She was finally beginning to realize her search was futile when she came on Lan, his back to her, looking down on the outer courtyard through an arrowslit. The noise from the courtyard was all horses and men, neighing and shouting. So intent was Lan that he did not, for once, seem to hear her. She hated the fact that she could never sneak up on him, however softly she stepped. She had been accounted good at woodscraft back in Emond’s Field, though it was not a skill in which many women took any interest.
She stopped in her tracks, pressing her hands to her stomach to quiet a flutter. I ought to dose myself with rannel and sheepstongue root, she thought sourly. It was the mixture she gave anyone who moped about and claimed they were sick, or behaved like a goose.
Safe from his eyes, she studied the length of him, leaning against the stone and fingering his chin as he studied what was going on below. He’s too tall, for one thing, and old enough to be my father, for another.  No, he’s not that. Never that. And he was a king. His land was destroyed while he was a child, and he would not claim a crown, but he was a king, for that. What would a king want with a village woman? He’s a Warder, too. Bonded to Moiraine. She has his loyalty to death, and ties closer than any lover, and she has him.
He turned from the arrowslit, and she whirled to go.
“Nynaeve.” His voice caught and held her like a noose. “I wanted to speak to you alone. You always seem to be in the women’s apartments, or in company.”
It took an effort to face him, but she was sure her features were calm when she looked up at him. “I’m looking for Rand.” She was not about to admit to avoiding him. “We said all we need to say long ago, you and I. I shamed myself—which I will not do again—and you told me to go away.”
“I never said—” He took a deep breath. “I told you I had nothing to offer for brideprice but widow’s clothes. Not a gift any man could give a woman. Not a man who can call himself a man.”
“I understand,” she said coolly. “In any case, a king does not give gifts to village women. And this village woman would not take them. Have you seen Rand? I need to talk to him. He was to see the Amyrlin. Do you know what she wanted with him?”
His eyes blazed like blue ice in the sun. She stiffened her legs to keep from stepping back, and met him glare for glare.
“The Dark One take Rand al’Thor and the Amyrlin Seat both,” he grated, pressing something into her hand.
She pulled her eyes away from his. He had a stare like a blue-eyed hawk when he was angry. In her hand was a signet ring, heavy gold and worn with age, almost large enough for both her thumbs to fit through. On it, a crane flew above a lance and crown, all carefully wrought in detail. Her breath caught. The ring of Malkieri kings. Forgetting to glare, she lifted her face. “I cannot take this, Lan.”
He shrugged in an offhand way. “It is nothing. Old, and useless, now. But there are those who would know it when they saw it. Show that, and you will have guestright, and help if you need it, from any lord in the Borderlands. Show it to a Warder, and he will give aid, or carry a message to me. Send it to me, or a message marked with it, and I will come to you, without delay and without fail. This I swear.”
Her vision blurred at the edges.  “I can’t . . . I do not want a gift from you, al’Lan Mandragoran. Here, take it.”
He fended off her attempts to give the ring back to him. His hand enveloped hers, gentle but firm as a shackle. “Then take it for my sake, as a favor to me. Or throw it away, if it displeases you. I’ve no better use for it.” He brushed her cheek with a finger, and she gave a start. “I must go now, Nynaeve mashiara. The Amyrlin wishes to leave before midday, and there is much yet to be done. Perhaps we will have time to talk on the journey to Tar Valon.” He turned and was gone, striding down the hall.
Nynaeve touched her cheek. She could still feel where he had touched her. Mashiara. Beloved of heart and soul, it meant, but a love lost, too. Lost beyond regaining. Fool woman! Stop acting like a girl with her hair still not braided. It’s no use letting him make you feel . . .
Clutching the ring tightly, she turned around, and jumped when she found herself face-to-face with Moiraine. “How long have you been there?” she demanded.
“Not long enough to hear anything I should not have,” the Aes Sedai replied smoothly. “We will be leaving soon. I heard that. You must see to your packing.”
Leaving. It had not penetrated when Lan said it. “I will have to say goodbye to the boys,” she muttered, then gave Moiraine a sharp look. “What have you done to Rand? He was taken to the Amyrlin. Why? Did you tell her about—about . . . ?” She could not say it. He was from her own village, and she was just enough older than he to have looked after him a time or two when he was little, but she could not even think about what he had become without her stomach twisting.
“The Amyrlin will be seeing all three, Nynaeve. Ta’veren are not so common that she would miss the chance to see three together in one place. Perhaps she will give them a few words of encouragement, since they are riding with Ingtar to hunt those who stole the Horn. They will be leaving about the time we do, so you had better hurry with any farewells.”
Nynaeve dashed to the nearest arrowslit and peered down at the outer courtyard. Horses were everywhere, pack animals and saddle horses, and men hurrying about them, calling to each other. The only clear space was where the Amyrlin’s palanquin stood, its paired horses waiting patiently without any attendants. Some of the Warders were out there, looking over their mounts, and on the other side of the courtyard, Ingtar stood with a knot of Shienarans around him in armor. Sometimes a Warder or one of Ingtar’s men crossed the paving stones to exchange a word.
“I should have gotten the boys away from you,” she said, still looking out. Egwene, too, if I could do it without killing her. Light, why did she have to be born with this cursed ability? “I should have taken them back home.”
“They are more than old enough to be off apron strings,” Moiraine said dryly. “And you know very well why you could never do that. For one of them, at least. Besides, it would mean leaving Egwene to go to Tar Valon alone. Or have you decided to forgo Tar Valon yourself? If your own use of the Power is not schooled, you will never be able to use it against me.”
Nynaeve spun to face the Aes Sedai, her jaw dropping. She could not help it. “I don’t know what you are talking about.”
“Did you think I did not know, child? Well, as you wish it. I take it that you are coming to Tar Valon? Yes, I thought so.”
Nynaeve wanted to hit her, to knock away the brief smile that flashed across the Aes Sedai’s face. Aes Sedai had not been able to wield power openly since the Breaking, much less the One Power, but they plotted and manipulated, pulled strings like puppet-masters, used thrones and nations like stones on a stones board. She wants to use me, too, somehow. If a king or a queen, why not a Wisdom? Just the way she’s using Rand. I’m no child, Aes Sedai.
“What are you doing with Rand, now? Have you not used him enough? I don’t know why you have not had him gentled, now the Amyrlin’s here with all those other Aes Sedai, but you must have a reason. It must be some plot you’re hatching. If the Amyrlin knew what you were up to, I wager she’d—”
Moiraine cut her off. “What possible interest could the Amyrlin have in a shepherd? Of course, if he were brought to her attention in the wrong way, he might be gentled, or even killed. He is what he is, after all. And there is considerable anger about last night. Everyone is looking for whom to blame.” The Aes Sedai fell silent, and let the silence stretch. Nynaeve stared at her, grinding her teeth.
“Yes,” Moiraine said finally, “much better to let a sleeping lion sleep. Best you see to your packing, now.” She moved off in the direction Lan had gone, seeming to glide across the floor.
Grimacing, Nynaeve swung her fist back against the wall; the ring dug at her palm. She opened her hand to look at it. The ring seemed to heat her anger, focus her hate. I will learn. You think because you know, you can escape me.  For what you’ve done to Mat, and to Perrin. For Rand, the Light help him and the Creator shelter him. Especially for Rand. Her hand closed around the heavy circlet of gold. And for me.
Egwene watched the liveried maid folding her dresses into a leather-covered travel chest, still a little uncomfortable, even after nearly a month’s practice, with someone else doing what she could very well have done herself. They were such beautiful dresses, all gifts from the Lady Amalisa, just like the gray silk riding dress she wore, though that was plain except for a few white morningstar blossoms worked on the breast. Many of the dresses were much more elaborate. Any one of them would shine at Sunday, or at Bel Tine. She sighed, remembering that she would be in Tar Valon for the next Sunday, not Emond’s Field. From the little Moiraine had told her of novice training—almost nothing, really—she expected she might not be home for Bel Tine, in the spring, or even the Sunday after that.
Nynaeve put her head into the room. “Are you ready?” She came the rest of the way in. “We must be down in the courtyard soon.” She wore a riding dress, too, in blue silk with red loversknots on the bosom. Another gift from Amalisa.
“Nearly, Nynaeve. I am almost sorry to be going. I don’t suppose we’ll have many chances in Tar Valon to wear the nice dresses Amalisa gave us.” She gave an abrupt laugh. “Still, Wisdom, I won’t miss being able to bathe without looking over my shoulder the whole time.”
“Much better to bathe alone,” Nynaeve said briskly. Her face did not change, but after a moment her cheeks colored.
Egwene smiled. She’s thinking about Lan. It was still odd to think of Nynaeve, the Wisdom, mooning after a man. She did not think it would be wise to put it to Nynaeve in quite that way, but of late, sometimes the Wisdom acted as strangely as any girl who had set her heart on a particular man. And one who doesn’t have enough sense to be worthy of her, at that. She loves him, and I can see he loves her, so why can’t he have sense enough to speak up?
“I don’t think you should call me Wisdom any longer,” Nynaeve said suddenly.
Egwene blinked. It was not required, exactly, and Nynaeve never insisted on it unless she was angry, or being formal, but this . . .  Nynaeve glanced at her unbraided hair, and Egwene resisted the urge to hurriedly twist it into a semblance of a braid.   “We are two women, a long way from Emond’s Field, and it will be longer still before we see home again. It will be better if you simply call me Nynaeve.”
“We will see home again, Nynaeve. We will.”
“Don’t try to comfort the Wisdom, girl,” Nynaeve said gruffly, but she smiled.
There was a knock at the door, but before Egwene could open it, Nisura came in, agitation all over her face. “Egwene, that young man of yours is trying to come into the women’s apartments.” She sounded scandalized. “And wearing a sword. Just because the Amyrlin let him enter that way . . . Lord Rand should know better. He is causing an uproar. Egwene, you must speak to him.”
“Lord Rand,” Nynaeve snorted. “That young man is growing too big for his breeches. When I get my hands on him, I’ll lord him.”
Egwene put a hand on Nynaeve’s arm. “Let me speak to him, Nynaeve. Alone.”
“Oh, very well. The best of men are not much better than housebroken.” Nynaeve paused, and added half to herself, “But then, the best of them are worth the trouble of housebreaking.”
Egwene shook her head as she followed Nisura into the hall. Even half a year before, Nynaeve would never have added the second part. But she’ll never housebreak Lan. Her thoughts turned to Rand. Causing an uproar, was he? “Housebreak him?” she muttered. “If he hasn’t learned manners by this time, I’ll skin him alive.”
“Sometimes that is what it takes,” Nisura said, walking quickly. “Men are never more than half-civilized until they’re wedded.” She gave Egwene a sidelong glance. “Do you intend to marry Lord Rand? I do not mean to pry, but you are going to the White Tower, and Aes Sedai seldom wed—none but some of the Green Ajah, that I’ve ever heard, and not many of them—and . . . ”
Egwene could supply the rest. She had heard the talk in the women’s apartments about a suitable wife for Rand. At first it had caused stabs of jealousy, and anger. He had been all but promised to her since they were children. But she was going to be an Aes Sedai, and he was what he was. A man who could channel. She could marry him.  The only way to stop it would be to have him gentled. I can’t do that to him. I can’t! “I do not know,” she said sadly.
Nisura nodded. “No one will poach where you have a claim, but you are going to the Tower, and he will make a good husband. Once he has been trained. There he is.”
The women gathered around the entrance to the women’s apartments, both inside and out, were all watching three men in the hallway outside. Rand, with his sword buckled over his red coat, was being confronted by Agelmar and Kajin. Neither of them wore a sword; even after what had happened in the night, these were still the women’s apartments. Egwene stopped at the back of the crowd.
“You understand why you cannot go in,” Agelmar was saying. “I know that things are different in Andor, but you do understand?”
“I didn’t try to go in.” Rand sounded as if he had explained all this more than once already. “I told the Lady Nisura I wanted to see Egwene, and she said Egwene was busy, and I’d have to wait. All I did was shout for her from the door. I did not try to enter. You’d have thought I was naming the Dark One, the way they all started in on me.”
“Women have their own ways,” Kajin said. He was tall for a Shienaran, almost as tall as Rand, lanky and sallow. His topknot was black as pitch. “They set the rules for the women’s apartments, and we abide by them even when they are foolish.” A number of eyebrows were raised among the women, and he hastily cleared his throat. “You must send a message in if you wish to speak to one of the women, but it will be delivered when they choose, and until it is, you must wait. That is our custom.”
“I have to see her,” Rand said stubbornly. “We’re leaving soon. Not soon enough for me, but I still have to see Egwene. We will get the Horn of Valere and the dagger back, and that will be the end of it. The end of it. But I want to see her before I go.” Egwene frowned; he sounded odd.
“No need to be so fierce,” Kajin said. “You and Ingtar will find the Horn, or not. And if not, then another will retrieve it. The Wheel weaves as the Wheel wills, and we are but threads in the Pattern.”
“Do not let the Horn seize you, Rand,” Agelmar said. “It can take hold of a man—I know how it can—and that is not the way. A man must seek duty, not glory. What will happen, will happen. If the Horn of Valere is meant to be sounded for the Light, then it will be.”
“Here is your Egwene,” Kajin said, spotting her.
Agelmar looked around, and nodded when he saw her with Nisura. “I will leave you in her hands, Rand al’Thor. Remember, here, her words are law, not yours. Lady Nisura, do not be too hard on him. He only wished to see his young woman, and he does not know our ways.”
Egwene followed Nisura as the Shienaran woman threaded her way through the watching women. Nisura inclined her head briefly to Agelmar and Kajin; she pointedly did not include Rand. Her voice was tight. “Lord Agelmar. Lord Kajin. He should know this much of our ways by now, but he is too big to spank, so I will let Egwene deal with him.”
Agelmar gave Rand a fatherly pat on the shoulder. “You see. You will speak with her, if not exactly in the way you wished. Come, Kajin. We have much to see to yet. The Amyrlin still insists on . . . ” His voice trailed away as he and the other man left. Rand stood there, looking at Egwene.
The women were still watching, Egwene realized. Watching her as well as Rand. Waiting to see what she would do. So I’m supposed to deal with him, am I? Yet she felt her heart going out to him. His hair needed brushing. His face showed anger, defiance, and weariness. “Walk with me,” she told him. A murmur started up behind them as he walked down the hall beside her, away from the women’s apartments. Rand seemed to be struggling with himself, hunting for what to say.
“I’ve heard about your . . . exploits,” she said finally. “Running through the women’s apartments last night with a sword. Wearing a sword to an audience with the Amyrlin Seat.” He still said nothing, only walked along frowning at the floor.  She could not make herself ask if he had been gentled; he looked anything but gentle, but she had no idea what a man looked like afterwards.
 “No. She didn’t . . . Egwene, the Amyrlin . . . ” He shook his head. “She didn’t hurt me.”
She had the feeling he had been going to say something else entirely. Usually she could ferret out whatever he wanted to hide from her, but when he really wanted to be stubborn, she could more easily dig a brick out of a wall with her fingernails. By the set of his jaw, he was at his most stubborn right now.
“What did she want with you, Rand?”
“Nothing important. Ta’veren. She wanted to see ta’veren.” His face softened as he looked down at her. “What about you, Egwene? Are you all right? Moiraine said you would be, but you were so still. I thought you were dead, at first.”
“Well, I’m not.” She laughed. She could not remember anything that had happened after she had asked Mat to go to the dungeons with her, not until waking in her own bed that morning. From what she had heard of the night, she was almost glad she could not remember. “Moiraine said she would have left me a headache for being foolish if she could have Healed the rest and not that, but she couldn’t.”
“I told you Fain was dangerous,” he muttered.  She won’t talk to you the way I am. The last man who tried to push his way into the women’s apartments spent a month up to his elbows in soapy water, helping with the women’s laundry, and he was only trying to find his betrothed and make up an argument. At least he knew enough not to wear his sword. The Light knows what they’d do to you.”
“Everybody wants to do something to me,” he growled. “Everybody wants to use me for something. Well, I won’t be used. Once we find the Horn, and Mat’s dagger, I’ll never be used again.”
With an exasperated grunt, she caught his shoulders and made him face her. She glared up at him. “If you don’t start talking sense, Rand al’Thor, I swear I will box your ears.”
“Now you sound like Nynaeve.” He laughed. As he looked down at her, though, his laughter faded. “I suppose—I suppose I’ll never see you again. I know you have to go to Tar Valon. I know that. And you’ll become an Aes Sedai. I am done with Aes Sedai, Egwene. I won’t be a puppet for them, not for Moiraine, or any of them.”
He looked so lost she wanted to put his head on her shoulder, and so stubborn she really did want to box his ears. “Listen to me, you great ox. I am going to be an Aes Sedai, and I’ll find a way to help you. I will.”
“The next time you see me, you will likely want to gentle me.”
She looked around hastily; they were alone in their stretch of the hall.  Do you want everyone to know?”
“Too many know already,” he said. “Egwene, I wish things were different, but they aren’t. I wish . . . Take care of yourself. And promise me you won’t choose the Red Ajah.”
Tears blurred her vision as she threw her arms around him. “You take care of yourself,” she said fiercely into his chest. “If you don’t, I’ll—I’ll . . . ” She thought she heard him murmur, “I love you,” and then he was firmly unwrapping her arms, gently moving her away from him. He turned and strode away from her, almost running.
She jumped when Nisura touched her arm. “He looks as if you set him a task he won’t enjoy. But you mustn’t let him see you cry over it. That negates the purpose. Come. Nynaeve wants you.”
Scrubbing her cheeks, Egwene followed the other woman. Take care of yourself, you wool-headed lummox. Light, take care of him.


About Me
I am a full stack web developer with experience in Ruby on Rails, JavaScript, React and Redux. During college years I worked as a freelance web developer. After graduation, I worked for 9 years as a Network Presales Manager. During all that time, I realized that I missed writing code and building things. After moving to DC, I found the chance to follow my dreams, quit network operations and sales and be at the creative side again. I bring strong skills in technical project management, understanding business and technical needs and visualizing technical design. I have Bs in Computer sciences with Ms degree on Engineering Management. I have strong low level electronics and programming background. I am strong on complex algorithms, and always curious about new web technologies. Regular attendee of development meet ups.


LOADING VARIANT DESCRIPTION
No comments found for {{ variant.name }}
comment.text
Login to post comments.
comment.text


|
Software Tester by professional, crime fighting "coder" by the night. Love to code and break stuff. |
|
Exibit 1 |
Exibit 2 |
|
|
Want to get in touch with me? Be it to request more info about myself or my experience, to ask for my CV, tips on how to fight crime with "code", random questions about the universe and the meaning of life, or even if only to find ways to break perfect looking code... just feel free to drop me a line anytime. I promise to reply A.S.A.P. |


Simply Blogging
Add Blog
Home
About Us
Contacts
Author
C++ course
Author
Python course
Author
Javascript course


Elasticsearch: Geographically Encoded Objects for Elasticsearch
Driver short name
Elasticsearch
Build dependencies
libcurl
Elasticsearch is an Enterprise-level search engine for a variety of data sources. It supports full-text indexing and geospatial querying of those data in a fast and efficient manor using a predefined REST API.
Driver capabilities
Supports Create()
This driver supports the GDALDriver::Create()
operation
Supports Georeferencing
This driver supports georeferencing
Opening dataset name syntax
Starting with GDAL 2.1, the driver supports reading existing indices from a Elasticsearch host. There are two main possible syntaxes to open a dataset:
Using ES:http://hostname:port (where port is typically 9200)
Using ES: with the open options to specify HOST and PORT
Layer open options
HOST=<hostname>: Defaults to
localhost
. Server hostname.PORT=<port>: Defaults to
9200
. Server port.USERPWD=<user:password>: Basic authentication as username:password.
LAYER=<name>: Index name or index_mapping to use for restricting layer listing.
BATCH_SIZE=<integer>: Defaults to
100
. Number of features to retrieve per batch.FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=<integer>: Defaults to
100
. Number of features to retrieve to establish feature definition. -1 = unlimited.SINGLE_QUERY_TIMEOUT=<seconds>: (GDAL >= 3.2.1) Defaults to
unlimited
. Timeout in second (as floating point number) for requests such as GetFeatureCount() or GetExtent().SINGLE_QUERY_TERMINATE_AFTER=<integer>: (GDAL >= 3.2.1) Defaults to
unlimited
. Maximum number of documents to collect for requests such as GetFeatureCount() or GetExtent().FEATURE_ITERATION_TIMEOUT=<seconds>: (GDAL >= 3.2.1) Defaults to
unlimited
. Timeout in seconds (as floating point number) for feature iteration, starting from the time of ResetReading().FEATURE_ITERATION_TERMINATE_AFTER=<integer>: (GDAL >= 3.2.1) Defaults to
unlimited
. Maximum number of documents to collect for feature iteration.JSON_FIELD=[YES/NO]: Defaults to
NO
. Whether to include a field called "_json" with the full document as JSON.FLATTEN_NESTED_ATTRIBUTE=[YES/NO]: Defaults to
YES
. Whether to recursively explore nested objects and produce flatten OGR attributes.FID=value: Defaults to
ogc_fid
. Field name, with integer values, to use as FID.FORWARD_HTTP_HEADERS_FROM_ENV=value: (GDAL >= 3.1) Can be used to specify HTTP headers, typically for authentication purposes, that must be passed to Elasticsearch. The value of string is a comma separated list of http_header_name=env_variable_name, where http_header_name is the name of a HTTP header and env_variable_name the name of the environment variable / configuration option from which th value of the HTTP header should be retrieved. This is intended for a use case where the OGR Elasticsearch driver is invoked from a web server that stores the HTTP headers of incoming request into environment variables. The ES_FORWARD_HTTP_HEADERS_FROM_ENV configuration option can also be used.
AGGREGATION=value: (GDAL >= 3.5) JSON-serialized definition of an aggregation.
Elasticsearch vs OGR concepts
Each mapping type inside a Elasticsearch index will be considered as a OGR layer. A Elasticsearch document is considered as a OGR feature.
Field definitions
Fields are dynamically mapped from the input OGR data source. However, the driver will take advantage of advanced options within Elasticsearch as defined in a field mapping file.
The mapping file allows you to modify the mapping according to the Elasticsearch field-specific types. There are many options to choose from, however, most of the functionality is based on all the different things you are able to do with text fields within Elasticsearch.
ogr2ogr -progress --config ES_WRITEMAP /path/to/file/map.txt -f "Elasticsearch" http://localhost:9200 my_shapefile.shp
Geometry types
In GDAL 2.0 and earlier, the driver was limited in the geometry it handles: even if polygons were provided as input, they were stored as geo point and the "center" of the polygon is used as value of the point. Starting with GDAL 2.1, geo_shape is used to store all geometry types (except curve geometries that are not handled by Elasticsearch and will be approximated to their linear equivalents).
Filtering
The driver will forward any spatial filter set with SetSpatialFilter() to the server.
Starting with GDAL 2.2, SQL attribute filters set with SetAttributeFilter() are converted to Elasticsearch filter syntax. They will be combined with the potentially defined spatial filter.
It is also possible to directly use a Elasticsearch filter by setting the string passed to SetAttributeFilter() as a JSon serialized object, e.g.
{ "post_filter": { "term": { "properties.EAS_ID": 169 } } }
Note: if defining directly an Elastic Search JSon filter, the spatial filter specified through SetSpatialFilter() will be ignored, and must thus be included in the JSon filter if needed.
Paging
Features are retrieved from the server by chunks of 100. This can be altered with the BATCH_SIZE open option.
Schema
When reading a Elastic Search index/type, OGR must establish the schema of attribute and geometry fields, since OGR has a fixed schema concept.
In the general case, OGR will read the mapping definition and the first
100 documents (can be altered with the
FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN
open option) of the index/type
and build the schema that best fit to the found fields and values.
It is also possible to set the JSON_FIELD=YES
open option so that a
_json special field is added to the OGR schema. When reading Elastic
Search documents as OGR features, the full JSon version of the document
will be stored in the _json field. This might be useful in case of
complex documents or with data types that do not translate well in OGR
data types. On creation/update of documents, if the _json field is
present and set, its content will be used directly (other fields will be
ignored).
Feature ID
Elastic Search have a special _id field that contains the unique ID of the document. This field is returned as an OGR field, but cannot be used as the OGR special FeatureID field, which must be of integer type. By default, OGR will try to read a potential 'ogc_fid' field to set the OGR FeatureID. The name of this field to look up can be set with the FID open option. If the field is not found, the FID returned by OGR will be a sequential number starting at 1, but it is not guaranteed to be stable at all.
ExecuteSQL() interface
Starting with GDAL 2.2, SQL requests, involving a single layer, with WHERE and ORDER BY statements will be translated as Elasticsearch queries.
Otherwise, if specifying "ES" as the dialect of ExecuteSQL(), a JSon
string with a serialized Elastic Search
filter
can be passed. The search will be done on all indices and types, unless
the filter itself restricts the search. The returned layer will be a
union of the types returned by the
FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN
first documents. It will also
contain the _index and _type special fields to indicate the provenance
of the features.
The following filter can be used to restrict the search to the "poly" index and its "FeatureCollection" type mapping (Elasticsearch 1.X and 2.X)
{ "filter": {
"indices" : {
"no_match_filter": "none",
"index": "poly",
"filter": {
"and" : [
{ "type": { "value": "FeatureCollection" } },
{ "term" : { "properties.EAS_ID" : 158.0 } }
]
}
}
}
}
For Elasticsearch 5.X (works also with 2.X) :
{ "post_filter": {
"indices" : {
"no_match_query": "none",
"index": "poly",
"query": {
"bool": {
"must" : [
{ "type": { "value": "FeatureCollection" } },
{ "term" : { "properties.EAS_ID" : 158.0 } }
]
}
}
}
}
}
Aggregations are not supported through the ExecuteSQL() interface, but through the below described mechanism.
Aggregations
New in version 3.5.0.
The driver can support issuing aggregation requests to an index. ElasticSearch
aggregations can potentially be rather complex, so the driver currently limits
to geohash grid based spatial aggegrations, with additional fields with
statistical indicators (min, max, average, .), which can be used for example
to generate heatmaps. The specification of the aggegation is done through
the AGGREGATION
open option, whose value is a JSON serialized object whose
members are:
index
(required): the name of the index to query.geometry_field
(optional): the path to the geometry field on which to do geohash grid aggregation. For documents with points encoded as GeoJSON, this will be for example geometry.coordinates. When this property is not specified, the driver will analyze the mapping and use the geometry field definition found into it (provided there is a single one). Note that aggegration on geo_shape geometries is only supported since Elasticsearch 7 and may require a non-free license.geohash_grid
(optional): a JSon object, describing a few characteristics of the geohash_grid, that can have the following members:size
(optional): maximum number of geohash buckets to return per query. The default is 10,000. Ifprecision
is specified and the number of results would exceedsize
, then the server will trim the results, by sorting by decreasing number of documents matched.precision
(optional): string length of the geohashes used to define cells/buckets in the results, in the [1,12] range. A geohash of size 1 can generate up to 32 buckets, of size 2 up to 32*32 buckets, etc. When it is not specified, the driver will automatically compute a value, taking into account thesize
parameter and the spatial filter, so that the theoretical number of buckets returned does not exceedsize
.
fields
(optional): a JSon object, describing which additional statistical fields should be added, that can have the following members:min
(optional): array with the paths to index properties on which to compute the minimum during aggegation.max
(optional): array with the paths to index properties on which to compute the maximum during aggegation.avg
(optional): array with the paths to index properties on which to compute the average during aggegation.sum
(optional): array with the paths to index properties on which to compute the sum during aggegation.count
(optional): array with the paths to index properties on which to compute the value_count during aggegation.stats
(optional): array with the paths to index properties on which to compute all the above indicators during aggegation.
When using a GeoJSON mapping, the path to an index property is typically
property.some_name
.
When specifying the AGGREGATION
open option, a single read-only layer called
aggregation
will be returned. A spatial filter can be set on it using the
standard OGR SetSpatialFilter() API: it is applied prior to aggregation.
An example of a potential value for the AGGREGATION
open option can be:
{
"index": "my_points",
"geometry_field": "geometry.coordinates",
"geohash_grid": {
"size": 1000,
"precision": 3
},
"fields": {
"min": [ "field_a", "field_b"],
"stats": [ "field_c" ]
}
}
It will return a layer with a Point geometry field and the following fields:
key
of type String: the value of the geohash of the corresponding bucketdoc_count
of type Integer64: the number of matching documents in the bucketfield_a_min
of type Realfield_b_min
of type Realfield_c_min
of type Realfield_c_max
of type Realfield_c_avg
of type Realfield_c_sum
of type Realfield_c_count
of type Integer64
Multi-target layers
New in version 3.5.0.
The GetLayerByName() method accepts a layer name that can be a comma-separated list of indices, potentially combined with the '*' wildcard character. See https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-index.html. Note that in the current implementation, the field definition will be established from the one of the matching layers, but not all, so using this functionality will be appropriate when the multiple matching layers share the same schema.
Getting metadata
Getting feature count is efficient.
Getting extent is efficient, only on geometry columns mapped to Elasticsearch type geo_point. On geo_shape fields, feature retrieval of the whole layer is done, which might be slow.
Write support
Index/type creation and deletion is possible.
Write support is only enabled when the datasource is opened in update mode.
When inserting a new feature with CreateFeature() in non-bulk mode, and if the command is successful, OGR will fetch the returned _id and use it for the SetFeature() operation.
Spatial reference system
Geometries stored in Elastic Search are supposed to be referenced as longitude/latitude over WGS84 datum (EPSG:4326). On creation, the driver will automatically reproject from the layer (or geometry field) SRS to EPSG:4326, provided that the input SRS is set and that is not already EPSG:4326.
Layer creation options
Starting with GDAL 2.1, the driver supports the following layer creation options:
INDEX_NAME=value: Name of the index to create (or reuse). By default the index name is the layer name.
INDEX_DEFINITION=[<filename>/<json>]: Filename from which to read a user-defined index definition, or inlined index definition as serialized JSon.
MAPPING_NAME=value: (Elasticsearch < 7) Name of the mapping type within the index. By default, the mapping name is "FeatureCollection" and the documents will be written as GeoJSON Feature objects. If another mapping name is chosen, a more "flat" structure will be used. This option is ignored when converting to Elasticsearch >=7 (see Removal of mapping types). With Elasticsearch 7 or later, a "flat" structure is always used.
MAPPING=[<filename>/<json>]: Filename from which to read a user-defined mapping, or mapping as serialized JSon.
WRITE_MAPPING=<filename>: Creates a mapping file that can be modified by the user prior to insert in to the index. No feature will be written. This option is exclusive with
MAPPING
.OVERWRITE=[YES/NO]: Defaults to
NO
. Whether to overwrite an existing type mapping with the layer name to be created.OVERWRITE_INDEX=[YES/NO]: Defaults to
NO
. Whether to overwrite the whole index to which the layer belongs to. This option is stronger thanOVERWRITE
.OVERWRITE
will only proceed if the type mapping corresponding to the layer is the single type mapping of the index. In case there are several type mappings, the whole index need to be destroyed (it is unsafe to destroy a mapping and the documents that use it, since they might be used by other mappings. This was possible in Elasticsearch 1.X, but no longer in later versions).GEOMETRY_NAME=value: Defaults to
geometry
. Name of geometry column.GEOM_MAPPING_TYPE=[AUTO/GEO_POINT/GEO_SHAPE]: Defaults to
AUTO
. Mapping type for geometry fields. GEO_POINT uses the geo_point mapping type. If used, the "centroid" of the geometry is used. This is the behavior of GDAL < 2.1. GEO_SHAPE uses the geo_shape mapping type, compatible of all geometry types. When using AUTO, for geometry fields of type Point, a geo_point is used. In other cases, geo_shape is used.GEO_SHAPE_ENCODING=[<GeoJSON>/<WKT>]: (GDAL >= 3.2.1) Encoding for geo_shape geometry fields. Defaults to GeoJSON. WKT is possible since Elasticsearch 6.2
GEOM_PRECISION=<value><unit>: Desired geometry precision. Number followed by unit. For example 1m. For a geo_point geometry field, this causes a compressed geometry format to be used. This option is without effect if
MAPPING
is specified.STORE_FIELDS=[YES/NO]: Defaults to
NO
. Whether fields should be stored in the index. Setting to YES sets the "store" property of the field mapping to "true" for all fields. (Note: prior to GDAL 2.1, the default behavior was to store fields) This option is without effect ifMAPPING
is specified.STORED_FIELDS=value: List of comma separated field names that should be stored in the index. Those fields will have their "store" property of the field mapping set to "true". If all fields must be stored, then using STORE_FIELDS=YES is a shortcut. This option is without effect if
MAPPING
is specified.NOT_ANALYZED_FIELDS=value: List of comma separated field names that should not be analyzed during indexing. Those fields will have their "index" property of the field mapping set to "not_analyzed" (the default in Elasticsearch is "analyzed"). A same field should not be specified both in
NOT_ANALYZED_FIELDS
and :NOT_INDEXED_FIELDS
. Starting with GDAL 2.2, the {ALL} value can be used to designate all fields. This option is without effect ifMAPPING
is specified.NOT_INDEXED_FIELDS=value: List of comma separated field names that should not be indexed. Those fields will have their "index" property of the field mapping set to "no" (the default in Elasticsearch is "analyzed"). A same field should not be specified both in
NOT_ANALYZED_FIELDS
andNOT_INDEXED_FIELDS
. This option is without effect ifMAPPING
is specified.FIELDS_WITH_RAW_VALUE=value: List of comma separated field names (of type string) that should be created with an additional raw/not_analyzed sub-field, or {ALL} to designate all string analyzed fields. This is needed for sorting on those columns, and can improve performance when filtering with SQL operators. This option is without effect if
MAPPING
is specified.BULK_INSERT=[YES/NO]: Defaults to
YES
. Whether to use bulk insert for feature creation.BULK_SIZE=<bytes>: Defaults to
1000000
. Size in bytes of the buffer for bulk upload.FID=value: Defaults to
ogc_fid
. Field name, with integer values, to use as FID. Can be set to empty to disable the writing of the FID value.DOT_AS_NESTED_FIELD=[YES/NO]: Defaults to
YES
. Whether to consider dot character in field name as sub-document.IGNORE_SOURCE_ID=[YES/NO]: Defaults to
NO
. Whether to ignore _id field in features passed to CreateFeature().
Configuration options
The following (deprecated) configuration options are available. Starting with GDAL 2.1, layer creation options are also available and should be preferred (see above):
ES_WRITEMAP=<filename>: Creates a mapping file that can be modified by the user prior to insert in to the index. No feature will be written. Note that this will properly work only if only one single layer is created. Starting with GDAL 2.1, the
WRITE_MAPPING
layer creation option should be used instead.ES_META=<filename>: Tells the driver to the user-defined field mappings. Starting with GDAL 2.1, the lco:MAPPING layer creation option should be used instead.
ES_BULK=<bytes>: Defaults to
5000000
. Identifies the maximum size in bytes of the buffer to store documents to be inserted at a time. Lower record counts help with memory consumption within Elasticsearch but take longer to insert. Starting with GDAL 2.1, theBULK_SIZE
layer creation option should be used instead.ES_OVERWRITE=[YES/NO]: Defaults to
NO
. Overwrites the current index by deleting an existing one. Starting with GDAL 2.1, theOVERWRITE
layer creation option should be used instead.
Examples
Open the local store:
ogrinfo ES:
Open a remote store:
ogrinfo ES:http://example.com:9200
Filtering on a Elastic Search field:
ogrinfo -ro ES: my_type -where '{ "post_filter": { "term": { "properties.EAS_ID": 168 } } }'
Using "match" query on Windows: On Windows the query must be between double quotes and double quotes inside the query must be escaped.
C:\GDAL_on_Windows>ogrinfo ES: my_type -where "{\"query\": { \"match\": { \"properties.NAME\": \"Helsinki\" } } }"
Basic aggregation:
ogrinfo -ro ES: my_type -oo "AGGREGATION={\"index\":\"my_points\"}"
Load an Elasticsearch index with a shapefile:
ogr2ogr -f "Elasticsearch" http://localhost:9200 my_shapefile.shp
Create a Mapping File: The mapping file allows you to modify the mapping according to the Elasticsearch field-specific types. There are many options to choose from, however, most of the functionality is based on all the different things you are able to do with text fields.
ogr2ogr -progress --config ES_WRITEMAP /path/to/file/map.txt -f "Elasticsearch" http://localhost:9200 my_shapefile.shp
or (GDAL >= 2.1):
ogr2ogr -progress -lco WRITE_MAPPING=/path/to/file/map.txt -f "Elasticsearch" http://localhost:9200 my_shapefile.shp
Read the Mapping File: Reads the mapping file during the transformation
ogr2ogr -progress --config ES_META /path/to/file/map.txt -f "Elasticsearch" http://localhost:9200 my_shapefile.shp
or (GDAL >= 2.1):
ogr2ogr -progress -lco MAPPING=/path/to/file/map.txt -f "Elasticsearch" http://localhost:9200 my_shapefile.shp
Bulk Uploading (for larger datasets): Bulk loading helps when uploading a lot of data. The integer value is the number of bytes that are collected before being inserted. Bulk size considerations
ogr2ogr -progress --config ES_BULK 5000000 -f "Elasticsearch" http://localhost:9200 PG:"host=localhost user=postgres dbname=my_db password=password" "my_table" -nln thetable
or (GDAL >= 2.1):
ogr2ogr -progress -lco BULK_SIZE=5000000 -f "Elasticsearch" http://localhost:9200 my_shapefile.shp
Overwrite the current Index: If specified, this will overwrite the current index. Otherwise, the data will be appended.
ogr2ogr -progress --config ES_OVERWRITE 1 -f "Elasticsearch" http://localhost:9200 PG:"host=localhost user=postgres dbname=my_db password=password" "my_table" -nln thetable
or (GDAL >= 2.1):
ogr2ogr -progress -overwrite ES:http://localhost:9200 PG:"host=localhost user=postgres dbname=my_db password=password" "my_table" -nln thetable


Amount:
Sender Address:
Recipient Address:
Hint: open the browser developer console to view any errors and warnings.


1) { $start = $_REQUEST['start']; if(!$start) $start = 0; $page = $start + 50; $page = $page/50; $ptitle = $c." search - Page $page"; $meta_keys = "jokes, funny, laugher, joke, gag, laughing"; $meta_desc = $c."  results for '".$c."': "; echo "Your search results are displayed below: "; ?> |
| ".$tracker.". | Category: ".$row[category]." |
| ".trim(substr(stripslashes($row[joke]), 0, 120))."... more |
|
Search For Jokes: "; echo "Use the searh box below to search for jokes on this site. "; ?> |


Fiat Chrysler to recall nearly 700,000 SUVs for electrical fault risk
Fiat Chrysler Automobiles NV said on Thursday it will recall nearly 700,000 sport utility vehicles worldwide because a faulty electrical connection could prevent engine starts or contribute to a stall.
WASHINGTON: Fiat Chrysler Automobiles NV said on Thursday it will recall nearly 700,000 sport utility vehicles worldwide because a faulty electrical connection could prevent engine starts or contribute to a stall.
The recall, covering 2011 through 2013 model year Dodge Durango and Jeep Grand Cherokee SUVs, will address silicon deposits on the contact points of fuel pump relays that may interrupt electrical current, Fiat Chrysler said in a statement. It said it is unaware of any injuries or accidents related to the faulty vehicles.
The Italian-American automaker had previously recalled most of the same SUVs in 2014 and 2015 for issues with their fuel pump relays.
The company, which last month announced it planned to merge with Peugeot owner PSA , said it would notify owners at a later date when they will be able to schedule repairs at dealerships.
The recall includes around 528,500 vehicles in the United States, 34,700 in Canada, 18,100 in Mexico and 116,500 outside North America, it said.
(Reporting by David Shepardson; Editing by Muralikumar Anantharaman)


Outline Badges
Custom
You can use mixins to customize your labels and badges.
Label 1 Tag
<!– scss –>
.label.custom {
// $text-color, $back-color
@include label(#fff, #ea48a7);
}
<!– html –>
Label
1
Tag


Printing Objects
You can print the Text View, the Contents View, or the Properties View of an object. Select the object that you want to print, then select File / Print... or File / Print Preview from the main menu. You can also use the Print or Print Preview buttons on the main toolbar. In the dialog that appears, select the view that you want to print.
You can print just a portion of the Text View by selecting some of the text before printing.
When printing the Contents View, the text will be sized so that all columns will fit on the printed page.
To change the orientation of the printout, select File / Page Setup... from the main menu, and select Portrait or Landscape.
To change the print margins, select File / Page Setup... from the main menu.
See also: Print Preview


---
---
I love streamlining businesses by improving processes and delivering better solutions.
My professional background of 3 years of Product
Management at Adobe, building a successful startup, together with a passion for User Experience Design, make me effective at
this.
"the amount of dedication and skill that he put into his work was simply amazing", "He is enthusiastic, professional and has
the exceptional ability to take the verbal requirements and quickly turn them in to working applications." —
Oracle
"proved to be very resourceful and creative. Marius always made a point to understand the mindset of our customers, even if
the information wasn't readily available. He also focused on proposing alternative solutions that would get us to market
quicker." — Adobe
"Marius was an amazing partner for this project! He was extremely reachable and a great communicator. There were several
time and other constraints to the project that he was able to identify solutions for and resolve very quickly." —
Uber
"Marius made it possible to deliver a project sooner and proceed with a better solution for the long-term. This required
understanding of both business needs and technicalities, Marius drove discussions with another Company by covering
engineering implementation details as well." — Bolt
Marius
Andreiana
Here's how:
In several video calls, I'll learn about your business and what pains you and your staff are confronting. Usually, problems are about
This phase is only about learning, identifying root causes, discussing workarounds you have tried, etc.
Ideas about potential solutions are welcome, but we'll just collect and set them aside for later. As Sherlock Holmes put it best, "It is a capital mistake to theorize before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts."
If things can be improved by using technology, I'll prototype a solution which solves your biggest problem,
collaborating with a professional interactive designer.
We'll iterate over it until the proposed solution is clear, and you're happy with both the outcome and what it takes to start using it.
We'll also discuss costs of building and adopting this solution, compared with the problem's costs.
Together with a team of talented software engineers, we'll build and deliver the fully functional solution. We will integrate existing components and third-party services wherever it makes sense, instead of reinventing the wheel.
We'll also help with training, legacy data imports or anything else required for a successful, gradual rollout to all staff which needs to start using it.
After adopting the solution, we'll maintain it, fix remaining bugs, monitor key performance indicators (KPIs) we agreed to, and make adjustments to further improve them.
I'm passionate about nature, science, health, education, artificial intelligence, robotics, sci-fi and how to make it real.
I believe "work" should be only smart and creative, and done not because one needs the money, but because one is proud of the result.
We're definitely far from Star Trek's world, where
"economics of the future are somewhat different. You see, money doesn't exist in the 24th Century. The
acquisition of wealth is no longer the driving force in our lives. We work to better ourselves and the rest
of humanity."
I hope we, as human race, will reach that point some day. Automating repetitive tasks and
volunteering for science is my small,
insignificant contribution to getting there.
It's easier together :-)


CSC 378: Data Structures and Algorithm Analysis
INTERVAL TREES
An interval is a pair of integers [a,b] such that a < b.
The endpoints a and b of each interval [a,b] divide the integer line into partitions called elementary intervals.
The interval x=[10, 20] has been added to the integer line. Notice that one interval cuts the line at two points:
See what happens as we add new intervals. Notice how many new elementary intervals we are creating.
Add y = [15, 25]:
Add z = [18, 22]:
Given n intervals [ai, bi], for i = 1 ... n, exactly how many elementary intervals are there, assuming that no intervals [ai,bi] share endpoints?
We get 2n + 1 sub-intervals when there are n intervals on the integer line that do not share endpoints.
Every interval can be expressed as an aggregate of the sub-intervals that it spans:
| Interval | spans Sub-Intervals | |
| x | [10,20] | [10,15], [15,18], [18-20] |
| y | [15,25] | [15,18], [18,20], [20-22], [22,25] |
| z | [18, 22] | [18,20], [20,22] |
How would we store these intervals in a data structure?
We would store them in an interval tree. This is an augmentation of the BST data structure.
An interval tree has a leaf node for every elementary interval. On top of these leaves is built a complete binary tree. Each internal node of the tree stores, as its key, the integer that separates the elementary intervals in its left and right subrees. The leaf nodes do not store any keys, and represent the elementary intervals. In the interval tree below, the key is shown in the top of each node.
Note that each leaf corresponds to exactly one elementary intervals.
How would we store the actual (non-elementary) intervals in this tree?
Each node of the tree (both internal nodes and leaf nodes) can store a set of intervals. In the tree above, this set is shown in the bottom of each node.
We could store these sets as linked lists. Each leaf (which corresponds to an elementary interval) would contain a pointer to a list of non-elementary intervals that span the leaf's elementary interval. For example:
What's wrong with this picture?!
It uses up too much space: If each interval were very long, it could potentially be stored in every leaf. Since there are n leaves, we are looking at O(n2) storage!
So how do we improve the storage overhead?
An internal node is said to ``span'' the union of the elementary intervals in its subtree. For example, node 18 spans the interval from 15 to 20: In other words: span(18) = [15,20].
Suppose that, rather than store an interval in each individual leaf, we will store it in the internal nodes. Here is the rule:
An interval [a,b] is stored in a node x if and only if
- 1)
- span(x) is completely contained within [a,b] and
- 2)
- span(parent(x)) is not completely contained in [a,b].
Let's incorporate this rule into our tree:
Each interval can be stored at most twice at each level. (Can you prove this?)
This gives us O(n log n) storage - actually 2 n log n, which has a very low coefficient.
MUCH BETTER!
Suppose we have a set of composers and their lifespans; each lifespan is an interval of years between the composer's birth and death. The following table gives an example.
| Interval | Composer | Birth | Death |
| A | Stravinsky | 1888 | 1971 |
| B | Schoenberg | 1874 | 1951 |
| C | Grieg | 1843 | 1907 |
| D | Schubert | 1779 | 1828 |
| E | Mozart | 1756 | 1791 |
| F | Schuetz | 1585 | 1672 |
The intervals are shown on the integer line. Each interval is labelled with a letter corresponding to one of the composers in the table:
Notice that the endpoints a and b of each interval [a,b] divide the integer line into elementary intervals. The elementary intervals for the composers are:
Here is the Interval Tree for our composers:
Notice that node 1828 spans the four elementary intervals between 1779 and 1874. In this case, we say span(1828) = [1779,1874]. A leaf node spans only one elementary interval.
And here's the tree with the intervals stored in each node according to the rule above:
For example, the interval C = [1843,1907] corresponds to Grieg's lifetime. This interval is stored in node 1888 because
- 1)
- span(1888) = [1874,1907] is completely contained within [1843,1907] and
- 2)
- span(parent(1888)) = [1874,1951] is not completely contained within [1843,1907].
The interval C is also stored in the leaf node to the right of 1843 because this node also satisfies conditions (1) and (2).
Test your understanding:
Suppose interval G = [1672,1779]. Which nodes in the tree above would contain a G? Hint: Start by adding G to each elementary node spanned by [1672,1779]. This satisfies condition (1) above. However, if G is in both children of a node x, then condition (2) is not satisfied by the children because the span of their parent, span(x), contains G. Whenever this occurs, remove G from each child and add it to the parent, x. Repeat this until G cannot be moved upward anywhere in the tree.
Try another: In the tree above, write an H in each node that stores the interval [1756,1971].
Storage cost: Each interval can be stored in many nodes of the tree. However, the conditions (1) and (2) ensure that any particular interval is stored in at most two nodes on each level of the tree.
Given this information and the fact that a tree of n intervals has O(n) leaf nodes, what is an asymptotic upper bound on the space required to store the n intervals inside the tree nodes? Assume that an interval requires O(1) space for each node in which it is stored.
How do we answer queries of the form ``What composers were alive in such-and-such a year?'' For example, the composers alive during 1910 were Stravinsky (A) and Schoenberg (B).
In the abstract, the query algorithm must do the following: Given an integer k and an interval tree T, list all the intervals stored in T that contain k. An interval [a,b] contains k if a <= k <= b.
The query algorithm must simply enumerate the intervals stored in the leaf that contains k. It must also enumerate the intervals stored in internal nodes whose span includes k. These are the ancestors of the leaf that contains k. So the query algorithm simply follows a root-to-leaf path to find the leaf corresponding to the elementary interval containing k, and enumerates all the intervals stored in nodes on that root-to-leaf path.
Each node stores the usual left and right pointers. In addition, it stores separator, which is the value that separates elementary intervals in its left and right subtrees. It also stores intervals, which is a pointer to a linked list of the intervals.
/* listIntervals( k, x ) * * List all the intervals that contain k in the subtree rooted at x. * * This is intitially called as listIntervals( k, root ). */ listIntervals( k, x ) while x != NULL output intervals(x) if k < separator(x) x = left(x) else x = right(x) endif endwhile
Here the problem is to add [a,b] to the tree, assuming that the endpoints a and b are already in the tree; that is, a and b already separate elementary intervals somewhere in the tree.
Essentially, we've got to descend from the root just until we find a node x whose span is completely contained in [a,b]. Then rule (1) is satisfied. At this point we store the interval in x and stop. Note that rule (2) is satisfied at x because we didn't stop at x's parent (otherwise we wouldn't have reached x). Also note that we're guaranteed to stop at a leaf.
But if we reach a node x whose span is not completely contained in [a,b] we simply recurse into each subtree of x that contains any part of [a,b]. We know that condition (1) is not satisfied at x, but that it will be satisfied at some of x's descendants.
/* addInterval( I, a, b, min, max, x ) * * The interval to insert is [a,b] and is named I. We assume that the * values a and b separate elementary intervals somewhere in the tree. * [min,max] is the span of the current subtree rooted at node x. * * This is initially called as addInterval( I, a, b, -infinity, +infinity, root ). */ addInterval( I, a, b, min, max, x ) if a <= min and max <= b /* span(x) is completely within [a,b], so store the interval and stop */ store I in intervals(x) else /* span(x) contains some elementary intervals that aren't in [a,b]. * We must recurse until we find a subtree that is completely contained * in [a,b]. Note that we might recurse into both subtrees. */ if (a < separator(x)) addInterval( I, a, b, min, separator(x), left(x) ); endif if (separator(x) < b) addInterval( I, a, b, separator(x), max, left(x) ); endif endif
How long do this algorithm take in a tree of n elementary intervals? The reasoning to answer this is not obvious.


Finds toolbar item with id and extends it with item object.
set(id, item)
| id |
string, id of the toolbar item |
| item |
object, new toolbar item object |
Returns boolean.
Description
The first argument id is the id of the toolbar item you used when you created toolbar items. The
.items array holds all created toolbar items. The toolbar item object is not replaced with
item, but extended by it. If you call this method it during run-time, you will need to call
.refresh() method. If toolbar item was successfully extended the method will
return true, otherwise false.
If you have toolbar defined in the following way:
You can get toolbar item:
You can also set toolbar menu item:


{% extends "_base.html" %} {% block content %}
Welcome to Ima's place. I don't have a whole lot going on here. Maybe soon. For now, enjoy a neat thing or two that I have come across in my travels.


HTML before
HTML before
HTML before
Item 1
Item 2
Item 3
Really Long Item Label
HTML after
HTML after
HTML after


deotm.wordpress.com
February 24, 2008
Ok, dreamessenceonthemove is too long a name for a blog link. I knew that since the day I set it up but I hadn 't come up with a better option myself. I always liked it to be the plain dreamessence but someone went first in the queue. Since this blog was originally intended to keep track of my life journey (so it is right now, but since i'm temporarily settled in my hometown, the post have taken a different look to the first ones), i thought dreamessenceonthemove might fit. Yet the thought it was too long remained. But las friday I came up with a "new" idea: why don't I open up a new one with a shorter name just make it easier for people to get through? So I just registered deotm.wordpress.com to let u easily remember my ciberSpace.
Then, from now on, if u r somewhere and wanna now about me but don't remember the whole address, just think of the first letters (DreamEssenceOnTheMove), type them on your web browser and enjoy the Digital Land!!!


Jake can morph into all sorts of fantastic shapes with his powers, but typically takes the form of an average sized yellow-orange bulldog.
- Sex: Male
- Species: Dog/Shape-shifter Hybrid
- Occupation: Adventurer
- Voiced by: John DiMaggio
Jake (full title: Jake the Dog), the deuteragonist of Adventure Time, is a dog/shape-shifter hybrid, referred to by others as a "magical dog", and Finn's constant companion, best friend, and brother.


Before Change
// Launch the "Open File" dialog
fileNames = self.getImageFileNamesToOpen(defaultDirectory)
if len(fileNames) == 1:
QMessageBox.warning(self, "Invalid selection", "Cannot create stack: You only selected one file. If your stack is contained in a single file (e.g. a multi-page tiff or hdf5 volume), please use the "Add File" button." )
return
// If the user didn"t cancel
if len(fileNames) > 0:
PreferencesManager().set("DataSelection", "recent stack image", fileNames[0])
// Convert into one big string, which is accepted by the stack loading operator
bigString = "//".join( fileNames )
self.importStackFromGlobString(bigString, roleIndex)
def getImageFileNamesToOpen(self, defaultDirectory):
After Change
finally:
self.guiControlSignal.emit( ControlCommand.Pop )
req = Request( importStack )
req.notify_failed( partial(self.handleFailedStackLoad, files ) )
req.submit()
@threadRouted
def handleFailedStackLoad(self, files, exc, exc_info):
import traceback