fasttext_score
float32 0.02
1
| id
stringlengths 47
47
| language
stringclasses 1
value | language_score
float32 0.65
1
| text
stringlengths 49
665k
| url
stringlengths 13
2.09k
| nemo_id
stringlengths 18
18
|
---|---|---|---|---|---|---|
0.950211 | <urn:uuid:c17aaf5e-136f-40df-b0e5-b50d0bb3cfbe> | en | 0.888668 | Storing it Up
Right behavior + wrong motive = wrong result
Wrong behavior + right motive = wrong result
Right behavior + right motive = right result
Living for now or later- this world or the next- temporal or eternal
What you sow you will reap.
What are the priorities in your life? How do you spend your time, your money, your efforts?
Jesus needs to be the focus in our lives... Consistently, everyday of our lives. Everything should happen while we keep Jesus as the source of WHY we are doing what we are doing.
Don't store up...hoarding, stockpiling
Cultural disease... Affluenza!
Always wanting more
Three things we can do with our lives
1. We can waste it
2. We can spend it
3. We can invest it
Where us my treasure stored?
What causes me to slip into a pattern if worry?
What are you seeking first in order of priority?
How can you better invest your life into the Kingdom Of God?
Created over 1 year ago | https://www.bible.com/en-GB/notes/8647773 | dclm-gs1-037780000 |
0.109604 | <urn:uuid:38927905-8c04-4049-bc88-9072d862401b> | en | 0.9764 | Reviews for Super Spy Wizard
Holly Muncho chapter 6 . 10/31/2009
CheechHatesClowns chapter 4 . 7/15/2009
Okay, okay. Nice. Thanks for updating. Getting more interesting by the minute! :D
Naomitrekkie chapter 4 . 7/15/2009
Oh, this was hilarious! It's like they're jealous! I could really see them doing this to fight over a guy! OMG, it's brilliant! And only making them more suspicious! And try as they might, they aren't even hurting the other ones, though I have to say, Violet's got it best off, seeing as no one took anything from her, she's got her forcefield to protect her from the snow, and her floor's been cleaned by Alex's magic. Now, who's got it worse? Well, as sad as it may be about losing her gum, I'd have to say Alex has it worse off cause her wand's been ruined and her spell book's AWOL. Carmen's just inconvenienced. i can't wait to see what else you'll do! This could be really, really fun. Hopefully they'll team up when it really matters, but until then, let the pranks begin!
OMG, I can just see it now! The three girls get into an all-out fight, and their parents have to be called. Carmen's parents might not care (well, the OSS will care about the mission going down the drain, but won't be too upset), Violet's parents will be unreachable (most likely), and Alex's parent's will have a cow! They won't even listen to her when she tries to explain!
This just gets better and better! Can't wait to see what you have in store for our crazy teenage friends! Let's just hope a boy doesn't come into the picture b/c then it'll all be downhill from there! *giggles*
Smiles! :D
Naomitrekkie chapter 3 . 7/13/2009
I planned on reviewing anyway, so here it is. I'm warning you in advance, I like to ramble.
So, I'm really liking this. I can see the next chapters just causing them all to become more and more suspicious. I wonder how the rest of the camp will react to finding two none wizards at the camp. I bet they won't even notice, what with Carmen using her gadgets and Violet using her powers.
So I wonder when they realize they're all on the same time? probably when the baddie swops in and tries to kill them all. that sounds about right for these three shows/movies. Maybe not. boy, this is gonna be good.
I really like the originality of this fic. I'd have never thought about these three girls meeting, but it sounds like there's lots of potential for this. misunderstandings always make the best plot lines. :D
oh, and the DDR update? brilliant! and Carmen's glasses that lets her see Violet? cool! yes, I'm definitely seeing this fic being absolutely hilarious.
hmm, let's see if I can play guess the baddie. now, at first glance it would appear to be wizards work, but that'd be too easy. supers and secret agents could also be behind it. my theory is is that someone (not a wizard) wants Alex for some reason, and knowing her parents, they decided to frame her so she'd get sent to camp, where they could capture her in one of the freak storms. and i think there's more to the storms than just causing people to freak. they're going for spectacle too. Now, who would want Alex? I'm guessing either a super, a guy with technology, or Gary Giggles. nah, it's not Gary. he might like Carmen, but he's good now.
So, I guess I'll have to see if I'm even anywhere close! now, that wasn't too much rambling, now, was it?
Smiles! :D
CheechHatesClowns chapter 3 . 7/7/2009
i hope this is enough of a review to keep you writing the story. but maybe you could try to keep the chapters longer.
BlackThrneBoysGgirl chapter 2 . 4/14/2009
Yoshion7 chapter 1 . 3/29/2009
Well it was realy good I cant wait to see what happens next.
Bubbly131 chapter 1 . 3/22/2009
I'm definitely curious now. Please update soon! | https://www.fanfiction.net/r/4932667/ | dclm-gs1-037790000 |
0.132933 | <urn:uuid:97845f1b-b1c7-4ce8-a07b-8bb52cc6bc07> | en | 0.972498 | The Sting
Summary: Vash makes a new acquaintance in the strangest of ways and finds himself tangled up with her hunt for a serial murderer. Things start to heat up as the murders grow closer and closer together, each one linking to another, each one looping directly back to the woman who calls herself Sting.
Hopefully a future clip: "Vash!" The woman's cry echoed in the vastness of the desert. "There comes a time when you have to choose between what is right and what you love!" The outlaw stopped dead now, his knuckles turning white as he grasped his gun. "Make up your mind! What's more important to you, Stampede?! The values of a woman who died over a hundred years ago or the woman living now that you love, who's being held captive and only God knows what else by men that have been known to torture people to death?!"
A/N: Alright, warning: this is my first Trigun story EVER! So please, be gentle. I might not get the characters down properly and I know there are only about a gazillion OC stories out there but I promise this one will be different; starting with the fact that she doesn't fall in love with one of the series character! Or at least none of them fall in love with her! Seriously that is…
Have fun and don't forget to READ AND REVIEW!
Chapter 1: The Man of No Words
The twin suns of Gunsmoke beat down harshly upon the back of man trekking the deserts that covered the planet's surface. Blond hair hung loose around his face, which was sparsely covered with stubbles of a beard, his green eyes were weary and sweat trickled down his face. The red duster he was so known for wearing had been long abandoned in desperation of cooling off and without it he looked as every man did.
I've got to get somewhere fast; Knives will die if I don't… I'll die if I don't! Vash thought rapidly, his grasp slightly tightening upon the platinum-haired man slung over his shoulder.
"Hey, needle noggin!"
Vash shook the voice of the late priest from his head. No… no! Don't think about him, don't… he's gone…
"Mr. Vash? Is that you?"
"Vash you idiot! Where have you been? We've been waiting forever for you to get back! I hope you weren't planning to just abandon us again, mister!"
The outlaw couldn't help but smile slightly, his eyes beginning to shine, at the thought of the insurance girls and what they'd say if he ever saw them again.
"Meryl," he whispered, staring upward at the sky. "I'm sorry, Meryl… I can't come back… Knives is too dangerous, I won't let him hurt anyone any more… no one… especially not you… not until I know he's okay again."
"Hey, Mister, you like talkin' to yourself or something?"
Vash turned quickly to spot two figures standing on a hill not far from him.
The smaller of the two was a young boy, maybe about twelve or so, with long, untamed black hair that hung clear past his shoulders, his bangs messily displayed across his forehead and before his blue-gray eyes. He wore a pair of brown slacks and a white shirt, with suspenders and boots, one eyebrow cocked at the outlaw with his hands upon his hips.
The second was taller than the boy, not by much, standing shorter than any other man Vash had seen, wearing a long, black coat, which concealed any amount of muscle he might've had to make up for his lack of stature, that buttoned from the waist to the throat, where a white, preacher's collar was visible. His hair was white, even if he couldn't have been a day past twenty, chopped short and radically thrown about his scalp, his eyes concealed behind a pair of sunglasses, and his stance ominous, looming, and commanding respect.
"Oh wow, someone's actually out here," Vash said, scratching the back of his head and laughing softly, relieved beyond what his voice betrayed, "say, you couldn't get me to the nearest town could you? My brother's hurt from a gunfight and I need to get him to someone who can help right away."
"Certainly," the boy piped, grinning broadly. "My name's Vann and this here's Sting. We were just heading out to New Memphis; you're welcome to come with, though you might want to sit back in the bed." (If there is such a place in the series I've never heard of it, I'm going to be making up these towns as I go along.)
The Humanoid Typhoon nodded and followed the boy and his companion over a dune, discovering their truck on the other side. "How'd you know I was out here?" Vash asked as he gently laid Knives back in the truck's bed and settled himself in the corner on the passenger's side.
"Sting spotted your tracks a while back, we've been looking out for you. What's your name?" Vann replied, rapping his fist on the top of the truck, signaling that they were ready, and then sitting down as the vehicle started off.
"Vash, like in the Stampede? Whoa, I've heard of you!" The boy smiled widely as he stared at the man before him in awe. "Yeah, yeah, you're that guy that blew up all those cities and stuff… even though I don't believe a word of it. Sting and I met these two women back in New Memphis when we were there a few weeks ago and they talked all about you."
Vash froze. "Really? Women? Well, I am quite the lady killer if you know what I mean!" He winked brightly, covering his true feelings deep inside. Meryl and Milly… they'd seen them, that had to be them; they were the only two women who'd ever talk about him in a good way.
Vann laughed. "Oh man, don't kid yourself, the short one, kind of a spitfire she was, she was on about what a 'broom-headed idiot' you were, 'harmless as a fly', but when I asked her when she'd seen you last she got really quiet and her friend, a big girl, sort of… I don't know… flakey, got really loud on about pudding and the conversation sort of died. You rub her fur the wrong way or something?"
The outlaw bit his lip. "Yeah, something like that," he murmured. "What's your story, kid?"
The boy laughed. "Momma and daddy got in bed, didn't want me, threw me in the orphanage, I raised some hell in town, got into some trouble with Sting, and here I am."
"What about Sting?"
"Not sure, don't know much about him except he's got a lot of secrets and none he's willing to share," Vann replied. "He don't talk much to me and he's the man of no words around strangers. He's friend enough, buys me food, let's me have the bed when we stop at hotels. He likes to keep to himself I guess."
The Plant watched the boy for some time, how he tipped his head back and soaked in the suns' rays, smiling to himself, and humming some made up tune quietly. This kid was hiding something about his friend.
The trip from there on in was silent, Vash checking on Knives every now and then to make sure he was still steady; he was. Sting made the gunman weary, he had an air of some mystery about him, his habit of not talking left everyone sort of in the dark, and the sheer fact that he seemed very… dangerous… amplified everything.
"We should be getting into the city any minute, last me and Sting checked it was only about a few hour's ride from where we picked you up," Vann said just as the twin suns set and the moons rose.
"I really appreciate it you two."
Vann waved a hand. "Think nothing of it, me and Sting will help however we can."
Sting did nothing to add to this sentiment and continued driving on.
* * *
"Dr. Groves probably ain't awake at this hour," Vann began as he leapt out of the bed of the truck, Vash soon following with Knives slung over his shoulders, the buildings of New Memphis looming lit up around them. "But he'll get out of that bed of his for a few coins and an ill man. He usually does everything, no questions asked, as long as he gets his payment. I'd try to keep low, people 'round here are anxious, they like money and lots of it and you, to them, would be one big piece of gold."
"Thanks, hey, uh, you wouldn't know any good hotels around here would you?" Vash asked, watching as Sting hauled a duffle from the cab of the truck and sling it over his shoulder.
"Not any good ones but me an' Sting are gonna be taking a room at that place," the boy replied, pointing to the building they'd parked in front of, which was dimly lit with uproarious laughter spilling from it. "Not the cleanest dump but it works, maybe we'll talk before me and Sting get to moving again. See you, Vash!"
The outlaw watched as the boy raced off.
Sting, however, turned to face the outlaw, the first time that the man had actually bothered to acknowledge anything anyone said. He stood there for a second, motionless, before nearing again offering an arm to take Knives with. "I'll get you a room and watch him until you come back with the doctor," he spoke softly in a muffled voice.
Unsure if the preacher could hold his brother's weight the Plant hesitated. "He's pretty heavy."
"Ah, don't worry, Sting's pretty strong, he can handle it," Vann called from the porch of the small hotel grinning wryly as he barely managed to lift the duffle bag, which he had pulled from the trunk but seconds before.
Vash paused a second. "Okay," he muttered, slipping Knives' deadweight frame from his own shoulder onto Sting's, who shifted uneasily for a second and then straightened, starting off again.
I'll be seeing them again soon, he thought, I can feel it. That Sting… there's something different about him.
"Mr. Vash?"
That was the voice.
That pierced the ears.
And broke the heart.
Of the outlaw named Vash.
"I-insurance girls?" he said it before he even turned to look at them but as he did 'lo he was right.
Both stood there, looking as they had when he had left them, both with wide eyes, staring in slight disbelief.
"Oh, Meryl, it is him! I told you it was!"
The shorter of the two was still stunned, even after her partner ran to Vash, hugging him tightly, proving that he was tangible, that he wasn't a ghost.
It can't be him, Meryl thought rapidly. But it is! He's alive, I don't believe it… he made it out alive! He's here… he came back!
But any rejoice she was feeling was quickly washed away as anger emerged. "Vash, you jerk!" she shrieked. "You had us worrying sick about you for over a month! You inconsiderate asshole! I can't believe you!"
Ah, music to his ears. Meryl's screeching never sounded more beautiful. "Good to see you too… Meryl."
It made the woman stop her ranting and just stare, their eyes locking and time stopping for a second. He'd never said he name before. It was then she let the barrier around herself collapse and she found herself in his arms, hers wrapped around his waist, her face buried in his chest. "I missed you, Vash," she whispered, "even if you are an idiot broom-head."
This is how it should always be, he thought. But it can't… when Knives wakes up he isn't going to be happy and he can't know what I feel for Meryl or she'll be endangered. Maybe someday Knives will be well and I can love her like I've wanted to.
Milly coughed and the two leapt away from one another, blushing crimson. The taller girl smiled brightly. "Since Mr. Vash is back we won't have to return to the office again, you should tell the boss that, Meryl."
Meryl nodded. "Yeah, I'll get to it in the morning. But first… I want to know what happened with Vash. Is he… you know… dead?"
The outlaw didn't meet her gaze. "No," he whispered. "He's alive. I was going to get a doctor for him before you two showed up."
They although shocked and a little scared that he'd brought that killer with him, alive nonetheless, didn't say anything and silence fell between them.
* * *
Vann watched Sting from where he sat on the bed. The man stood in the window, looking out it thoughtfully, arms crossed, sunglasses missing, revealing what was hidden. Scars danced circles around his left eye, which was staring sightlessly into the darkness of the streets below. "You can't keep up this disguise the entire time we're here."
"I like this disguise, no one suspects the skinny looking man of God."
"Someone's bound to find out or notice or something."
Sting shrugged.
Vann shifted uncomfortably. "This is dangerous."
"I warned you about that coming into the business, kid."
"I know."
Silence fell between them.
Sting looked to the floor. "Vann… I told you it was dangerous… I also told you that there'd come a time when I'd have to leave you behind, where it'd get too dangerous."
"I know, Sting. What if they find out?"
"Find out what?"
"You know."
"No, Vann… I don't know… there are a lot of bad things people can find out about me that'll throw us both into peril."
"I mean… Sting… what if they find out you're a woman? There are people crawling this place looking for you and there are, needless to say, few women with your looks."
Sting looked away. "Get some food, Vann and bring it up… I'm gonna take a shower."
Vann nodded and watched his companion turn toward the bathroom door, stripping away the black coat, revealing a white shirt that clung to smooth curves and a chest flattened from deliberate exercise. Their plan had been to get her around dressed as a man, a preacher nonetheless, but if anyone found out their secret was blown.
But if we fooled Vash the Stampede how hard can a bunch of mercenaries be hard to fool? Vann thought as he started downstairs, stopping at a door half-way down the hall. That unconscious, bullet-filled, blond man lay on the other side of that door. I really wonder what that story's really all about. | https://www.fanfiction.net/s/1603533/1/The-Sting | dclm-gs1-037810000 |
0.052365 | <urn:uuid:c8069009-c056-4175-8d22-75d230480361> | en | 0.979479 | Author's notes:
Well, after having recieved email from the "why do you hate KP?" Club, I felt the need to discuss this story. See, for those of you who yet to enjoy the process, I'm writing an MA thesis. Those of you who have enjoyed the process understand why, this sometimes makes me...cranky. After my fifth reading of British minutes of the House of Common's, I shall probably have to write a story where Ron gets rabies and Kim has to shoot him, otherwise known as Kim Possible: Old Yeller.
Unfortunately, the two currently incomplete stories (not counting KP/farscape, which is waiting until I can find time to rewatch season four), require a certain mindset so in the spirit of trying to get back into the swing of things, I'm going to start updating on the following pattern: Memories, Noir, and Senior Yearat least one chapter every two weeks, although it might be short. Memories is plotted for four chapter, so it will probably be finished first.
Oh, and one note about Memories: All characters are from the KP cartoon...there are no new characters... of course, reconciling that with what you read... ah, well there's the mystery!
Shelly Lu stood at the entrance to Middleton High School. The dark haired girl sighed. How many schools was this? It was hard to remember, they kept fading into the past. Hell, she barely remembered any names from her last school.
"Hi!" The voice interrupted her thoughts and Shelly turned to see an attractive African-American girl, standing smiling at her.
"You must be Shelly."
"Yeah…that's me." She said uncertainly.
"Hi, I'm Monique… I'm here to show you around the school." She grinned, "Sometimes things can get a little weird around here."
"I've heard." Shelly said, thinking about the news stories. Monique's face grew set.
"Yeah…about that. You might not want to, well…you'll understand." She said. Than, with class list in her hands, she and Shelly went exploring for Shelly's first day as a Junior at Middleton High.
The day went pretty well. Shelly was a good student, and while her times at schools were very short, she was able to fit in easily with the class work. The students… well they were just students. Some tried to hit on her, her dark hair and curvy figure attracting them, others ignored her…just like every other school. Still, the student body was friendlier than most, she figured. Monique had proven to be a fun girl to be around.
"So, what now?" She asked. Monique grinned back at here.
"Well, I'm meeting some friends at Bueno Nacho….you want to come along." She paused.
"You eat there all the time?" Shelly asked. A Shadow passed over Monique's face.
"Not all the time, no…" Then she looked behind Shelly and her eyes widened. Shelly blinked, both at her look and the odd clicking sound she heard.
"Why is she here?" Monique wondered.
"Uh, nothing, Shelly, hang on, I need to talk to someone." Shelly turned as Monique hurried past her. There was a redheaded girl, hair in a pony tail, wearing a large sweater and long pants, coming down the corridor…slowly. The reason for that was clear, as the two crutches she used to support her body made the clicking noise as she moved. More than that, her body was…hunched, was the only word Shelly could think of, moving slowly as if she was in a wind. Monique stalked towards her and Shelly quickly looked somewhere else. However she could hear fragments of their conversation.
"…warned you about this."
"…Just had to….something."
"…don't need….stop babying…"
"…acting like it." The girl finally gave Monique a glare, and spun around, obviously trying to end the conversation…but the gesture was ruined as she lost balance and Monique was the only one who saved her from taking a trip to the floor. Shelly looked around to see if anyone else was going to help, and noticed something. Every other student was deliberately not noticing anything out of the ordinary…and in fact her attention garnered her a few glares. She turned back to her locker and busied herself with the combination.
"Hey KP." A cheerful voice came as a blond haired student came around the corner with a wheelchair. Now the girl was glaring at him.
"I didn't need…" She started.
"Uh-huh…did I ask you a question? Monique, did I ask KP a question?" He said. There was a…naked rodent on his shoulder? Shelly blinked at that. Then she blinked again, and couldn't tear her eyes away from him... or rather his face. One side was normal…but the other side…an eyepatch covered his left eye, and a network of new scars lined that side of his face, pulling his mouth up in a lopsided smile. The girl tried to glare, but ended up looking at the floor and obediently sitting down in the wheel chair. Shelly didn't say anything as the boy looked at Monique.
"Thanks Monique, I'll take it from here."
"'Kay Ron—are you going to Bueno Nacho?"
"We've…had a long day." Ron said, and behind the girl, where she couldn't see him, his one good eye dipped meaningfully. Monique nodded.
"Well, see you tomorrow, than."
"Who was that?" Shelly asked when Monique came over.
"Kim Possible and Ron Stoppable…" Monique said, and Shelly suddenly realized that Monique had tears in her eyes.
"Oh My God…" Shelly said in horror. "But…they…the website…"
"That's over, Shelly." Monique paused, "Don't ask me why or how…it's not my story to tell." Shelly nodded.
"So, uh…ready for Bueno Nacho?" Monique said, forcing cheer into her voice. Shelly nodded, uncertainly, her eyes fixed on the two figures receding down the corridor.
To be continued. | https://www.fanfiction.net/s/2290567/1/Memories | dclm-gs1-037820000 |
0.027624 | <urn:uuid:5d5f645f-3d0f-43e6-8fe1-36e4e0af7acd> | en | 0.956958 | No one knows the precise size of Earth's current urban "Alien" population and with the Xenomorph pandemic reaching a critical high contact with the extraterrestrial menace has increased. Late last year medical officials announced that the Xenomorph species is a great risk towards the general public and there means of reproduction is cause for great concern. The parasitoid form, nicknamed the "Facehugger" hasfound its way in to the black market pet trade and people are willingly bringing these creatures into households across the planet. Much like the 20th century's craze for exotic and deadly house guests, these highly illegal pets have taken a foot hold in our society and for the time being are greatest weapon against these monsters is knowledge.
Are you and your loved ones safe?
Please read the enclosed pamphlet to insure you have the knowledge needed to fight against the growing Xenomorph threat. (Please do not take the word fight in a literal sense; these actions could result in death!)
The Xenomorph has many stages in its life cycle but the parasitoid form mentioned above is our biggest concern. Unlike the advanced forms in the life cycle the Facehugger does not poses any visible appendages that can be mistaken for defensive weaponry. The visually harmless creature has peeked are interest as a curious species, with a misguided sense of safety we have opened our doors to an extremely hostile organism. The role of the parasitoid form is to implant its embryonic seed inside a living host. Attaching itself to the face of its chosen incubator the Facehugger will use a proboscis to deliver its seed via the mouth of its chosen victim. Once the creature has fulfilled its task it will detach itself and shortly after die. Complications can arise once the host regains consciousness; the limited oxygen fed by the parasite during the impregnation can leave you feeling weak, disorientated and confused. In this state you may fail to notice the deceased animal and leave the scene none the wiser to the actions that had taken place. Some people believe that once the creature is dead the implanted embryo will also die, this is not true. The creature has completed its life cycle and a new one has begun; time to look for signs of pregnancy.
The first and most obvious symptom to look for is the parasite attached to your face. Being conscious during the interspecies rape is rare and most have little memory of the act itself, this can make it hard to tell if it ever happened at all.
Warning! Trying to remove the parasite from its victim may result in death!
Other visual symptoms include dried mucus around the mouth and bruising around the neck.
Internal symptoms build acutely after detachment of the Facehugger, the most common being sore throat, slight nausea, increased congestion and moderate to extreme hunger. Symptoms will alter towards the final stages of embryonic development and these may include a shortness of breath, exhaustion, and haemorrhaging presented in random bleeding.
There is none.
Once the embryo has reached maturity it will chew its way though your rib cage, erupting in a violent birth to live an equally violent life and you will be dead. Even though the Alien pregnancy proves fatal to all mothers there are things you can do to make this horrific death more bearable.
Since becoming aware that the Xenomorph presence on earth had developed into an international heath crisis, world wide birthing centers have been funded across the planet. These centers' prove quite popular amongst male victims who have trouble coming to terms with pregnancy. The birthing process is an excruciating experience and can cause emotional stress to the other visitors, in delicate times such as these we like to provide as much privacy as we can. Isolation chambers are insisted upon so you will not hear anyone scream, they are also a convenient way of containing the new born creature. These centers supply a relaxed and calming environment for victims to live out there remaining day. We understand that many victims wish to spend there final hours with there loved ones but we must stress the fact that this is not a moment you should share with your children, the event could cause life long emotional trauma and the larval form of the Xenomorph "Chestburster", although small can prove detrimental to there health.
(No human remains will be released from the berthing center, they will be held for scientific research.)
Please read the frequently asked questions to save time you may not have.
Frequently asked questions?
Question. "I have been raped! I want justice!"
Answer. "As far as we know there is no law set in place for extraterrestrial beings, they cannot be arrested and put on trial. If its any consolation the thing that did this to you is now dead."
Question. "Hi, I think I'm pregnant with an alien, will it be a boy or a girl?"
Answer. "Each Xenomorphic embryo is male; it may develop into a Queen later into the pregnancy, in which case it will be a baby girl and you should be very proud."
Question. "Your operator told me to go suck it!"
Answer. "The operator in question has been fired for his insensitivity, do have a lovely day."
Question. "Hello. My son had a pet Facehugger and it's now dead on my carpet! What happened?"
Answer. "The Facehugger will not die of natural causes; Madam your son is pregnant."
Question. "There has to be a morning after pill, or something!"
Answer. "I am sorry sir; there is no contraception for this kind of pregnancy."
Question. "I wanted to do the birth alone but man I'm scared. Can you get me to a birthing center?"
Answer. "Have the convulsions started? There may still be time, don't pack just wait for the helicopter!"
Question. "Hey, I think the girlfriend is infected? How long do I have to wait before I can shoot her?"
Answer. "Sir we must strongly advise against killing your loved ones, she may not be pregnant."
Question. "Me again, she's bulging at the chest can I shoot her now?
Answer. "Yes! Do it now!"
We hope that the information provided proves useful. If you are unsure on anything please contact our 24 hour help line, it's never to late to be sure. 0800 IGOT-RAPED-IN THE-FACE-BYALIENS | https://www.fanfiction.net/s/6123743/1/In_the_event_of_Alien_impregnation | dclm-gs1-037870000 |
0.02595 | <urn:uuid:0b62c1ae-e7e4-4c8a-bfd4-39e0b125ab78> | en | 0.975062 | The Headless Horseman
Once I was riding home alone,
When I heard a trot in a wooded zone.
I turned my head and there did stand
The Headless Horseman, head in hand.
At first I thought it a trick of the light,
When I saw his horse, of shadow and might.
Its eyes did burn, its nostrils flared,
Never before have I felt so scared.
I turned without a second look,
Made for the bridge that spanned the brook.
But my horse was old and thin and slow,
How could she move, with him in tow?
By now we were galloping across the land,
Still holding his noggin in his hand.
I turned my head and tried to scream,
As a flaming pumpkin towards me streamed.
My eyes were fire, my body flame,
As I tried to turn the way I came.
But a big, strong hand then gripped my arm,
And dragged me back, to my alarm.
I felt his hands upon my neck,
And before long I was begging for my body back.
And like holding the crown of a wicked Lord,
Mounted my head on his spinal cord.
Wasn't it good? Didn't it fit?
With a growl of frustration the ground I hit.
My brain soon died, and the last thing I saw,
Was the Headless Horseman, temper run raw.
Now, I know what may be going through your head,
How can he write this if he is dead?
Well I'll tell you, my friends, and only to you,
Because he still haunts here, it's only true.
I may be dead, but I still exist,
Or was that perhaps a part you missed?
The headless Horseman roams these parts,
Around this time he usually starts.
I hear is voice inside my brain,
The voice of a sullen man in pain.
I read his thoughts, I know his plans,
The hateful thoughts of a headless man!
On Halloween, All Hallows Eve,
He roams these woods for a head to cleave.
You should turn and tread with quickened pace,
Because he believes your head should take my place.
This is the first poem I've uploaded to Fan fiction, and is also the only one I've ever been proud of! I wrote this at about one in the morning, (I always get my best ideas at night) and redid and refurbished it until I had a truly good poem!
The Headless Horseman is one of my favourite mythical creatures, and this was inspired by watching the Disney version of the Legend of Sleepy Hollow.
Review, and favourite, all that jazz. Thank you! | https://www.fanfiction.net/s/8573123/1/The-Headless-Horseman | dclm-gs1-037910000 |
0.042555 | <urn:uuid:c47b3dbb-c093-4176-b01d-443d6163ad20> | en | 0.949983 | hide bio
PM . Follow . Favorite
Joined 03-24-13, id: 4616985, Profile Updated: 05-15-13
Author has written 2 stories for Hunger Games.
Heya, I'm Lee Lee
I love writing these fanfics as it gives me a chance to share my point of view and hyper active imagination with everyone.
As I plan to be writing for a long time, you guys will just have to learn to deal with me but I'm sure we'll get along if we try *puppy dog eyes holding a plate of cookies*
I love cookies, and chocolate, and chocolate cookies.
Warning: when reading my stories please, please keep an open mind. Sometimes my imagination goes into over drive and thats were we find the random words that are passed from my crazy mind only to be blurted out out my characters mouth in a completely inappropriate scene. For example there may be a death and one of the main characters could unfourtunetely have to say "oh look, it's a squirrel!" or something like that. Plus I tend to babble but it's only because I like to talk, a lot.
Anyway, please read my stories and reviews would score you an extra virtual cookie!
Reader: Holy Batman, did she just say virtual cookies?!
Me: Why yes I did! And they'll be all yours with only three easy payments of $79.99! *giggles* Joking!
So again, please read my stories and love what they have to offer.
Drive-By Flirtation by njwriter62 reviews
Bella Swan's commute to work is disrupted by a guy in a silver Volvo who cuts her off at the drive through coffee shop. Bella's upset, but her friend Alice thinks its kind of cute. So begins a car and coffee-based flirtation. She doesn't know who he is, and he doesn't know who she is - or does he?
Twilight - Rated: T - English - Romance - Chapters: 24 - Words: 53,541 - Reviews: 435 - Favs: 236 - Follows: 329 - Updated: 1/11 - Published: 5/18/2013 - Bella, Edward - Complete
Starcrossed Lovers reviews
They used to best friends but something happened that wrenched them apart. They hardly ever see each other anymore. So what happens when old feelings start to resurface?
Hunger Games - Rated: M - English - Humor/Romance - Chapters: 1 - Words: 873 - Reviews: 4 - Favs: 2 - Follows: 8 - Published: 5/15/2013 - Katniss E., Peeta M.
This is my life reviews
Poor katniss, it seems like nobody loves her. or do they? Katniss is a 17 year girl living in modern day America. When she was 8 her father was killed and everything went haywire from there. What happens when she meets a certain boy? She thinks she's weak, can he help her out of the mess of her life before it's too late? Let's hope he can before they both lose everything.
Hunger Games - Rated: M - English - Romance/Drama - Chapters: 4 - Words: 10,373 - Reviews: 4 - Favs: 6 - Follows: 14 - Updated: 5/13/2013 - Published: 3/24/2013 - Katniss E., Peeta M. | https://www.fanfiction.net/u/4616985/RosesForMyGun | dclm-gs1-037940000 |
0.047907 | <urn:uuid:8eead5ee-f7a0-49b2-a8ad-0a60fbf9de29> | en | 0.920527 | Online PR for attracting Beta customers
Job Description
I'm looking for someone to work with us to help launch a new product. Its very disruptive replacing a service mobile developers currently pay for with a better service they get paid to use... it should be a piece of cake!!
This job is to find and comment to promote to Beta users on appropriate web properties [blogs, forums, social media pages].
This is a US centric business so only US applicants please.
Skills: writing | https://www.odesk.com/o/jobs/job/_~01610e8bf3d1519069/ | dclm-gs1-037960000 |
0.018183 | <urn:uuid:8e8c186b-2b09-421d-8b80-f63a14b95f21> | en | 0.969928 | Sudan: Protests Continue in Sudan
Khartoum — Street demonstrations in Sudan have now stretched into their fourth consecutive week. Seemingly inspired by past revolts against dictatorship in 1964 and 1985, Sudanese protestors are now demonstrating against what they see as their government's tyranny and economic incompetence.
Since South Sudan seceded a year ago, Sudan's economy has suffered. Food prices have soared, the currency has weakened, and the government has enforced spending cuts. This has been exacerbated by the loss of approximately three-quarters of the country's oil output to South Sudan.
On June 16, students from the University of Khartoum led anti-austerity protests. Protests against spending cuts, however, soon extended out beyond Khartoum and evolved into broader demonstrations against President Omar al-Bashir's 23-year-old regime. Demonstrations became a daily occurrence at both public and private universities, and despite the police's heavy-handed response of beatings, teargas and arrests, dissent has grown.
Growing protests
The largest protests often begin from mosques after Friday prayers, with each week's demonstration accorded a different theme. Past Fridays have been labelled 'Sandstorm Friday', 'Elbow Licking Friday' (in reference to a remark by one of Al-Bashir's advisors that those who want to overthrow regime have a better chance of licking their elbows) and 'Outcasts Friday' (referring to Al-Bashir's recent speech in which he called protesters 'outcasts'). Today's, planned as 'Kandaka Friday', is dedicated to the revolutionary women of Sudan.
A 22-year-old protester who wished not to be named recounted the events of July 6's 'Outcasts Friday' at the Wad Nubawi mosque in Omdurman to Think Africa Press. "Right after the prayers we started chanting inside the mosque" he explained, "then we made our way into the big yard in front of the mosque.
Government response
Since the start of the demonstrations four weeks ago, security forces have arrested and detained thousands of protesters and activists to date. And reports suggest that behind the doors of the National Intelligence and Security Service's notorious "ghost houses", beatings, interrogations, and food and sleep deprivation are not unusual.
Maha El-Sanosi is a freelance writer and blogger based in Sudan. Follow her on twitter @MimzicalMimz
| http://allafrica.com/stories/201207131268.html | dclm-gs1-038000000 |
0.041048 | <urn:uuid:db5aef12-8d9d-4f4f-b30c-f17df8228f55> | en | 0.961419 | Ask MetaFilter questions tagged with paint Questions tagged with 'paint' at Ask MetaFilter. Fri, 28 Feb 2014 20:36:30 -0800 Fri, 28 Feb 2014 20:36:30 -0800 en-us 60 Best kind of paint/primer for a co-sleeper for a baby I've built a co-sleeper for our new-born infant (kind of like <a href="">this</a>). For reasons, I only had access to plywood and so that's what I made it out of. I'm now about ready to paint it, and have two questions in mind: since this is for a baby, I'd like 1) the paint to be non-toxic and 2) seal in whatever fumes the plywood might still be off-gassing. Does such a paint exist? Would I need to use a primer? Would milk paint achieve this goal? Any and all advice would be greatly appreciated.,2014:site.257959 Fri, 28 Feb 2014 20:36:30 -0800 low_VOCs non-toxic paint AwkwardPause Painting the inside of glass that will have liquid in it Is there any way to paint or otherwise color the inside of a glass spray bottle that will have liquid (perfume) in it?,2014:site.257611 Sun, 23 Feb 2014 06:40:46 -0800 bottles diy glass paint ferdinandcc Auto Body Paint Recommendations in Toronto I'm gearing up to sell my car in Toronto and I'd like to get a fresh paint job. Or, at least, touch up the spots that are showing wear due to rust near the rear wheels and some white paint (on a red car) from bumping into the pillar in my parking space a couple of times. Note: I don't actually want to do body repair, just paint (I'm not trying to conceal the dings in the body, just to freshen up the look). Have any GTA Mefites had work like this done at a place they would recommend? I live downtown, but don't mind traveling to the 905 for good, affordable work. Thanks in advance for any recommendations.,2014:site.256202 Wed, 29 Jan 2014 17:53:05 -0800 auto paint repair toronto dry white toast Help me paint my bathroom I have a bathroom that has had some serious moisture issues over the years. I recently installed an exhaust fan and that's mitigated the problem somewhat. My big issue is this: the wall paint (semi-gloss latex) is peeling off where the wall and tile meet. It started bubbling up here and there and I made the mistake of pulling on a little piece today and the paint came off like peeling an orange. I need to repaint several of the walls in the bathroom while trying to prevent the paint from peeling off again. How do I seal the walls or at least where the wall and the tiles come together to keep the moisture out? Several years ago I removed some awful wall paper in the bathroom and used joint compound mixed with water to fill holes and apply a texture to the walls that matched the old horse hair plaster walls in the rest of the house. Was the joint compound a bad idea?,2014:site.256007 Sun, 26 Jan 2014 16:19:18 -0800 bathroom home improvement moisture paint tile wall photoslob Paint over fresh stain? We have double-glazed wooden oak windows on our house. Due to a combination of language barrier and over-helpfulness, the nice man painting bits in my house has just taken it upon himself to re-stain the exteriors. I actually want them painted white. He says he'll just paint them tomorrow but surely you can't just.... paint white over fresh stain? Won't it bleed through or discolour?,2014:site.255463 Fri, 17 Jan 2014 05:53:55 -0800 fuck paint resolved DarlingBri Stuck on you What is the best way to clean and remove the remnants of vines that have been stuck to my garage wall for years in preperation for a paint job? The little nubs that remain after the vines have been pulled away.,2013:site.254343 Fri, 27 Dec 2013 08:46:22 -0800 garage garden paint vines silsurf How to make light floors and dark furnishings work? It's time to paint the living room. Problem: we have light wood floors with dark furnishings and my SO wants to keep the room "light and airy" whereas I would do anything to avoid white or eggshell walls and keep pushing for colors he says are "too dark and claustrophobic". What color scheme can we both agree on to really tie the room together? Photos of the unpainted living room<a href=""> here</a>. Were also not adverse to wallpaper as we plan on staying here (and with these furnishings) for a Long Time.,2013:site.254042 Fri, 20 Dec 2013 10:22:41 -0800 color design home housing interiordecor paint room scheme wall The Whelk Best paint to use for a portrait on a toaster oven? A coworker of mine often complains that we do not have a toaster in the office. I have an unused one, and would like to paint her portrait on it as a humorous secret-santa gift for our office xmas party. I like to work with acrylics and india ink, but am afraid that they will peel off when they get hot. What paint/technique do you think will work best?,2013:site.252698 Wed, 27 Nov 2013 08:52:54 -0800 acryllic art craft oven paint spraypaint toaster DaveZ Car-appy paint job We have a 97 Jeep Cherokee, which has two flaws (according to my wife, who is the primary driver). One is the paint job, which is typical for a car of this age- many little scratches and dings from rocks and such, and the other is the headliner (the ceiling fabric), which is descending. We can't afford (nor is the car worth imho), a new paint job, and the headliner issue just makes me shake my...head. Anyway, I was hoping to DIY one or both of these things while I have access to the car between Thanksgiving and Christmas. Any suggestions? The paint color is a dark blue, which has kind of a purple hue at some angles. It's not red, thank the gods, so it doesn't look 'chalky', more just old, and with the aforementioned scratches and dings. The headliner is light gray, and has pretty well given up the ghost in the past 6 months, so it is attached at the edges, but kind of balloons down. <br> I've read some older AskMe posts on the headliner thing, but wondered if there was any newer information that might help. Thanks in advance Mefi Mechanics!,2013:site.252528 Sun, 24 Nov 2013 13:02:23 -0800 car headliner paint resolved PlantGoddess Scraping/Painting an Old House With Layers of Lead Paint The exterior of my 100 year old house (dutch colonial) is a mess: layers of paint atop paint. Nobody's ever scraped because there's obviously lead in there. So at this point, it's a gunky, peeling mess. And I don't want to resort to siding. I got one estimate to scrape (in full-out hazmat suits and containment set-ups, etc) and paint for $25K. Yeow! I don't want to make anyone sick - not the painters, nor the kids in the nabe - I really don't. Are there less expensive options?,2013:site.252472 Sat, 23 Nov 2013 09:20:19 -0800 lead paint scrape Quisp Lover I can't paint, but I want to make some paintings. I want to make some paintings that basically look like <a href="">this</a>--basically some flat fields of hopefully compatible colors on canvas. I don't care if what I make is real art, I mainly just want to add some color to the room. I went to the craft store and was kind of confused by all the different options for paint. Let's just assume I pick a set of colors I like -- what do I need to buy to make the painting, other than a canvas? What kind of paints, which colors, what kind of brush, what else do I need? How do I mix the colors? I'm not under any illusions that I'm going to make anything good, I just want to get some colors down on canvas in a hopefully appealing way. If I picked a palate from a site like colourlovers, is there a way to order the paints premixed in those colors or what that be a bad idea?,2013:site.251381 Mon, 04 Nov 2013 20:58:48 -0800 art crafts decoration homedeco paint painting empath What's the best paint color on my wall? I'm horrible at color matching and I envy the HGTV shows that color board everything so you can see what it looks like ahead of time. I've just finished decorating my living room with a couch and I think the walls are too bare. Should I do an accent wall or some wall pattern? <a href="">Here are some photos of the room</a>.<br> <br> The last of the 3 photos is how it looks right now with the new rug. Any suggestions on wall color?,2013:site.250296 Tue, 15 Oct 2013 18:02:50 -0800 color paint wall pikaboy202 What Color Should I Paint This Room? I need some suggestions for a paint color for our sunroom. There is lots of light, a wood floor with medium tones and the furniture we have out there is brown and an orangish rust color. The rest of the house is mostly neutral, but we can go with a bold color if it would work well.,2013:site.248022 Fri, 06 Sep 2013 13:35:47 -0800 color homedecor paint resolved Nickel Pickle What's the toughest nail polish? Looking to cover a logo on a suitcase My suitcase has logos on it. They're small, but I'd like to obscure them to lower my likelihood of being victimized. Examples <a href="">are here</a>. It looks like there's a small dollop of clear, rubbery, plastic that covers them - to protect logo. I was thinking of buying some black nail polish, and painting over them. Nail polish is supposed to be durable right? However, I've never had to buy nail polish before. Questions: 1. Is nail polish the right product for this? 2. Which brand / type should I get? Are there ones that are more durable than others?,2013:site.247711 Sun, 01 Sep 2013 17:42:45 -0800 luggage nailpolish paint StrictlyVague Chalkboard-painting a stainless steel refrigerator: possible? Can I paint my stainless steel fridge with chalkboard paint? I've found lots of tutorials on how to do it with a regular white fridge (whatever those are made of) but nothing on stainless. Should I try to sand it? Do I need primer? Please advise. I've been thinking of replacing it anyway, because my adorable 1922 house is not a "stainless steel appliances" kind of house. But the fridge works just fine and it seems silly to get rid of it just because I don't like how it looks. So...chalkboard paint! Fun?,2013:site.247697 Sun, 01 Sep 2013 12:48:07 -0800 appliances chalkboard chalkboardpaint diy interiordesign paint painting redecorating refrigerator resolved exceptinsects How to paint all sides of small wooden things I've got some small wooden pieces (from a board game) that I'd like to paint a different color. I'm unsure of how to accomplish this. There are too many to realistically hand-paint. The pieces don't weigh much and if I spray paint them, they're going to tumble around and end up with some paint on the bottom. (That means that they'll probably stick to whatever surface I try to dry them on). Same goes for dipping them in paint - I'm not sure how would I dry them afterwards. I feel like there has to be some ingenious solution that I'm just not thinking of. Any suggestions would be much appreciated!,2013:site.246824 Sat, 17 Aug 2013 08:10:16 -0800 diy paint smallparts spraypaint chrisamiller It isn't easy painting green. How do you paint a stainless steel ring? I bought <a href="">this</a> shamrock ring with the intent of painting the shamrocks green. Now that I have the ring, it isn't working. Every attempt, thus far, has ended with green blobs instead of shamrocks.<br> <br> I am not looking to buy another ring.<br> I am not willing to spend more than $20 on this.<br> <br> What's the easiest way to color the shamrocks green?<br> What's the best way to color the shamrocks green?,2013:site.246382 Sat, 10 Aug 2013 07:32:52 -0800 jewelry paint painting ring stainlesssteel zinon Exterior paint removal question: MILD EMERGENCY Exterior paint removal question: MILD EMERGENCY Hi all-<br> <br> So, I've been scraping the old paint off the house for about two weeks. I expected this to not take so long. I have three walls where basically the whole thing needs to be stripped - they are covered in peeling paint. I need a machine's help before I scrape the whole thing with a 5 in 1 painters tool.<br> <br> Here's what has kinda worked:<br> <br> -orbital sander with 120 grit paper (80 grit and the type that feels like a scrubby pad did nothing) - but there must be something stronger<br> -a hitachi disc angle grinder (it takes the paint off but leaves valleys in the wood)<br> <br> Is there some tool in between these two which I can use? There is so much paint to take off and I'm running out of time to get the old paint off and finish up (about a week and a half left).<br> <br> Thanks in advance!,2013:site.246234 Wed, 07 Aug 2013 16:52:14 -0800 house paint painting power removal tools ashtabula to opelika Did I just kill this bag? I just got paint all over a Filson field bag. Do I have any chance whatsoever of cleaning it? They're painting the hallways at my job. There was an accident. The bag is canvas and according to the painter, the paint is water-based. Most of it did seem to come off in the sink, but there's still a good amount on there. Am I screwed?,2013:site.245389 Thu, 25 Jul 2013 12:03:03 -0800 canvas cleaning paint Venadium How to fix this flooded kitchen floor? Bought this house about three years ago and then learned that the water pipes, under the concrete-terrazzo slab, had burst and flooded the place (no, incompetent inspector did not notice this). The previous owner had then laid down an inexpensive woodlike floor. That was carelessly done but looked okay overall, except that residual water had stained and darkened a few areas. I had the house re-piped and the floor seemed to have dried and healed leaving just those few dark spots. But recently, the HVAC drain clogged, and did a bit more flooding and although that too is now fixed, the kitchen's woodlike floor has buckled some and the stains have spread. It looks pretty crappy. I'll have it all inspected again and be sure it's finally repaired, but now the question is what to do about the ugly floor? <br><br> I intend to sell the house soon so want it to look good, and want to be able to fully disclose this history, but want to minimize further investment within reason and ethical boundaries. I could tear out the woodlike floor in the kitchen only, and then tile that room. But that's work. And pricey. I'm thinking of painting it. Some kind of epoxy? <br><br> What would you suggest? Something waterproof against normal kitchen spillage, something rather glossy but not slick to walk on. The kitchen is black tile, white walls and cabinets, stainless steel appliances. Was thinking black floor, but this is Florida and fear it will be too dark--although the gloss would help bounce light. <br><br> Suggestions for colors, materials, methods, cautions or other, alternative ideas? <br><br> Thanks so much.,2013:site.245127 Sun, 21 Jul 2013 13:19:36 -0800 home kitchen paint renovation repair tile fivesavagepalms Old house - trying to fix up dirty moldy medicine cabinet Just moved into a rental house. House built circa 1920. Medicine cabinet interior was completely lined with nasty old contact paper. I pulled off most of the paper. Now I'm worried about three things: 1. The paint underneath the paper is flaking. Is there danger of lead poisoning? 2. Black mold in the corner crevices under the paper. What's the best chemical for removal? Bleach solution? 3. What's the easiest cheapest way to get new shelves that will fit? <a href="">PHOTOS.</a> Any advice or encouragement is appreciated. How do I make this cabinet clean and functional? <whine>I don't like fixing old houses. Unfortunately there is much to do in this old house. The kitchen is a contact paper festival. The rental market is tight here, so landlords don't have to care.</whine>,2013:site.245101 Sat, 20 Jul 2013 19:46:18 -0800 diy home house lead mold paint repair resolved valannc Painted tile floor - something to paint on for a durable finish? My wife and I are redoing a powder room that had some hideous tiles on the floor. We have neither the time nor the money to redo the tiles, so we've decided to paint over them in a semi-gloss white. It looks fantastic, but we realize now that it could be easily dirtied or scuffed and we're wondering if there's some kind of finish or lacquer that we can put on it to make sure that it's more durable - easily cleaned, more scratch resistant.<br> <br> Help?,2013:site.245064 Sat, 20 Jul 2013 09:51:10 -0800 floor paint fso "Old Reliable" by Sherwin Williams Can someone recommend a specific pleasant white-ish or neutral shade of paint that I can use on my walls repeatedly for like, forever? I'm looking for a basic white/neutral shade that I can paint various rooms and hallways that are not otherwise an actual color. We have only painted a few rooms selected colors, and for the rest, I think I'd like to go with "white". <br> <br> I'm hoping I can find something like 'Sherman Williams - Linen' (I made that up; also it doesn't actually have to be Sherman Williams) that will be around for years to come so that five years from now, I can decide to paint a room the exact same white (it doesn't have to be 100% the same -- 90% the same is good enough.) <br> <br> I'd like a white that's a little on the warmer side, maybe a bit more cream-colored. Parts of the house are extremely bright and if it's too white-white it'll be like having a near-death experience in an Apple store.,2013:site.240515 Tue, 07 May 2013 08:10:47 -0800 color decorating neutrals paint walls white A Terrible Llama The company located next to my house won't stop spraying paint fumes. The company located next my house sprays noxious paint fumes into the air and my yard. Despite years of trying to get them to stop, they haven't. What are the next steps to take? My significant other and I have been renting a house for several years that we love. It's wonderful. The rent is cheap, the place is beautiful, and we don't want to move. However, there is one big thing that sucks, and that is our neighbor. Our house is next to an industrial-zoned area, and one of our closest neighbors (a couple lots away) is a company that creates industrial metal products (don't want to get too specific in case we pursue legal action.) Every day, including on the weekends, they spray paint outdoors. You can hear the paint sprayers, but the issue is the constant presence of paint fumes. We can't use our yard because it stinks like paint. We can't open the windows in our home on the side that faces their building. We are afraid to plant food in our garden. We're worried about our health. <br> <br> We looked up our city's zoning code, and it clearly states in several places that a company in an industrial zone like theirs cannot create fumes or any sort of health hazard that affects nearby residents. A few years ago, we had the city investigate, and they found that the company was violating city code in many ways. However, since then, every time I ask the city for an update, there is always some song and dance about how they are "working on it" and I don't get much more than that. In the meantime, the paint spraying continues. <br> <br> We tried to be neighborly and approached the company, but we didn't get much more than a shrug and a "sorry, it's our business" type of response. I also called the county last year and had them come out to do an air inspection. They inspected and their response was that the company was technically under the legal level of air toxins/emissions/whatever, but the inspector also leveled with me and was like yeah, it's probably not good to be breathing that in. I also approached our landlord (who lives out of town), and while he was kind of like "yeah, that's bad", he's pretty hands-off and I'm not sure I can get him to get gung-ho on this issue.<br> <br> I'm so frustrated. We're not in a situation right now where we want to move - it would be a huge pain in the butt and an unneeded financial hit. As I said, everything else about the house is amazing. What would you do in my situation? Should we hire a lawyer? Or should we just suck it up and get an air filter and never open our windows again?,2013:site.240103 Tue, 30 Apr 2013 09:02:45 -0800 air citycode neighbors paint pollution zoning Anonymous Are there alternatives to Coolwall Paint? How much are we talking (in L? I had someone through Costco come out to our house to give a quote on painting the house with Coolwall paint. It wasn't a quote just for the paint, but for all the prep work, repairs in our stucco, and the trim. We don't live in a large house--it's less than 1,400 square feet. He extolled the benefits of this paint. It's highly reflective and thus reduces damage to the paint, and also keeps the house cooler in the summer. The way the guy went on about it, it's a miracle product. He quoted $18,600 to prep and paint our house with this stuff. Again, it's through Costco and has a lifetime warranty. And they don't strip off the existing paint or stucco--they repair it, bond it, and paint right over it. Are there similar alternatives that would cost much less? Costco stuff is good, and I trust it. But $18,600? I want what he's smoking. But one of the things that made it attractive versus regular house-painting was that they wouldn't remove the old paint--which he claims costs about $1,000 for lead abatement.<br> <br> So I ask you--are there reflective, high quality alternatives? Can we get the house painted without removing the old stuff (ie. bonding and painting over it)?<br> <br> How much for a really nice professionally-applied paint job?,2013:site.239148 Sun, 14 Apr 2013 16:12:58 -0800 contractor costco house housepaint paint rybreadmed | http://ask.metafilter.com/tags/paint/rss | dclm-gs1-038040000 |
0.226058 | <urn:uuid:9dbb9b5a-28d0-4506-b795-1533626f3832> | en | 0.971213 | Max (avatraxiom) wrote,
How Not To Get Hired
So, I recently posted a job on (which, by the way, I highly recommend if you're looking for Perl programmers) and a few other places. One of the things that the posting asks for is a code sample--one that they consider to be well-written. Reading these has been a very interesting experience, and I thought that perhaps some of you might find it enlightening (or amusing) to know what particular things will make me immediately discard somebody's application:
• If somebody doesn't submit a code sample at all, that's a very easy "no." If somebody can't follow a simple instruction like that (which is very clear in the job posting), then imagine trying to communicate client requirements to them!
Some people have the problem that they always wrote proprietary code and they don't have the code available now to send. Okay, I understand that. But that also means that you've never written Perl for any personal project, and never contributed to any open-source project, neither of which are good indicators. (This is a good reason to work on open-source, by the way--it'll get you code samples that you can show prospective employers, later.)
• The very first thing I will notice in a piece of code is bad indentation or no indentation. If your code has no indentation or the indentation varies all over the place (or you mix spaces and tabs), I'll just toss it immediately. It could be the most amazing code in existence, but who cares? I have about two minutes to read your code, and if I can't read it easily, I just won't read it at all.
• Send me any code that doesn't "use strict", and it will go into the garbage. This is 2008. Perl 5 came out in 1995 people. Let's get with the picture, here. I don't care if somebody doesn't "use strict" in their little personal projects, but I ask people for a code sample that they consider well-written. If someone thinks that a lot of undeclared globals make for good code, then I don't really want them writing for my clients.
• If you name local variables things like $A and $B.... I don't think I have to explain this one. Reading the perlstyle manpage is not such a bad thing to do.
• If you write a few long comments without any punctuation, grammar, or complete sentences, then that's what I expect you're going to do when writing code for clients. I understand that some people don't speak English as their native language, but from what I've seen, the problem is more likely that the coder doesn't care or is a native speaker but doesn't have the requisite command of English to actually communicate sensibly.
• Don't print out a bunch of HTML in your Perl code, please. Just use templates. That's what they're there for. There's like, a zillion templating languages available for Perl, and it's really not that hard to use them. The Bugzilla Project put a lot of effort into moving to templates many years ago, because templates are a good idea.
• By and large, I'll discard anything that doesn't use at least some sort of object-oriented principles. There are ways to write good, structured code that aren't OO, but they're not that common, particularly in Perl.
• SQL that doesn't use placeholders makes me suspect that either you're not that familiar with DBI or you're traditionally a PHP coder. If you're at least inserting things with $dbh->quote, that's good, but given the number of applicants that I'm getting, it's not good enough.
• Even if your code is good, if you're re-inventing the wheel, that makes me suspect that you'll do the same when I give you work. I want my engineers to use the CPAN modules and great open-source software that already exists, not re-write their own webserver or something else like that.
• Using features correctly is good, mis-using them is bad. For example, I love to see POD in modules, but please use it standardly. There are ways to make lists of items (=over and =item)--if you want to make a list of items, that's what you should be using.
Also, some people are clearly spamming every job posting that they find--they have no cover letter to speak of, they don't respond to any of the specifics in the posting, and they attach no code sample. Maybe they think they're improving their chances by emailing everyone, but it's just spam--the chances are that it will be deleted without your resume being read, really.
Now, just to balance things out, there are a few things that I really like to see:
• Use Moose! This tells me that you're up on the latest developments in the Perl world, and that you probably have some good grasp of CPAN.
• Write POD for your modules. It's nice when people care enough about their code to document it properly.
• Correctly use CPAN modules, particularly modern ones.
• Use taint mode in your CGI scripts. Most people don't send me CGI scripts, but if you do, it's nice to see that you care about security. And Bugzilla uses taint mode, so it's cool to see that people can use it correctly.
Really, I want to see that people care about their code. This is professional development, not just local sysadmin Perl hacks. And anyhow, you're sending your code to me--and I put a lot of care into even my local sysadmin Perl hacks. Probably the hackiest thing I ever contributed to Bugzilla was, and it's still better than most of the code that people send me.
Tags: perl, tech
• Post a new comment
Anonymous comments are disabled in this journal
default userpic
Your reply will be screened
Your IP address will be recorded | http://avatraxiom.livejournal.com/95669.html | dclm-gs1-038080000 |
0.12141 | <urn:uuid:9401364d-f512-48f8-80ef-a42ff139f34b> | en | 0.974122 | Tracking Every Signing
Grading Biggest Deals
With Braylon Edwards DWI, Is NFL a Reflection of Society and Lowered Morals?
Use your ← → (arrow) keys to browse more stories
It seems that every day we are reading about this athlete or that athlete, about this celebrity or that celebrity, who either pushes the envelope or goes way outside the envelope, with unacceptable and at times illegal behavior.
Currently, Braylon Edwards of the New York Jets brought upon himself a situation that he never should have placed himself in. He was arrested for DUI Tuesday morning, and I do mean morning. It was somewhere between midnight and 6 AM.
My first question is—and I do understand that he is a grown man—what is he doing out at that hour when he should be sleeping and getting ready to do his job? Edwards' job is to catch footballs for the NY Jets, and he is paid rather well.
Moreover, I do fully understand that he is young, playing and living in the greatest city, but he needs to exercise a modicum of common sense and better judgment.
Furthermore, Edwards' passengers included D'Brickashaw Ferguson and Vernon Gholston, along with two friends coming from a party. Was there any common sense employed here by any of the passengers...I THINK NOT!!!!
Imagine what would have happened if Edwards caused an accident injuring others, or an accident resulting in a fatality? I cannot imagine the outcome and results. This action is contemptible and cannot be excused.
Braylon Edwards, when he was with the Cleveland Browns, was a witness to what can occur when someone does not use their gray matter. Does the name Donte' Stallworth mean anything? Arrested for DUI, convicted of the manslaughter of a family man, and spent 30 days in jail. THIRTY DAYS!!!
If a common man was involved in a similar circumstance, the authorities would throw away the key. Celebrity does have its perks.
As I said, his actions cannot be excused. The NFL has a program to prevent this. Why did Braylon choose not to use a program he is contributing to? He thought he was above it all.
At this point in time, the only punishment the NY Jets can hand out is not to start him this Sunday against the Miami Dolphins. What kind of message is that sending? The NFL is replete with offenders. The punishment doled out to NFL players borders on ridiculous.
Michael Vick murdered dogs. He is playing again. Ben Roethlisberger faced allegations of sexual assault and was suspended six...oops, I mean four games. He will be playing soon. Rae Carruth is in jail for conspiracy to commit the murder of his girlfriend, the mother of his children. He can possibly be released in 2018.
Finally, the dumbest of all, Plaxico Burress. No need to go into detail on this clown. They all have broken the law, and their celebrity saved them.
The lack of common sense spills into all aspects of society. Paris Hilton can play in the NFL. Tom Sizemore can play in the NFL. Mel Gibson can play in the NFL. Lindsay Lohan can play both sides of the ball in the NFL. Amy Winehouse can play football/soccer in England.
The list can go on and on, but again, these celebrities had their celebrity save their bacon. The worse part is that people actually look up to these "stars" as role models. Pathetic.
As I grew up, I had hero worship of professional athletes. Some of my favorites included Jean Potvin of the New York Islanders, Ken Boswell of the New York Mets, and Joe Namath of the New York Jets. Over the course of time, I came to realize that athletes are people also and can make mistakes. However, their mistakes hurt people, and not in the physical sense.
When I read Jim Bouton's book Ball Four, it really opened my eyes. Nonetheless, I had the opportunity to meet, at some point, each of the aforementioned people, and I can tell you, my hero worship with Potvin, Boswell, and Namath is still very much intact.
I have great admiration for a number of today's athletes. The sad thing is that a minority ruins it for the majority. I can only imagine what is going on with Jets management and the image they are attempting to project. Braylon Edwards almost sank and torched the Jets faster than President Kennedy's PT-109.
An apology and losing his starting position for one day is not enough. I am not asking for an execution, but a suitable punishment and suspension, along with a substantial fine, is going in the right direction.
Edwards should be absolutely ashamed of himself, as should Ferguson and Gholston for not stopping him. They are also culpable for not thinking and hurting the New York Jets franchise and insulting the Jets fan, of which I am. A professional athlete is not indestructible, and neither is the "common man."
Enough is enough. They should be made to pay back society for their actions. Give the "common man" a break. We deserve it.
Load More Stories
Follow New York Jets from B/R on Facebook
New York Jets
Subscribe Now
We will never share your email address
Thanks for signing up. | http://bleacherreport.com/articles/471052-is-the-nfl-a-reflection-of-society-and-lowered-morales | dclm-gs1-038140000 |
0.020364 | <urn:uuid:cccfd6e4-5cf9-4df6-b1ef-d68e47fd9cc8> | en | 0.745483 | From Wikipedia, the free encyclopedia - View original article
Jump to: navigation, search
Human colostrum
Newborns have very immature digestive systems, and colostrum delivers its nutrients in a very concentrated low-volume form. It has a mild laxative effect, encouraging the passing of the baby's first stool, which is called meconium. This clears excess bilirubin, a waste-product of dead red blood cells, which is produced in large quantities at birth due to blood volume reduction, from the infant's body and helps prevent jaundice. Colostrum is known to contain antibodies called immunoglobulins such as IgA, IgG, and IgM in mammals. IgA is absorbed through the intestinal epithelium, travels through the blood, and is secreted onto other Type 1 mucosal surfaces. These are the major components of the adaptive immune system. Other immune components of colostrum include the major components of the innate immune system, such as lactoferrin,[4] lysozyme,[5] lactoperoxidase,[6] complement,[7] and proline-rich polypeptides (PRP).[8] A number of cytokines (small messenger peptides that control the functioning of the immune system) are found in colostrum as well,[9] including interleukins,[9] tumor necrosis factor,[10] chemokines,[11] and others. Colostrum also contains a number of growth factors, such as insulin-like growth factors I,[12] and II,[13] transforming growth factors alpha,[14] beta 1 and beta 2,[15][16] fibroblast growth factors,[17] epidermal growth factor,[18] granulocyte-macrophage-stimulating growth factor,[19] platelet-derived growth factor,[19] vascular endothelial growth factor,[20] and colony-stimulating factor-1.[21]
Colostrum is very rich in proteins, vitamin A, and sodium chloride, but contains lower amounts of carbohydrates, lipids, and potassium than normal milk. The most pertinent bioactive components in colostrum are growth factors and antimicrobial factors. The antibodies in colostrum provide passive immunity, while growth factors stimulate the development of the gut. They are passed to the neonate and provide the first protection against pathogens.
In animal husbandry
Bovine colostrum is produced by cows for their newborn calves. In many dairy cow herds the calves are not permitted to nurse; rather, they are fed colostrum from a bottle or by stomach tube and later milk from a bottle then a bucket.
Human consumption of bovine colostrum
Solidified Colostrum in a sweet stall, Salem, Tamil Nadu.
Assertions that colostrum consumption is of human benefit are questionable because most ingredients undergo digestion in the adult stomach, including antibodies and all other proteins. Bovine colostrum and its components are safe for human consumption, except in the context of intolerance or allergy to lactose or other components. It shows promise in the treatment or prevention of a variety of diseases.[24][25][26]
Bovine colostrum from pasture-fed cows contains immunoglobulins specific to many human pathogens, including Escherichia coli, Cryptosporidium parvum, Shigella flexneri, Salmonella, Staphylococcus,[27] and rotavirus (which causes diarrhea in infants). Before the development of antibiotics, colostrum was the main source of immunoglobulins used to fight infections. In fact, when Albert Sabin made his first oral vaccine against polio, the immunoglobulin he used came from bovine colostrum.[28] When antibiotics began to appear, interest in colostrum waned, but, now that antibiotic-resistant strains of pathogens have developed, interest is once again returning to natural alternatives to antibiotics, namely, colostrum.[29]
Some athletes have used colostrum in an attempt to improve their performance[30] decrease recovery time,[31] and prevent sickness during peak performance levels.[32][33] Thus, supplementation with bovine colostrum (20 g/d) in combination with exercise training for 8 wk may increase bone-free lean body mass in active men and women.[30][34]
Low IGF-1 levels may be associated with dementia in the very elderly, although causation has not been established.[35] People with eating disorders also have low levels of IGF-1 due to malnutrition,[36] as do obese individuals.[37] Supplementation with colostrum, which is rich in IGF-1, can be a useful part of a weight reduction program.[citation needed] Although IGF-1 is not absorbed intact by the body, it does stimulate the production of IGF-1 when taken as a supplement.[38]
Colostrum also has antioxidant components, such as lactoferrin[39] and hemopexin, which binds free heme in the body.[40]
Hyperimmune colostrum
Proline-rich Polypeptides (PRP)
These small immune signaling peptides were independently discovered in colostrum and other sources, such as blood plasma, in the United States,[42] and Poland.[43] Hence they appear under various names in the literature, including Colostrinin, CLN, transfer factor and PRP. They function as signal transducing molecules that have the unique effect of modulating the immune system, turning it up when the body comes under attack from pathogens or other disease agents, and damping it when the danger is eliminated or neutralized.[44] At first thought to actually transfer immunity from one immune system to another, it now appears that PRP simply stimulates cell-mediated immunity.[45]
A 2006 study published in the Journal of Experimental Therapeutics and Oncology indicated that PRP may have an impact on the aging process by reducing the spontaneous or induced mutation frequency in the DNA of cells.[46] Such DNA damage is implicated in the general process of aging. The study, which was performed in both hamster and human cells, looked at the impact of PRP on the frequency of defined DNA mutations in these cells as they occur naturally and when induced by various known chemical or physical agents. In cells stressed oxidatively, PRP reduced the frequency of mutation induced by reactive oxygen species (ROS) to nearly background levels in a dose-dependent manner. It is suggested that the antimutagenic properties of PRP are achieved via multiple mechanisms - by decreasing intracellular levels of ROS and so preventing DNA damage and by increasing the efficiency of natural DNA repair mechanisms.
PRP-rich preparations from bovine colostrum have shown some activity against various diseases including viral infections[47] of herpes viruses[48] and HIV,[49] as well as difficult to treat bacterial and fungal infections like Mycobacterium fortuitum[50] and Mycobacterium tuberculosis[51] (cause of tuberculosis), cryptosporidosis in AIDS patients,[52] and candida.[53] Also for various forms of cancer, such as Hodgkin's disease,[54] osteogenic sarcoma,[55] prostate cancer,[56] and others. As an immune modulator, PRP is also effective in disease states characterized by an overactive immune system, such as allergies,[57][58] asthma,[59] and autoimmune diseases.[60]
PRP has some effect in neurodegenerative diseases, especially Alzheimer's disease,[61] but has not yet shown longterm disease retarding effect.[62] A placebo-controlled clinical trial in 106 people with Alzheimer’s over 30 weeks was completed in 2002 and the results appeared to demonstrate efficacy in a significant proportion of patients treated.[63] The results showed that approximately 40% of patients taking PRP were stabilized or improved after 15 weeks of therapy, based on an Analysis of Overall Response. 33% of patients continued to show stabilization or improvement after 30 weeks of treatment, although levels of benefit were slightly higher at the 15-week stage of the trial. The dosage regimen used for the trial was 100 micrograms of PRP administered every second day for three weeks followed by a two-week period without PRP.
There is one report of use in patients with intractable epilepsy.[64]
5. ^ Paulík S, Slanina L, Polácek M (January 1985). "[Lysozyme in the colostrum and blood of calves and dairy cows]" (in Slovak). Vet Med (Praha) 30 (1): 21–8. PMID 3918380.
23. ^ Venner M, Markus RG, Strutzberg-Minder K, Nogai K, Beyerbach M, Klug E (2008). "[Evaluation of immunoglobulin G concentration in colostrum of mares by ELISA, refractometry and colostrometry]" (in Germanfbf). Berliner Und Münchener Tierärztliche Wochenschrift 121 (1–2): 66–72. PMID 18277781.
38. ^ Mero, A.; Kähkönen, J.; Nykänen, T.; Parviainen, T.; Jokinen, I.; Takala, T.; Nikula, T.; Rasi, S. et al. (Aug 2002). "IGF-I, IgA, and IgG responses to bovine colostrum supplementation during training". J Appl Physiol 93 (2): 732–9. doi:10.1152/japplphysiol.00002.2002 (inactive 2009-11-22). PMID 12133885.
44. ^ Zimecki M (2008). "A proline-rich polypeptide from ovine colostrum: colostrinin with immunomodulatory activity". Adv. Exp. Med. Biol.. Advances in Experimental Medicine and Biology 606: 241–50. doi:10.1007/978-0-387-74087-4_9. ISBN 978-0-387-74086-7. PMID 18183932.
46. ^ Bacsi Attila; Aguilera-Aguirre Leopoldo; German Peter; Kruzel Marian L; Boldogh Istvan; Colostrinin decreases spontaneous and induced mutation frequencies at the hprt locus in Chinese hamster V79 cells, Journal of Experimental Therapeutics & Oncology 2006; 5(4):249-59.
47. ^ Khan A (February 1978). "Transfer factor in viral diseases". Lancet 1 (8059): 328–9. doi:10.1016/S0140-6736(78)90099-5. PMID 75363.
48. ^ Estrada-Parra S, Chávez-Sánchez R, Ondarza-Aguilera R et al. (1995). "Immunotherapy with transfer factor of recurrent herpes simplex type I". Arch. Med. Res. 26 Spec No: S87–92. PMID 8845664.
49. ^ Raise E, Guerra L, Viza D et al. (1996). "Preliminary results in HIV-1-infected patients treated with transfer factor (TF) and zidovudine (ZDV)". Biotherapy 9 (1–3): 49–54. doi:10.1007/BF02628656. PMID 8993757.
50. ^ Wilson GB, Metcalf JF, Fudenberg HH (May 1982). "Treatment of Mycobacterium fortuitum pulmonary infection with "transfer factor" (TF): new methodology for evaluating TF potency and predicting clinical response". Clin. Immunol. Immunopathol. 23 (2): 478–91. doi:10.1016/0090-1229(82)90132-5. PMID 7049471.
51. ^ Fabre RA, Pérez TM, Aguilar LD et al. (May 2004). "Transfer factors as immunotherapy and supplement of chemotherapy in experimental pulmonary tuberculosis". Clin. Exp. Immunol. 136 (2): 215–23. doi:10.1111/j.1365-2249.2004.02454.x. PMC 1809022. PMID 15086383. //
52. ^ Louie E, Borkowsky W, Klesius PH et al. (September 1987). "Treatment of cryptosporidiosis with oral bovine transfer factor". Clin. Immunol. Immunopathol. 44 (3): 329–34. doi:10.1016/0090-1229(87)90077-8. PMID 3621678.
53. ^ Feigin RD, Shackelford PG, Eisen S, Spitler LE, Pickering LK, Anderson DC (January 1974). "Treatment of mucocutaneous candidasis with transfer factor". Pediatrics 53 (1): 63–70. PMID 4588132.
54. ^ Phillips J, Boiucheix C, Pizza G, Sartorio C, Viza D (March 1978). "Effect of in vitro produced transfer factor on Hodgkin patients". Br. J. Haematol. 38 (3): 430–1. doi:10.1111/j.1365-2141.1978.tb01066.x. PMID 76476.
55. ^ Levin AS, Byers VS, Fudenberg HH et al. (March 1975). "Osteogenic sarcoma. Immunologic parameters before and during immunotherapy with tumor-specific transfer factor". J. Clin. Invest. 55 (3): 487–99. doi:10.1172/JCI107955. PMC 301776. PMID 1078826. //
56. ^ Pizza G, De Vinci C, Cuzzocrea D et al. (1996). "A preliminary report on the use of transfer factor for treating stage D3 hormone-unresponsive metastatic prostate cancer". Biotherapy 9 (1–3): 123–32. doi:10.1007/BF02628669. PMID 8993770.
57. ^ Boldogh I, Aguilera-Aguirre L, Bacsi A, Choudhury BK, Saavedra-Molina A, Kruzel M (2008). "Colostrinin decreases hypersensitivity and allergic responses to common allergens". Int. Arch. Allergy Immunol. 146 (4): 298–306. doi:10.1159/000121464. PMID 18367843.
58. ^ Keech A (2008). "Peptide Immunotherapy: The Use of Bovine Colostrum Proline-Rich Polypeptides in Cytokine Modulation for the Alternative Relief of Allergic Symptoms". Journal of Allergy and Clinical Immunology 119 (1): S260–S260. doi:10.1016/j.jaci.2006.12.388.
59. ^ Khan A, Sellars W, Grater W et al. (April 1978). "The usefulness of transfer factor in asthma associated with frequent infections". Ann Allergy 40 (4): 229–32. PMID 345886.
60. ^ Lawrence HS (June 1965). "Transfer factor and autoimmune disease". Ann. N. Y. Acad. Sci. 124 (1): 56–60. doi:10.1111/j.1749-6632.1965.tb18942.x. PMID 4379060.
61. ^ Bilikiewicz A, Gaus W (February 2004). "Colostrinin (a naturally occurring, proline-rich, polypeptide mixture) in the treatment of Alzheimer's disease". J. Alzheimers Dis. 6 (1): 17–26. PMID 15004324.
62. ^ Robles A (2009). "Pharmacological Treatment of Alzheimer's Disease: Is it Progressing Adequately?". Open Neurol J 3: 27–44. doi:10.2174/1874205X00903010027. PMC 2684708. PMID 19461897. //
63. ^ A. Bilikiewicz; W. Gaus; Colostrinin (a naturally occurring proline-rich polypeptide mixture) in the treatment of Alzheimer’s disease, Journal of Alzheimer’s Disease 6 (2004) 17–26 17 IOS Press.
64. ^ Simko M, Mokrán V, Nyulassy S (April 1997). "[Immunomodulatory therapy of epilepsy with transfer factor]" (in Slovak). Bratisl Lek Listy 98 (4): 234–7. PMID 9264833.
External links | http://blekko.com/wiki/Colostrum?source=672620ff | dclm-gs1-038160000 |
0.126901 | <urn:uuid:6d78df37-6f4b-4e76-8d06-69c746d90854> | en | 0.8248 | Test steps are very important in manual testing because they provide the detailed semantics on how each test case is to be validated and ultimately completed. That said, if you consider most manual test cases will have several steps each and most organizations will have a number of test cases, this results in a large number of steps to manage. Copying and pasting from popular tools like Microsoft Excel and Notepad reduces the time needed to properly manage, compose, and translate steps.
The test steps control inside the test case work item supports bulk copying and pasting of data from a variety of data sources, including other test steps, Microsoft Excel, Notepad, or any other tool that is capable of copying tab-delimited data onto the clipboard.
Copying steps from other data sources
Copying steps from Microsoft Excel requires that you use only two columns in your table of steps: the first column will map to "Action” and the second column will map “Expected Result” in the test steps work item control. Copy the range of two-column rows that you want to insert to the clipboard and paste them using either the context menu or keyboard (Ctrl-V):
You can also copy steps from the test steps control and paste them into either other test cases, or other data sources. Select a range of rows in the test steps control and either copy with the keyboard (CTRL-C), or use the context menu to copy the steps. Notice they are rendered in notepad as readable TAB-delimited rows:
Pasting the text above into a new test case provides you the same user experience as when working with Microsoft Excel:
Ryan Vogrinec | http://blogs.msdn.com/b/vstsqualitytools/archive/2009/11/16/copy-paste-test-steps.aspx | dclm-gs1-038190000 |
0.092972 | <urn:uuid:963f53b7-1466-465a-b6c8-05881409a23a> | en | 0.972326 | dealsmorons from outer space/alien from la: midnight…
I've seen this DVD a few times recently in the $3 rack at Big Lots.
I would really recommend "Morons from Outer Space" its a great bit of British silliness. Also the Yanks are stupid too.
What if aliens landed on earth but they were just lost idiots on vacation in their RV? Everyone on earth would assume they were gods or rock stars etc. Fun Movie. Mel Smith is very funny. | http://deals.woot.com/deals/details/43a777ae-7d73-42dc-ac11-0ffcce0509e5/morons-from-outer-space-alien-from-la-midnight-movie-double-feature?sort=votes | dclm-gs1-038290000 |
0.11769 | <urn:uuid:e5c451b0-9539-47e7-86c7-55026f1c0f76> | en | 0.80132 | Drifter (floating device)
From Wikipedia, the free encyclopedia
Jump to: navigation, search
A drifter nicknamed holey sock. Typical sensors acquire air pressure, sea surface temperature, irradiance and CTD.
A drifter (also float) is an oceanographic device floating on the surface or at a given water depth to investigate ocean currents and other parameters like temperature or salinity. They are also called Lagrangian drifters since they follow the flow in a Lagrangian manner. The depth of drifter is defined by its neutral buoyancy. The device stops sinking when its buoyancy force is in equilibrium with its gravitational force.[1]
Construction principle[edit]
The major component of a drifter are hollow bodies that ensure flotation, underwater-sails to catch water currents, instruments (e.g., data collecting instruments, transmitters to transmit the collected data, and GPS devices), and waterproof containers for instruments.[2][3] Drifters are a hi-tech evolution of the ocean current analysis by means of drift bottles, which in their turn evolved from simple collection of data about messages in a bottle.
Drifters provide real-time information about ocean circulation. The data is a valuable input for weather forecasts as meteorological satellites can at maximum measure the sea surface temperature or the surface roughness of the world oceans, but it is not possible to look into the water column. Data from inside the ocean is helpful for hurricane prediction as well.
Drifters may also collect information about marine life, such as distribution of plankton.[2]
Different types[edit]
An Argo float
• ALACE (Autonomous Lagrange Circulation Explorer)[4]
• Argo float[5]
• PALACE (Profiling Autonomous Lagrange Circulation Explorer)
• Davis drifter[6]
• Polar Profiling Float
• SOFAR float[7]
• SOLO
• Swallow float
See also[edit]
1. ^ Budeus, Gereon. "Floats – free drifting underwater buoys". Alfred-Wegener-Institute for Polar- and Marine Research. Retrieved 2012-09-13.
2. ^ a b "Drifters"
3. ^ "Dissect a Drifter"
4. ^ [1]
5. ^ "Argo-float design". Retrieved 2012-09-17.
6. ^ [2]
7. ^ [3]
External links[edit] | http://en.wikipedia.org/wiki/Drifter_(floating_device) | dclm-gs1-038380000 |
0.144446 | <urn:uuid:5276d14f-9444-45d6-bd67-465c9c979b31> | en | 0.940999 | Movie projector
From Wikipedia, the free encyclopedia
Jump to: navigation, search
This article is concerned with technical aspects of moving film projection. For non-film movie projection, see digital cinema. For historical aspects, see the article history of cinema.
35 mm movie projector in operation.
The cinématographe Lumière in projection mode.
Simulation of a spinning zoopraxiscope
The first movie projector was the Zoopraxiscope, invented by British photographer Eadweard Muybridge in 1879. The zoopraxiscope projected images from rotating glass disks in rapid succession to give the impression of motion. The stop-motion images were initially painted onto the glass, as silhouettes. A second series of discs, made in 1892–94, used outline drawings printed onto the discs photographically, then colored by hand.[1]
A more sophisticated movie projector was invented by Frenchman Louis Le Prince while working in Leeds. In 1888 Le Prince took out a patent for a 16-lens device that combined a motion picture camera with a projector. In 1888, he used an updated version of his camera to film the first ever motion picture, the Roundhay Garden Scene. The pictures were privately exhibited in Hunslet.
The Lumière brothers invented the first successful movie projector. They made their first film, Sortie de l'usine Lumière de Lyon, in 1894, which was publicly screened at L'Eden, La Ciotat a year later. The first commercial, public screening of cinematographic films happened in Paris on 28 December 1895.[2] The cinematograph was also exhibited at the Paris Exhibition of 1900. At the Exhibition, films made by the Lumière Brothers were projected unto a large screen measuring 16 by 21 meters (approximately 52.5 x 69 feet).[3]
According to the theory of persistence of vision, the perceptual processes of the brain and the retina of the human eye retain an image for a brief moment of time. This theory is said to account for the illusion of motion which results when a series of film images is displayed in quick succession, rather than the perception of the individual frames in the series.
The frequency at which flicker becomes invisible is called the flicker fusion threshold, and is dependent on the level of illumination. Generally, the frame rate of 16 frames per second (frame/s) is regarded as the lowest frequency at which continuous motion is perceived by humans. (Interestingly this threshold varies across different species; a higher proportion of rod cells in the retina will create a higher threshold level.)
It is possible to view the black space between frames and the passing of the shutter by the following technique:
Close your eyelids, then periodically rapidly blink open and closed. If done fast enough you will be able to randomly "trap" the image between frames, or during shutter motion. This will not work with television due to the persistence of the phosphors nor with LCD or DLP light projectors due to the continuity of image, although certain color artifacts may appear with some digital projection technologies.
Silent films usually were not projected at constant speeds [1] but rather were varied throughout the show at the discretion of the projectionist, often with some notes provided by the distributor. Speeds ranged from about 18 frame/s on up - sometimes even faster than modern sound film speed (24 frame/s). Contrary to received opinion, 16 frame/s - though sometimes used as a camera shooting speed - was dangerously inadvisable for projection, due to the high risk of the nitrate-base prints catching fire in the projector. (A dramatic rendition of a nitrate print fire and its potentially devastating effects is famously found in Nuovo Cinema Paradiso, which revolves around the goings-on of a projectionist.)
Since the birth of sound film, virtually all film projectors in commercial movie theaters project at a constant speed of 24 frame/s. This speed was chosen for both financial and technical reasons. When Warner Bros. and Western Electric were trying to find the proper projection speed for the new sound pictures, Western Electric went to the Warner Theater in LA and noted the average speed at which films were projected there. They set that as the sound speed at which a satisfactory reproduction and amplification of sound could be conducted. There are some specialist formats (e.g. Showscan and Maxivision) which project at higher rates—60 frames/sec for Showscan and 48 for Maxivision. The Hobbit was shot at 48 frames/sec and projected at the higher frame rate at specially equipped theaters.
Principles of operation[edit]
35 mm Kinoton FP30ST movie projector, with parts labeled. (Click thumbnail for larger text.)
Projection elements[edit]
As in a slide projector there are essential optical elements:
Light source[edit]
Most lamp houses in a professional theatrical setting produce sufficient heat to burn the film should the film remain stationary for more than a fraction of a second. Because of this, care must be taken in inspecting a film so that it should not break in the gate and be damaged, particularly if it is flammable cellulose nitrate film stock.
Reflector and condenser lens[edit]
(Also spelled dowser.)
A metal or asbestos blade which cuts off light before it can get to the film. The douser is usually part of the lamphouse, and may be manually or automatically operated. Some projectors have a second, electrically controlled douser that is used for changeovers (sometimes called a "changeover douser" or "changeover shutter"). Some projectors have a third, mechanically controlled douser that automatically closes when the projector slows down (called a "fire shutter" or "fire douser"), to protect the film if the projector stops while the first douser is still open. Dousers protect the film when the lamp is on but the film is not moving, preventing the film from melting from prolonged exposure to the direct heat of the lamp. It also prevents the lens from scarring or cracking from excessive heat.
Film gate and single image[edit]
A single image of the series of images comprising the movie is positioned and held flat within an aperture called the gate. The gate also provides a slight amount of friction so that the film does not advance or retreat except when driven to advance the film to the next image.
A commonly held misconception is that film projection is simply a series of individual frames dragged very quickly past the projector's intense light source. This is not the case; if a roll of film were merely passed between the light source and the lens of the projector, all that would be visible on screen would be a continuous blurred series of images sliding from one edge to the other. It is the shutter that gives the illusion of one full frame being replaced exactly on top of another full frame. A rotating petal or gated cylindrical shutter interrupts the emitted light during the time the film is advanced to the next frame. The viewer does not see the transition, thus tricking the brain into believing a moving image is on screen. Modern shutters are designed with a flicker-rate of two times (48 Hz) or even sometimes three times (72 Hz) the frame rate of the film, so as to reduce the perception of screen flickering. (See Frame rate and Flicker fusion threshold.) Higher rate shutters are less light efficient, requiring more powerful light sources for the same light on screen.
Mechanical sequence when image is shown twice and then advanced.
Outer sprockets rotate continuously while the frame advance sprockets are controlled by the mechanism shown - a Geneva drive.
Imaging lens and aperture plate[edit]
Imaging lens Diastar of an Askania 35mm movie projector (focal length: 400 mm)
A projection objective with multiple optical elements directs the image of the film to a viewing screen (imaging lens). Imaging lenses also differ in aperture and focal length. Different lenses are used for different aspect ratios.
Viewing screen[edit]
In most cases this is a reflective surface which may be either aluminized (for high contrast in moderate ambient light) or a white surface with small glass beads (for high brilliance under dark conditions). Switchable projection screen can be switched between opaque and clear by a safe voltage under 36V AC and is viewable from both sides. In a commercial theater, the screen also has millions of very small, evenly spaced holes in order to allow the passage of sound from the speakers and subwoofer which often are directly behind it.
Film transport elements[edit]
Film supply and takeup[edit]
Two-reel system[edit]
The size of the reels can vary based on the projectors, but generally films are divided and distributed in reels of up to 2000 feet (610 m, about 22 minutes at 24 frames/sec). Some projectors can even accommodate up to 6000 feet (1,830 m), which minimizes the number of changeovers (see below) in a showing. Certain countries also divide their film reels up differently; Russian films, for example, often come on 1000-foot (305 m) reels, although it's likely that most projectionists working with changeovers would combine them into longer reels of at least 2000 feet (610 m), to minimize changeovers and also give sufficient time for threading and any possibly needed troubleshooting time.
Films are identified as "short subjects," taking one reel or less of film, "two-reelers," requiring two reels of film (such as some of the early Laurel & Hardy, 3 Stooges, and other comedies), and "features," which can take any number of reels (although most are limited to 1½ to 2 hours in length, enabling the theater to have multiple showings throughout the day and evening, each showing with a feature, commercials, and intermission to allow the audiences to change). In the "old days" (i.e., ca. 1930–1960), "going to the movies" meant seeing a short subject (a newsreel, short documentary, a "2-reeler," etc.), a cartoon, and the feature. Some theaters would have movie-based commercials for local businesses, and the state of New Jersey required showing a diagram of the theater showing all of the exits.
The first cue appears twelve feet (3.7 m) before the end of the program on the reel, equivalent to eight seconds at 24 frames/sec. This cue signals the projectionist to start the motor of the projector containing the next reel. After another ten and a half feet (3.2 m) of film is shown (seven seconds at 24 frames/sec), the changeover cue should appear, which signals the projectionist to actually make the changeover. When this second cue appears, the projectionist has one and a half feet (457 mm), or one second at 24 frame/s, to make the changeover. If it doesn't occur within one second, the tail leader of the reel coming to an end will be projected on the screen.
On some projectors, the operator would be alerted to the time for a change by a bell that operated when the feed reel rotation exceeded a certain speed (the feed reel rotates faster as the film is exhausted), or based on the diameter of the remaining film (Premier Changeover Indicator Pat. No. 411992), although many projectors do not have such an auditory system.
Once the changeover has been made, the projectionist unloads the full takeup reel from projector "A," moves the now-empty reel (that used to hold the film just unloaded) from the feed spindle to the takeup spindle, and loads reel #3 of the presentation on projector "A." When reel 2 on projector "B" is finished, the changeover switches the live show from projector "B" back to projector "A," and so on for the rest of the show.
Single reel system[edit]
Christie AW3 platter, BIG SKY Industries console, and Century SA projector.
There are two largely used single reel systems (also known as long-play systems) today: the tower system (vertical feed and takeup) and the platter system (non-rewinding; horizontal feed and takeup).
This system makes it possible to project a film multiple times without needing to rewind it. As the projectionist threads the projector for each showing, he transfers the payout unit from the empty platter to the full platter and the film then plays back onto the platter it came from. In the case of a double feature, each film plays from a full platter onto an empty platter, swapping positions on the platter stack throughout the day.
nonrewind in Royal - Malmo, Sweden.
Automation and the rise of the multiplex[edit]
Feed and extraction sprockets[edit]
Film loop[edit]
Film gate pressure plate[edit]
Intermittent mechanism[edit]
The intermittent mechanism can be constructed in different ways. For smaller gauge projectors (8 mm and 16 mm), a pawl mechanism engages the film's sprocket hole one side, or holes on each side. This pawl advances only when the film is to be moved to the next image. As the pawl retreats for the next cycle it is drawn back and does not engage the film. This is similar to the claw mechanism in a motion picture camera.
In 35 mm and 70 mm projectors, there usually is a special sprocket immediately underneath the pressure plate, known as the intermittent sprocket. Unlike all the other sprockets in the projector, which run continuously, the intermittent sprocket operates in tandem with the shutter, and only moves while the shutter is blocking the lamp, so that the motion of the film cannot be seen. It also moves in a discrete amount at a time, equal to the number of perforations that make up a frame (4 for 35 mm, 5 for 70 mm). The intermittent movement in these projectors is usually provided by a Geneva drive, also known as the Maltese Cross mechanism.
Types of projectors[edit]
8 mm[edit]
Long used for home movies before the video camera, this uses double sprocketed 16 mm film, which is run through the camera twice. The 16 mm film is then split lengthwise into two 8 mm pieces that are spliced to make a single projectable film with sprockets on one side.
Super 8[edit]
9.5 mm[edit]
Film format introduced by Pathé Frères in 1922 as part of the Pathé Baby amateur film system. It was conceived initially as an inexpensive format to provide copies of commercially made films to home users. The format uses a single, central perforation (sprocket hole) between each pair of frames, as opposed to 8 mm film which has perforations along one edge, and most other film formats which have perforations on each side of the image. It became very popular in Europe over the next few decades and is still used by a small number of enthusiasts today. Over 300,000 projectors were produced and sold mainly in France and England, and many commercial features were available in the format. In the sixties the last projectors of this format were being produced. The gauge is still alive today. 16mm projectors are converted to 9,5mm and it is still possible to buy film stock (from the French Color City company).
16 mm[edit]
This was a popular format for audio-visual use in schools and as a high-end home entertainment system before the advent of broadcast television. The most popular home content were comedic shorts (typically less than 20 minutes in length in the original release) and bundles of cartoons previously seen in movie theaters. 16 mm enjoys widespread use today as a format for short films, independent features and music videos, being a relatively economical alternative to 35 mm.
35 mm[edit]
A diagram of the VistaVision format
70 mm[edit]
Regardless of the sound format, any sound represented on the film image itself will not be the sound for the particular frame it occupies. In the gate of the projector head, there is no space for a reader, and the film is not travelling smoothly at the gate position. Consequently, all optical sound formats must be offset from the image because the sound reader is usually located above (for magnetic readers) or below (for optical readers) the projector head.
See the 35 mm film article for more information on both digital and analog methods.
Analog Optical Sound[edit]
Optical stereo is recorded and read through a bilateral variable area track, recorded using Dolby Stereo matrix encoding and Dolby noise reduction. Left, center, right and surround channels are matrix-encoded into these two tracks.
Magnetic sound[edit]
Although magnetic audio was of excellent quality it also had significant disadvantages. Magnetic sound prints were expensive, 35mm magnetic prints cost roughly twice as much as optical sound prints, whilst 70mm prints could cost up to 15 times as much. Furthermore they wore out faster and were also prone to damage and erasure over time. Because of the high cost of installing magnetic sound reproduction equipment only a minority of movie theaters ever installed it and the magnetic soundheads needed considerable maintenance to keep their performance up to standard. As a consequence the use of the Cinemascope 35mm four-track magnetic sound format decreased significantly during the course of the 1960s and effectively ended with the success of the Dolby Stereo optical stereo format in the late 1970s. However 70mm film continued to be used for prestigious "roadshow" screenings until the introduction of digital sound on 35mm film in the early 1990s removed one of the major justifications for using this expensive format.
Cinema Digital Sound (CDS)[edit]
Sony Dynamic Digital Sound (SDDS)[edit]
Dolby Digital[edit]
In 2006, Dolby discontinued the sale of their external SR-D processor (the DA20), but included Dolby Digital decoding in their CP500 and later CP650 cinema processors.
Digital Theater Systems (dts)[edit]
dts actually stores the sound information on separate CD-ROMs supplied with the film. The CDs are fed into a special modified computer which syncs up with the film through the use of dts time code, decompresses the sound, and passes it through to a standard cinema processor. The time code is placed between the optical sound tracks and the actual picture, and is read by an optical LED ahead of the gate. The time code is actually the only sound system which is not offset within the film from the picture, but still needs to be physically set offset ahead of the gate in order to maintain continuous motion. Each disc can hold slightly over 90 minutes of sound, so longer films will require a second disc. Three types of dts sound exist: dts-ES (Extended Surround), an 8 channel digital system; dts-6, a 6 track digital system, and a now-obsolete 4 channel system. dts-ES derives a back surround channel from the left surround and right surround channels using Dolby Pro Logic. The audio data in a dts track is compressed in the 20-bit APTX-100 compression scheme at a ratio of about 4.5:1. Of the three digital formats currently in use, dts is the only one that has been used with 70 mm presentations. dts was premiered on Jurassic Park. Datasat Digital Entertainment, purchaser of dts's cinema division in May 2008, now distributes Datasat Digital Sound to professional cinemas worldwide. A consumer version of dts is available on some DVDs. A bit for bit version of the dts soundtrack is on Blu-ray Discs and HD DVDs called dts-HD MA (dts-HD Master Audio).
Academy leader is placed at the head of release prints containing information for the projectionist and featuring numbers which are black on a clear background, counting from 11 to 3 at 16 frame intervals (16 frames in 35 mm film = 1 ft). At -12 feet there is a START frame.
SMPTE leader is placed at the head of release prints or video masters containing information for the projectionist or video playback tech. The numbers count down in seconds from 8 to 2 at 24 frame intervals ending at the first frame of the "2" followed by 47 frames of black.
Usually there's an audio POP that play 48 frames (2 seconds at 24 frame per second) before first frame of action (FFOA) that helps to sync audio and video during printing processes or postproduction.
Types of lenses and screens[edit]
Before the advent of certain wide screen technologies, lenses always reproduced the exact proportions of the film image onto the screen. Such lenses (known as a "flat" lens in theater projection parlance) are relatively simple to design and manufacture. Prior to modern wide screen, the industry standard image ratio of width to height was 1.37:1.
35 mm VistaVision was a wide screen orthographic system. The wide image was obtained by running the film horizontally across the gate so that the width limitation of the film was transformed to a height limitation. See the VistaVision article for more information.
Simulated wide screen image with 1.96 to 1 ratio as it would be seen in a camera viewfinder or on a theater screen
Simulated anamorphed image with 1.33 to 1 ratio (4:3) as it would appear on a frame of film
1953 saw the development of wide screen films using special lenses for filming and projection. The images on these films utilized a more squarish aspect ratio (1.18:1) in order to accommodate both magnetic and optical tracks. The wide image is compressed horizontally in half onto the film in the camera using additional cylindrical elements within the lens (known as "scope" in theater projection parlance), with a corresponding lens used in the projector to expand the image to the wide screen. This technique is called anamorphic projection and various implementations have been marketed under several brand names, including CinemaScope, Panavision and Superscope, with Technirama implementing a slightly different anamorphic technique using vertical expansion to the film rather than horizontal compression. Large format anamorphic processes included Ultra Panavision and MGM Camera 65 (which was renamed Ultra Panavision 70 in the early 60s).
Fish eye with dome[edit]
Wide and deep flat screen[edit]
Multiple cameras and projectors[edit]
One wide screen development during the 1950s used non-anamorphic projection, but used three side by side synchronised projectors. Called Cinerama, the images were projected onto an extremely wide, curved screen. Some seams were said to be visible between the images but the almost complete filling of the visual field made up for this. This showed some commercial success as a limited location (only in major cities) exhibition of the technology in This is Cinerama, but the only memorable story-telling film of two made for this technology was How the West Was Won, widely seen only in its Cinemascope re-release.
See also[edit]
1. ^ "Motion Picture Pioneer: Eadweard Muybridge and the Zoopraxiscope". Retrieved 2012-12-17.
4. ^ Nowell-Smith, Geoffrey (ed.) The Oxford History of World Cinema, pp. 446–449. Oxford University Press: Oxford, 1996.
5. ^ Kodak Film Notes Issue # H-50-03: Projection practices and techniques - see Manuals at
External links[edit] | http://en.wikipedia.org/wiki/Movie_projector | dclm-gs1-038400000 |
0.054385 | <urn:uuid:87f5f632-f212-4cb1-a073-a0184132100c> | en | 0.95721 | Negative amortization
From Wikipedia, the free encyclopedia
Jump to: navigation, search
In finance, negative amortization (also known as NegAm, deferred interest or graduated payment mortgage) occurs whenever the loan payment for any period is less than the interest charged over that period so that the outstanding balance of the loan increases. As an amortization method the shorted amount (difference between interest and repayment) is then added to the total amount owed to the lender. Such a practice would have to be agreed upon before shorting the payment so as to avoid default on payment. This method is generally used in an introductory period before loan payments exceed interest and the loan becomes self-amortizing. The term is most often used for mortgage loans; corporate loans with negative amortization are called PIK loans.
Defining characteristics[edit]
Neg-Ams also have what is called a recast period, and the recast principal balance cap is based on Federal and State legislation. The recast period is usually 60 months (5 years). The recast principal balance cap (also known as the "neg am limit") is usually up to a 25% increase of the amortized loan balance over the original loan amount. States and lenders can offer products with lesser recast periods and principal balance caps; but cannot issue loans that exceed their state and federal legislated requirements under penalty of law.
Typical circumstances[edit]
Adjustable rate feature[edit]
The most notable differences between the traditional payment option ARM and the hybrid payment option ARM are in the start rate, also known as the "minimum payment" rate. On a Traditional Payment Option Arm, the minimum payment is based on a principal and interest calculation of 1% - 2.5% on average.
The start rate on a hybrid payment option ARM is higher, yet still extremely competitive payment wise.
On a hybrid payment option ARM, the minimum payment is derived using the "interest only" calculation of the start rate. The start rate on the hybrid payment option ARM typically is calculated by taking the fully indexed rate (actual note rate), then subtracting 3%, which will give you the start rate.
Example: 7.5% fully indexed rate - 3% = 4.5% (4.5% would be the start rate on a hybrid pay option ARM)
This guideline can vary among lenders.
Aliases the payment option ARM loans are known by:
• Negative Amortizing Loan (Neg Am)
• Pick - A - Pay
• Deferred interest option loan (this is the way this loan was introduced to the mortgage industry when first created)
NegAm - mortgage terminology[edit]
• Cap
• Life cap
• Index
The variable, such as the COFI; COSI; CODI or often MTA, which determines the adjustment as an increase or decrease in the interest rate. Other examples include the LIBOR and TREASURY.
• Margin
Often disclosed in the adjustable rate rider of a Deed of Trust, the margin is determined by the lender and is used to calculate the interest rate. Often the loan originator can increase the margin when structuring the product for the borrower. An increase to the margin will also increase the borrower's interest rate, but will improve the yield spread premium which the loan originator may receive as compensation from the lender.
• Fully indexed rate (F.I.R.)
The fully indexed rate is the sum of the margin and the current index value at the time of adjustment. The F.I.R. is the "interest rate" and determines the interest only, 30 year and 15 year amortized payments. Most adjustable rate products have caps on rate adjustments. If the note provides for a single adjustment not to exceed an increase by more than 1.5, and the variable index, for example, increased by 2.5 since the last adjustment, the fully indexed rate will top out at a maximum adjustment of 1.5, as stated in the note, for that particular adjustment period. Often the F.I.R. is used to determine the debt to income ratio when qualifying a borrower for this loan product.
• Payment options
There are typically 4 payment options (listed from highest to lowest):
• 15 year payment
• Amortized over a period of 15 years at the F.I.R.
• 30 year payment
• Amortized over a period of 30 years at the F.I.R.
• Interest only payment
• F.I.R. times the principal balance, divided by 12 months (with no amortization or reduction in the owed balance).
• Minimum payment
• Based on the minimal start rate determined by the lender. When paying the minimum payment, the difference between the interest only payment and the minimum payment is deferred to the balance of the loan increasing what is owed on the mortgage.
• Period
How often the NegAm payment changes. Typically, the minimum payment rises once every twelve months in these types of loans. Usually the rate of rise is 7.5%. The F.I.R. is subject to adjusting with the variable Index, most often on a monthly basis, depending on the product.
• Recast
Premature stop of NegAm. Should the balance increase to a predetermined amount (from 110% up to 125% of the original balance per federal or state regulations) the loan will be "recast" with one of two payment options: the fully amortized principal and interest payment, or if the maximum balance has been reached before the fifth year, an interest only payment until the loan has matured to the recast date (typically 5 years).
• Stop
End of NegAm payment schedule.
Negative amortization loans[edit]
In a reverse mortgage borrowers do not need to make payments on their loan until it is due. A reverse mortgage is due only when the borrower no longer resides in his or her principal residence.[1]
Negative-amortization loans, being relatively popular only in the last decade, have attracted a variety of criticisms:
• Unlike most other adjustable-rate loans, many negative-amortization loans have been advertised with either teaser or artificial, introductory interest rates or with the minimum loan payment expressed as a percentage of the loan amount. For example, a negative-amortization loan is often advertised as featuring "1% interest", or by prominently displaying a 1% number without explaining the F.I.R. This practice has been done by large corporate lenders. This practice has been considered deceptive for two different reasons: most mortgages do not feature teaser rates, so consumers do not look out for them; and, many consumers aren't aware of the negative amortization side effect of only paying 1% of the loan amount per year. In addition, most negative amortization loans contain a clause saying that the payment may not increase more than 7.5% each year, except if the 5-year period is over or if the balance has grown by 15%. Critics say this clause is only there to deceive borrowers into thinking the payment could only jump a small amount, whereas in fact the other two conditions are more likely to occur.
• Negative-amortization loans as a class have the highest potential for what is known as payment shock. Payment shock is when the required monthly payment jumps from one month to the next, potentially becoming unaffordable. To compare various mortgages' payment-shock potential (note that the items here do not include escrow payments for insurance and taxes, which can cause changes in the payment amount):
• A 10-year interest only mortgage product, recasting to a 20-year amortization schedule (after ten years of interest-only payments) could see a payment increase of up to $600 on a balance of 330K.
• Negative amortization mortgage: no payment jump either until 5 years OR the balance grows 15% (depending on the product) higher than the original amount. The payment increases, by requiring a full interest-plus-principal payment. The payment could further increase due to interest-rate changes. However, all things being equal, the fully amortized payment is almost triple the negatively amortized payment.
• First month free: a loan officer may allow the borrower to skip the first monthly payment on a refinance loan, by simply adding that payment to the principal and charging compound interest on it for many years. The borrower may not understand or question the transaction.
In a very hot real estate market a buyer may use a negative-amortizing mortgage to purchase a property with the plan to sell the property at a higher price before the end of the "negam" period. Therefore, an informed investor could purchase several properties with minimal monthly obligations and make a great profit over a five-year plan in a rising real-estate market.
However, if the property values decrease, it is likely that the borrower will owe more on the property than it is worth, known colloquially in the mortgage industry as "being underwater." In this situation, if the property owner cannot make the new monthly payment, he or she may be faced with foreclosure or having to refinance with a very high loan-to-value ratio, requiring additional monthly obligations, such as mortgage insurance, and higher rates and payments due to the adversity of a high loan-to-value ratio.
It is very easy for borrowers to ignore or misunderstand the complications of this product when being presented with minimal monthly obligations that could be from one half to one third what other, more predictable, mortgage products require.
Difference between negative amortization and a reverse mortgage[edit]
A negative amortization mortgage should not be confused with a reverse mortgage. A negative amortization mortgage is a mortgage where the principal increases throughout the early stage of the mortgage. This early stage is known as the negative amortization or NegAm period. During this time period the borrower is, in effect, making partial payments toward his mortgage. The remainder of his payment, which he is not paying, is added onto the amount owed on the mortgage. Naturally, when this period ends, he must start to pay this additional amount off, along with his original principal.
A reverse mortgage happens when a homeowner, usually a retired person, sells some or all of his equity in his home and retains the right to live there. No payments are due until the homeowner sells the house, moves out of the house, or dies. However, all the interest charged on the loan is applied back to the principal, since no interest payments are made during the life of the loan.
See also[edit] | http://en.wikipedia.org/wiki/Negative_amortization | dclm-gs1-038410000 |
0.039461 | <urn:uuid:6db17c01-63e0-415a-a5f4-fb2ead3bb1bf> | en | 0.895766 | Social conservatism in the United States
From Wikipedia, the free encyclopedia
Jump to: navigation, search
Social conservatism in the United States is generally defined by promotion of what its proponents perceive to be traditional social norms and values.
Social conservatives emphasize what they describe as traditional views of social units such as the family, church, or locality. Social conservatism may entail opposition to same-sex marriage and abortion.
In the 1920s, religious fundamentalists like William Bell Riley and William Jennings Bryan led the battle against the teaching of evolution, a battle which fundamentalists are still fighting today, when fundamentalist Protestants often advocate the teaching of creationism in the public schools.
Conservatives tend to strongly identify with American nationalism and patriotism. They denounce anti-war protesters and hail the police and the military. Conservatives hold that military institutions embody admirable values like honor, courage, devotion, and loyalty, and also admire their tradition and ritual pageantry.
Historically, free market and social conservative elements were politically separate (but also not necessarily opposed) in the United States. An alliance of convenience was generated between them in the last half of the twentieth century under the doctrine of Fusionism, created by the ex-communist Frank Meyer, editor of the National Review.[1]
Electoral politics[edit]
In American politics, the Republican Party is the largest political party with some socially conservative ideals incorporated into its platform. Voters who are concerned with socially conservative issues often support the Republican Party, although there are also socially-conservative Democrats who break ranks with the party platform. Despite this, there have been instances where the Republican Party's nominee has been considered too socially progressive by social conservatives. This has led to the support of third party candidates from parties such as the Constitution Party, whose philosophies more closely parallel that of social conservatism.[2] While many social conservatives see third parties as a viable option in such a situation, some high-profile social conservatives see the excessive support of them as dangerous. This fear arises from the possibility of vote splitting.[3] Social conservatives, like any other interest-group, usually must find a balance between pragmatic electability and ideological principles when supporting candidates.[4]
Commentator Randall Hoven of The American Thinker has remarked, "Using the National Journals ratings of Senators in 2007, the correlation coefficient between "economic" scores and "social" scores is 90%. That means they almost always go together; financial conservatives are social conservatives and vice versa".[5]
The American Tea Party movement, despite being mostly made up of stringent Social Conservatives, is economically conservative but generally avoids social conservative issues, and this is a deliberate strategy.[6] The Tea Party Patriots is officially neutral[7] on social conservatism. While social conservatism emphasizes faith and family as core values, the Tea Party Patriots identifies its "Core Values" as "Fiscal Responsibility, Constitutionally Limited Government, Free Markets."[8] Some branches are opposed[9] to social conservatism. However, independent polls have repeatedly shown that Tea Party supporters are nearly indistinguishable in their views from traditional Republican social conservatives, despite their choice to emphasize economic issues.[10][11][12][13] While not allying itself exclusively with the Christian conservative movement,[14] members of the Tea Party movement identify with the Christian conservative movement more strongly than the general American populace (44%[15] compared to 34%[16] of the population), and some social conservative leaders have denounced it for its "libertarian" and "irreligious" views.[17] Nearly 80% of those in the Tea Party movement are members of the Republican party.[18]
1. ^ "Articles - The End of Republican 'Fusionism'?". RealClearPolitics. 2008-03-01. Retrieved 2011-03-30.
2. ^ "huffingtonpost news story on NY23". 2009-10-29. Retrieved 2011-03-30.
3. ^ Drake, Bruce. "Romney tells Tea Party not to split vote". Retrieved 2011-03-30.
4. ^ Third Party Alternative to McCain (Although no third party siphoned any significant percentage from McCain, such voter sentiment truly existed during the campaign)
5. ^ "A Libertarian Defense of Social Conservatism". American Thinker. Retrieved 2011-03-30.
6. ^ "Tea parties stir evangelicals' fears - Ben Smith". Politico.Com. Retrieved 2011-03-30.
8. ^ "Mission Statement and Core Values". Tea Party Patriots. Retrieved 2011-03-30.
9. ^ "» Tea Party Leaders Release Letter Urging House and Senate GOP to Avoid Social Issues". 2010-11-23. Retrieved 2011-03-30.
10. ^ ANALYSIS February 23, 2011 (2011-02-23). "Tea Party and Religion - Pew Forum on Religion & Public Life". Retrieved 2011-03-30.
11. ^ Siegel, Elyse (Released June 2, 2010). "More Than Half Of Tea Party Supporters Say Gays And Lesbians Have Too Much Political Power (POLL)". The Huffington Post. Retrieved July 1, 2010.
12. ^ New poll looks at tea party views toward minorities The Seattle Times; June 1, 2010
14. ^
18. ^ "Tea Party Supporters Overlap Republican Base". Retrieved 2011-03-30. | http://en.wikipedia.org/wiki/Social_conservatism_in_the_United_States | dclm-gs1-038430000 |
0.022412 | <urn:uuid:e7caf0a0-99c0-4181-b1f6-801cc2a6c74f> | en | 0.973554 | Adrian Beltre back in lineup for Rangers
Associated Press Modified: September 22, 2012 at 8:02 pm • Published: September 22, 2012
SEATTLE (AP) — Texas third baseman Adrian Beltre was back in the Rangers lineup on Saturday night against the Seattle Mariners, though it doesn't mean his stomach problems are completely solved.
Beltre batted fourth and played at third base for the second-game of a weekend series against the Mariners after flying to Seattle late Friday night following a day of tests to try and determine what's causing pain in his stomach.
He said doctors believe scar tissue from surgery on his appendix more than a decade ago has built up and is pressing on his intestines. There is no simple treatment, other than surgery which Beltre doesn't consider an option with the Rangers leading the AL West and hoping to make a deep postseason run for the third straight season.
"If it stays the same or gets worse we're going to have to do surgery, which is not a choice right now," Beltre said. "If the pain is still there in the offseason then we're going to have to go in there and fix it."
Beltre sat out one game during the Rangers' series against the Los Angeles Angels and had to talk his way into the lineup another day before finally taking the time to see a specialist. He was frustrated the cause of his stomach pain couldn't be determined earlier, but was relieved it was nothing more than what the doctors believe.
| |
Trending Now
Around the web
1. 1
Class 2A girls: Millwood, Cordell advance
2. 2
3. 3
Michigan 'rape insurance' law goes into effect
4. 4
5. 5
Survey ranks Texas football third behind A&M, Baylor
+ show more | http://newsok.com/adrian-beltre-back-in-lineup-for-rangers/article/feed/438186?custom_click=rss | dclm-gs1-038990000 |
0.063956 | <urn:uuid:d79f98aa-1934-4cc7-84fe-6772fc11afa4> | en | 0.903993 | Labor News
NLRB OKs rules to streamline union election procedures
Biden blasts “right-to-work”
Business and right wing backers of so-called "right to work" laws really want "the right for them to eliminate your right to have a say in your work."
Las Vegas Teamsters beat Coke decertification attempt
Coca-Cola's attempt to get rid of the Teamsters and a union contract in Las Vegas fizzled out like so much bad soda.
Labor Dept. to force firms to disclose union-busting tactics
| http://peoplesworld.org/labor/tag/union+busting | dclm-gs1-039070000 |
0.991499 | <urn:uuid:89a16642-6516-43eb-8c62-96b0a6864e8e> | en | 0.948616 | Take the 2-minute tour ×
Sorry if this is a basic question but I can't find anywhere to ask else to ask it:
If the universe was created again and exactly the same conditions where in place at the beginning, would everything happen exactly the same as it has now. IE: Is there any true randomness?
share|improve this question
add comment
3 Answers
up vote 4 down vote accepted
This is a complicated question to answer in a simple yes/no matter. First there is a distinction to be made between classical and quantum mechanics. Both are deterministic theories. It is just that the determinism in quantum mechanics takes a different form. In quantum mechanics the determinism is associated with the evolution of the wave function.
It helps to understand how things evolve in classical statistical mechanics. First you have to imagine the existence of an abstract space called phase space. In phase space the instantaneous position and momentum are plotted on separate axes as shown in the hyperlink. For normal 3D space, for each particle there are 6 dimensions in phase space, 3 for position and 3 for the component of momentum associate with each position axis. If there are N particles there are 6N dimensions. At any instant, the entire state of the system can be described as a point in phase space. This is called a microstate.
Depending on the macroscopic properties of a system, there are certain microstates that are accessible by the system at any time. If the system is an isolated thermodynamic system this is called the microcanonical ensemble. If the system is in thermal equilibrium, then there is an equal probability that the system can be in any one of the accessible energy microstates. This is when the system is at maximum entropy.
If the system is classically far out of equilibrium, then there is some probability distribution function that biases the system to certain microstates. If there is a probability of one (100%) that the system has to be in one microstate out of all the microstates that have similar properties, then the system is in a low entropy condition. From a classical standpoint, the universe was in one of these low entropy conditions where only one or a few microstates was available to it at the start of the evolution.
As entropy increases, more and more microstates are available to the system. As the system evolves, from a statistical mechanics point of view, there is some probability associated with which microstate the system will find itself in next.
When the system is in thermal equilibrium, and the system is ergodic, there is a theory called Poincare Recurrence. This theory basically suggest that under certain conditions, the system can find itself back in its original starting microstate an infinite number of times. This is very controversial as it applies to the behavior of the universe, but it is likely the source of the question you have and it is true if certain assumptions are true.
This topic about the origin of the universe is unfortunately very complicated, and when we talk about quantum effects at the early stages there is a lot of theory, but limited evidence. In fact, one of the insights being provided by LHC is exactly how the universe behaved in its very early stages.
To be honest the real answer is that nobody knows for sure how the universe started, however strict adherents to quantum mechanics will tell you that classical approaches to the problem are inadequate.
share|improve this answer
That is an awesome answer. Sorry I didn't get back sooner :) I appreciate your help thanks. – andy Sep 25 '12 at 10:56
Thanks, no problemo! – Hal Swyers Sep 25 '12 at 11:47
add comment
No, your quantum observation caused probabilistic outcomes. Yes, there is true randomness in quantum mechanics.
share|improve this answer
Please elaborate... – Pacerier Jan 1 '13 at 12:20
add comment
As mentioned, quantum randomness drives everything. We (humans) don't see it with our eyes because the effects are small, however the effects become quite large when working with small particles. Since the (very) early universe was nothing but a soup of insanely small unbound particles, the way in which they interacted was quite affected by the randomness. Whether the laws of classical physics, as we know them, would be roughly the same is another story. I believe they would be much the same. However it should be considered certain that the shape and elemental makeup of the universe would be different.
share|improve this answer
add comment
Your Answer
| http://physics.stackexchange.com/questions/35570/if-the-universe-started-again-with-exactly-the-same-conditions-would-it-be-th/35578 | dclm-gs1-039080000 |
0.029063 | <urn:uuid:e1e63c72-db3f-47ba-978b-9cf4e89563d9> | en | 0.971874 | where the writers are
Thirty Days in November
Because I've never done it myself, I probably shouldn't be expressing an opinion on NaNoWriMo, the month when writers attack their keyboard or typewriter keys with a dedicated ferocity and attempt to write as many words as they can on that new novel they've been thinking about writing and just haven't quite gotten around to yet. Because I am one othose who can only create in one form at a time and this seems to be my poetry period, I have passed on the novel idea. That is my this year's excuse. As a sporadic writer I can only admire those who, determined to complete a novel in 30 days, actually sit down and do it. But this year, for the first time I can remember, there seems to be a murmer of unenthusiasm, a little chord of disharmony that has arisen and asks "Is this month really necessary?" Well, Obviously it isn't to every writer. Those who have established themselves in the world of agents, publishers or even self-publishers do not need a special month to hone their talents. it is something they do all year. What I have noticed among the objectors is that with the advent of computers and all their electric kin, a writer can by-pass the hassle of locating agents and publishers and simply print and publish their work themselves. Which means that the reading public can be exposed to so many, many, many books that trying to get an idea of the book's quality or suitability is difficult or almost non-existant. A recent artcile asks "Do we really need 180 thousand more novels written this month?" Another question could be "How many of these novels will find readers?" There are reports of people reading fewer books each year. Newspapers and magazines are also facing fewer readers. Actually, there are worse ways people can spend their time besides writing novels. There are no laws forcing everything that is published to be read. If people want to improve their writing skills and are willing to spend thirty days doing that, who has a right to complain?Well, yes, we live in a democracy and have all kinds of rights. We just don't have the right to enforce our opinions on others, If your neighbor is still sitting at his computer at 4:00am, perhaps he will turn out a western that is equal to Lonesome Dove. Or not. At least, no one will force you to read it. Perhaps a new Jane Austen will emerge from these thirty days of practice. All she needs may be a little encouragement, and one thing we don't have the right to do is to discourage people from trying something they might have thought of doing for years but just never got around to it. | http://redroom.com/member/marian-veverka/blog/thirty-days-in-november | dclm-gs1-039130000 |
0.060059 | <urn:uuid:a4c996f2-54e2-4004-8feb-d354953f38e5> | en | 0.930176 | 103 reputation
bio website hr.linkedin.com/pub/…
location Croatia
age 25
visits member for 9 months
seen Dec 9 '13 at 15:00
I studied pattern recognition and image analysis and I have some expirience in that field gained through several projects of human classification based on biometric data (fingerprint, iris, face...), - human computer interaction through natural interface based on hand detection, recognition and tracking, and through various other projects that involved knowledge of basic and advanced methods regarding image processing, object detection and recognition and data classification. Therefore, I believe entering and participating in the dicussions of this group is mutually beneficial.
This user has not answered any questions
Stack Overflow 352 rep 111
Super User 106 rep 4
Server Fault 103 rep 2
Ask Ubuntu 101 rep 2
0 Votes Cast
This user has not cast any votes | http://serverfault.com/users/174770/dajuric | dclm-gs1-039180000 |
0.115078 | <urn:uuid:a80fd2e1-1ed5-439a-ba3e-3363d3756143> | en | 0.971978 | Forgot your password?
Comment: Whereas a few thousand miles away... (Score 3, Interesting) 112
by Retron (#46309299) Attached to: VA Tech Experiment: Polar Vortex May Decimate D.C. Stinkbugs In 2014
Comment: Re:Sort of (Score 2) 249
by Retron (#46138525) Attached to: Windows 8.1 Passes Windows Vista In Market Share
8.1 also has a load of inconsistent mush. Click the volume control - get a Windows 7-style popup. Click the network icon - get a Metro thing pop up. Open Media Player - see Windows 7 shiny style controls. Icons in Explorer are still from Vista (3D, nicely drawn) whereas the window controls were changed to an 80s-style flat look just before release. Except, that is, in MDI programs which still use the Aero Basic theme from Vista. Oh yes, insert a memory stick and you'll be invited to "tap to choose" what to do with it. Very useful on a traditional desktop PC! Adding some code to say "click" instead of "tap" if no touch input is available must have been too hard to do.
Windows 8 was an utter mess. Windows 8.1 has done little to improve things, it's still a confused bundle of touch, Metro and Vista.
Hopefully Windows 9 next year will get things back to some sort of consistent, polished feel. Until then, if you're on Windows 7 with a traditional PC/laptop I'd say you're better off just sticking with it. Doubtless there'll be some cheap upgrade offers again when 9 comes out.
Comment: Re:!HP (Score 1) 474
Not really - "died" is traditionally the upper-class way of saying "passed on". As Wiki says, although the original list of U vs non-U English terms is obsolete in some ways, in others it's still a good indication of class (at least in the UK, I'm not sure how much that applies to the US!)
http://en.wikipedia.org/wiki/U... has more info for those who are interested.
Comment: Re:Greetings from EU (Score 1) 767
by Retron (#45961835) Attached to: Incandescent Bulbs Get a Reprieve
I'm in the UK too and the CFLs I have make the house look like it's an underground car-park - they're horrible things. They're better than they were 15 years ago (when we bought our first one), but they still give out a horrible light compared to incandescents.
Luckily I have a stock of Osram 100W bulbs for the living room, so that at least continues to have a decent, warm quality of lighting. The Chinese-made "rough service" bulbs (which exploit a loophole to get round the rules) are universally terrible, I've gone through a dozen and none lasted more than 2 or 3 weeks.
Comment: Incandescents (Score 1) 944
by Retron (#45786063) Attached to: 60% of Americans Unaware of Looming Incandescent Bulb Phase Out
Over here in the UK 100W incandescent bulbs were phased out around 4 years ago and 60W bulbs not long after. As a result my house now has a mixture of old incandescents and newer CFLs, as well as a halogen bulb or two. The halogens give a harsh light and the CFLs make the room look like it's lit like a multi-storey carpark - not exactly a "homely" look. The living room still has two 100W incandescent bulbs but due to the ban they're becoming really hard to source; there's a loophole where less-efficient 100W bulbs can be sold (as "rough service") but they only seem to last for a few dozen hours rather than 1000 or so. Whether that's because they're cheap Chinese tat or whether it's because they genuinely aren't made to work indoors I couldn't say.
Thankfully old pre-ban bulbs are still available on eBay etc so I've stocked up with a couple of years' worth... hopefully by the time they run out alternative lighting will finally have caught up with the quality of light you get from an incandescent.
Comment: Bad PR for Zavvi (Score 2) 617
It's interesting to see the wide variety of responses to the story. I guess the only way we'll ever know the exact legal situation is if the case makes it to court, but I'd bet that Zavvi will try anything they can to settle out-of-court in order to save themselves the chance of receiving even more bad PR.
It's one of those situations where Zavvi can't win. If they let the person keep the Vita then those who sent them back will be annoyed. If they set the legal eagles loose then it'll just generate more bad PR for them. Zavvi itself had loads of bad PR a few years ago when the original company went bust; it was one of those situations where gift cards weren't honoured during the administration period and the media was full of people moaning about the company. That didn't bother The Hut, though, who bought the rights to the name and then set up a new online shop.
FWIW, my thoughts are that it'd be pretty obvious upon opening the packaging that a Vita+game had been sent rather than just a game. As such, I'd have felt pretty guilty if I'd tried to keep the Vita and I'd hope that I would do the obvious thing and send it back, although it wouldn't be at my expense (a pre-paid Special Delivery label would be my request, as that way the returned package would be insured - sod's law says that it'd go missing on the way back and then you'd have no Vita, no game and would still have the company hounding you for its return!)
The whole sorry mess could have been alleviated by giving a gift voucher upon the return of the Vita, or some other token to say "sorry for messing you around". Doing it the way they did just leaves a bad taste in everyone's mouth!
+ - British retailer mistakenly sends Vitas, threatens legal action to get them back
Submitted by Retron
Retron writes "The BBC brings news that British retailer Zavvi mistakenly sent out PlayStation Vitas to people who had preordered a game called Tearaway. It's now threatening legal action against those who have kept theirs despite a request to return them. It's unclear whether the Distance Selling Act protects consumers who have mistakenly been sent an expensive item and forums such as Eurogamer seem divided on the issue."
Comment: Stupidly expensive (Score 0) 53
by Retron (#45381567) Attached to: British Operator EE Offers £8 Million Petabyte 4G Data Bundle
Stupidly expensive, which has been the story of EE's 4G in general.
3, for example, offer consumers 7 GB for £25 (=£3.57/GB) on their network - and that's as a PAYG thing. If you're a business and bulk-buying it'd be way cheaper than that. The only snag is that 3 doesn't offer 4G (yet)... when it does, expect EE's pricing to plummet!
Comment: Re:MS knew the Win8.1 DPI scaling was messed, yet (Score 0) 326
by Retron (#45323013) Attached to: Microsoft Admits Windows 8.1 Update May Bork Your Mouse, Promises a Fix
Wow, setting it to 150% actually works with SIMS...
Good on MS for deciding to fix the crummy programs which ignore Windows' DPI settings (such as the aforementioned SIMS). The method for doing it does generate fuzziness, but that's because it's resizing everything (effectively lying about the resolution Windows is running in). That's actually *way* better than the way it was before, which means programs like SIMS would enlarge fonts in some areas and not in others, leading to a right old mess.
A toggle switch for XP-8 or 8.1 behaviour would have been a good idea though for those who find the fuzziness of non-DPI aware applications annoying.
Comment: Re:Mouse works fine, Sandy Bridge HDMI not so much (Score 1) 326
by Retron (#45322989) Attached to: Microsoft Admits Windows 8.1 Update May Bork Your Mouse, Promises a Fix
Hmm, odd - I use a desktop PC with a Sandy Bridge i5 at work and the Intel HD graphics drivers (from here: http://downloadmirror.intel.com/22627/a08/Win64_152815.zip) work just fine under Windows 8.1. Admittedly that's via DVI rather than HDMI, as my monitor doesn't have an HDMI input.
Comment: And another 3D icon bites the dust... (Score 4, Insightful) 365
...well, a bit at least. This anti-skeuomorphic craze is pretty damned irritating - the new logo looks worse than the old one in my view, just as the Windows 8 theme looks worse than Aero Glass and iOS 7 looks worse than iOS 6. I had enough of 2D, flat icons in the 80s (when there weren't the resources to do better); I can only imagine the designers doing all this 2D stuff today weren't around back then.
Comment: Re:Bad Science (Score 1) 96
by Retron (#44382575) Attached to: Unique Howls Are What Wolves Use As Names
Interesting, but is it possible that the younger pups were just playing, while as they got older deeper hunting instincts were kicking in and they used those tactics?
Oh, I've no doubt the behaviour is instinctual - they were definitely honing their skills on me. The thing that makes me wonder is "how did they decide which wolf would have which role" - there has to have been something which made them decide that the male would ensnare me while the females went in for the "kill".
Comment: Re:Bad Science (Score 3, Interesting) 96
by Retron (#44381655) Attached to: Unique Howls Are What Wolves Use As Names
Here's something which I can't explain. Maybe a reader here can shed some light on it?
Back in 2006 we had three wolf pups at the wolf centre (I became a volunteer after adopting Kenai, mentioned above). They were hand-reared, so were used to people right from the start.
I decided to do a fun experiment, knowing it'd be the only chance I'd get. Nobody else was this daft!
* When they were three months of age, I ran away from them in their enclosure. They chased me, but when I zigzagged away from them they gave up.
* At four months old, I repeated the experiment. This time they followed me even after I zigzagged, before catching up with me (whereupon they licked me profusely).
* At six months old, I did it for the final time. This time the two female wolves ran away from me and vanished behind some trees. The male wolf came straight towards me, staring at me intently. When he reached me, he wrapped himself around my legs, causing me to wobble a bit. As I was working out how to extricate myself, there was an almighty "whomp" from behind as the two females jumped upon me. That knocked me over and I was licked half to death by the happy pups.
To this day, I don't know how they communicated their tactics to one another, although clearly they did somehow. Wild wolves do the same thing, of course, as you'll have seen on those nature programmes where they use the pincer movement to get a bison calf away from the herd. FWIW there was no noise from the wolves beforehand, just the rustling of grass as they executed their manoeuvre.
Oh, so there you are! | http://slashdot.org/~Retron/firehose | dclm-gs1-039230000 |
0.999499 | <urn:uuid:7535fdd0-edd7-4da8-868a-46d63ca70db0> | en | 0.84992 | Take the 2-minute tour ×
I want to create a calendar with the following features in pictureenter image description here
I want to have the time in the left column and the task in the bottom area. I want to drag a task from the bottom list and schedule it in the specified time on specified day.
How can I do this?
share|improve this question
Nobody will tell you how to do it unless you provide some code with the specific question – matino Apr 5 '12 at 7:23
add comment
1 Answer
up vote 6 down vote accepted
Check out http://arshaw.com/js/fullcalendar-1.5.3/demos/external-dragging.html .
share|improve this answer
+1: How can one better answer the question? – hakre Apr 5 '12 at 7:52
Great buddy..Very helpfull man.. I would have given +100 for this.. – ScoRpion Apr 14 '12 at 10:29
add comment
Your Answer
| http://stackoverflow.com/questions/10024182/creating-calendar-with-task-scheduling-using-php | dclm-gs1-039260000 |
0.803915 | <urn:uuid:ee7dae46-a062-4a12-8390-74bb0b59fbbb> | en | 0.685508 | Take the 2-minute tour ×
I have a long JSON string representing a string[] array being returned from a WCF service. The array elements are simply strings, they are not objects. This is an example of the return data
I don't mind the index being included in the string, but I need to parse the strings into an ArrayList in Android so that I can adapt it to a ListView.
Since these technically aren't JSONObjects, how can I iterate over them and extract the string from each array element?
share|improve this question
I'm a little confused. Is the WCF returning a string formatted as a JSON array or an actual array of strings? If it's an array why don't you just iterate through each array element, strip out the index and run a JSON deserializing function on the resulting string? – Spencer Ruport Apr 13 '12 at 20:39
add comment
3 Answers
up vote 5 down vote accepted
this is a valid JSON array of strings, you can parse it normally like this
JSONArray jsonStrings = json.getJSONArray("items");
String strings[] = new String[jsonStrings.length()];
strings[i] = jsonStrings.getString(i);
share|improve this answer
Yeah, this is it, shortly after posting this I realized I made this more difficult than it needed to be. – SmashCode Apr 13 '12 at 21:03
add comment
Maybe this post can help you out:
JSON Array iteration in Android/Java
applicationSettings.put(name, value);
JSONArray names= json.names();
JSONArray values = json.toJSONArray(names);
String dateString = values.getString(i);
String dateString = values.getString(i);
share|improve this answer
Not really, I've had to do something similar to what you posted in other Android projects, but that was dealing with JSONArrays that contained objects. If the data being returned was the format ["Name" : "the_name", ... ] I'd be fine, but if you look at the data being returned, your code wouldn't work. – SmashCode Apr 13 '12 at 20:35
Thats true, the post below could be more what your looking for. – Rob Angelier Apr 13 '12 at 20:43
add comment
Just to clarify, as I understand it you are receiving a JSON array of strings which are strings of valid JSON prefixed with the array index and a pipe character?
First, I would suggest contacting the creator of this abomination and lecturing them on violating standards. If they won't listen, talk to their bosses. This kind of thing is unacceptable in my opinion and needs to stop.
Second, I'd suggest doing something like this:
string[] element_strings = JSON.deserialize(WCF_string_result);
object[] elements = new object[element_strings.length];
int pipeIndex = element_strings.indexOf("|");
elements[x] = JSON.deserialize(element_strings[x].substr(pipeIndex + 1));
Of course this assumes you have some kind of method for deserializing strings of JSON objects. If you don't I'd recommend using the built in library available in Android:
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/10147851/json-array-of-strings-no-objects-extracting-data | dclm-gs1-039270000 |
0.380088 | <urn:uuid:34b96031-bc07-47cd-8b1d-ab87b9ddd2a3> | en | 0.874895 | Take the 2-minute tour ×
I want to plot a function in a form without the forms background being visible. Created a TForm with TransparentColor set to True and TransParentColorValue set to clWhite. Just put a TImage on it, draw a function on a bitmap, assign it to the image, works great. There is one problem. I cannot click the form anymore. Any click on the form's caption and clientarea lead to a click in the underlying application. This is caused by setting TransparentColor to True. How can I prevent this "clicking-thru"?
Update I tried Sertac's suggestions and I got some remarkable results. I prepare the bitmap as follows:
Bitmap.Canvas.Brush.Color := clFuchsia;
Bitmap.Canvas.FillRect (Rect (0, 0, Bitmap.Width, Bitmap.Height));
When Color is set to clWhite and the Forms TransparentColorValue as well, the form is completely click-thru enabled.
Both set to clBlack, the form can be moved, but borders can't be resized and system buttons don't work
Both set to clFuchsia it behaves as a normal Form. Well, it works now but maybe someone got an explanation?
share|improve this question
Use a different color (I have no idea why..). – Sertac Akyuz Apr 21 '12 at 14:05
Weird, setting the TransparentColorValue to clBlack and filling the bitmap with clBlack as well works partially. It doesn't click-thru, I can move the form now, but still cannot resize and the system buttons don't react. Any idea how to solve that? – Arnold Apr 21 '12 at 14:17
Where do you find those colors? <g> Make it clFuchsia and let go.. :) – Sertac Akyuz Apr 21 '12 at 14:20
This isn't VCL's fault by the way. I suggest you to include a litte snippet duplicating this with api calls and include winapi tag. – Sertac Akyuz Apr 21 '12 at 14:27
You are not joking, it really works with the clFuchsia!!! Thank you! What exactly do you mean with api calls? If you answer this question I'll mark it as the correct one. – Arnold Apr 21 '12 at 14:33
add comment
1 Answer
up vote 3 down vote accepted
It would seem the API acts weird when some specific colors is used. White is an obvious one, black is a little less problematic. I've tried with yellow, gray, button face, fuchsia etc.. and they look fine.
If anyone wants to duplicate the problem without using Delphi's 'Transparent...' properties, here's a little snippet:
procedure TForm1.Button1Click(Sender: TObject);
Color: DWORD;
DC: HDC;
Color := $00FFFFFF;
SetWindowLong(Handle, GWL_EXSTYLE,
GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_LAYERED );
SetLayeredWindowAttributes(Handle, Color, 255, LWA_COLORKEY);
DC := GetWindowDC(Handle);
SetDCBrushColor(DC, Color);
FillRect(DC, Rect(10, 10, 100, 80), GetStockObject(DC_BRUSH));
ReleaseDC(Handle, DC);
Note: I'd gladly remove this answer if anyone provides an answer with a definitive explanation.
share|improve this answer
I agree with that. – Arnold Apr 21 '12 at 14:55
add comment
Your Answer
| http://stackoverflow.com/questions/10259365/prevent-click-thru-on-transparent-form?answertab=oldest | dclm-gs1-039280000 |
0.027206 | <urn:uuid:b286f148-e788-431d-8efa-8bf8a9925899> | en | 0.912231 | Take the 2-minute tour ×
I am trying to write Java console application, the code is quite simple:
public class ConsoleTest {
public static void main(String[] args) {
If I run this application from Eclipse, then i see "test" in Eclipse's "Console", but if I export my app as a "Runnable JAR file" and run it from Windows XP cmd.exe, then nothing is echoed to the console.
On the safe side, i tried to check System.console(), it returns null.
What can be wrong?
share|improve this question
Your code works fine for me. When you run it from cmd.exe, what do you see? – Hovercraft Full Of Eels May 1 '12 at 17:09
i think System.console() will return null in eclipse too. – Boris Strandjev May 1 '12 at 17:09
How are you running the jar from the command line? – Attila May 1 '12 at 17:11
@HovercraftFullOfEels, i see exactly the same as without System.out.println("test");. I.e. nothing. – Dmitry Frank May 1 '12 at 17:11
Related question: stackoverflow.com/questions/996517/java-console-api – Gilbert Le Blanc May 1 '12 at 17:11
show 5 more comments
6 Answers
up vote 8 down vote accepted
How are you running your program outside eclipse?
You should use command line like
java -jar yourjar.jar
java -cp yourjar.jar ConsoleTest
If you are occasionally using javaw instead no console output will be produced. The STDOUT of javaw is null. Probably this is what happens when you are clicking on your jar file.
share|improve this answer
AlexR, you are right, thanks, i tried to run my app as you suggested, it works. But this is a bit painful to run app every time in such manner, is there any way to make it work just when i type yourjar.jar and press Enter? – Dmitry Frank May 1 '12 at 17:21
@Dmitry Frank, running program by clicking jar file is not safe anyway. It depends on mapping of extension jar to program that executes it (by default javaw) on client's machine. Many developers change this mapping to winzip because they want to view content of jar file by clicking it. So, the best way is to write bat file for windows and shell script for Unix to execute java program or to use WebStart. – AlexR May 1 '12 at 17:36
thanks, but anyway I would like to have some way to compile my app as a "Console" app, and javaw should run it the same way as java -jar myapp.jar. It will work at least for people who didn't change his settings =) Pity that there's no such option. – Dmitry Frank May 1 '12 at 17:44
add comment
You need to run your jar file from command prompt.
If you double click on it , then you wont be able to see the command line operations being run in the background. Jar files are run by double clicking only when they involve GUI.
To run jar files from command prompt is pretty simple. You just do this:
java -jar ConsoleTest.jar
Assuming you've set environment variables for java.exe and the current directory has the jar file.
If this din't work , then it is not your code's fault at all. There is also the chance that the manifest file pointing to the Main class was set up incorrectly
share|improve this answer
thank you, you are right. But is there any way to make it work just when I type consoletest.jar? – Dmitry Frank May 1 '12 at 17:27
Just typing consoletest.jar in cmd wont help as that will be same as double clicking it. You can however make a batch file which runs java -jar consoletest.jar when you click on it – EnKrypt May 1 '12 at 17:32
of course I understand that typing that is the same as double-clicking it. But I would like to have some way to compile my app as a "Console" app, and this app should behave by double-clicking exactly the same as it is runned by java -jar myapp.jar. I see no reasons to not to provide such option, as far as batch files and manual typing is painful. – Dmitry Frank May 1 '12 at 17:39
Well you could do one thing. You could use the Runtime.getRuntime().exec("start") method to start a new command line window and make it run java -jar consoletest.java on that window to display text to the console. In this case however , if you try running it through command prompt , it will open two windows which may be an inconvenience. But double clicking it will open a single cmd window and will work – EnKrypt May 1 '12 at 17:44
EnKrypt, thank you, i'll keep this in mind. – Dmitry Frank May 1 '12 at 18:05
add comment
Chances are your runnable jar file isn't working as you expect and isn't actually running your ConsoleTest class.
share|improve this answer
add comment
Try compiling it into a class from the command line and then running it. Does that work?
javac ConsoleTest.java
java ConsoleTest
share|improve this answer
Huh, it works! Thanks. Actually @AlexR is right, i tried to run my app as he suggested, and it works. – Dmitry Frank May 1 '12 at 17:20
add comment
Like what Hovercraft Full Of Eels wrote, compile the .java file using cmd.exe with the following command:
javac ConsoleTest.java
Then this will create a .class file, and we want to compile it with this command:
java ConsoleTest
It should then display the "test" output.
share|improve this answer
add comment
you have to install the java jdk and add the root of the directory containing the file java.exe to your system's directories, you will find further informations in the jdk's installation guide.
and then run the file in the console with the command
> java file.java
share|improve this answer
I would have voted down if i had that reputation. Your answer is unrelated to the problem and even that small piece of command that you put there is wrong – EnKrypt May 1 '12 at 19:13
sorry then, I just wanted to say that you have to use the java command wich is part of the java jdk and make sure that the environment variable is well configured.I know this for .java files but it works too for .jar files with more arguments. – Karim Garram May 1 '12 at 20:54
add comment
Your Answer
| http://stackoverflow.com/questions/10401380/java-system-out-println-should-write-to-the-console-but-it-doesnt | dclm-gs1-039290000 |
0.060437 | <urn:uuid:b33ad392-ec15-457c-9287-ddb449dc408c> | en | 0.886483 | Take the 2-minute tour ×
I have been given the following code that should perform an ssl handshake and certificate authentication:
1 s = socket.socket()
2 print "connecting..."
3 logging.debug("Connecting")
4 # Connect with SSL mutual authentication
5 # We only trust our server's CA, and it only trusts user certificates signed by it
6 c = ssl.wrap_socket(s, cert_reqs=ssl.CERT_REQUIRED,
7 ssl_version=ssl.PROTOCOL_SSLv3, ca_certs='ca.crt',
8 certfile='user.crt', keyfile='user.key')
9 c.connect((constants.server_addr, constants.port))
I have 2 questions about this:
1. where do we specify the server/port to which we are connecting? are these arguments to socket.socket()?
2. I have a .p12 from which I extracted a cert and a key in pem format(see this question), and I assume that these correspond to user.crt and user.key (line 8), respectively. However, while I assume that ca.crt (line 7) is retrived from the certificate authority, how to I retrieve it?
If any part of the above code or my assumptions about it are incorrect, please let me know. Thanks!
share|improve this question
Actually -- PKCS#12 files (your .p12 file) can, and typically do, contain the relevant CA certificate as well. – Charles Duffy May 17 '12 at 16:19
@CharlesDuffy, your own PKCS#12 file is likely to contain your own certificate's chain, but not the servers (unless they are the same, which isn't necessarily the case). – Bruno May 17 '12 at 16:50
@CharlesDuffy how would I retrieve the CA cert from the p12? – ewok May 17 '12 at 17:06
@Bruno Fair enough -- I was presuming a private (ie. corporate) CA used for both ends here. – Charles Duffy May 17 '12 at 20:10
@ewok see man pkcs12 -- particularly -cacerts in conjunction with -out. That said, Bruno's warning applies -- the client and server certificates may or may not be signed by the same CA. – Charles Duffy May 17 '12 at 20:11
add comment
1 Answer
up vote 2 down vote accepted
1. Server address and port are specified as part of the socket address in line 9, specified as the parameter to connect.
2. Generally, you've acquired the CA certificate via some out-of-band method, then saved it locally. Linux systems generally have a bundle of certificates for well-known, trusted CAs available under /etc/ssl/certs or similar.
share|improve this answer
the code is being run on Windows. any idea where it would be stored there? would it be retrievable through security exceptions saved in firefox? – ewok May 17 '12 at 17:02
You can export the CA certificates from Firefox, sure, if you know which CA signed the server's certificate. Use PEM format for use with the ssl library (see docs.python.org/library/ssl.html#certificates). But if the server was not signed by one of those CAs, you will want to ask the organization that runs the server about getting a certificate. – zigg May 17 '12 at 19:36
add comment
Your Answer
| http://stackoverflow.com/questions/10639402/ssl-certificate-authentication-in-python?answertab=active | dclm-gs1-039300000 |
0.687854 | <urn:uuid:22635bd5-0390-479d-abb3-e8aa548c3f7a> | en | 0.868971 | Take the 2-minute tour ×
How do I subtract 30 days from the current datetime in mysql?
WHERE exec_datetime BETWEEN DATEDIFF(NOW() - 30 days) AND NOW();
share|improve this question
What is the point of the AND NOW()? – minitech May 26 '12 at 1:49
It's the syntax for the BETWEEN value1 AND value2 – user784637 May 26 '12 at 1:49
@minitech: it's the second operand for BETWEEN – zerkms May 26 '12 at 1:50
how do I subtract 30 days, the -30 days syntax doesn't work – user784637 May 26 '12 at 1:51
@zerkms: Ah... (facepalm) – minitech May 26 '12 at 1:54
add comment
2 Answers
up vote 18 down vote accepted
share|improve this answer
add comment
Let's not use NOW(), you're losing any query caching or optimization because the query is different every time. See the list of functions you should not use here in the docs.
In the below let's assume this table is growing with time. New stuff is getting added and you want to show just the stuff in the last 30 days. This is the most common case.
Note that the date has been added as a string. It is better to add the date in this way from your calling code than to use the NOW() function as it kills your caching.
SELECT * FROM table WHERE exec_datetime >= DATE_SUB('2012-06-12', INTERVAL 30 DAY);
You can use BETWEEN if you really just want stuff from this very second to 30 days before this very second, but that's not a common use case in my experience, so I hope the simplified query can serve you well.
share|improve this answer
So you proposed not no use NOW() and still use it in your answer. o_O PS: your query would return another result, not what OP probably wants – zerkms May 26 '12 at 1:56
@zerkms How would this query produce a different result set than your query? – user784637 May 26 '12 at 2:05
@user784637: uhm, BETWEEN and >= are different operators, you know? My query limits the result set for 30 days ago AND today, this everything after 30 days ago. So tomorrow records won't match for mine and your original query, but will match by this answer – zerkms May 26 '12 at 3:07
Ok, my bad. Typically such queries are in live tables that are growing with time. That is why I dropped the between. I've clarified my answer above. – Joseph Lust May 26 '12 at 10:33
add comment
Your Answer
| http://stackoverflow.com/questions/10763031/how-to-subtract-30-days-from-the-current-datetime-in-mysql | dclm-gs1-039310000 |
0.074496 | <urn:uuid:abfcbda5-9fb6-4e4c-bd8b-7fc8aba481f5> | en | 0.828461 | Take the 2-minute tour ×
Sometimes I use vim to write non-US text, and when I wanna use any command in normal mode, I need to change layout to US. It's possible to do that automaticly?
PS. I can do mapping like this, but in this case command looks like :ц instead :w - not pretty and typo-risk.
I don't want to use keymap option, because I prefer switch languages by CapsLock. I've try to write autocmd for InsertLeave event, but failed...
Update 2
Probably anybody know, why the following not work?
function SetUsLayout()
!setxkbmap us,ru
autocmd InsertLeave * call SetUsLayout()
share|improve this question
The answer here is relevant: stackoverflow.com/a/3777557/329063 – glts Jun 11 '12 at 17:37
See my answer to a similar question "Vim “annoyance” with keyboard layouts" rather than the one linked in the previous comment, since it covers effectively the same issue and it is more thorough. – ib. Jun 12 '12 at 3:21
I already write in Update, that don't want to use keymap option, because it's not possible to map CapsLock in vim. – Kulti Jun 12 '12 at 8:01
add comment
2 Answers
:help langmap
is likely to provide all the info you need.
share|improve this answer
"Characters entered in Command-line mode will NOT be affected by this option." So hjkl works fine, but commands not. – Kulti Jun 11 '12 at 16:58
This deals with what you asked for: normal mode commands. See :help keymap for the command mode. – romainl Jun 11 '12 at 17:06
Ok, I can set keymap=russian-jcukenwin, but to switch to US I need to use ctrl+^ (or map any other), but not very convenient CapsLock. – Kulti Jun 11 '12 at 18:15
I'm not really in a position to test it out (french layout) but you could try something like :nnoremap : :<C-^>. What's the deal with CapsLock? – romainl Jun 11 '12 at 18:58
stackoverflow.com/a/2176558/656610 At now I try to use OS-dependent solution: setxkbmap to switch layout automaticly on InsertLeave event – Kulti Jun 11 '12 at 19:09
show 1 more comment
up vote 0 down vote accepted
Looks like, that cross-platform solution doesn't exist... So, under KDE I use the following:
function! SetUsLayout()
silent !qdbus org.kde.keyboard /Layouts setLayout us > /dev/null
autocmd InsertLeave * call SetUsLayout()
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/10983604/how-to-automaticly-change-keyboard-layout-on-switch-to-vim-normal-mode | dclm-gs1-039330000 |
0.11128 | <urn:uuid:05c85c8e-8377-4fa8-be01-718c71c092bb> | en | 0.936903 | Take the 2-minute tour ×
We have a website that requires a username and password. Once logged in, the user can select a link to a PDF in the web browser. Once this has happened they are able to see the full URL path of the PDF, they could copy and paste the path into a different browser without logging in, or send the address to someone else to look at.
I am asking this for a co-worker so I am not too sure on what is needed, but they want to change it from say "documents/customerlist.pdf" to "documents/info.asp" (not sure what the file type should be, maybe just "documents/info"?) I think that is what the goal is. Is this possible? If someone could point me in the right direction we might be able to figure it out!
share|improve this question
Tim, how are you getting on with this? – halfer Jun 25 '12 at 20:41
Good, the URL rewriting was nice. I didn't even know that was possible! Thanks – Tim G Jun 27 '12 at 12:53
Yes, it's not so well known that there are a number of rewrite approaches for ASP. Handy to know! – halfer Jun 27 '12 at 13:17
add comment
1 Answer
up vote 0 down vote accepted
I should think you can do this in ASP. You'll need to deliver the PDF dynamically via an ASP page, which detects the user's session and only serves the data if they are suitably authenticated (so copying the URL to a different browser/machine will result in a 404 or access denied, as you wish). You'll need to read the data from file and binary-write it to the browser, and set HTTP headers for mime-type, content length etc.
I'd start off with serving it on a pdf.asp?file=customerlist URL, but you can later experiment with changing this to something more readable (docs/customerlist.php). You'll need to look into URL rewriting here.
So, that's the general approach. If you do a web-search around these topics ("ASP serve binary file", "ASP URL rewriting") you are sure to get plenty of examples.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/11127386/hiding-changing-the-virtual-path-in-classic-asp | dclm-gs1-039340000 |
0.046645 | <urn:uuid:7b3cb7a2-f0cb-4f37-84fb-02239c59fe00> | en | 0.890402 | Take the 2-minute tour ×
I apologize for the confusing title, I was a little stumped as to how to word my question.
I am new to CakePHP, but am following along through the cookbook/tutorials nicely, however I have come up against something which I cannot find an answer to.
My structure is as follows:
'Invoices' hasMany 'InvoiceHistory'
'InvoiceHistory' belongsTo 'InvoiceHistoryDeliveryStatus'
Whereby, an invoice can have multiple invoice histories, and each history contains a delivery status id, which links to a name.
On the Invoice view (index.ctp) I am displaying a list of all invoices but wish to display the Most Recent Delivery Status Name (InvoiceHistory contains a date field so it can be sorted) - thereby displaying the 'current Delivery Status'. When I do:
$this->set('invoices', $this->Invoice->find('all'));
It does not go deep enough in what it returns to provide me with Delivery Status Names, nor have I deduced a way of only returning the most recent Invoice History within my result. I know how to do this manually with a MYSQL query but I figured that is probably just plain wrong.
What is the correct way of going about this while following CakePHP conventions?
share|improve this question
add comment
2 Answers
up vote 1 down vote accepted
Use Containable
$this->set('invoices', $this->Invoice->find('all', array(
'contain' => array(
'InvoiceHistory' => array(
share|improve this answer
That's a very neat function!! Thanks for your help - works like a charm. – user984976 Jun 29 '12 at 22:26
add comment
From what I can tell, I think you should check out the Containable behavior.
share|improve this answer
Thanks for your answer Poyan - the containable behavior is exactly what I was looking for. – user984976 Jun 29 '12 at 22:27
add comment
Your Answer
| http://stackoverflow.com/questions/11258977/cakephp-displaying-field-names-via-two-associations | dclm-gs1-039350000 |
0.709853 | <urn:uuid:035e7f07-47f3-4c29-8800-267fc81fd7ac> | en | 0.782984 | Take the 2-minute tour ×
I am using Isapi Rewrite for IIS, and I want to make SEO friendly URLs for a dynamic product page.
I need to replace spaces differently in two query string parameters.
In the first param, \s should be replaced with + In the second, all \s should be replaced with -
#seo. 2 conditions. split on _ delimiter.
RewriteRule ^Store/([^_]+)_([^/]+) Store/Details.aspx?id=$1&name=$2 [QSA,NC]
#replace spaces with + in first condition (doesn't work)
#RewriteRule ^Store/([^\w\s]+)\s(.+)$ Store/Details.aspx?id=$1+$2 [QSA, NC]
#replace spaces with dash in second condition ???
Store/NP SP_name name
//$1: NP+SP
//$2: name-name
// output: Store/NP+SP_name-name
//$1: mn+98+765
//$2: name-name-name
//output: Store/mn+98+765_name-name-name
share|improve this question
add comment
1 Answer
up vote 0 down vote accepted
I've done smth like that the other day, but there was a simplier task with only one type of replacement. Try using the following for basic redirect(if it works, we'll think of a more complex, multiple-parameters scenario):
RewriteRule ^Store/(.+)\s([^_]+)_(.+)\s(.+) /Store/$1+$2_$3-$4 [NC,R=301,L]
Make sure you put in on top of the existing rewrite.
share|improve this answer
Hi, That worked for NP SP_name name, but did not work for NP SP_name name name or mn%2098%20765_name%20name%20name. – User970008 Jul 26 '12 at 2:24
Is there a way to replace all spaces in the condition? not just the first one – User970008 Aug 2 '12 at 17:47
add comment
Your Answer
| http://stackoverflow.com/questions/11637824/regex-to-replace-spaces-in-two-conditions-with-isapi-rewrite/11645753 | dclm-gs1-039360000 |
0.053396 | <urn:uuid:cd9d044c-076c-42e6-a287-f0ad498da1ea> | en | 0.775617 | Take the 2-minute tour ×
I have just installed libjson from sourceforge.net . I tried executing a simple program But i get this error
‘JSONNode’ was not declared in this scope
Here is the code
#include <libjson.h>
int main()
JSONNode n(JSON_NODE);
c.push_back(JSONNode("", 16));
c.push_back(JSONNode("", 43));
c.push_back(JSONNode("", 69));
std::string jc = n.write_formatted();
return 0;
M I missing some header file ?
share|improve this question
Did you make sure libjson.h was saved in the same project folder as this .cpp file? – 0x499602D2 Aug 20 '12 at 11:58
Is it in some namespace? – Lyubomir Vasilev Aug 20 '12 at 12:01
add comment
4 Answers
up vote 1 down vote accepted
I see that libjson stuff is defined in the json namespace. Please try adding json:: in front of JSONNode solve the problem? Like this:
json::JSONNode n(JSON_NODE);
json::JSONNode c(JSON_ARRAY);
share|improve this answer
didnt solve the problem . I get 'json has not been declared' error. – Vihaan Verma Aug 20 '12 at 12:11
On which line is the error? Did you place json:: in front of the other too? – Lyubomir Vasilev Aug 20 '12 at 12:28
I tired replacing as you pointed out . It complains that 'json' has not been declared. – Vihaan Verma Aug 20 '12 at 12:51
add comment
You need to disable #define JSON_LIBRARY in JSONOptions.h, otherwise libjson won't include the C++ headers.
share|improve this answer
add comment
You have to make sure to build the libJson library first.
I followed the following thread and it worked great for me after having the same problem you are having:
For running the Make File: http://stackoverflow.com/a/11865407/1399434e
share|improve this answer
add comment
disable the JSON_LIBRARY in JSONOptions.h
//#define JSON_LIBRARY
then compile again as below
#include "libjson.h"
using namespace libjson;
int main(int argc, char* argv[])
JSONNode* pNode = NULL;
return 0;
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/12037183/jsonnode-was-not-declared-in-this-scope/17242009 | dclm-gs1-039370000 |
0.582337 | <urn:uuid:574617de-f189-4989-aac7-d5ca30a4d851> | en | 0.709429 | Take the 2-minute tour ×
Private Sub framePDF_MouseMove(ByVal... )
framePDF.BackColor = &H80000012&
So, the frame's color is changing.
I can't find the event to return the color back - when the cursor is away from the frame ?
share|improve this question
Is it possible to add a frame slightly larger than the label, position it behind the label and add a MouseMove event to the frame? You can then detect then query the label colour to determine if the mouse is leaving or entering the label. – ooo Aug 30 '12 at 16:16
I think, I understood. Will try, thanks – Alegro Aug 30 '12 at 16:22
add comment
2 Answers
up vote 2 down vote accepted
In vba and VB6 there is no MouseLeave event.
The best way to achieve this is to start a timer when the mouse enters the frame.
Then in the timer code check to see if the mouse pointer is still within the bounds of the frame. If not change the colour back and stop the timer
Put this code in a module:
Public Declare Function GetCursorPos Lib "user32" (lpPoint As _
POINTAPI) As Long
Public Type POINTAPI
x As Long
y As Long
End Type
Create a timer on your form, set interval =10 Enbaled = False
Then the code looks something like this:
Private Sub frameTest_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
frameTest.BackColor = vbRed
tmrMouseLeave.Enabled = True
End Sub
Private Sub tmrMouseLeave_Timer()
Dim pt As POINTAPI
Call GetCursorPos(pt)
Dim xValue As Long, yValue As Long
xValue = pt.x * Screen.TwipsPerPixelX
yValue = pt.y * Screen.TwipsPerPixelY
If (xValue > (Me.Left + frameTest.Left)) And _
(xValue < (Me.Left + frameTest.Left + frameTest.width)) And _
(yValue > (Me.Top + frameTest.Top)) And _
(yValue < (Me.Top + frameTest.Top + frameTest.height)) Then
'we are still inside the frame
'mouse is outside the frame
frameTest.BackColor = vbBlue
tmrMouseLeave.Enabled = False
End If
End Sub
share|improve this answer
UnBelievable ! What is then the purpose of MouseMove ? Will the timer slow the code execution ? Could You please write a short code example for the timer ? – Alegro Aug 30 '12 at 15:57
Thanks, Matt. I will try – Alegro Aug 30 '12 at 16:18
add comment
On a Userform? The Userform also has a MouseMove event that doesn't fire when you're in the Frame.
Private Sub Frame1_MouseMove(ByVal ...)
Me.Frame1.BackColor = vbRed
End Sub
Private Sub UserForm_MouseMove(ByVal ...)
Me.Frame1.BackColor = vbWhite
End Sub
will turn the frame red when you're over it and white when you're not. These events fire constantly, so use them judiciously.
share|improve this answer
Dick, excelent, thanks a lot – Alegro Sep 3 '12 at 7:51
add comment
Your Answer
| http://stackoverflow.com/questions/12200618/mousemove-what-is-the-reverse-event | dclm-gs1-039390000 |
0.990227 | <urn:uuid:97bf9cb8-8bbc-4901-a0b8-c37259363fb1> | en | 0.81103 | Take the 2-minute tour ×
I've been tasked with creating a server monitor that tests the system at standard intervals, and if it's beyond a certain level, the program will send an email to the user. Along with sending an email, it will also create a file that will show the load averages every 60 seconds. I can't seem to get the loop to write to a new line every time, it just keeps over-writing the first line, over and over. What am I missing?
require 'fileutils'
def LoadAvg()
return `cat /proc/loadavg | awk '{print $1" "$2" "$3}'`
def Timer()
servername = `uname -n`.strip
t = Time.now
taber = t.strftime("%m-%d-%Y-%T")
filename = "#{servername}_Systemcheck_#{taber}.txt"
File.open(filename, 'w') { |x|
x.puts "#{t.strftime("%I:%M:%S %p")} - #{LoadAvg()}"
puts LoadAvg()
share|improve this question
add comment
1 Answer
up vote 3 down vote accepted
if you want to APPEND to the file use a instead of w.
unrelated: use Monit, God or Bluepill!
share|improve this answer
Ah, it all makes sense now! Thank you very much. – SecurityGate Aug 31 '12 at 22:04
add comment
Your Answer
| http://stackoverflow.com/questions/12220425/loop-function-in-ruby-to-write-multiple-times?answertab=oldest | dclm-gs1-039400000 |
0.525161 | <urn:uuid:fce7e375-2e1c-4459-bbff-b26026370949> | en | 0.813833 | Take the 2-minute tour ×
I'm building a MVC 4.0 WEB API app, and want to use the following route:
I want to use the appId parameter and use it to set a value in the HttpContext.Current.Items collection, and want it out of the Action matching process. I certainly do not want to add a appId parameter to each and every action method in my controllers.
Does anyone have an idea how to achieve that?
share|improve this question
add comment
1 Answer
up vote 2 down vote accepted
1. You don't need to include appId as a parameter; web API will route to the action that matches the best subset of route parameters. So if no actions have an appId parameter, it will just match on id1, id2, and action name (from {action}).
2. If you want to get the value of appId inside the controller action, you can get the route values from the ControllerContext.RouteData.Values dictionary. (Not sure if that's you're scenario. Do you specifically need to store it in HttpContext.Current.Items?)
This article describes action selection in some detail: http://www.asp.net/web-api/overview/web-api-routing-and-actions/routing-and-action-selection
share|improve this answer
Thank you, Mike! – nir.arazi Sep 16 '12 at 9:40
add comment
Your Answer
| http://stackoverflow.com/questions/12409703/how-do-i-take-a-route-parameter-out-of-the-action-matching-process?answertab=oldest | dclm-gs1-039420000 |
0.055376 | <urn:uuid:58367160-2ca5-4b4c-b1f7-0db251d0323a> | en | 0.846341 | Take the 2-minute tour ×
I am using RadGrid to display assigned customer names to particular salesman. In item template I am binding name of customer with delete button to delete that customer name from that salesman's list. I have a RadComboBox in footer template of Grid. What I want to do is, in needDatasource I am able to bind RadGrid with assigned customer records to that salesman but I also want to display not assigned customers in Combobox of footer template with assign button, When I press assign button, selected customer will be assigned to that sales man and will be displayed in Grid and from combobox that customer will be removed. And on clicking delete button beside the assigned customer name, it will delete the record of customer from grid and will be added to combobox. I don't know which events to be used for this as I am not able to find RadComboBox of footer template in NeedDataSource event. Can anyone help please?
Thank you, Dev
share|improve this question
add comment
1 Answer
up vote 2 down vote accepted
To retrieve your RadComboBox, look in the GridFooterItem. To do so, use the ItemDataBound Event:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
if (e.Item is GridFooterItem)
GridFooterItem item = (GridFooterItem)e.Item;
RadComboBox yourComboBox = (item.FindControl("yourRadComboBoxID") as RadComboBox);
Don't forget adding the property to your aspx file:
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/12425778/radgrid-footer-template-to-add-record | dclm-gs1-039430000 |
0.020209 | <urn:uuid:262e9169-5dc8-4e4d-b18e-a4ddc66e8922> | en | 0.904909 | Take the 2-minute tour ×
What are some recommended ways of dealing with namespace heavy xml documents without having to rely on the browser?
Background: I am handling wsdl/soap documents from Web Services with ajax. It is very frustrating when something like doc.getElementsByTagName("xs:complexType") behaves differently on a mobile cordova app in a tablet, and a chrome browser on the desktop. On some of the devices you have to strip the prefix, and on others you must include it. Another example of a problem is getElementsByTagNameNS on older browsers.
JQuery out of the box seems to make you use the prefix in the selectors as opposed to the actual namespace. This is a bit of a pain, because it is very common for the documents to use multiple prefixes for the same namespace.
Dojox.xml would require me to bring an entire framework to use alongside my existing JQuery code just to handle xml.
I am currently dealing with these issues on a case-by-case basis, but I am wondering if there is a better way.
share|improve this question
If you're stripping prefixes, you're almost certainly doing something wrong, but since you've not posted any code, it's hard to say what. Please show how you are loading and using the wsdl/soap in the Chrome browser. – Alohci Oct 4 '12 at 8:17
I am only stripping the prefix on browsers that have a broken getElementsByTagName() method that won't find the tag if i put the prefix in. Everything works fine in desktop chrome without the prefix stripped. The point was, I am trying to find good ways to parse and walk xml in js without the browser's "help". A library that eluded my searches before was xml for <script>, so I am looking into that now. – insipid Oct 4 '12 at 13:01
add comment
Your Answer
Browse other questions tagged or ask your own question. | http://stackoverflow.com/questions/12711632/browserless-javascript-xml-dom-with-ns-support | dclm-gs1-039450000 |
0.30197 | <urn:uuid:98504f13-e5eb-43bf-8e28-8e4766113a9f> | en | 0.927807 | Take the 2-minute tour ×
I require some advise really, I have 2 different themes and what I want to do is depending on what user account they use to login with they will access a different theme.I've been told implementing a membership provider would help me do this?.
share|improve this question
Do you already have user accounts? – Tim B James Oct 8 '12 at 11:37
yes using .net membership framework you can put your themes in different folders and assign roles so as to allow/deny to respected users only, go for it – Prasad Oct 8 '12 at 11:38
Not as of yet I just have 2 themes set up – user1259076 Oct 8 '12 at 11:39
add comment
1 Answer
up vote 1 down vote accepted
Use this link as a reference to using themes in ASP.NET. But take note to the section that has the following code public void Page_PreInit(), that's the script you're going to need to set the theme dynamically. Your code will look much different because you're going to be leveraging the user that's logged in, but setting it won't change.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/12780913/2-different-logins-accessing-different-themes | dclm-gs1-039460000 |
0.876785 | <urn:uuid:13d2d858-9006-4816-af41-20e214d1f9c7> | en | 0.739383 | Take the 2-minute tour ×
I'm working on a plot with translucent 'x' markers (20% alpha). How do I make the marker appear at 100% opacity in the legend?
import matplotlib.pyplot as plt
plt.plot_date( x = xaxis, y = yaxis, marker = 'x', color=[1, 0, 0, .2], label='Data Series' )
plt.legend(loc=3, mode="expand", numpoints=1, scatterpoints=1 )
share|improve this question
Really an interesting question, quite useful. Thanks! – Pablo Navarro Oct 12 '12 at 13:38
add comment
1 Answer
up vote 1 down vote accepted
If you want to have something specific in your legend, it's easier to define objects that you place in the legend with appropriate text. For example:
import matplotlib.pyplot as plt
import pylab
line1 = pylab.Line2D(range(1),range(1),color='white',marker='x',markersize=10, markerfacecolor="red",alpha=1.0)
line2 = pylab.Line2D(range(10),range(10),marker="_",linewidth=3.0,color="dodgerblue",alpha=1.0)
plt.legend((line1,line2),('Text','Other Text'),numpoints=1,loc=1)
Here, line1 defines a short, white line (so essentially invisible) with the marker 'x' in red and full opacity. As an example, line2 gives you a longer blue line with no markers visible. By creating this "lines," you are able to more easily control their properties within the legend.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/12848808/set-legend-symbol-opacity-with-matplotlib | dclm-gs1-039470000 |
0.065843 | <urn:uuid:df5bb779-2079-498f-939f-239ab5f59a8f> | en | 0.845851 | Take the 2-minute tour ×
I have several UITextViews that contain numbers between one and three digits. I'd like these views to expand and shrink as the number becomes larger or smaller. At the moment the text is shrinking and the TextViews size remains the same.
I'd preferable like to do this using the xib file (I'm very surprised this isn't a meagre check box) but a coded answer would be great if this isn't possible.
share|improve this question
Did you check NSString -sizeWithFont: ? It must be somewhere at top search results when you are looking for iOs NSString size. – A-Live Oct 24 '12 at 20:30
I'll try that search, I've been searching for expandable UITextView and wrap TextView round text and so on. I assumed this would be a property of the UITextView and not the String within it. Thanks – Deco Oct 24 '12 at 20:31
AFAIK there's no such property of the text view, you can find the reference docs of UITextView at developer.apple.com to see everything at one place. What I tried to tell you is that you can check the text size when the delegate text-changed event is fired, then when you have the text size you can change the textView frame as you see it needed. – A-Live Oct 25 '12 at 10:13
add comment
1 Answer
up vote 2 down vote accepted
I'd recommend using the contentSize property of the UITextView:
self.textView.frame = CGRectMake(self.textView.frame.origin.x, self.textView.frame.origin.y, self.textView.contentSize.width, self.textView.contentSize.height);
share|improve this answer
I threw this in to my viewDidLoad method but I'm getting a sigabrt runtime error. for(UITextView *statPanel in statPanels) { statPanel.frame = CGRectMake(statPanel.frame.origin.x, statPanel.frame.origin.y, statPanel.contentSize.width, statPanel.contentSize.height); } – Deco Oct 24 '12 at 21:15
add comment
Your Answer
| http://stackoverflow.com/questions/13057164/how-do-i-make-a-uitextview-wrap-to-accommodate-text-within-it | dclm-gs1-039480000 |
0.430495 | <urn:uuid:94743e2e-24ac-4c6e-8aaf-76ce549c75d3> | en | 0.901294 | Take the 2-minute tour ×
I want to create multiple processes from one master process. I know I want to use a function from the exec family, but it does not seem to be preforming in the way I intended it to. It seems that exec() is a blocking call, or maybe I am just using it wrong. Anyway, on to the code:
const char* ROUTERLOCATION = "../../router";
int main(int argc, char** argv) {
manager manager;
vector<string> instructions = manager.readFile(argv[1]);
//file gives me the number of proceses i want to spawn and that value goes in
for(int i = 0; i < rCount; i++){
cout << "creating:" << i << endl;
The output I see is:
And then everything exits gracefully. Can I not spawn more than one process using execl()?
Also, I would like to communicate with each of these processes, so I don't want to be blocking while these processes are running.
share|improve this question
Where is the fork call? You need to call that, and if it indicates you are the child process you do the exec. The parent continues running and forking children. The children all replace themselves with the program you want to run. – paddy Oct 26 '12 at 2:53
add comment
2 Answers
up vote 2 down vote accepted
You need to fork in your master process, the in your child processes call execl. (exec family of functions replaces your current process image with your new process, so hence why your for loop never completes.)
share|improve this answer
if I fork in the master, won't all my children then read the file as well? – publ1c_stat1c Oct 26 '12 at 3:00
I don't know what your readFile does, but if it just reads the file then closes it and returns the results, then if you fork after that (right before your execl), then no it wont re-read the file, execution proceeds from the point at which you fork. Your child will have a copy of everything the parent does though, at least until execl is called (then everything gets replaced.) – hexist Oct 26 '12 at 3:05
You are correct. Thanks. accepting you as you were the first. Thanks so much. – publ1c_stat1c Oct 26 '12 at 3:10
add comment
calling exec() means that your current program not longer exists. You might want to create a new process using fork() and then call exec() in it so that exec() replaces your new process and your main process still works as you intend it to.
pid_t pid = fork();
if (pid == 0) {// child
} else { // parent
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/13080093/execute-multiple-processes-from-a-master-process | dclm-gs1-039490000 |
0.356082 | <urn:uuid:b327cac5-b378-4890-87a4-cd9b80a7b359> | en | 0.859171 | Take the 2-minute tour ×
I'm getting a compile-time error. It complains that I'm initializing a variable, but not referencing it. What's happening is that I initialize it then make a debug print statement that only get's compiled in for a debug build but not a release build. The error in question is warning c4189 (it's treated as an error and won't compile).
Is it possible to suppress this warning? How about warnings in general?
share|improve this question
You shall try to understand the warning and make warning free code instead of suppressing it. – billz Nov 1 '12 at 23:36
Why not put the variable declaration inside the debug-only part as well? – Kerrek SB Nov 1 '12 at 23:36
If you really want to, there's a #pragma to 'fix' warnings. On the whole, though, you should fix the code, not use the #pragma. – Jonathan Leffler Nov 1 '12 at 23:38
You can just click on the warnings tab (if you're using mvs) to hide the warnings. It should still compile. – user1534664 Nov 1 '12 at 23:42
add comment
1 Answer
up vote 3 down vote accepted
Don't suppress the warning, fix it! Wrap the declaration and initialization of the variable so it only exists in a debug build too.
share|improve this answer
The value IS INITIALIZED but never referenced in debug since the referencing code is stripped out in a release build. – CPlayer Nov 1 '12 at 23:38
@CPlayer you are correct, I edited my answer to give the correct solution in that case. – Scott Chamberlain Nov 1 '12 at 23:39
add comment
Your Answer
| http://stackoverflow.com/questions/13187118/suppressing-compiler-warning-c | dclm-gs1-039500000 |
0.788392 | <urn:uuid:b8b6c435-d8e4-4809-ba3d-b6b8553de97e> | en | 0.88702 | Take the 2-minute tour ×
I have a bunch of records (orders) that I want to make available to users to make reports from.
The users come from different departments, and I would like to make it, so each department can only see their own stuff.
I can't figure out how to do this the right way.
What I have now is: - A model where I have placed a Filter on the Order table.
The filter can use GetUserID() to get the users name, but I can't figure out how I get from that to the "UserDepartment" table that maps users to specific departments.
Ofcourse, I would prefer a solution whereby I didn't have to create new access groups or edit the model for each department that someone might dream up.
Any clues?
(Using SQL server 2008)
EDIT: This link http://blogs.msdn.com/bobmeyers/articles/Implementing%5FData%5FSecurity%5Fin%5Fa%5FReport%5FModel.aspx shows the basics of what I'm trying to do, but the author seems to assume that each record have a UserName field that can be matched.
In my case i want all users of department X to be able to access the line.
share|improve this question
What is the link between user/userdepartment and Order? – gbn Aug 25 '09 at 17:13
Each order has a DepartmentId to the department owning the order – Soraz Aug 25 '09 at 17:45
add comment
3 Answers
We had a similar problem to this and ended up writing a function in SQL.
The function did the following:
1. Received the username parameter from SRSS
2. Performed a lookup on the permissions table and retrieved the records (department Id's in your case).
3. returned the department Id's
Then our sql statement looked like this:
SELECT * FROM ImportantData WHERE DepartmentId IN (SELECT Id FROM fn_GetUserDepartmentAllocations(@UserName))
This did force us to modify all of the sql queries but it allowed us to do it with minimal complex logic.
The other thing that this allows for is if you have one user who transcends department boundaries: for example a manager of 2 departments.
CREATE FUNCTION [dbo].[fn_GetUserDepartmentAllocations]
@UserName NVARCHAR(100)
@TempPermissions TABLE
DepartmentId Int
INSERT INTO @TempPermissions
SELECT DepartmentId
FROM DepartmentPermissions
WHERE DepartmentAllowedUsername = @UserName
The main benefit to doing it this way is it also allows you to edit one place to change the entire permissions structure, you don't have to go through each and every report to change it, instead you change one place
For example you could have a manager who belongs to 2 departments but is not allowed to view them except on thursdays (I know silly example but you get the point hopefully).
Hope this helps
share|improve this answer
add comment
This assume that Users have Orders. So, filter by users who exist in the same dept as the filter user. Don't filter orders directly.
I've guessed at schema and column names: hoep you get the idea...
MY STuff
Order O
UserDept UD ON O.UserCode = UD.UserCode
UserDept UD2
UD2.UserCode = @MYUSerCode
UD2.DeptID = UD.DeptID)
MY STuff
Order O
UserDept D ON O.UserCode = D.UserCode
UserDept U ON D.DeptID = U.DeptID
U.UserCode = @MYUSerCode
share|improve this answer
When you create a Model for SRSS you can add filters and fields to the model, and that in turn creates its own SQL behind the scenes. Is this the same thing ? I fear that if I use SQL to define the datasource, I will not be able to use the GetUserID() of the model. – Soraz Aug 25 '09 at 17:48
Sorry, I've not used models in SSRS. Surely this is data function anyway: a set based join/filter, and not soemthing to do in the report itself? – gbn Aug 25 '09 at 18:02
@Soraz: You can still pass user id as a parameter to the data source right? – Faiz Sep 9 '09 at 6:47
Not sure really. When you say "Create Model" in Visual Studio, it pretty much does everything on its own. I'm not really sure where I would implement any of these sql based approaches. – Soraz Sep 14 '09 at 11:54
add comment
What you're trying to achieve is difficult using the GetUserID() method. To use that your source query would have to return a lot of redundant data, imagine something like the following:
Table: User
Fields: UserID, LoginName, FullName
Table: Department
Fields: DepartmentID, Name
Table: UserDepartments
Fields: UserID, DepartmentID
Table: Order
Fields: OrderNumber, DepartmentID
SELECT O.OrderNumber, O.DepartmentID, U.LoginName
FROM Order O
JOIN Department D ON D.DepartmentID = O.DepartmentID
JOIN UserDepartments UD ON UD.DepartmentID = D.DepartmentID
JOIN User U ON U.UserID = UD.UserID
This will give you more rows than you want, basically a copy of the order for each user in the department that owns the order.
Now you can apply your filter as described in the link you provided. This will filter it down to just one copy of the order rows for the current user if they're in the right department.
If this is a performance issue there's other alternatives, easiest being using a local report (.RDLC) in either ASP.NET, WinForms or WPF and passing user details off to the data call so the filtering can be done in the SQL.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/1329592/sql-server-reporting-services-how-to-best-apply-filters | dclm-gs1-039510000 |
0.271943 | <urn:uuid:34ee6e59-70b0-4105-83b8-dcaebcb7cb0d> | en | 0.957113 | Take the 2-minute tour ×
I wrote a python script to do some experiment with the Mandelbrot set. I used a simple function to find Mandelbrot set points. I was wondering how much efficiency I can achieve by calling a simple C function to do this part of my code? Please consider that this function should call many times from Python.
What is the effect of run time? And maybe other factors that should I aware?
share|improve this question
"Please consider that this function should call many times from Python." Generally this is a bad idea; it would be faster to call once from Python into native code and do as much work in the native code as you possibly can. The boundary between the two is not cheap. – cdhowie Nov 9 '12 at 16:15
As a rule the way to improve performance is to measure what is slow and then optimise it, if you find your python code which you suspect is slow, and measure it, then compare with a C version then you will find the answer. This doesn't feel like an answer to your question, but I think what is much more important here is that if you were approaching optimisation correctly you wouldn't have to ask this question. :) – jheriko Nov 9 '12 at 16:19
add comment
closed as not a real question by Martijn Pieters, jdi, Lev Levitsky, Jaguar, Matti Lyra Nov 9 '12 at 17:09
1 Answer
You'll want the python calls to your C function to be as little as possible. If you can call the C function once from python and get it to do most/all of the work, that would be better.
share|improve this answer
That is a ridiculously stupid article, illustrating poorly constructed benchmarks. Read the comments on it. But I agree with your actual answer. You should remove the article link though. – jdi Nov 9 '12 at 16:36
Yes, I agree the benchmarks are poorly constructed and you cannot decide anything by looking at the results. – Amir Masoud Nov 9 '12 at 16:41
add comment
| http://stackoverflow.com/questions/13311732/efficiency-of-calling-c-function-from-python | dclm-gs1-039520000 |
0.144766 | <urn:uuid:8e99b9f6-54c0-4267-9934-bfc3cb8b107d> | en | 0.819236 | Take the 2-minute tour ×
We recently upgraded from Oracle 10g to 11g and now the microsoft provider MSDAORA.1 won't work. I've changed to using the OraOLEDB.Oracle provider but now one of my stored procedures that is returning a resultset isn't going to work either.
Old Call: strSQL = "{call SYSADM.lss_pkg_catalog_pages.get_catalog_pages(?,{resultset 100, lss_media_cd, lss_page_num})}"
So I've been trying to change it to return parameter values but I keep getting the following error: Error: -2147217900 - ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'GET_CATALOG_XXX' ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'GET_CATALOG_XXX' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
I'm guessing that it's because of the data type of my output parameters but can't seem to find the right type to use.
Here is the code I'm using:
dim con, rst1, prm1, prm2, prm3, prm4
set cmCmd = Server.CreateObject("ADODB.Command")
set con = Server.CreateObject("ADODB.Connection")
Set Rst1 = Server.CreateObject("ADODB.Recordset")
Con.Provider = "OraOLEDB.Oracle"
Con.ConnectionString = "Data Source=XXXXXX;Password=XXXXXX;User ID=XXXXX;Persist Security Info=True"
cmCmd.ActiveConnection = Con
cmCmd.CommandType = adCmdText
Set Prm1 = cmCmd.CreateParameter("PRODUCT_ID", adVarChar, adParamInput, 20, strTempProductID)
cmCmd.Parameters.Append Prm1
Set Prm2 = cmCmd.CreateParameter("LSS_MEDIA_XX", adVarWChar, adParamOutput, 100)
cmCmd.Parameters.Append Prm2
Set Prm3 = cmCmd.CreateParameter("LSS_PAGE_XXX", adVarWChar, adParamOutput, 100)
cmCmd.Parameters.Append Prm3
strSql = "{ CALL SYSADM.lss_pkg_catalog_pages.get_catalog_pages(?, ?, ?) }"
cmCmd.CommandText = strSql
I have other straight SQL and other stored procedure calls that return data just fine it's just this one stored procedure that isn't working properly.
Edit: I was asked about the type declaration inside the Oracle stored procedure:
TYPE t_lss_media_XXX is TABLE of ps_lss_cat_XXXX.lss_XXX%TYPE
TYPE t_lss_page_XXX is TABLE of ps_lss_cat_XXXX.lss_XXXX%TYPE
If there is more information necessary from the store procedure let me know and I can post it.
Any suggestions would be greatly appreciated.
Thanks Robert
share|improve this question
Pls check this link from OTN :Stored Procedures and Functions Returning Rowsets – SearchAndResQ Nov 22 '12 at 6:57
I looked at that site and specifically the section on PLSQLRSet and even copied the code and modified it for my situation and still get the same error. – Robert Nov 25 '12 at 4:52
can you show the modified code ? you could edit your question . – SearchAndResQ Nov 26 '12 at 5:34
.. And, as that link shows, can you change the types of those two to ref_cursors ? – SearchAndResQ Nov 26 '12 at 10:55
The code sample is the code I'm using which was copied from that site and modified to meet my needs. – Robert Nov 26 '12 at 13:45
show 3 more comments
1 Answer
up vote 1 down vote accepted
From a suggestion by @searchAnResQ in the comments I had our oracle team redo the stored procedure to return a Ref Cursor and that seemed to do the trick. I found that returning a table wasn't supported by the ODAC version we were working with.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/13494938/return-resultset-from-oracle-11g-stored-procedure-using-classic-asp | dclm-gs1-039550000 |
0.037452 | <urn:uuid:ac47b05e-e34d-4c18-bb46-7b1e7b2d4afa> | en | 0.76534 | Take the 2-minute tour ×
Can anybody say me how to save NSTimer ? I need to display that, at how much time player completed his/her game. please suggest.
share|improve this question
do you mean you wanna know how much time a user has spent for playing a game? – Andrey Chernukha Dec 4 '12 at 9:37
yes, and after that i have to display that time in leaderboard. – Abha Dec 4 '12 at 9:38
i just tested my answered code and it's work perfect, i dont know why some one give minus requtation but angel i just req to you just implement my answer code hope its a help you... thx – Nitin Gohel Dec 4 '12 at 9:56
okat, m trying ur code... – Abha Dec 4 '12 at 9:58
@Angel thx happy coding.. :) – Nitin Gohel Dec 4 '12 at 10:07
show 1 more comment
4 Answers
up vote 2 down vote accepted
you can do like this way..
int currentTime;
BOOL isGameOver;
- (void)viewWillAppear:(BOOL)animated
[self start];
[super viewWillAppear:YES];
- (IBAction)start{
lbl=[[UILabel alloc]init];
//creates and fires timer every second
myTimer = [[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(showTime) userInfo:nil repeats:YES]retain];
//your game action Whenever its game over this method fire and Set One Bool value in this method like
[myTimer invalidate];
myTimer = nil;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Game Over"
message:[NSString stringWithFormat:@"Your Rount Time is %.2d", currentTime]
[alert show];
[alert release];
//you can save this [NSString stringWithFormat:@"Your Rount Time is %.2d", currentTime] in nsuserdefoult or database like bellow
NSString *myGameLastTime =[NSString stringWithFormat:@"Your Rount Time is %.2d", currentTime] ;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:myGameLastTime forKey:@"gameoverTime"];
[defaults synchronize];
//now you can get this time anyplace in your project like [[NSUserDefaults standardUserDefaults] valueForKey:@"gameoverTime"]
lbl.text = [NSString stringWithFormat:@"%.2d", currentTime];
NSLog(@"my lable == %@",lbl.text);
Hope its help you all the best
share|improve this answer
add comment
You don't need to use NSTimer. I suggest you using NSDate
When the game starts:
startDate = [NSDate date];
when the game is over:
endDate = [NSDate date];
NSTimeInterval interval = [endDate timeIntervalSinceDate:startDate];
so now you have time spent and can use it however you like. You can save it in NSUserDefaults just like ordinary double value
share|improve this answer
thanksss. its helpful. – Abha Dec 4 '12 at 10:22
you're very welcome – Andrey Chernukha Dec 4 '12 at 10:26
add comment
U should do some research before ask such questions, its easy to figure it out with google, it will take something like 20 min max,
NSUserDefaults *YourTimerName=[NSUserDefaults standardUserDefaults];
[defaultsPassword setObject:YourTimerName forKey:@"key1"];
[defaultsPassword synchronize];
and then u can recover it like that
Nsstring *str=[[NSUserDefaults standardUserDefaults]objectForKey:@"key1"];
but you need to make your timer Nsstring format firstly and then save it
share|improve this answer
add comment
NSTimer is just a source of periodic time events, there’s not much to save. If you use it to keep track of time in your game, there has to be a variable that keeps the total time. Save that into NSUserDefaults or somewhere.
share|improve this answer
okay, but i m new in ios so can u say me how to save? i m trying to save time in NSUserDeafults but gives "0" in output. – Abha Dec 4 '12 at 9:42
add comment
Your Answer
| http://stackoverflow.com/questions/13699805/how-to-save-nstimer | dclm-gs1-039570000 |
0.075408 | <urn:uuid:6757733e-0f44-4497-924d-ae3fbeef8b1e> | en | 0.850101 | Take the 2-minute tour ×
I have a data frame that looks like this:
What I would like is to use the column month to specify intervals for each season and return those values in a new column from the same data frame. I was using this code for the seasons, which seems to work fine,
# Classify months into seasons
# Create a new column with seasons
for(i in 1:nrow(df)){
if(df$month[i]%in%summer){df$season[i]<-"1-summer"} else
if(df$month[i]%in%fall){df$season[i]<-"2-fall"} else
if(df$month[i]%in%winter){df$season[i]<-"3-winter"} else
However, this loop in already inside of a bigger loop with more complex and bigger data bases. So I was looking for a faster, more efficient approach. The reason that I am using a loop rather than cutting or subsetting my original data frame is because the first loop that I am using is separating and performing analyses on individual animals. The length of resulting data frame varies between animals and one of the problems that I was having is that not all animals were present in all months, so when I was trying to assign seasons inside the loop for animals that were not present on a particular season, then R gave me an error message...
share|improve this question
Have you seen this? stackoverflow.com/questions/9500114/… – Roman Luštrik Dec 19 '12 at 11:50
add comment
2 Answers
up vote 1 down vote accepted
I'd just generate the lookup table for season names and apply that:
> season.names <- rep("",12)
> season.names[summer] <- "1-summer"
> season.names[fall] <- "2-fall"
> season.names[winter] <- "3-winter"
> season.names[spring] <- "4-spring"
> season.names
[1] "1-summer" "1-summer" "2-fall" "2-fall" "2-fall" "3-winter" "3-winter"
[8] "3-winter" "4-spring" "4-spring" "4-spring" "1-summer"
> df$season <- season.names[df$month]
> head(df)
species ind month hour depth season
1 ABC 1 1 0 41.643471 1-summer
2 ABC 1 2 1 36.055533 1-summer
3 ABC 1 3 2 1.901639 2-fall
4 ABC 1 4 3 7.737539 2-fall
5 ABC 1 5 4 35.327364 2-fall
6 ABC 1 6 5 9.156978 3-winter
share|improve this answer
I am trying to use the same approach for "day"/"night" but I noticed that the last "night" for hour 23 is not showing so that code does not run properly. Any suggestions? day<-seq(6,17,1) alltimes<-seq(0,23,1) night<-alltimes[!alltimes%in%day] diel.names<-rep("",24) diel.names[day]<-"day" diel.names[night]<-"night" diel.names – user1626688 Dec 20 '12 at 0:04
The problem is that the hours start at 0 and go to 23, but the vector diel.names has to be indexed from 1 to 24. One way to deal with that is just to have index i refer to hour i-1: diel.names[day+1]<-"day" ; diel.names[night+1]<-"night"; df$diel <- diel.names[df$hour+1]. – Jonathan Dursi Dec 20 '12 at 3:29
add comment
seasons <- c("1-summer", "2-fall", "3-winter", "spring")
df$season2 <- factor(trunc(df$month %% 12 / 3) + 1, labels = seasons)
table(df$season, df$season2)
You can convert df$season2 to character if you wish.
share|improve this answer
It does not work. It gives me this error message "Error in factor(trunc(df$month%%12/3) + 1, labels = seasons) : invalid labels; length 4 should be 1 or 0" – user1626688 Dec 19 '12 at 12:32
@user1626688 You receive this error because you did not include month in your data frame df. Both djhurio's solution and your loop will work if you add the column month to your data frame. – Sven Hohenstein Dec 19 '12 at 12:34
I am trying to run this code in my real script but it is giving me a similar error message "invalid labels; length 4 should be 1 or 1". In some of the individuals there is only data for October and November. Is this going to be an issue here with this code? – user1626688 Dec 19 '12 at 12:44
Strange, I don't receive the error on example data. Try to simplify if something doesn't work. Drop factor. Does this work? df$season2 <- trunc(df$month %% 12 / 3) + 1 – djhurio Dec 19 '12 at 14:11
The example is fine. This code seems to work fine, but when I try to run the code on real data (which not always have all months because some of the animals in my study were only present for 3 or 4 months) then I get an error message. I am not sure if I need to have all months so that the code can specify all seasons. If for example the months for summer are missing, then I don't know if it will still work? – user1626688 Dec 19 '12 at 22:11
show 1 more comment
Your Answer
| http://stackoverflow.com/questions/13951737/fill-specific-values-in-a-data-frame-using-another-column-as-an-index?answertab=oldest | dclm-gs1-039580000 |
0.218491 | <urn:uuid:d78e0716-b87b-4f2d-9980-6bc21e4863f5> | en | 0.91506 | Take the 2-minute tour ×
My question is simple:
What tactics are used with PostgreSQL based applications to avoid the user ever being presented with a DB generated error caused by constraints and foreign keys etc. ?
The rationale for this question is:
It is common practise within all DBs I've worked with to trap at least some user errors. Generally you try to make sure the application guides the users away from error but no matter how idiot proof you make something, someone will always make a better idiot. As a result you always need to encode constraints such as unique constraints and foreign key constraints to ensure that a brilliantly foolish individual does not corrupt your data.
These need to be DB constraints and not application logic because frequently they involve race conditions (only the DB can correctly keep something unique or enforce foreign keys etc).
For modern software it no longer acceptable to present a user with a message such as: ERROR: duplicate key value violates unique constraint "test_x_key". Just the word "error" makes some users phone tech support to tell them the application has broken. Users expect to be talked to as people not as a computer. And well they should... computers the servants of people; not the other way around.
The problem is, I have never found a good solution to reliably catch a DB error resulting from a constraint and trace it's precise origin in order to a) have the application take appropriate action such as correcting the error automatically and retrying or b) presenting the user with a meaningful error message written by the application designer not the makers of PostgreSQL.
I have thought of parsing the resulting human readable error message which usually available in some form or other depending on which language you're working in. My concern over this answer is that I don't see the error messages specified in the manual and so I'm not certain how reliable they are from one version of PostgreSQL to the next.
I'm interested to know: What techniques do people use to identify which DB constraint caused a DML statement to fail or what techniques do people use to avoid hitting these constraints entirely.
share|improve this question
add comment
closed as too broad by Juhana, Charles, Dimitri M, Harry Johnston, Chris Mar 3 at 7:08
2 Answers
When you catch the error, extract the constraint name from the exception/error message and use the constraint name as a key to a resource bundle that maps the name to a human readable message
Given the table:
create table foo
id integer constraint pk_foo primary key,
some_value integer
create a resource bundle (or whatever technique you use in your programming language) with this content:
pk_foo=This record already exists in the database
For FK constraints you can have something like:
fk_foo_bar=There is no corresponding "bar" record available.
These messages can then even be localized.
To supply "generic" error messages, you should rely on the error code and not on the message. The error codes are described in the manual
share|improve this answer
Could you elaborate a little on the reliability of error messages. You suggest that parsing them is acceptable. What is the scope for them changing from one version to the next and thus messing up the "extraction" of the constraint name? – couling Jan 6 '13 at 23:14
@couling: although there is a chance they will change, I doubt that existing message will change substantially. I would however make sure that the language is always set to english, so that you don't need to worry about that. – a_horse_with_no_name Jan 7 '13 at 8:02
add comment
Another possibility (although I can't comment on whether it's a good solution) is to create your own set of translated messages.
See Native Language Support for a description of how message catalogs are written for PostgreSQL. Many of the message strings are parameterized so you may find that the information that you plan to parse out of the error message is already treated as a parameter anyway.
share|improve this answer
This is exactly what we do with LedgerSMB. One note I would make is that the best way to do this is to translate the SQL State code to a human readable message, not the db error string. – Chris Travers Mar 4 '13 at 11:55
add comment
| http://stackoverflow.com/questions/14182584/how-to-replace-a-db-error-with-a-user-readable-message | dclm-gs1-039590000 |
0.695805 | <urn:uuid:569b3279-820c-4081-8bab-980d30f13c8c> | en | 0.891167 | Take the 2-minute tour ×
Our product consists in DLLs we ship to our customers.
When providing Windows 8 versions, I noticed I couldn't link against the CRT statically otherwise applications using our DLLs don't pass the certification.
I couldn't find any document that mentions that. Does someone know why it's not possible or how to make it happen?
Our product only makes use of malloc/free and math functions. It would be so much simpler to link against CRT statically instead of requiring every application that links against us to install the proper vc redist. (and ffs why aren't vc redists deployed through the Windows Update channel?)
share|improve this question
The are distributed through Windows Update. Well, the security patches are anyway. There have been many over the past several years. Which is surely why you are being reminded about it, it ensures that Microsoft can fix a security vulnerability in their code. I don't otherwise see it explicitly listed in the requirement check list either. – Hans Passant Jan 7 '13 at 18:49
executables built with VS2012 (no update 1) don't run on Windows 8 without installing the Visual Studio redists – Gregory Pakosz Jan 7 '13 at 19:21
add comment
1 Answer
Windows Store apps can only be built using VS 2012 and the current CRT. The key point is that static linking of the CRT is not supported for Windows Store apps.
Here is some more information about the CRT:
Windows Store Apps, the Windows Runtime, and the C Run-Time http://msdn.microsoft.com/en-us/library/hh972425.aspx
Here are the list of UNSUPPORTED crt routines: http://msdn.microsoft.com/en-us/library/hh674596.aspx
Rob Caplan writes here:
"If your lib links to a Metro style app compliant C runtime you will be able to call standard C functions such as fopen. You can test against the App Cert Kit to confirm. Runtimes older than VC 2012 's will not work.
Your app will still be subject to the security sandbox and won't have access directories outside of its app data and package."
share|improve this answer
does it mean it's ok to link against the CRT statically (/MT) when you want to build a desktop app? – Gregory Pakosz Jan 8 '13 at 7:31
add comment
Your Answer
| http://stackoverflow.com/questions/14201166/windows-8-certification-requirements-dynamically-linking-with-the-runtime/14205616 | dclm-gs1-039600000 |
0.168517 | <urn:uuid:772bc5ea-99b9-4206-9f61-b836763d37da> | en | 0.90227 | Take the 2-minute tour ×
I have a structure, that i want to write to a regular file as one record, with comma delimited fields. For example
struct A {
int a;
int b;
} test;
Given test.a=1 and test.b = 2, the regular file will have a corresponding 1,2 as one line record. Another requirement, is that i want to write the entire structure with one system call. So, i created a char buffer[10], stored the value of int a,b into buffer, with comma delimited and a new line character and used Linux system write() call to write the buffer.
The problem is that the record ends up as binary in the file. Which is intuitive as i took away the "typeness" from the variables, the momment i stored them in a char array. I can use standard io, but i would like to learn, how i can achieve the desired results with standard linux system calls with the outlined constraints. How can i preserve the "typness" of a variable. By typeness i mean that if the variable is of type int, the regular file should have human readable digits.
share|improve this question
Do you mean fprintf(file, "%d, %d\n", a, b);? – user529758 Jan 14 '13 at 16:56
This doesn't make sense. You're saying that you create a human-readable string (presumably with sprintf or similar), but then when you write() it, the file contains only binary representation of your values? – Oli Charlesworth Jan 14 '13 at 16:57
The typeness is applied by the human when reading the untyped human-readbale format. To have both (readabilty for humans and typeness for machines) you need to use human-readable format which incorporates the typeness as well. XML with a suitable scheme might help here. Further reading: w3.org/TR/xmlschema11-2 – alk Jan 14 '13 at 17:02
Why the downvote? This question targets an essential problem, which was around for a long time ... - and hadn't been solved properly before mark-up came in use. – alk Jan 14 '13 at 17:09
If you want human-readable with types you must explicitly include the types in the formatted output. – Hot Licks Jan 14 '13 at 17:20
add comment
closed as not a real question by H2CO3, Mark, Soner Gönül, brenjt, Mario Jan 14 '13 at 21:08
3 Answers
up vote 5 down vote accepted
What you are looking to do is something like fprintf(fh, "%d,%d\n", test.a, test.b);, if you open the output file with fopen. If you really must use write() for some reason, you can sprintf(buffer, "%d,%d\n", test.a, test.b); write(fd, buffer, strlen(buffer));.
share|improve this answer
How do fprintf or sprintf achieve the correct result? At the lowest level, i am sure they are using write() also. Do they convert int to its ASCII or similar to make it human readable? – Jimm Jan 14 '13 at 17:05
sprintf does not because it only writes to a buffer in memory, not to an output file descriptor. fprintf does end up using write() in some way. What matters here is that both are able to translate numbers in binary form to an array of human readable characters. – whooot Jan 14 '13 at 17:10
It's not what the OP wants, as this way the typness is lost. – alk Jan 14 '13 at 17:15
He wants ints to appear as human readable numbers in the output file and he sure as hell got it. How is the typeness lost when all you have are comma separated numbers? – whooot Jan 14 '13 at 17:18
@alk I think you are reading more than there is in the question. – whooot Jan 14 '13 at 18:40
show 2 more comments
fprintf(fh, "struct:A{int:%d,int:%d}\n", test.a, test.b);
In some environments you might be able to write:
fprintf(fh, "struct:%s{%s:%d,%s:%d}\n", typeid(A).name(), typeid(test.a).name(), test.a, typeid(test.b).name(), test.b);
share|improve this answer
I'm curious. Is this some kind of standard format? – whooot Jan 14 '13 at 19:46
@whooot - Nope. Just a stab at something that sorta fits the OP's presumed "requirement". – Hot Licks Jan 14 '13 at 20:18
ok, thank you for the answer. – whooot Jan 14 '13 at 21:36
add comment
Use fprintf if you want your file to be human readable, writing the file using code like
void writeArrayToFile(struct A* array, int count)
int i;
FILE* fp;
// open file
fprintf(fp, "%d,%d\n", array[i].a, array[i].b);
share|improve this answer
isnt that standard io? – Jimm Jan 14 '13 at 16:57
@Jimm It is. And now what? – user529758 Jan 14 '13 at 16:59
... also it does not preserve the variables types. – alk Jan 14 '13 at 17:08
@Jimm Can you update your question to show how you format your data before the write call, how your output file is currently structured and how you'd like it to appear please? It sounds like H2CO3, whooot and I may all have misunderstood what you're asking. If many users aren't understanding your question, re-wording it would be useful. – simonc Jan 14 '13 at 17:08
@alk Depends on your interpretation of the question I guess. I thought the question was just about getting human readable output (as opposed to using write(fp, &myint, sizeof(myint))) – simonc Jan 14 '13 at 17:11
show 5 more comments
| http://stackoverflow.com/questions/14322952/how-to-not-write-in-binary-format | dclm-gs1-039610000 |
0.687975 | <urn:uuid:c21d1ab3-8039-4729-808b-7fab80c60ace> | en | 0.78723 | Take the 2-minute tour ×
I have three models (tables):
1. content
2. category
3. contentCategory
The contentCategory have content_id and category_id that related to each other.
How I must write relation in each model to select content of specific category?
public function relations()
return array(
share|improve this question
if you define the relationship(PK, FK) while designing the database, yii will automatically build the relationship, which is better than defining manually... yiiframework.com/doc/guide/1.1/en/database.arr the above doc explains cleary about building relations.... – Neeraj Dangol Jan 20 '13 at 9:50
add comment
1 Answer
up vote 2 down vote accepted
If your table contentCategory has only 2 fields content_id and category_id then u don't need to create a model for this table and in the other models you'll have
'contentCategory(content_id, category_id)'),
'contents'=>array(self::MANY_MANY, 'Content',
'contentCategory(category_id, content_id)'),
If your table contentCategory has more content then you'll need to use through:
Link to the guide
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/14422857/how-to-write-relation-between-three-model/14424372 | dclm-gs1-039620000 |
0.116228 | <urn:uuid:02c0b30f-689f-43e9-b58c-27ce836c7b55> | en | 0.809745 | Take the 2-minute tour ×
I'm using a UITextField as a search field: The user can input multiple search values separated by comma. By typing I want to find every custom object in my NSArray that matches one of the search component.
My custom objects have no properties (that can be used for the search). Receiving a value I have to call [myObject fieldForKey:@"username"].value;. Because of this I have to use [NSPredicate predicateWithBlock] (or another way was not possible for me).
My method for the search (will be called whenever a character was changed in the TextField):
-(void)searchEntriesWithString:(NSString*)searchString {
NSArray *dataSource = [NSArray arrayWithArray:_allObjects];
searchString = [searchString stringByReplacingOccurrencesOfString:@" " withString:@""];
NSArray *components = [searchString componentsSeparatedByString:@","];
NSMutableArray *predicates = [NSMutableArray array];
for (NSString *value in components) {
return ( [[(MyObject*)evaluatedObject fieldForKey:@"username"].wert hasPrefix:value ]);
[predicates addObject:predicate];
NSPredicate *resultPredicate = [NSCompoundPredicate andPredicateWithSubpredicates:predicates];
NSMutableArray searchResultArray = [NSMutableArray arrayWithArray:[dataSource filteredArrayUsingPredicate:resultPredicate]];
Assuming following dataSource:
• Object1 with username "userA"
• Object2 with username "userB"
• Object3 with username "userC"
Calling the method with '[self searchEntriesWithString:@"userA,userB"]' should result in an array with Object1 and Object2.
But I don't get this result.
share|improve this question
Maybe it isn't possible this way with NSPredicate? I removed the NSPredicate usage and use normal for loops. My App works now, but I'm still wondering why my code with NSPredicate isn't working. – Sebastian Mar 4 '13 at 14:52
add comment
1 Answer
up vote 2 down vote accepted
Since you wanted one of the search components, not all of the search components, I think you should have used:
NSPredicate *resultPredicate = [NSCompoundPredicate orPredicateWithSubpredicates:predicates];
As you had it using andPredicateWithSubpredicates a term would have needed to pass for "userA" and "userB".
[I realize you asked this three months ago, have found a work around, and moved on but thought I would just leave a suggestion]
share|improve this answer
I tested your suggestion and it's working. Thanks for your help! – Sebastian May 24 '13 at 18:22
You're welcome... I've experienced the frustration of trying to get an NSPredicate to do what I want it to do. – LavaSlider May 25 '13 at 12:21
add comment
Your Answer
| http://stackoverflow.com/questions/15085547/how-to-use-multiple-nspredicates-for-multiple-search-values/16737426 | dclm-gs1-039640000 |
0.081526 | <urn:uuid:6741710a-bb43-436f-b63e-c33696691c5d> | en | 0.897368 | Take the 2-minute tour ×
In my WPF application, my Viewmodel has a boolean property IsOwnerOf and a string property Title. If IsOwner==false, I want a TextBlock displaying the Title (because if you're not the owner, you should not be able to edit it) and if IsOwner==true, I want a TextBox displaying Title - obviously at the same place in the view.
Also I don't want to do it codebehind since I follow the MVVM pattern. Thought about Style.Triggers, but with them I can only influence attributes of an element, not the element type itself, or can I?
EDIT: Practically the answers below regarding triggering Visibility or IsReadOnly work, but I still would like to see a conceptually better answer! What if I replace the TextBox resp. TextBlock by elements that don't have these convenient properties? There must be a better way than creating both and hiding one of them, that just doesn't sound right...
share|improve this question
Have you just considered a TextBox and bind the ReadOnly property to !IsOwnerOf msdn.microsoft.com/en-us/library/… – Blam Mar 11 '13 at 13:44
You can bind the visibility of your controls to the boolean property. Here's an article to help you rhyous.com/2011/02/22/binding-visibility-to-a-bool-value-in-wpf – Rafał Saltarski Mar 11 '13 at 13:45
Please post your markup and the view model. Also, please read this article to help you understand why there are certain pieces to a question that need to exist (msmvps.com/blogs/jon_skeet/archive/2010/08/29/…). – Michael Perrenoud Mar 11 '13 at 13:46
Hmm, sure, I understand, but all is standard here, so I though I omit the code... Also, to the fisrt two comments, see my comments to the answers below. – ToaoG Mar 11 '13 at 13:49
add comment
2 Answers
up vote 1 down vote accepted
The easiest option is to always drop a TextBox and bind it's IsEnabled or IsReadOnly property to the IsOwner flag.
You can also use a DataTemplateSelector to achieve this.
share|improve this answer
Sure, but a TextBox looks different, it "suggests editability" to the user, whereas a TextBlock not. – ToaoG Mar 11 '13 at 13:48
Thanks! The DatatemplateSelector is the solution I was looking for, i.e., I make two templates, one containing the TextBlock, the other one the TextBox, and then I choose the template according to the value of the flag. – ToaoG Mar 12 '13 at 9:52
@ToaoG You're welcome. I wanted to improve the answer and give a sample code for the template selector approach, but I didn't found the time. I'm gald you solved it. – MD.Unicorn Mar 12 '13 at 10:03
add comment
You can use triggers to change the Visibility of your TextBlock and TextBox using a BooleanToVisibilityConverter
share|improve this answer
So you suggest to always have both present, and just juggle the visibility depending on the value of IsOwnerOf? That seems like a waste of resources to me, because I create more objects than I need, and hence not the best practice. Or is that irrelevant? – ToaoG Mar 11 '13 at 13:47
@ToaoG, I would say that's irrelevant. You're talking about two objects - and keep in mind that a TextBlock doesn't even have a window handle. – Michael Perrenoud Mar 11 '13 at 13:59
Ok, granted it is of minimal concern here, but the question was also of broader interest, i.e., what should I do in a similar situation, where I want to toggle between different elements depending on the value of a flag, which dont necessarily have a readonly or visibility property? What is the cleanest way? This one seems like ad hoc problem solving, sry. – ToaoG Mar 11 '13 at 14:13
@ToaoG Ad hoc? Visibility is a property of UIElement. msdn.microsoft.com/en-us/library/system.windows.uielement.aspx – Blam Mar 11 '13 at 18:15
add comment
Your Answer
| http://stackoverflow.com/questions/15340122/display-textbox-or-textblock-depending-on-value-of-a-flag | dclm-gs1-039650000 |
0.511226 | <urn:uuid:ef761407-6b61-48de-bf95-dae48e317448> | en | 0.902187 | Take the 2-minute tour ×
How can I start Pry in Rails/Ruby automatically when any exception occurs, at the location of the raised exception?
I have a hard to debug problem, that I can't seem to trace back to it's source, it occurs in Rails somewhere between a controller responding and a view being rendered.
I figured if I somehow got a pry (pry gem) to open up before or after the stack trace is displayed in the console I might be able to see where the issue has occurred. Is it possible to get Pry to start up automatically when an error occurs?
Or a debugger for that matter?
share|improve this question
add comment
2 Answers
up vote 1 down vote accepted
Use pry-rescue it does exactly what you want.
share|improve this answer
add comment
You can use pry-debugger to set breakpoints and debug in the console using pry. Another thing you can try is to use better_errors which will give you a better error page and also an interactive console.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/15466309/how-can-i-start-pry-in-rails-ruby-automatically-when-any-exception-occurs-at-th | dclm-gs1-039660000 |
0.505779 | <urn:uuid:f832650c-fc77-44cc-8c17-f82ba101be59> | en | 0.93543 | Take the 2-minute tour ×
Is there any way to emulate this kind of 360 degree product view scroll/drag functionality with video, so taking a piece of video and being able to scroll it left and right as though it was a set of images? I've found this tutorial which is about the 360langstrasse.sf.tv/page/ site which is pretty interesting, but it's pretty custom to their specific needs and pretty complex. Is there any way to just take some video and have the kind of left/right scroll/drag functionality that you would get with an image-based 360 degree script? I would just like a little video to load in a placeholder, and then you can drag it left and right.
I've thought about converting frames to jpegs and then stitching them into a panorama, but that gets very big very quickly. Would prefer a video solution, where one can just drag the video itself.
share|improve this question
I've done something simulair for a mobile based project. We went with splitting the video up in jpg's and making a scrolling paralex. Wich worked perfectly, but loading times were huge, so we added an imagepreloader as a splashscreen. Very interested in knowing if there's a viable video sollution to this problem aswell. – Jefferson Mar 19 '13 at 9:21
add comment
1 Answer
You could shoot the video of the object spinning. Then play it forwards for spinning one way and reverse for spinning another.
Using 2 videos could also work - one for spinning one way and the other video the opposite way.
This is possible in Flash but I'm not sure about HTML5 video across browser vendors.
Is it possible to play HTML5 video in reverse?
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/15492981/scrolling-video-back-and-forth-with-script/15778923 | dclm-gs1-039670000 |
0.1134 | <urn:uuid:1360c091-fadc-4f3b-b2e5-c8e79e32823e> | en | 0.948231 | Take the 2-minute tour ×
So far in my use of objective c and cocoa, I have made some simple OSX apps that make use of some of the basic apple UI elements such as NSButton, NSTextFeild, NSView, etc. However, now I find that I'm wanting to add parts to my programs that don't fit so squarely within the given UI elements. ie. in a program I'm writing now, I want to create a checklist in which users can enter new elements, check off elements to delete them, etc. all with a custom UI. My problem right now is that I don't even know where to start looking for the information I need to learn how to create more advanced things like this, or what to search for to start finding information. Could anyone set me on the right track as to what information I should be looking for and where I can go to find it? Thanks.
share|improve this question
It's not entirely clear what this would look like, but you can get a long way down the road by subclassing and customizing the Cocoa UI classes. If it looks basically like a button and acts like a button, chances are you can get the custom look you're after by adjusting the frame, images, and text. A list of checkboxes sounds a lot like a table view with checkboxes in the table cell views, not something that requires a completely custom UI element – jxpx777 Mar 27 '13 at 15:43
add comment
closed as not a real question by Monolo, jrturton, rmaddy, Josh Caswell, Joshua Nozzi Mar 27 '13 at 16:50
1 Answer
up vote -1 down vote accepted
You'll probably want to look at Cocos2d or even OpenGL. I'm guessing though that this may be overkill for your solution. You might also be able to override or extend some of the base UI elements.
If you're new to Objective-C and Mac OS programming, I would recommend taking it a bit slower with this. Often we developers dream up huge complex interfaces when really, just a basic, stock interface would work just fine for our users.
For your first release, keep it simple and just ship some code in short time. Then work with your users and see how they really want to work with your app and go from there.
Good luck!
share|improve this answer
Those are useful for making games, but if you're just making regular controls with non-standard appearances, you can do that with much less work and much better behavior by subclassing the standard controls. – Peter Hosey Mar 28 '13 at 5:42
add comment
| http://stackoverflow.com/questions/15662512/cocoa-creating-more-customized-apps | dclm-gs1-039690000 |
0.062651 | <urn:uuid:38d7f773-2e0e-4c90-aad2-2ddbdfb65caa> | en | 0.855553 | Take the 2-minute tour ×
I have get the content of Xml file and stored it in memory as string , how can I convert this xml string to Configuration Object?
share|improve this question
add comment
Your Answer
Browse other questions tagged or ask your own question. | http://stackoverflow.com/questions/16437350/how-to-convert-string-of-xml-in-memory-to-configuration-object | dclm-gs1-039700000 |
0.038053 | <urn:uuid:abd79910-2dd9-4843-8490-1ca64c320b96> | en | 0.835767 | Take the 2-minute tour ×
After deployiny my rails application to my production server using capistrano, I ran into an issue with my Rabl initializer file:
Uninitialized constant Rabl
However, I can access the Rabl object in my rails console:
Loading production environment (Rails 3.2.11)
irb(main):001:0> Rabl
=> Rabl
I tried adding
require 'rabl'
to my rabl_init.rb file, but then got this error:
`require': cannot load such file -- rabl (LoadError)
My production server is unicorn. This happened to me before with the ActiveAdmin gem, but adding the require fixed the problem. Unfortunately, it did not work for Rabl
share|improve this question
add comment
Your Answer
Browse other questions tagged or ask your own question. | http://stackoverflow.com/questions/16631955/rabl-initializer-error-after-deploying-to-production | dclm-gs1-039710000 |
0.934976 | <urn:uuid:408e240a-301e-46ed-a0ff-be3b46b3a358> | en | 0.707507 | Take the 2-minute tour ×
The django-sphinx documentation shows that django-sphinx layer also supports some basic querying over multiple indexes.
from djangosphinx.models import SphinxSearch
SphinxSearch('index1 index2 index3').query('hello')
It seems SphinxSearch does not contain the function query(). I also tried to include content_type in sphinx.conf sql_query configuration as mentioned in the django-sphinx documentation. Nothing has worked.
Traceback (most recent call last):
AttributeError: 'SphinxSearch' object has no attribute 'query'
Can anybody throw light on how I could get ranked results from multiple indexes in sphinx
share|improve this question
add comment
1 Answer
up vote 6 down vote accepted
instead of using SphinxSearch, you want to use SphinxQuerySet
for example, if i wanted to query three indexes, weigh the results using the title, tags, and content fields, and set custom matching (SPH_MATCH_EXTENDED2) and ranking (SPH_RANK_NONE) modes:
from djangosphinx.models import SphinxQuerySet
search = SphinxQuerySet(
index = "index_1 index_2 index_n",
weights = {
'title': 100,
'tags': 80,
'content': 20
mode = 'SPH_MATCH_EXTENDED2',
rankmode = 'SPH_RANK_NONE')
results = search.query('what is the answer to life, the universe, and everything?')
for result in results:
print result
share|improve this answer
the answer is 42 ;) – nabizan Feb 4 '11 at 9:35
add comment
Your Answer
| http://stackoverflow.com/questions/1767814/querying-multiple-index-in-django-sphinx?answertab=active | dclm-gs1-039720000 |
0.469992 | <urn:uuid:96332f29-41dc-4a0e-adc3-869cfffbb1cb> | en | 0.72036 | Take the 2-minute tour ×
I am trying to solve a optimization problem using Apache Commons. I found a "Hello World" example here for Commons Math 2. But, I would like to use Commons Math 3.2 and I couldn't find any example on how to use this part of the code:
PointValuePair solution = null;
SimplexSolver solver = new SimplexSolver();
solution = solver.optimize(optData);
Specificaly, I don't know what is optData and where I put the constraints. I would appreciate if someone indicate me one "Hello World" example of how to use the org.apache.commons.math3.optim library.
Best wishes!
share|improve this question
add comment
1 Answer
This worked for me:
My version for max cx : Ax <= b, x >= 0. Maybe not "hello world" but I hope it helps:
LinearObjectiveFunction f = new LinearObjectiveFunction(c, 0);
Collection<LinearConstraint> constraints = new
double[] Av = new double[A[i].length];
for(int j=0; j<A[i].length; j++) {
Av[j] = A[i][j];
constraints.add(new LinearConstraint(Av, Relationship.LEQ, b[i]));
SimplexSolver solver = new SimplexSolver();
PointValuePair optSolution = solver.optimize(new MaxIter(100), f, new
GoalType.MAXIMIZE, new
double[] solution;
solution = optSolution.getPoint();
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/17954235/hello-world-example-for-simplexsolver | dclm-gs1-039730000 |
0.08944 | <urn:uuid:8561a69f-7cdf-491a-b55f-d757c6a93e0b> | en | 0.932867 | Take the 2-minute tour ×
I'm using VS 2008 Developer Edition and am finding some bugs with the Test Projects.
I am getting one error that doesn't make sense - I have a class called 'Foo' which I need to test and created the blank test class automatically.
Foo takes 3 paremeters in its constructor - IBar, IBaz, IBang.
When I write a test case, I will Dim foo as New Foo(bar,baz,bang), and I will sometimes get an error that says = 'Type IBang could not be implicitly converted to IBang'. This error does not make any sense.
Even more odd - if I switch to an instance of Foo_Accessor() instead, the error goes away. I've played with the references and then I can eventually fix the above error - but then I get the same error for my Foo_Accessor() class!
I clean, rebuild, and sometimes the error will go away - but then I get the error 'Foo_Accessor' is not defined. Now I go to the Foo class and do 'create accessor' again - again, it still gives the same error. So at this point I'm stuck and my solution won't compile, and the only thing I did was add a new test case through visual studio!
Has anyone seen these issues and could please help?
Also - I have tried everything, including instructions from MS such as - renaming the type, re-referencing the project / in different ways, unloading the projects, etc, etc.. still I wind up with either the 'ifoo cannot convert to ifoo' bug or Foo_Accessor is not defined bug... I'm about to just break down and give the damned property I have to check a ReadOnly accessor... !
share|improve this question
add comment
1 Answer
up vote 1 down vote accepted
It's hard to say for certain but it sounds like you have a problem with your references being setup incorrectly. What's likely happening here is that one of the references between your projects is setup as a DLL reference vs. a project reference. This can confuse the type system into thinking that Bang from the project and Bang from the DLL are actually different types.
I would delete all references between my projects. Then go add all of them back again being careful to select the project from the project tab of the add reference dialog vs. the Browse one. This should fix your problem.
Is this a multi-language project or just a single language project? I've found this type of problem is more likely to occur in a multi-language project but it's certainly happened in a single language one.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/1833396/vs2008-unit-test-project-bugs | dclm-gs1-039740000 |
0.401969 | <urn:uuid:b6848988-3ce9-4ec2-8be8-2f5b96d41abd> | en | 0.904861 | Take the 2-minute tour ×
I'm creating a forum for a website, and plan on implementing a "Report this content" function.
In all honesty, I'm not sure how useful (lit. necessary) the feature will be, since a user account (created by admin) will be required for posting, but the solution interests me.
So in short, this is the scenario:
For all users, there will be read-only access to all (non-restricted) content on the forum. For unidentified users there will be a reply button and report this content button present. The former will proceed to require a login, while I had planned that the latter wouldn't, so that anyone would be able to flag suspicious or offensive content.
The problem I'm thus facing is basically "robot clicks", or rather how to implement the system so it won't be fooled by "robot clicks".
There are a few methods that come to mind:
1) User-agent
2) Requiring several flags (in a predefined timespan?) before reacting in any way
3) robots.txt
4) Requiring human input on a second form (captcha or "specify reason")
What I think of them:
1) Unreliable (as sole solution)
2) This requires a mass of users which might lead to the event never being triggered
3) This is probably the "right" way to go, but will only work for those who respect it
4) Meh, I hate captcha and requiring a reason might raise the bar too high to keep the function useful
What methods would the (highly enlightend) community have to share with me?
share|improve this question
add comment
3 Answers
up vote 1 down vote accepted
You could append the 'report this' <form> to the DOM with javascript's appendChild();.
This would prevent a lot of spam.
It would also prevent users not running javascript from seeing the report button. But since this is a feature that does not hinder the user-experience, it is probably an acceptable option.
window.onload = function() {
var f = document.createElement('FORM');
f.method = 'post';
f.action = 'report.cgi';
var b = document.createElement('INPUT');
b.type = 'submit';
b.value = 'Report this';
The rel="nofollow" attribute makes sure search engines do not 'count' the link, they do however follow it (yes, the name suggests differently).
If you want the search engines not to touch a certain file, use robots.txt
Note 2:
Reporting something is an action that 'changes' something on the server. Thus, it should not be a GET request Instead it should be a POST request. In other words: do not use a <a href""> but instead submit a <form> with its method argument set to "post".
share|improve this answer
Good point on the POST request. How do robots (the nice kind) react to forms? Spamcrawlers do obviously submit forms, so the problem still persists. – nikc.org Feb 1 '10 at 14:13
if you add the form to the DOM with javascript, the crawler would have to support scripting to even notice there is a form. – Jacco Feb 1 '10 at 14:35
'Good' crawlers will never make POST-requests, as it is against the specs. – Jacco Feb 1 '10 at 14:37
needless to say, the 'Good' crawlers aren't what's worrying me. (As much anyway. I'm sure there are unintentionally sloppy ones in that lot, too.) The JS DOM injection + required input is indeed looking like a good way to go. – nikc.org Feb 1 '10 at 14:55
add comment
You could simply redirect to a form where the user needs to enter a reason for reporting the content. A robot probably would not enter anything here and the form would not be processed if the user didn't enter anything.
share|improve this answer
Yeah, I though of this (might've been editing my question while you answered), but I'd rather not go there, unless there isn't a better solution available. – nikc.org Feb 1 '10 at 13:12
But actually, if the reason would be a multiple choice form, maybe it wouldn't be such a deterrant. But how would that be for spiders? – nikc.org Feb 1 '10 at 13:17
Definitely provide an "enter reason" option. Something may sound innocent out of context. Also, name the field in non-standard way ("f0878"), then add a hidden (by CSS) dummy field named in a default way ("reply"). Any notification which sends non-empty "reply" field is spam filled in by a spambot. – SF. Feb 1 '10 at 13:43
add comment
You missed making the link a nofollow one, but I'd opt for a combination of requiring human input (reason, details of complainant) to counter robots and requiring a number of flags to stop people just flagging people they disagree with/don't like on the forum.
share|improve this answer
I do have rel="nofollow" present, but robots do still follow them, they're just treated differently in pageranking. en.wikipedia.org/wiki/… – nikc.org Feb 1 '10 at 13:15
add comment
Your Answer
| http://stackoverflow.com/questions/2176795/implementing-report-this-content-and-detecting-spammer-or-robot-triggered-even | dclm-gs1-039780000 |
0.991645 | <urn:uuid:5c5c209f-1bdb-4efc-ab50-1d3c00624f85> | en | 0.775889 | Take the 2-minute tour ×
now() gives me
datetime.datetime(2010, 7, 6, 5, 27, 23, 662390)
How do I get just datetime.datetime(2010, 7, 6, 5, 27, 0, 0) (the datetime object) where everything after minutes is zero?
share|improve this question
add comment
3 Answers
up vote 21 down vote accepted
dt.replace( second=0, microsecond=0)
share|improve this answer
Note that this is just a value and does not alter dt - if that's what you want then also assign it back to dt. – John Mee Jun 30 '11 at 4:00
add comment
You can use datetime.replace to obtain a new datetime object without the seconds and microseconds:
the_time = datetime.now()
the_time = the_time.replace(second=0, microsecond=0)
share|improve this answer
or the_time= datetime.now().replace(second=0, microsecond=0) – tzot Aug 4 '10 at 11:05
add comment
I know it's quite old question, but I haven't found around any really complete answer so far.
There's no need to create a datetime object first and subsequently manipulate it.
dt = datetime.now().replace(second=0, microsecond=0)
will return the desired object
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/3183707/stripping-off-the-seconds-in-datetime-python/3183727 | dclm-gs1-039860000 |
0.018666 | <urn:uuid:e409c891-8437-48a9-aa76-b3f0cbebf3bc> | en | 0.874656 | Take the 2-minute tour ×
I'm using the WCFTestClient to debug a service. This normally works like a charm. This particular service is using SSL and I need to pass the user name and password. I can right click and edit the config file, but I do not see a place where I can inject the user name and password. On the normal client app for this service, we programatically set the credentials, how do I do this using the tools WCFTEstClient or ServiceConfigurationEditor. Anyone out there know how to do this? Here's how I do it in code.
_client.ClientCredentials.UserName.UserName = ConfigurationManager.AppSettings["name"];
_client.ClientCredentials.UserName.Password = ConfigurationManager.AppSettings["pass"];
Thanks for any help.
~ck in San Diego
share|improve this question
add comment
1 Answer
up vote 18 down vote accepted
I don't think you can do that with the WCF Test Client. It's a fairly limited and simplistic tool - works great in simple scenarios, but stops fairly quickly.
If you need more features and abilities, you might want to look at SoapUI which is a SOAP/web services testing tool and works quite well - the normal edition is free, too!
share|improve this answer
Just a comment for those using SoapUI so you don't have to look this up elsewhere - to pass credentials like the example given in the OP, you would set the WSS-PasswordType = PasswordText and then set the username and password all in the request properties window. – Jim Nov 13 '13 at 19:12
add comment
Your Answer
| http://stackoverflow.com/questions/3301605/wcftestclient-how-can-i-add-username-and-pass | dclm-gs1-039870000 |
0.256512 | <urn:uuid:8f6c5e92-b36a-4246-b2bc-af5bfcbc490b> | en | 0.752857 | Take the 2-minute tour ×
Is there some way to send a struct like:
struct COLOR {
float r, g, b, a;
directly into glColor*() function as one parameter? Would make the code nicer.
I could make own function and send separetely each R,G,B,A values onto glColor4f() but that wouldnt be that nice. So im looking a way to send it the most optimal way as possible.
share|improve this question
add comment
3 Answers
up vote 5 down vote accepted
COLOR color;
glColor4fv((GLfloat*) &color);
Update: I wouldn't recommend creating an inline function, however, you could use GLfloat in your struct to get the expression clearer. Use &color.r to avoid a compiler warning.
struct COLOR {
GLfloat r,g,b,a;
COLOR color;
share|improve this answer
hmm, is it possible to make it any cleaner from that? – Newbie Oct 17 '10 at 19:41
actually, I think it's as clear as it can possibly be. – Viktor Sehr Oct 17 '10 at 19:47
@Newbie: You can just do glColor4fv(&color.r), assuming GLfloat is just float. – GManNickG Oct 17 '10 at 19:48
should i make inline void glColor(const COLOR &color){ return glColor4fv((GLfloat*)&color); } ? would clean up the code, but im not so sure about using gl function looking function names... also does it make it faster if i use &color.r rather than (GLfloat*)&color ? if i make my struct use GLfloat instead could i just use &color ? – Newbie Oct 18 '10 at 15:30
updated the answer – Viktor Sehr Oct 18 '10 at 17:15
show 2 more comments
The most optimal way of sending vertex data is Vertex Arrays, it will also make your code look nicer, you should take a look.
share|improve this answer
i dont always want to create vertex arrays for little things since the optimizing would be useless – Newbie Oct 18 '10 at 15:27
add comment
to make the code of calling glColor4fv simpler,
i prefer writing a small class to encapsulate the color values and
use operator overloading to to convert to float * automatically.
class MyClr
MyClr(float r, float g, float b, float a)
m_dat[0] = r;
m_dat[1] = g;
m_dat[2] = b;
m_dat[3] = a;
// if needed, we can
// overload constructors to take other types of input like 0-255 RGBA vals
// and convert to 0.0f to 1.0f values
// wherever a float* is needed for color, this will kick-in
operator const float* ()const { return (float*)m_dat;}
float m_dat[4];
// usage
MyClr clrYellow (1.0f, 1.0f, 0.0f, 1.0f);
// to send to OpenGL
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/3954871/opengl-sending-rgba-color-struct-into-glcolor-as-one-parameter | dclm-gs1-039910000 |
0.40648 | <urn:uuid:8647c9e5-bf4c-471d-adc9-a28a9b393828> | en | 0.874637 | Take the 2-minute tour ×
I'm seeing the following crash on two different devices (an iphone 3g and an ipod touch) when in adhoc mode, although it seems to be OK when building in debug mode for those devices. It also seems to be OK on iPhone 4's.
Here's the stack trace that I'm getting in ad hoc mode:
From what I can tell, this stack trace is producing a recursive call to requestWithURL:delegate: - although it makes no such call in code:
+ (TTURLRequest*)requestWithURL:(NSString*)URL delegate:(id /*<TTURLRequestDelegate>*/)delegate {
return [[[TTURLRequest alloc] initWithURL:URL delegate:delegate] autorelease];
So what's going on here? How can I debug this further?
share|improve this question
add comment
1 Answer
up vote 1 down vote accepted
From your stack trace (line 8) it looks like something is calling an undefined function
8 CoreFoundation 0x000a5b28 -[NSObject(NSObject) doesNotRecognizeSelector:] + 8
9 CoreFoundation 0x0004ae00 ___forwarding___ + 500
10 CoreFoundation 0x0004abb8 _CF_forwarding_prep_0 + 40
11 App 0x0005684a +[TTURLRequest requestWithURL:delegate:] + 42
12 App 0x00056840 +[TTURLRequest requestWithURL:delegate:] + 32
First add some print statements in to see which function call is the offender, use:
[object doesRespondToSelector:@selector(someFunction:withArg:)]
If it is not your code which is calling an undefined function make sure the arguments you are passing in are valid, print out the value of URL, and delegate to ensure they are are indeed of the expected type and value. Most importantly make sure that delegate does respond to whatever messages TTURLRequest will pass to it.
Also, is TTURLRequest your class, can you give the full definition, does it extend another class, does it define 'initWithURL'? Can we see the source? Those are important questions for anyone trying to debug your code.
share|improve this answer
TTURLRequest is from facebook's three20 library. Here's the complete source: gist.github.com/638669 – smtlaissezfaire Oct 21 '10 at 15:22
Just a thought, are you sure you are linking the TTURLRequest source properly, and don't just have the header included? From the information given I can't think of anything else which would give you a doesNotRecognizeSelector: error on initialization. – Akusete Oct 21 '10 at 23:23
Akusete - turns out you were right. Basically, a bunch of the three20 subprojects were compiling for the right architecture when compiling for ad hoc. Here's what I did to fix it: – smtlaissezfaire Oct 25 '10 at 20:40
0. Delete the app on the phone if already present 1. Select Ad Hoc Release, Device 2. Navigate into each of three20's dependencies (under Groups & Files => Clicking on project). Once inside the project, hit the active target, set base sdk to iOS device 4.1, and active architectures to standard (armv6, armv7) – smtlaissezfaire Oct 25 '10 at 20:41
3. Clean everything: Build -> Clean Targets Also Clean Dependencies Also Remove Precompiled headers screencast.com/t/GP3TuqE5 4. Rebuild for Device, Ad Hoc release. It should start up, but will crash the first time. Now, relaunch the app from the device, and all should be good. – smtlaissezfaire Oct 25 '10 at 20:42
add comment
Your Answer
| http://stackoverflow.com/questions/3982909/tturlrequest-failing-on-adhoc-release-but-succeeding-otherwise?answertab=active | dclm-gs1-039920000 |
0.990216 | <urn:uuid:9bf30974-891c-427d-a698-2954d690fc03> | en | 0.826655 | Take the 2-minute tour ×
Is there a quick way to "super" deep clone a node, including its properties? (and methods, I guess)
I've got something like this:
var theSource = document.getElementById("someDiv")
theSource.dictator = "stalin";
var theClone = theSource.cloneNode(true);
The new cloned object has no dictator property. Now, say I've got a thousand properties attached to theSource - how can I (non-explicitly) transfer/copy them to the clone?
Your hasOwnProperty answer doesn't work properly, so I adjusted it. This is the solution I was looking for:
temp = obj.cloneNode(true);
for(p in obj) {
if(obj.hasOwnProperty(p)) { eval("temp."+p+"=obj."+p); }
share|improve this question
add comment
1 Answer
up vote 2 down vote accepted
probably the best way to save a lot of properties is to create a property object in which you can store all properties e.g.
thesource.myproperties = {}
thesource.myproperties.dictator1 = "stalin";
thesource.myproperties.dictator2 = "ceasescu";
thesource.myproperties.dictator3 = "Berlusconi";
then you have to copy just one property
theclone.myproperties = thesource.myproperties
otherwise do a for cycle for all properties you have stored
for (p in thesource) {
if (thesource.hasOwnProperty(p)) {
theclone.p = thesource.p;
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/4094811/javascript-clonenode-and-properties | dclm-gs1-039930000 |
0.031447 | <urn:uuid:bb16e723-df91-4c68-b1ce-dce88aa7175d> | en | 0.912389 | Take the 2-minute tour ×
Right now, I'm using LDA topic modelling tool from the MALLET package to do some topic detection on my documents. Everything's fine initially, I got 20 topics from it. However, when I try to infer new document using the model, the result is kinda baffling.
For instance I deliberately run my model over a document that I manually created which contains nothing but keywords from one of the topics "FLU", but the topic distributions I got was <0.1 for every topic. I then try the same thing on one of the already sampled document which has a high score of 0.7 for one of the topics. Again the same thing happened.
Can someone give some clue on the reason?
Tried asking on MALLET mailing list but apparently no one has replied.
share|improve this question
When you say that you run your model over the document you created, what exactly are you doing? Are you attempting to re-run the inference portion of the LDA algorithm on the new document? If so, your result would be expected behavior. It sounds like you are trying to train a new model based solely upon the new document. Could you reply with your actual command? The LDA algorithm does not accept new documents into the topic distributions without needing to infer over all the original documents as well as it is an algorithm over a collection of documents. – user1698895 Jul 6 '11 at 0:12
add comment
3 Answers
I also know very little about MALLET, but the docs mention this...
Topic Inference
Maybe you forgot to do this? It does sound to me like the data you are training on is not in the same format as the data you are testing on.
share|improve this answer
hey @stompchicken, have tried with the --use-pipe-from command. – goh Dec 7 '10 at 10:14
Oh well. In that case I don't have a clue. If you can, try inspecting the training and test data to make sure the documents are being represented in the same way. – StompChicken Dec 7 '10 at 10:23
add comment
I had the same difficulty of Mallet. Later I found the problem is that the documents must be read in through the Pipe that was once used to read in the training documents.
Here is the sample to read in training documents:
ImportExample importerTrain = new ImportExample();//this is an example class in MALLET to import docs.
InstanceList training= importer.readDirectory(new File(trainingDir));
training.save(new File(outputFile));
While reading in docs in topic inference:
InstanceList training = InstanceList.load(new File(outputFile));
Pipe pipe = training.getPipe();
ImportExample importer = new ImportExample();
importer.pipe = pipe; //use the same pipe
InstanceList testing = importer.readDirectory(new File(testDir));
I got my clue from one question posted in their archive:http://thread.gmane.org/gmane.comp.ai.mallet.devel/829
share|improve this answer
add comment
Disclosure: I'm familiar with the techniques and the math generally used for topic inference, but I have minimal exposure to MALLET.
I hope these semi-educated guesses lead you to a solution. No warranty ;-)
I'm assuming you are using the mallet command hlda for training the model.
A few things that may have gone wrong:
• Ensure you used the --keep-sequence option during the import phase of the process. By default mallet saves the inputs as plain Bags of Words, loosing the order in which the words are originally found. This may be ok for basic classification tasks but not for topic modeling.
• Remember that the Gibbs sampling used by mallet is a stochastic process; expect variations in particular with small samples. During tests you may want to specify the same random seed for each iteration to ensu
• What is the size of your training data? 20 topics seems a lot for initial tests which are typically based on small, manually crafted and/or quickly assembled training and testing sets.
• remember that topic inference is based on sequences of words, not isolated keywords (your description of the manually crafted test document mentions "keywords" rather than say "expressions" or "phrases")
share|improve this answer
Hi @mjv, i used the command "train-topics" actually (i assume its using parallelTopicModel). 1. yes, I used the --keep-sequence option. 2. My training data consists of 8000+ documents. I believe that is an adequate dataset? – goh Dec 7 '10 at 9:42
3. Isn't LDA based on bag-of-words? But even if my "manually crafted test document" does not produce the results, shouldn't the "already sampled document" produce a somewhat similar results during inference to that of it's original topic distribution? – goh Dec 7 '10 at 9:45
add comment
Your Answer
| http://stackoverflow.com/questions/4374296/about-lda-inference | dclm-gs1-039950000 |
0.238489 | <urn:uuid:e2aad14e-fb15-4478-b85b-f6eeb1544b91> | en | 0.844914 | Take the 2-minute tour ×
I am converting a winform application to WPF. I am wondering if the files under properties (Resources.resx, Resources.Designer.cs, Settings.settings etc) can be simply migrated to WPF application.
share|improve this question
add comment
1 Answer
Yes, the Resources and Settings designers work the same way in a WPF app. The .resx associated with a Form is however not usable.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/4481508/is-there-any-difference-between-resources-resx-and-settings-setting-in-winform-a | dclm-gs1-039960000 |
0.810365 | <urn:uuid:482f9a38-3e4d-4899-83e2-3fe38b0ab2b2> | en | 0.808019 | Take the 2-minute tour ×
I have float numbers like 3.2 and 1.6.
I need to separate the number into the integer and decimal part. For example, a value of 3.2 would be split into two numbers, i.e. 3 and 0.2
Getting the integer portion is easy:
n = Math.floor(n);
But I am having trouble getting the decimal portion. I have tried this:
remainer = n % 2; //obtem a parte decimal do rating
But it does not always work correctly.
The previous code has the following output:
n = 3.1 => remainer = 1.1
What I am missing here?
share|improve this question
Shouldn't 3.2 be split into 3 and 0.2? – Surreal Dreams Dec 22 '10 at 18:28
Yes. Typo error – Oscar Dec 23 '10 at 9:21
add comment
6 Answers
up vote 71 down vote accepted
Use 1, not 2.
js> 2.3 % 1
share|improve this answer
Thanks. It works fine. – Oscar Dec 23 '10 at 9:20
You just saved my life :) – Shikiryu Apr 8 '11 at 14:39
Sweet, that simplified a nasty problem for me. – Falkayn Jun 29 '12 at 5:11
add comment
var decimal = n - Math.floor(n)
Although this won't work for minus numbers so we might have to do
n = Math.abs(n); // Change to positive
var decimal = n - Math.floor(n)
share|improve this answer
If you already have the integer portion, there's no need to call Math.floor() again -- just use the integer portion that you've calculated. – tvanfosson Dec 22 '10 at 18:29
add comment
You could convert to string, right?
n = (n + "").split(".");
share|improve this answer
add comment
You could convert it to a string and use the replace method to replace the integer part with zero, then convert the result back to a number :
var number = 123.123812,
decimals = +number.toString().replace(/^[^\.]+/,'0');
share|improve this answer
True, you could. – I. J. Kennedy Nov 6 '13 at 2:24
add comment
How is 0.2999999999999998 an acceptable answer? If I were the asker I would want an answer of .3. What we have here is false precision, and my experiments with floor, %, etc indicate that Javascript is fond of false precision for these operations. So I think the answers that are using conversion to string are on the right track.
I would do this:
var decPart = (n+"").split(".")[1];
Specifically, I was using 100233.1 and I wanted the answer ".1".
share|improve this answer
add comment
float a=3.2;
int b=(int)a; // you'll get output b=3 here;
int c=(int)a-b; // you'll get c=.2 value here
share|improve this answer
that doesn't look like javascript to me! – Ch'marr Aug 8 '13 at 1:31
-1. No javascript here, moreover, c = 0 – pckill Feb 3 at 14:53
add comment
Your Answer
| http://stackoverflow.com/questions/4512306/get-decimal-portion-of-a-number-with-javascript/4512317 | dclm-gs1-039970000 |
0.232947 | <urn:uuid:95124499-115c-40d4-98ce-990cad04fa48> | en | 0.862898 | Take the 2-minute tour ×
I added a file to the index with:
git add somefile.txt
I then got the SHA1 for this file with:
git hash-object somefile.txt
I now have a SHA1 and I would like to retrieve the filename of the object in the index using the SHA1.
git show 5a5bf28dcd7944991944cc5076c7525439830122
This command returns the file contents but not the name of the file.
How do I get the full filename and path back from the SHA1?
share|improve this question
add comment
4 Answers
up vote 8 down vote accepted
There's no such direct mapping in git as the name of the file is part of the tree object that contains the file, not of the blob object that is the file's contents.
It's not a usual operation to want to retrieve a file name from a SHA1 hash so perhaps you could expand on a real world use case for it?
If you're looking at current files (i.e. the HEAD commit) you can try the following.
git ls-tree -r HEAD | grep <SHA1>
If you want to find the contents in previous commits you'll need to do something more like this.
git rev-list <commit-list> | xargs -n1 -iX sh -c "git ls-tree -r X | grep <SHA1> && echo X"
share|improve this answer
Thanks for that. I didn't know you could do that – Jonathan Jan 20 '09 at 9:01
If you don't know what to put in for <commit-list>, --all will search across all branches in the repository. – EoghanM Sep 15 '11 at 13:53
My version of git ls-tree only accepts 1 revision as argument (git v1.7.4.4). I adapted yours to for rev in $(git rev-list --all); do git ls-tree -r $rev | grep $SHA; done | uniq – dboehmer Nov 1 '11 at 19:06
@halo: I'm fairly sure everyone's ls-tree takes a single revision argument, that's why I used -n1 with xargs. – Charles Bailey Nov 1 '11 at 21:59
@CharlesBailey: Ah, never knew about the -n option. Seems to be very useful. Thanks for the hint! However the command as listed above didn't work for me. Don't know why but luckily solved my problem in the meantime. – dboehmer Nov 2 '11 at 9:14
add comment
The following shell script is heavily based on http://stackoverflow.com/questions/223678/git-which-commit-has-this-blob and the answer provided by Aristotle Pagaltzis.
# go over all trees
| while read tree commit subject ; do
git ls-tree -r $tree | grep "$obj_hash" \
| while read a b hash filename ; do
if [ "$hash" == "$obj_hash" ]; then
echo $f
if $f ; then break; fi
if $f; then break; fi
I'm sure someone could beautify this script but it does work. The idea is to look at all trees commited and search for your specific hash.
share|improve this answer
add comment
Commit the file and note the sha1 hash of the commit object. After that use
git ls-tree <commit-sha1>
and you will get the names of the files with the hashes.
Check the manual pages for more options.
share|improve this answer
Good answer IMO! – Rob Oct 29 '09 at 23:24
add comment
git rev-list <commit-list> won't include any commits which were for example removed by rebase -i and now are referenced only by reflog, so if blob is not found by command above you should check also reflog ie like this:
git reflog --all | cut -d\ -f1 | xargs -n1 -iX sh -c "git ls-tree -r X | grep <BLOB_SHA> && echo X"
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/460331/git-finding-a-filename-from-a-sha1 | dclm-gs1-039990000 |
0.213774 | <urn:uuid:b01ad236-80f6-4878-9e3d-f5caeeed1b77> | en | 0.805155 | Take the 2-minute tour ×
What are the size limits for HTML 5 client side storage?
share|improve this question
This page has some great information on HTML5 storage: diveintohtml5.org/storage.html The site itself is a wealth of HTML5 information, too. – GreenWebDev Jan 13 '11 at 23:53
Depends on the user's setting in their browser. – drudge Jan 13 '11 at 23:59
@GreenWebDev the link is no longer available. Can you please update it? – Salvador Dali Nov 13 '12 at 7:47
add comment
1 Answer
up vote 5 down vote accepted
It's around 5 MB per website, but it depends a lot on the browser and the settings of the user.
In Safari, for example, if a website wants to use more than 5 MB, the browser will just ask the user if he wants to let the website use more space.
share|improve this answer
reference: dev.w3.org/html5/webstorage/#disk-space – yorah Jan 13 '11 at 23:54
add comment
Your Answer
| http://stackoverflow.com/questions/4686624/what-are-the-size-limits-for-html-5-client-side-storage/4686634 | dclm-gs1-040010000 |
0.985361 | <urn:uuid:142a643b-152c-4b7b-820f-f04f546ba0dc> | en | 0.76886 | Take the 2-minute tour ×
I have Model X and Model Y which are associated through a has_and_belongs_to_many macro. There's a table in the database that retains data on the many-to-many relationships between Model X and Model Y.
I also have Model A, which is associated through a has_many macro with Model X. I want to be able to run a very simple command to reach all Model Y objects associated with Model A. So, in other words, let's say I have the following objects:
objectA.kind_of? ModelA = true
objectX.kind_of? ModelX = true
objectY.kind_of? ModelY = true
I want to be able to run objectA.objectYs and have returned to me [objectY].
What must I put in my model definitions to be able to do this?
(I have tried placing in Model A: (1) has_many :modelY; and (2) has_many :modelY, :through => :modelX. Neither is right.)
share|improve this question
add comment
1 Answer
up vote 1 down vote accepted
Caveat: normally one wouldn't use such perverse model names.
Assuming the models look like this:
class ModelA < ActiveRecord::Base
has_many :model_xes
class ModelX < ActiveRecord::Base
belongs_to :model_a
has_and_belongs_to_many :model_ies, :class_name => 'ModelY',
:join_table => 'model_x_model_ies'
class ModelY < ActiveRecord::Base
has_and_belongs_to_many :model_xes, :class_name => 'ModelX',
:join_table => 'model_x_model_ies'
We can create a scope to get the ModelY's for all the ModelX's belonging to a Model A:
class ModelY < ActiveRecord::Base
scope :find_by_a, lambda { |a| joins(:model_xes).\
then a simple method to call the scope on an instance of ModelA:
class ModelA < ActiveRecord::Base
def ys
Test like so:
require 'spec_helper'
describe ModelA do
before(:each) do
@a = ModelA.create(:name=>"a")
2.times { @a.model_xes.create(:name=>"x") }
it "relates model_x" do
@a.model_xes.count.should == 2
it "relates model y" do
x = @a.model_xes.first
x.model_ies.count.should == 1
it "relates model y through model x" do
@a.model_xes.each do |x|
2.times { x.model_ies.create(:name=>"y") }
ys = @a.ys
ys.count.should == 4
ys.all? { |y| y.name == "y" }.should be_true
Note that HABTM has fallen out of favor, so you're encouraged to use has_many :through instead.
share|improve this answer
My strong thanks for your extremely helpful answer. – Morris A. Singer Feb 10 '11 at 3:33
add comment
Your Answer
| http://stackoverflow.com/questions/4947694/serial-joins-in-a-rails-3-model-how-to-associate-through-a-many-to-many-relatio | dclm-gs1-040030000 |
0.186685 | <urn:uuid:7a6b8011-610c-43ff-8d8d-f9752aa38f7c> | en | 0.877455 | Take the 2-minute tour ×
I'm using a vanilla JBossAS 6 server with a couple of projects to test the functionality of clustered JBoss environments. The problem that I have is that if I transfer an EJB reference from one EJB (of another type) in a node, to an instance of the same type in another node, upon method invocation an exception is thrown, stating that the long_alphanumeric_key key for the specified bean is not registered in the cache (InfinispanStatefulCache).
The thing is that when using a Singleton annotation instead of a Stateful annotation on the object that I need to transfer, the transferred objects works flawlessly, succesfully invoking methods of the shared EJB on the server where it was created. The problem is that this case has the same flaw as the HA-Singleton. All transferred references where previously obtained via a lookup on the HA-JNDI tree.
Some insight on what I'm trying to achieve:
What I currently need is to share a single instance of a Stateful EJB between nodes, like a HA-Singleton. The reason for not using HA-Singleton is that the state of this type of singletons is mantained exclusively on the master node of the cluster, so if the node shutsdown or fails, the state of the instance is lost.
Using a Stateful bean would allow me to mantain the state on the cluster, thus preventing state loss upon failure on a node. I've yet to fully understand how does JBoss and Infinispan cache work, but as far as I've read, @Clustered annotated stateful beans' state is automatically replicated over the cluster.
We've been already warned of the problems of using Singletons and HA-Singletons in the current JBoss version, so any kind of document or pattern to aid solving this design change will be welcome.
Also, I would appreciate any documentation that can provide me insight on how does Infinispan cache and JBoss clustering work. So far the material I've been reading was mixed with older JBoss versions where JBossCache was used instead of Infinispan.
Thanks ind advance,
share|improve this question
add comment
1 Answer
Unfortunately, JBoss AS6 or AS7 does not yet support clustered EJB Singletons - which is really what you're looking for, I think. HA-Singleton will make sure only one instance of some service is only ever started on a single node of the cluster. That doesn't seem like it fits your use case. It seems you really only need to distribute the state of an EJB singleton. Here's what I'd recommend, use a local EJB singleton, but use infinispan to store its distributed state: * For starters, I'd recommend you use AS7 instead of AS6, as the Infinispan integration is more mature. * In AS7, you can directly use an infinispan cache in your Singleton. e.g.
public class MySingleton {
// This references the same infinispan cache container used for sfsb replication
private CacheContainer container;
private Cache<?, ?> cache;
public void init() {
// This will create a cache for use by this singleton
// Any state to be distributed should be stored in the cache.
this.cache = container.getCache(this.getClass().getName());
public void destroy() {
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/5460411/singleton-vs-stateful-remote-ejb-references-in-clusters?answertab=active | dclm-gs1-040080000 |
0.043689 | <urn:uuid:c8781472-c5f3-4583-bff2-b8e65562e7e7> | en | 0.908724 | Take the 2-minute tour ×
I want to remove a class which is added by an obfuscator in a .NET assembly.
This should be possible (cause the obfuscator added one), but I'm not sure in which way.
Has anyone an idea or did something like that? Every clue is welcome.
share|improve this question
Now i wonder how could that be done – V4Vendetta May 13 '11 at 8:40
add comment
1 Answer
up vote 3 down vote accepted
Mono Cecil should be able to help you editing the IL of the assembly and removing the class.
share|improve this answer
thanks, did not know about this. – cevik May 13 '11 at 19:36
add comment
Your Answer
| http://stackoverflow.com/questions/5989313/is-there-any-way-to-remove-a-class-after-an-assembly-has-build | dclm-gs1-040110000 |
0.813886 | <urn:uuid:1aa34988-44b4-4c09-ba01-369b103cbd52> | en | 0.88644 | Take the 2-minute tour ×
Consider this scenario: You want to redirect (REDIRECT) a user to a certain handler (aspx or ashx) without hardcoded path. You have the name of the handler's class, you can even get it's type (ASP.whateverpageclass). Now, how do you get the virtual path?
share|improve this question
add comment
1 Answer
up vote 1 down vote accepted
If I understood correctly, you want a virtual path for a handler if you have the name/type of implementing class. AFAIK, this is not possible because there need not be one to one correlation between two - from ASP.NET run-time perspective, it has to map a virtual path to some handler class (and not a vice-verse). For example, you can have all paths to certain extension be mapped with the same handler type.
As far as your main problem of avoiding hard-coding is concerned, you can handled that having configurable url (to redirect) or have persistent store (database, xml file or config file) that can map some key (for example, handler class name) to virtual path to redirect.
share|improve this answer
Seems like you can't be wrong, but mapping paths is just a pain. – poopysprint Jun 7 '11 at 10:05
I guess defining static property with respective virtual location will work fo now. Thank you. – poopysprint Jun 7 '11 at 10:10
add comment
Your Answer
| http://stackoverflow.com/questions/6263341/getting-virtual-path-of-an-arbitrary-page | dclm-gs1-040130000 |
0.102787 | <urn:uuid:65e8cb64-7fc0-4d9f-913d-46b74b7e507f> | en | 0.879029 | Take the 2-minute tour ×
Suppose you pass an array as argument to a given method, say,
public static DoSomething (string[] array)
// Do something with array here.
and that inside the method you use some instructions that throw an exception if array contains invalid data. In a multi-threaded environment where multiple threads may be accessing array, in what order should you procede?
1) Lock the array to make sure only one thread operates on it at the same time and, after locking, validate it, releasing the lock as soon as you finish working; or
2) Check the array immediately for validity and, in case it is valid, lock it and do your work.
share|improve this question
Of course, if all the threads are readers, it might be you don't need any locks ;p – Marc Gravell Jun 29 '11 at 9:17
And don't lock on the array itself. Locking on objects anybody else knows is usually a bad idea. – CodesInChaos Jun 29 '11 at 9:23
@CodeInChaos you could argue that locking an object that nobody else knows is kinda pointless... – Marc Gravell Jun 29 '11 at 9:32
@Marc - I think a thread-safe class might lock on a private readonly object field - the same instance might have methods invoked from different threads and use that object that no-one else can see? – Kieren Johnstone Aug 9 '11 at 15:44
@Kieren - I meant directly or indirectly :) – Marc Gravell Aug 9 '11 at 16:41
add comment
2 Answers
up vote 5 down vote accepted
You can't lock "the array" if it is null; but it wouldn't matter anyway - the reference can't change; it is still the same reference even if the contents change. So you can defer the lock until you are interested in the contents.
• null check
• lock
• check contents / use contents
If you mean general validity - it depends on whether any threads are going to change the contents. If not... meh, no locks needed. If they are changing the contents, you need to lock before you validate, otherwise your validations are moot.
share|improve this answer
Thanks Marc, you are right! I have already edited the post. – User Jun 29 '11 at 9:16
add comment
I believe that the code within the method doesn't need to lock the item passed as argument. Instead, the caller should do it!!
It's a matter of chain of responsibility: the object that accesses shared data (ie. a static field in a class) should null-check and lock, and the method supposed to operate on its input should not consider any mulithreading issues, assuming that the argument is exclusively used by it.
This is only my opinion, so
• Null check
• Lock
• Call method
• Unlock on return
share|improve this answer
Assuming you use lock(...), the last step is implicit – Marc Gravell Jun 29 '11 at 9:29
add comment
Your Answer
| http://stackoverflow.com/questions/6518220/lock-validate-or-validate-lock?answertab=active | dclm-gs1-040150000 |
0.476512 | <urn:uuid:45f70487-e9c6-40c7-8ff1-9bf2d76e921f> | en | 0.804058 | Take the 2-minute tour ×
I have a JUnit test that tests adding Strings to a Dictionary custom type. Everything works fine for everyone else on a Linux/Windows machine, however, being the first dev in my shop on a mac, this unit test fails for me. The offending lines are where unicode string literals are used:
dict.add( "Su字/会意pin", "Su字/会意pin" );
dict.add( "字/会意", "字/会意" );
Is there a platform-independent way to specify the unicode string? I've tried changing the encoding of the file in Eclipse to UTF-8 instead of the default MacRoman, but the test still fails.
share|improve this question
add comment
1 Answer
up vote 3 down vote accepted
In the flags for the javac compiler, set the -encoding flag, so in your case you'd mark it as
javac -encoding UTF-8
Check here for a quick explanation from the sun forums.
share|improve this answer
Worked like a charm! Thanks! – layne Sep 15 '08 at 20:49
add comment
Your Answer
| http://stackoverflow.com/questions/66668/problem-with-unicode-string-literal-in-unit-test?answertab=votes | dclm-gs1-040170000 |
0.207964 | <urn:uuid:0ed0d192-4968-401e-b044-66d48030ec99> | en | 0.725159 | Take the 2-minute tour ×
I want to capture the screen of my game using glreadpixel(). it works fine over simulator also on 2g iphone with ios version 3.1.1 . but on ipad with ios version 4.2.1 it doesnt . i came to know the issue regarding this. for ios version 4.0 above on a particular device (ipad) we bind depth buffer and use anti-aliasing technique. And when we use glreadpixel() of opengl that capture data from frame buffer returns all 0 in the destination buffer...
if we dont bind the depth buffer to frame buffer and dont use the anti-aliasing technique it works fine.
the code i used is :-
CGRect screenBounds = [[UIScreen mainScreen] bounds];
int backingWidth = screenBounds.size.width;
int backingHeight =screenBounds.size.height;
NSLog(@"width : %f Height : %f",screenBounds.size.width,screenBounds.size.height);
CGSize esize = CGSizeMake(screenBounds.size.width, screenBounds.size.height);
NSInteger myDataLength = esize.width * esize.height * 4;
GLuint *buffer = (GLuint *) malloc(myDataLength);
glReadPixels(0, 0, esize.width, esize.height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
for(int y = 0; y < backingHeight / 2; y++) {
for(int xt = 0; xt < backingWidth; xt++) {
GLuint top = buffer[y * backingWidth + xt];
GLuint bottom = buffer[(backingHeight - 1 - y) * backingWidth + xt];
buffer[(backingHeight - 1 - y) * backingWidth + xt] = top;
buffer[y * backingWidth + xt] = bottom;
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, buffer, myDataLength, releaseScreenshotData);
const int bitsPerComponent = 8;
const int bitsPerPixel = 4 * bitsPerComponent;
const int bytesPerRow = 4 * backingWidth;
CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault;
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;
CGImageRef imageRef = CGImageCreate(backingWidth,backingHeight, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, bitmapInfo, provider, NULL, NO, renderingIntent);
UIImage *myImage = [UIImage imageWithCGImage:imageRef];
[snap setImage:myImage];
[self addSubview:snap];*/
Any idea how to include depth information with anti-aliasing while using glreadpixel() or any other similar function in opegl es ?
share|improve this question
add comment
2 Answers
Figured it out! You have to bind the resolve-framebuffer back to GL_FRAMEBUFFER before calling glReadPixels()
glBindFramebuffer(GL_FRAMEBUFFER, resolveFramebuffer);
glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
glReadPixels(xpos, ypos, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixelByteArray);
glBindFramebuffer(GL_FRAMEBUFFER, sampleFrameBuffer);
Make sure to bind your sample-framebuffer as GL_FRAMEBUFFER before rendering the next frame, but the default Apple template already does this.
share|improve this answer
hey i tried this but it doesnt work....the data captured is all black – Tornado Jul 22 '11 at 6:58
also any idea how to check whether the pixelByteArray in glReadPixels contain the valid data ? – Tornado Jul 22 '11 at 7:14
Are you sure you are rendering anything on that pixel? I copy/pasted this from a working program. – Gabe Aug 31 '11 at 21:53
i got it worked but there's another issue...glReadPixels is quite slow ...when i use it FPS decreases from 30-40 to 2-3 only any alternative to that ? – Tornado Sep 1 '11 at 4:47
Yep, glReadPixels is terrible for performance for a number of reasons: it has to wait for the render to completely finish, it has to resynchronize with the CPU after rendering, and accessing video memory from the CPU is very slow on many architects(don't think that applies to iPhone though). It's fine if you need to check a pixel on a single tap though. – Gabe Oct 19 '11 at 20:32
add comment
This won't solve your problem, but will help tailor your searching. Since you are using OpenGL-ES, glReadPixels() won't be able to read the depth buffer. I'm currently having the same functionality issues with my application.
share|improve this answer
yeah right ! if you find any other way to do so please let me know. meanwhile i should continue with my searching. – Tornado Jul 19 '11 at 4:38
add comment
Your Answer
| http://stackoverflow.com/questions/6731385/problem-reading-data-by-glreadpixel-while-using-depth-buffer-and-anti-aliasing | dclm-gs1-040180000 |
0.031666 | <urn:uuid:44203074-980b-4e4f-984a-f73efb737440> | en | 0.886509 | Take the 2-minute tour ×
I'm making an SCons file for building Docbook documentation. In order to trace dependencies I would like some way to resolve catalog file lookups to an absolute path to a file.
So say I have a bit of Docbook XML :
<title>Docbook example document</title>
<xi:include href="file:///common/logo.xml"
<xi:include href="chap1/chap1.xml"/>
<xi:include href="chap2/chap2.xml"/>
<xi:include href="chap3/chap3.xml"/>
<xi:include href="chap4/chap4.xml"/>
and a catalog.xml file :
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
rewritePrefix="file:///home/kst/svn/TOOLS/Docbook/stylesheet/" />
rewritePrefix="file:///home/kst/svn/TOOLS/Docbook/common/" />
<nextCatalog catalog="/etc/xml/catalog" />
Getting the xinclude href string is no problem using lxml but I'm stuck there. What I need is some way to get the absolute filename that file:///common/logo.xml resolves to (in this case /home/kst/svn/TOOLS/Docbook/common/logo.xml) from the catalog file. It needs to be some kind of Python code so I can use it in my SConstruct file without too much hassle.
Any help is appreciated.
share|improve this question
add comment
1 Answer
up vote 0 down vote accepted
Lxml uses the catalog support from libxml2. Use the environment variable XML_CATALOG_FILES to provide a list of catalogs (you could set this from python as well, using os.environ), or, if this variable is not present, it checks for the existence of /etc/xml/catalog (can't use this one on windows of course).
An alternative would be to use a custom URI resolver. You can find more information in the lxml docs
EDIT: apparently, the question was not about the actual xinclude processing, which works, but about a way to "query" the catalog, or ask it for the actual filenames that would be used for the inclusions.
Lxml (at least currently) has no API to do that. The underlying libxml2 library does support this, however, and the "original" libxml2 python bindings allow you to do this (easy documentation is lacking though, the docstrings in the source code of the libxml2 help, however). So, although this module is not nearly as nice to use than lxml, it seems to be your best bet. Example which seems to work:
>>> import libxml2
>>> libxml2.loadCatalog('catalog.xml')
>>> print libxml2.catalogResolveURI('file:///common/logo.xml')
share|improve this answer
I've been trying to do this but I haven't been able to get it to work. Note that I am not interested in validating my document but in getting the filenames of any xml files the document includes and therefore depends on. – Kevin Steffensen Aug 29 '11 at 12:25
As far as I know, it does not only apply to validating, but also to xinclude resolving. How dit you try it? Did you get any specific errors? – Steven Aug 29 '11 at 15:16
@Kevin Steffensen: I just tested a simple example myself, and xinclude with a catalog seems to work just fine? It would seem that there is something wrong with either the file location, or your xpointer (which would need an id attribute with the value of "logo", I used xml:id="logo" in my test. You could maybe try without the xpointer to check whether you can include the whole document first, then go on with the xpointer) – Steven Aug 29 '11 at 18:45
Actual parsing of the document using xinclude and xpointer works fine. But I want to scan some xml file and find out the filenames of the files that xml file depends on and this is where I fail. I've tried iterating over the <xi:include> elements and grabbing the href attribute. This works but gives me references like 'file:///common/example.xml'. I need to change this reference into an actual filename using the information in my catalog somehow. – Kevin Steffensen Aug 29 '11 at 19:51
Ah, you mean you do NOT want to process the xincludes and actually include the content, only look up the actual filenames via the catalog? (Although I think libxml2 supports that, lxml has no api to do that as far as I know) – Steven Aug 29 '11 at 20:05
show 2 more comments
Your Answer
| http://stackoverflow.com/questions/7228583/python-lxml-catalog-lookup | dclm-gs1-040190000 |
0.880932 | <urn:uuid:1776ede8-8b3c-4610-8135-5b0dfcc3a8a9> | en | 0.930136 | Take the 2-minute tour ×
I'm new to developing in Ruby and have mostly been using irb to experiment with code. For longer scripts, it would be helpful to be able to run them in my native browser (similar to how I run php scripts through MAMP). I believe there is a way to do this using localhost:3000 but I have not been able to get it to work. So my question is, what is the best way to view Ruby scripts in my native browser?
share|improve this question
Your question is a bit confusing. Are you talking about a standalone Ruby program or a Rails application? Do you want to execute the script or look at its source code? – John Topley Apr 26 '09 at 16:24
I'm talking about a standalone Ruby program, which I'm now realizing may only be possible to run over Terminal, as it is Rails which supplies the html code that a browser would read.. Does that sound correct? – jwb Apr 26 '09 at 16:39
Yes, although you can run Rails code through the Terminal too using script/console (think of it as an IRB that has access to your Rails models and controllers). – John Topley Apr 26 '09 at 16:43
add comment
3 Answers
Well, running some Ruby code in IRB has nothing to do with using the Rails framework.
Follow a tutorial (for example this one) to learn the Rails framework itself now you have some understanding of the Ruby language.
Good luck.
share|improve this answer
add comment
I don't see how this would really be helpful to you, but it would be pretty easy to put your code into a simple Sinatra route and have that serve the result of the code into a browser if you want. Then you can just…
require 'rubygems'
require 'sinatra'
get '/' do
"Hello World! This is file #{$0} live from Boulder!"
And when you access the server on your local computer, it will print whatever you put in the method.
I would be interested to hear why you want to do this rather than IRB, though. This seems like kind of a perverse way to code in most cases.
share|improve this answer
add comment
Rack is a Ruby webserver interface, you probably want to use that to hook your ruby script up with a server.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/791118/viewing-a-ruby-on-rails-script-in-my-native-browser/791140 | dclm-gs1-040230000 |
0.465943 | <urn:uuid:061db639-a1b7-4ea8-bd63-b9b798ccc0c9> | en | 0.815765 | Take the 2-minute tour ×
Which data type in Oracle 10 and 11g is best suited for full text search to be conducted on. I am thinking BLOB?
share|improve this question
add comment
1 Answer
It could be varchar2, clob, or blob. It depends on the size of a chunk of text that will be in a record. docs: http://download.oracle.com/docs/cd/B28359_01/text.111/b28303/ind.htm
EDIT here's a basic introduction http://www.oracle-base.com/articles/9i/FullTextIndexingUsingOracleText9i.php
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/8167716/oracle-full-text-search?answertab=active | dclm-gs1-040250000 |
0.413239 | <urn:uuid:dad65f3a-a676-4fd5-bc2a-d4c05ea6d228> | en | 0.932321 | Take the 2-minute tour ×
Given that RESTful web services are all based around the sacred idea that "everything is represented as resources and can be accessed by an address (URI)", this may make sense for CRUD applications (all examples are about listing/creating/updating/deleting entities). However, how about other business logic like, for example, creating a simple calculator RESTful service that has nothing to do with CRUD operations? What can be a good design for such a REST service?
Secondly, what is the real advantage of using REST over SOAP if the logic of SOAP already makes complete sense?
share|improve this question
So what exactly is your question? – paulsm4 Nov 26 '11 at 0:11
add comment
2 Answers
up vote 4 down vote accepted
A calculator service would be simple to model in a RESTful manner. The "R" in "CRUD" stands for "read", and there's no reason that "read" can't also mean "compute". So a simple Reverse Polish calculator service could be accessed via GET:
GET https://calc.com/rpnCalc?3&4&%2B
The URI scheme above simply adds three parameters to the GET request:
+ (URL-encoded as %2B)
That's an idempotent, safe and cacheable request. If this was an insanely complicated math query that took many minutes to compute I could route these queries to an out-of-the-box HTTP proxy and use it to instantly return any pre-computed values should the same URI be queried repeatedly.
Depending on the kinds of calculations you need to do, you could also POST a very complex query to a Calculator resource (passing in the query as the request body) and the server might return the URI to a "result" resource, which you can then GET to retrieve the results, and even paginate through them.
I can access the above calculator service using a command-line tool like curl without building a complex piece of SOAP. I can code calls to it in seconds without having to use any third-party XML library or SOAP toolkit. I can use commodity tools like HTTP proxies to cache results and improve performance. I don't have to worry about SOAP interoperability or check for WS-I compatibility. If I use hyperlinks correctly then I can evolve and improve my service without affecting existing clients or having them to even recompile. There's no WSDL to version and no brittle contract which I have to maintain for years. The clients already know what GET/PUT/POST/DELETE do and I don't have to redefine or re-document their semantics. API clients that decide they'd prefer JSON instead of XML can get it using HTTP's inbuilt content-negotiation feature. I can do absolutely zero of these things with SOAP and Web Services.
Hey, if SOAP fits your needs, have at it. There are many benefits to using REST but they might not be appropriate to your situation. At the very least, learn about what REST can give you with a decent book like this one and then make your mind up after getting the full story.
share|improve this answer
Thanks Brian! So if methods can also be modelled as (sub-)resources, can I also write "GET calc.com/arithmeticCalc/add?a=3&b=4"; ? – karimyafi Nov 26 '11 at 11:19
Yes, but I'd avoid adding verbs to your URI structure. You already have verbs within HTTP, so you should just use nouns to describe your resources within your URIs. That way your API clients won't be confused about how to use each resource. Imagine you do an HTTP POST to an /add resource - how would I know if it would do an actual addition or create a sub-resource? To avoid the confusion in your example, I'd change it slightly to calc.com/arithmeticCalc/adder?a=3&b=4. – Brian Kelly Nov 26 '11 at 17:32
add comment
This is a good example of the tension between nouns and verbs in REST. The suggestion to use "add" or "adder" as the resource is tremendously naive. It implies that each operation be done as a GET to an "adder" or "subtractor". Of course one can have the resource be "calculate" but then we've using a verb. We can change it to "calculator" or "answer", which are nouns but we really haven't done anything useful.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/8275209/how-can-i-create-a-restful-calculator | dclm-gs1-040260000 |
0.883563 | <urn:uuid:72cf702c-e1db-4d84-b785-bd9ab066b4dc> | en | 0.747838 | Take the 2-minute tour ×
Gurus, I am new to JS. I am getting an error, "Unable to find method createEntitlementTree". Can you please help how I should be writing and invoking this method? Thanks in advance for your help.
Ext.define('Myviews.UserGroupManagerPanel', {
extend: 'Ext.panel.Panel',
createUserGroupForm: function(){
this.gridPanel = Ext.create( 'Ext.FormPanel', {
region: 'center',
collapsible: false,
floatable: false,
items: [
xtype: 'textfield',
name: 'userGroupName',
fieldLabel: 'User Group Name',
width: 210
return this.gridPanel;
createEntitlementTree: function() {
return Ext.create( 'Ext.tree.Panel', {
border: true,
rootVisible: false,
useArrows: true,
frame: true,
title: 'Entitlements',
width: 300,
height: 350,
initComponent: function() {
this.store = Ext.create( 'Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: '/TradeHubSVN/admin/getAllEntitlements.json'
this.callParent( arguments);
share|improve this question
Extraneous code should be removed from samples, with an eye towards making them complete, concise & representative. – outis Dec 28 '11 at 6:15
SO uses a Q&A site, rather than a forum. Comments aren't meant for general messaging. If an answer is helpful, up-vote it. If it resolves your issue, accept it. Consider picking a meaningful username. One advantage to this is others can use at-replies and you'll get a notification that someone has addressed you in a comment. – outis Dec 31 '11 at 20:13
add comment
1 Answer
createEntitlementTree() has to be called in the context of an object of the right type. You can't just call it all by itself like you are trying to do.
I don't really understand how createUserGroupForm() is invoked, but you may need this.createEntitlementTree() or obj.createEntitlementTree() where obj is an object of the right type in order to call createEntitlementTree() in the createUserGroupForm() method.
share|improve this answer
Thank you jfriend. Changing it to this.createEntitlementTree() did the trick. Thanks a lot. – user1054725 Dec 30 '11 at 2:59
add comment
Your Answer
| http://stackoverflow.com/questions/8652343/oo-javascript-method-calling-issue | dclm-gs1-040280000 |
0.11385 | <urn:uuid:e8625e00-3886-41e3-9f5f-d6fe907f9a4e> | en | 0.871626 | Take the 2-minute tour ×
I am currently working on a bluetooth application and I am able to connect to paired and unpaired devices already but if i try to connect to a unpaired device the pairing dialog does not show up directly but there will be a notification in the background.
Is there a possibility to directly show the pairing-dialog?
share|improve this question
add comment
Your Answer
Browse other questions tagged or ask your own question. | http://stackoverflow.com/questions/8898845/bluetooth-pairing-dialog-does-not-show-up | dclm-gs1-040320000 |
0.201664 | <urn:uuid:792d1760-b54e-4bb9-b82a-f068cc17c056> | en | 0.75528 | Take the 2-minute tour ×
As with the command line in Pylons call the REST function from controller such as update? How to pass a request.POST to update function?
share|improve this question
add comment
2 Answers
up vote 1 down vote accepted
You need to use paster's post command. Below, I post to /login/attempt of a local app I've wrote.
$ paster post development.ini /login/attempt email_address=me password=invalid
## It returns this JSON
{"status": "fail", "value": "me is not a registered email address."}
Here is the docs for paster post -
Usage: C:\cygwin\home\jaime\virtualenv\sstesting\Scripts\paster-script.py post [options] CONFIG _FILE URL [OPTIONS/ARGUMENTS] Run a request for the described application
This command makes an artifical request to a web application that uses a paste.deploy configuration file for the server and application. Use 'paster request config.ini /url' to request /url. Use 'paster post config.ini /url < data' to do a POST with the given request body. If the URL is relative (doesn't begin with /) it is interpreted as relative to /.command/. The variable environ['paste.command_request'] will be set to True in the request, so your application can distinguish these calls from normal requests. Note that you can pass options besides the options listed here; any unknown options will be passed to the application in environ['QUERY_STRING'].
Options: -h, --help show this help message and exit -v, --verbose -q, --quiet -n NAME, --app-name=NAME Load the named application (default main) --config-var=NAME:VALUE Variable to make available in the config for %()s substitution (you can use this option multiple times) --header=NAME:VALUE Header to add to request (you can use this option multiple times) --display-headers Display headers before the response body
share|improve this answer
add comment
The simplest thing would be to make a HTTP POST request directly:
$ curl -d 'arg1=value&arg2=another' http://host/path/controller/responds/to/
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/9030258/pylons-call-controller-function-from-cli?answertab=active | dclm-gs1-040330000 |
0.108353 | <urn:uuid:bd5d4cd3-a3bf-47a8-a2e6-ddc0af4918fe> | en | 0.757427 | Take the 2-minute tour ×
I'm implementing a layout for a small screen device.
For testing I'm using a Huawei Ideos U8150 which has a resolution of 240x320.
Because of the small resolution I have a major space problem. So I thought I could put an AdMob AdView and a TextView inside of a horizontal LinearLayout.
The AdView size would take up 3/4 of the width and the TextView 1/4.
In the graphical layout tool everything looks as expected. But when I run the app on the device it doesn't display an ad inside of the AdView. I made the background of the AdView red so I can confirm that the AdView is actually visible. It just doesn't display ads.
I confirmed with onReceiveAd that I get ads. And I print the frame of the AdView in that method. Which logs as origin: 0,38 width: 180,47. Looks okay for me too.
So I'm wondering if the AdMob AdView is able to resize its ads so they are displayed correctly. Maybe the things I try are just not possible.
That's my layout:
<LinearLayout android:id="@+id/linearLayoutAds" android:background="#F0F0" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_alignParentTop="true">
share|improve this question
add comment
1 Answer
up vote 4 down vote accepted
Ads won't display if your linearlayout's height becomes less than 50 dp. I have not tried reducing width , but after looking at this thread it looks like its not possible to reduce the width to 180 px.
share|improve this answer
great. At least for the users of tiny devices. They don't see ads :-) Just found that on the AdMob website: "The SDK will request whatever size the requesting AdView was instantiated with. **If there isn't enough space on the device's screen to display the ad, nothing will be shown.**" – Matthias Bauch Jan 30 '12 at 7:16
AdMob Ads are 320x50dp. Your phone has a resolution of 240x320, but is a low density device(1dp = 0.75 px), so it is really 320x426dp. In portrait mode, AdMob requires the entire width of the screen to display an ad, but in landscape mode, it only needs 3/4 of the width on this device. Take another look at your logs; if you receive an ad, but there is not enough space to show it, the SDK will log a warning saying something like "Not enough space to show ad! Wants<320,50>, Has: <240,377>". – Eric Leichtenschlag Jan 31 '12 at 0:11
add comment
Your Answer
| http://stackoverflow.com/questions/9052995/is-it-possible-to-have-an-adview-inside-of-a-linearlayout-which-shrinks-the-advi?answertab=oldest | dclm-gs1-040340000 |
0.059229 | <urn:uuid:14f07c3f-02db-4c40-931d-c972e3caed6d> | en | 0.834621 | Take the 2-minute tour ×
I have two different projects and in one, I have a class that defines a custom event to fire under certain conditions:
public delegate void ButtonHandler(object myObject,
GuitarArgs myargs);
public event ButtonHandler OnButtonPress;
... other stuff ...
GuitarArgs myArgs = new GuitarArgs( guitarState );
if(OnButtonPress!= null)
OnButtonPress(this, myArgs);
Then in another project I create an instance of this class and subscribe to this event:
Guitar.OnButtonPress += Guitar_OnButtonPress;
The event then fires properly, but it seems to be on a different thread, because when I try to access some UI elements, I get an error : The calling thread cannot access this object because a different thread owns it.
The code throwing the error is:
void Guitar_OnButtonPress(object myObject, Guitar.GuitarArgs myargs)
private void GuitarCheck(GuitarState getState)
if (getState.green)
VisualTreeHelper.HitTest(guitarCanvas, null,
new GeometryHitTestParameters(
new RectangleGeometry(new Rect(1, 411, 88, 78))));
What can I do to make this run?
Thank you.
share|improve this question
similar problem to this question: stackoverflow.com/questions/2403972/… – Justin C Mar 29 '12 at 0:31
add comment
3 Answers
up vote 1 down vote accepted
If you are using WinForms this.Invoke(() => GuitarCheck(myargs.State)); (http://msdn.microsoft.com/en-us/library/zyzhdc6b.aspx)
If you are using WPF this.Dispatcher.Invoke(() => GuitarCheck(myargs.State)); (http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher.invoke.aspx)
share|improve this answer
You probably want BeginInvoke. When used improperly Invoke can lead to deadlock. – debracey Mar 29 '12 at 0:44
add comment
You need to check if your event handler is running on a non-UI thread and, if so, invoke it on the UI thread:
How to update GUI from another thread in C#?
I would like to highlight the less-upvoted answer, which provides a very elegant approach using an extension method. I use this in all of my WinForms projects (and use a variant in WPF/Silverlight projects)
share|improve this answer
add comment
So you have an event called OnButtonPress whos event handler is obviously executing on a thread that is not hosting VisualTreeHelper. The big question for me is...why? With a name like OnButtonPress it makes me think it should already be on the UI thread. Afterall, it is a button press right? So why is it executing on another thread to begin with?
Using a marshaling operation like Invoke or BeginInvoke is fine as long as you are aware of why it is needed and what it accomplishes for you. But, you really need to take a step back and identify what all is going on that would cause you to need to use a marshaling operation in the first place. There may be a bigger issue here that you need to address.
share|improve this answer
add comment
Your Answer
| http://stackoverflow.com/questions/9917543/custom-events-and-threading | dclm-gs1-040390000 |
0.418027 | <urn:uuid:c156b48f-3e86-4336-9f51-005f34e9b19c> | en | 0.91744 | %% As much hatedom as this attracts, PLEASE, keep the whole "Complaining About Shows You Don't Like" out of this page.
[[caption-width-right:220:[[VideoGameMoviesSuck It's a video game movie]], [[GenreBlindness how bad could it be?]][[note]]''Very''.[[/note]]]]
'''''Street Fighter: The Legend of Chun-Li''''' -- the second live-action film based on Capcom's long-running StreetFighter video game series, but not a direct sequel to [[{{Film/Street Fighter}} the first]] -- tells the story of Chun-Li Xiang (Kristin Kreuk), a ten-year-old piano/Wushu prodigy who has her young world shattered after the crimelord [[BigBad Bison]] (with the help of his [[ScaryBlackMan Scary Black]] [[TheDragon Dragon]], Balrog) kidnaps her father and whisks him off to parts unknown. After the death of her mother seventeen years later, Chun-Li -- now a concert pianist -- receives a mysterious scroll that tells her to go to UsefulNotes/{{Bangkok}}. Once there, she meets Gen, [[TheAtoner a former partner of Bison]] and leader of the mysterious Order Of The Web; Gen offers to train Chun-Li in preparation for her inevitable showdown with Bison.
The film also has a subplot about Interpol agent Charlie Nash and Bangkok detective Maya Sunee, but they don't really matter until the end (and even then, they only serve as backup for Chun-Li). Continuing the truth that VideoGameMoviesSuck, the film was panned remorselessly and was a commercial failure, even more of an embarrassment than [[Film/StreetFighter the original Street Fighter movie]].
!! ''Street Fighter: The Legend of Chun-Li'' contains examples of the following tropes:
* ButNotTooForeign: Chun-Li and Maya being half-white, for a start.
** The exact ethnicity of M. Bison has never been clear but it's unlikely he's ever been Irish.
* CanonForeigner: Cantana, Maya, Fen, and others.
** On Maya's case, it can be argued that she may or may not be Crimson Viper (since Maya is also Viper's real given name).
* ChildPopstar: Chun-Li started as a pianist when she was young.
* CorruptCorporateExecutive: Bison is one. In fact, his master plan to convert a slum area in prime real estate into middle class housing probably wouldn't be too illegal if it weren't for his tactics.
* DisappearedDad: Or, worse yet, "dragged off before her eyes".
* DragonLady: Cantana
* TheDragon: Balrog
* {{Expy}}: Maya Sunee is almost certainly a stand in for [[VideoGame/StreetFighterIV Crimson Viper]]. They are law enforcement agents that share a first name.
** Bison is closer to [[FatalFury Geese Howard]] than the actual M. Bison.
* {{Gonk}}: Vega, in stark contrast to the video games.
* {{Irony}}: Bison looking and acting similar to Geese Howard from the ''Fatal Fury'' series. Geese had once killed Terry's father and in turn was unintentionally killed by him, who then raises the boy Geese had abandoned. [[spoiler:At the end of this movie Bison falls out of a building much like Geese, but only dies from Chun Li breaking his neck as his daughter watches. Chun Li then asks Nash to take care of her.]]
* InNameOnly: The movie used only the names and basic plot.
* KamehameHadoken : Chun-Li uses one to take Bison down.
* MonumentalView: The movie starts looking out the window of Chun-Li's first house at a beautiful view of the Golden gate Bridge that would place the house somewhere in the Presidio, which has no homes in it.
* NeckSnap: [[spoiler:Bison does this to Chun-Li's father]], right in front of her.
** DeathByIrony: She eventually returns the favor, right in front of his daughter.
* NoPronunciationGuide:
** When Gen talks about Ryu, he mispronounces his name as "Rai-yu". Yes, a movie released in friggin' 2009 is pronouncing Ryu as "Rai-yu".
** A little less common is Bison's "Shadow''lau''", right after the caption reading "Shadow''loo'' Headquarters". And even then, both are wrong.
* NotEvenBotheringWithTheAccent:
** Everyone in Bangkok speaks perfect English with an American accent.
** Chun-Li even speaks [[http://www.youtube.com/watch?v=MPYCybm2s7Y Cantonese with an American accent]].
* TheObiWan: Gen
* OddlySmallOrganization: The Order Of The Web
* OutrunTheFireball
* PsychoForHire: Vega
* RaceLift: Somehow, Chun-Li grows from an obviously Asian child to a 3/4 white Canadian pretending to be full Chinese. All in the span of the intro.
* ScaryBlackMan: Balrog
* SequelHook: At the end of the film, Gen shows Chun-Li a poster for a fighting tournament and mentions a Japanese fighter named "Ryu--something."
* SmugSnake: Bison
* [[MadScientistsBeautifulDaughter The Corrupt Corporate Executive's Beautiful Daughter]]: Rose
* TheWorfEffect: Gen's repeated curb-stompings at Bison's hands
* ThreePointLanding: Used by Chun-Li multiple times
* VillainBall: Bison has a deathgrip on it.
* YouDontLookLikeYou:
** M. Bison: a blonde guy with a beard and a three-piece suit
** Chun-Li: half-white, skinny legs, wears her famous hair buns and blue outfit (or something loosely meant to represent them) for only a short time
** Gen: a guy in his fourties (at least they got the Asian part right)
** [[spoiler:Rose:]] Late teens to early twenties, no AnimeHair, very naive, [[spoiler:is no longer Bison's GoodCounterpart.]]
** Charlie: They couldn't even be bothered to give him glasses, let alone blonde hair, an orange vest and green cargo pants.
** Vega: Unattractive, silver mask he wears because he's embarrassed about said unattractiveness, black hair, bulky black jumpsuit | http://tvtropes.org/pmwiki/folderizer.php?target=Film.StreetFighterTheLegendOfChunLi | dclm-gs1-040530000 |
0.126686 | <urn:uuid:013db4ac-2394-43ea-93df-4f7600672da2> | en | 0.97514 | Now Playing
Chaplains Wanted For Atheists In Foxholes
Military chaplains, most of whom are Protestant Christians, are assigned many secular advising duties, including marriage, family and suicide counseling. But as many as 40,000 U.S. military service members identify as atheists, agnostics or humanists, and a retired Army captain is leading the charge to instate military chaplains who share their beliefs. | http://wamu.org/audio-player?nid=40492 | dclm-gs1-040560000 |
0.998782 | <urn:uuid:8d796e18-0cc4-4bbb-9ae7-4de7264e843b> | en | 0.969267 | We're all used to the idea that making the labour market more flexible, which is a code for making it easier to fire workers, lowers the unemployment rate. I think we've all also seen the counter-argument that this is tosh. It's never quite laid out why it is but it must be so there. Fortunately we've now got some more empirical evidence to bolster our case about flexibility increasing employment:
The advantage of American data is that the various states are rather closer together in their overall culture than are the (fewer) countries of Europe. It's thus easier to see the effects of variations in economic freedom without having too much confounding data. But there we have it, greater economy freedom, including those hiring and firing laws, leads to lower unemployment. We should thus be deconstructing some of our own wasteful regulations and laws around this point in order to lower our own unemployment rate.
I'd also make a rather more speculative point. Why is it that people don't want to believe this finding? As above, we've known it for a long time but there's a great reluctance to believe it. And I think it's because people really don't understand the job churn in the economy.
If you think that a rise in unemployment of 100,000 means that 100,000 people have been fired then you might well think that making it harder to fire people will lead to a reduction in the number of people in unemployment. But the truth is that this isn't what causes a rise in unemployment at all. There are always 100,000 people getting fired. More than that actually: some 3 million jobs, or 10% of the total, are destroyed in the UK economy each year. That's that destruction part of capitalism. This rate doesn't, particularly, rise in recessions nor fall in booms either. That's a reasonably constant rate at which the economy destroys the things that people do for a living.
What does change in a recession is how many new jobs are being created: thus the balance, between those fired and those hired, changes. The actual unemployment numbers that we see are the end result of this complex process. If unemployment rises by 100,000 in one month it's not the result of 100,000 more people being fired. It's the result of 100,000 of that (roughly) 250,000 who get fired every month not finding a new job. Unemployment isn't best thought of as a result of people being fired therefore: it's a result of people not getting hired.
At which point the economic freedom argument begins to make intuitive sense. The more economic freedom, the less regulation stopping you from doing things, the more things will get tried and done.The less the cost of firing an undesired worker the more of them will be hired: demand curves do indeed work that way. So far so true: my speculation is that those who don't get this point are those who don't really understand why unemployment occurs. It simply isn't because people get fired because people get fired all the time. It's that they don't get rehired at times which is what causes unemployment. | http://www.adamsmith.org/blog/economics/making-it-easier-to-fire-workers-really-does-lower-the-unemployment-rate | dclm-gs1-040620000 |
0.078337 | <urn:uuid:3efc1819-1172-4c15-94e0-a688f3c0bf3c> | en | 0.872688 | Business Description
PT Sumber Alfaria Trijaya Tbk is an Indonesia-based company primarily engaged in operating convenience store chain and managing its franchise. The convenience store chain is operated under the brand name Alfamart. The Company classifies its business into two operating segments: food and non-food. Its outlets is available in various areas in Indonesia, such as Jakarta, Bogor, Tangerang and Bekasi (Jabotabek), Medan, Pekan Baru, Bandung, Cilacap, Semarang, Denpasar, Makassar, among others. Its subsidiaries include PT Sumber Indah Lestari and PT Midi Utama Indonesia Tbk. | http://www.alacrastore.com/company-snapshot/PT-Sumber-Alfaria-Trijaya-Tbk-4247827 | dclm-gs1-040640000 |
0.023118 | <urn:uuid:68f11e85-42a9-4392-9355-0f73d52b9aa0> | en | 0.935892 | Arizona suspect denies charges
Last Modified: 10 Mar 2011 02:34 GMT
Jared Loughner is accused of opening fire on US congresswoman Gabrielle Giffords and a crowd of bystanders attending a political event [AFP]
The suspect in the Arizona shooting rampage that critically injured a US congresswoman has pleaded not guilty to an expanded, 49-count indictment, accusing him of killing six people and wounding 13 others.
The plea on Wednesday came shortly before the federal judge presiding over the case sided with prosecutors in ordering Jared Loughner to undergo a psychiatric evaluation to determine whether he is mentally competent to stand trial.
US District Judge Larry Burns set a May 25 hearing date on competency despite objections from defence lawyer Judy Clarke, who said such a proceeding was premature and could interfere with her ability to build trust with her client.
Loughner is accused of opening fire with a semiautomatic pistol on US congresswoman Gabrielle Giffords and a crowd of bystanders attending a political event outside a grocery store in January.
Six people, including a federal judge, were killed and 13 were wounded including Giffords, an Arizona Democrat, who was shot through the head.
In asking for a mental evaluation, prosecutors cited widely publicised accounts of erratic, paranoid behaviour by Loughner in the months before the shooting rampage, including homemade videos posted to YouTube in which Loughner talks about mistrust of the government and mind control.
The return of the new, expanded indictment against Loughner launched a formal US Justice Department review of the case to decide whether to seek the death penalty or life in prison.
Topics in this article
Featured on Al Jazeera
Is there a link between Syria and Ukraine conflicts?
join our mailing list | http://www.aljazeera.com/news/americas/2011/03/20113102933777171.html | dclm-gs1-040650000 |
0.169948 | <urn:uuid:8c8d9cd9-8327-4345-a7cb-c7b77849d0f9> | en | 0.897349 | What are the duties and responsibilities of logistics assistant?
1-assist with inventory management. 2- assist in the management planing of office space allocation including of definition of future needs ,planing office space availability and on time preparation. 3- coordinates office space upon arrival of new
Q&A Related to "What are the duties and responsibilities of..."
The job responsibility will be as follows :- 1. Coordinating with warehouses, freight forwarders, shipping lines. 2. Updating the stock 3. Handling inventory
I used to work in Insurance & got promoted to assistant manager. Basically alls it is is your the assistant to your manager, which involves when she's really busy you do some
They have to work on variety of functions. The main function of an administrative assistant is to help the higher administrative authorities to perform the daily tasks of a company. | http://www.ask.com/question/what-are-the-duties-and-responsibilities-of-logistics-assistant | dclm-gs1-040710000 |
0.7892 | <urn:uuid:fcf1ae4e-d81d-47c2-b48b-cd954fcab7e0> | en | 0.893363 | What Does Preceding Mean?
Preceding is a word used in reference to order or arrangement. It can be used as an adjective to mean or show that something happens before the other does. For example, the preceding protests led to the resignation of the prime minister.
1 Additional Answer
Ask.com Answer for: what does preceding mean
that precedes; previous: Refer back to the footnote on the preceding page.
Source: Dictionary.com
Q&A Related to "What Does Preceding Mean"
Precedent is a rule that a court uses in similar court cases. It is commonly used in divorce, murder, and child custody cases. Many lawyers also use this rule to win cases.
When you use a cell in a formula located within another cell, it's a precedent cell. Likewise, the cell that contains the formula is a dependent cell. So if cell A2 has the formula
a legal case establishing a principle or rule that a court or other judicial body adopts when deciding subsequent cases with similar issues or facts. Court decision that stands as
The paleontologist Steven Mithen speculates that music is the evolutionary bridge between the calls and gestures of our fellow primates and human language. There's much to recommend
Explore this Topic
The word precede” may be used to mean “come or go before something” that is to come, go, be or happen before somebody or something else in time ...
The word preceded means came before or happened before. it is used to refer to positioning where it shows that one act or occurrence came before another. A synonym ...
Precedence is order observed in acknowledgement of people of different ranks in reference to an acknowledged or legal system. It also refers to a right of preferential ... | http://www.ask.com/question/what-does-preceding-mean | dclm-gs1-040720000 |
0.140538 | <urn:uuid:9efb5e8f-de51-4b4f-8630-3ba0c685c0bd> | en | 0.929048 | What is a wet fart?
A wet fart is a sound made from the body. It usually occurs when there is a small amount of feces in the anal area as the fart happens. A wet fart could also be done by the vagina if there is discharge in the vagina as air escapes.
Q&A Related to "What is a wet fart?"
A dangerous disease that can kill you. The best reason ever discovered for wearing underwear.
You may have wet farts because you have diarrhea, which can be caused by a bacterial
I have this same problem. My advice: embrace it. love it. become the best farter you can be. I even wrote a poem about this very topic: I fart every chance that I get. My boxers are
It means when you think you have to fart and it is not gas but liquid that comes out. That is a wet fart.
Explore this Topic
A queef is a sound emitted by a woman's vagina during or after she has sex. This sound is almost identical to a fart that is wet in nature. However, a queef is ... | http://www.ask.com/question/what-is-a-wet-fart | dclm-gs1-040730000 |
Subsets and Splits