text:
Pair and a spare: Tailback depth a must-have in Big Ten play
Added by i898 on September 22, 2021
Recruiting and developing the right running backs to carry it out remains a vital part of program-building in the Big Ten and elsewhere, a task that seemingly never stops. Because once a team has that true standout, what's most important is to find another one.
CLICK HERE FOR MORE SPORTS COVERAGE .
"The more good playmakers you have, the better," Harbaugh said, sounding ready to help assemble a coach's book of pithy quotations.
The 19th-ranked Wolverines lead the FBS with an average of 350 rushing yards per game, behind a tailback time share for senior Hassan Haskins and sophomore Blake Corum. They couldn't have split up the carries any better if they tried: Corum has 49 and Haskins has 48.
There's no place in the nation that has enjoyed more star running backs than Ohio State, where player development is needed to stem the tide of NFL departures as much as inevitable injuries.
Coach Ryan Day has yet to settle on his depth chart this year, and no sympathy is needed given the 277-yard game TreVeyon Henderson had last week to set the single-game freshman rushing record on just 24 attempts. The Buckeyes were playing the "hot hand" against Tulsa, as Day put it, leaving Master Teague III in the background with 14 carries and Miyan Williams on the bench.
Williams won the starting job out of preseason camp that was presumed to be Teague's for the second straight year. In 2020, Teague wound up being overshadowed by transfer Trey Sermon, who became a third-round draft pick by the San Francisco 49ers.
"As we get into the meat of the season, having depth at that position is critical, especially with the balance that we're striving for. We've got to be able to run the ball, throw the ball. We haven't quite found that balance yet," said Day, whose team is third in the conference in passing attempts.
The traditional powerhouse programs aren't alone in their pursuit of multiple running backs, with Minnesota long serving as a prime example.
For three straight years from 2003-05, the Gophers enjoyed the riches of having two 1,000-yard rushers each season. Then-coach Glen Mason even coined the perfect phrase for the formula: a pair and a spare. He ought to have trademarked it; there's now a Twin Cities-based college football podcast using the clever mantra.
"It's awful tough for one guy to carry the ball 40 or 50 times a game if that's what you're intending on doing as far as the makeup of your offense," Mason said this week in a phone interview. "If you always need two, then you better have another guy. Because if one guy goes down, your whole philosophy can't go out the window."
Thomas Hamner (2000), Thomas Tapeh (2004), Marion Barber III (2005) and Laurence Maroney (2006) were all NFL draft picks who played for the Gophers under Mason.
"There's nothing tougher in football than getting tackled. You ask any defensive player what he hates more than anything in practice, and he'll tell you it's when he's the guy who has to get tackled in tackling drills," Mason said, adding: "There are a lot of plays that are designed for 4 yards. If it's well blocked, it's 4 yards and you're going to take a beating."
Just this year, four coaching staffs later, the Gophers lost star Mo Ibrahim in the opener to a season-ending leg injury. They've turned to Trey Potts, who's fifth in the Big Ten in rushing, and have begun to work in freshmen Mar'Keise Irving and Ky Thomas.
Said Nebraska coach Scott Frost: "I don't think one guy in this day and age can go through a whole game."
In this new age of the transfer portal and name-image-and-likeness profits, keeping players satisfied with partial workloads can be even trickier.
Wisconsin, which has long had one of the nation's most potent running games, has turned this year to Clemson transfer Chez Mellusi but also has sophomore Isaac Guerendo and leading returner Jalen Berger at the ready. Splitting up carries so far seems like a promising plan for coach Paul Chryst.
"I think it's extremely helpful. There's kind of no drop-off when one guy gets kind of winded," Mellusi said. "It's more so when a guy kind of has the hot hand, it kind of gives you the hot hand as well because you kind of see what they're doing and can kind of try to imitate that."
Said Guerendo: "Having a diverse backfield is something that a lot of teams can take advantage of. You've got backs that are really completely different. They have their own strengths. I think it allows you to open up stuff and see more stuff with the offense."
'Spare, depth, musthave, Pair, play, Tailback
Donna Kelce, mother of 2 NFL stars, travels to see both her sons play in playoff games
i898	 1 hour ago
Donna Kelce is the mother of Philadelphia Eagles center Jason Kelce and Kansas City Chiefs tight end Travis Kelce. Both Kelce brothers had a wild-card playoff game – Jason and the Eagles against the Tampa Bay Buccane...
Cowboys' Dak Prescott, Mike McCarthy explain final play, coach says he was told time would be back on clock
i898	 4 hours ago
With 14 seconds left, Prescott took off running on a QB draw play and slid down up the field with a few seconds remaining. The team tried to huddle back up to snap the ball but it wasn't repositioned in time. It appe...
Cowboys' final play in playoff loss leaves fans, Jerry Jones flabbergasted: 'Extraordinarily disappointed'
i898	 19 hours ago
The Cowboys worked their way into 49ers territory, and on their final offensive play, Prescott ran a quarterback draw for 17 yards down to San Francisco's 24-yard line. CLICK HERE FOR MORE SPORTS COVERAGE . ...
Packers' Aaron Rodgers hilariously mocks Giants for QB sneak on 3rd and 9 play
i898	 5 days ago
The Giants were facing a third-and-9 on their own 4-yard line, and instead of attempting a pass with quarterback Jake Fromm, they decided to call a QB sneak, and they gained one yard on the play. CLICK HERE FOR MORE ...
Bob Saget's autopsy completed: 'No evidence of drug use or foul play,' authorities say
i898	 1 week ago
"An autopsy was performed this morning on Robert Lane Saget. Mr. Saget is a 65-year-old male, who was found unresponsive in his hotel room," Joshua Stephany, the chief medical examiner of Orange and Osceola Counties,...
Chargers' Brandon Staley faces criticism for calling timeout with possible tie scenario in play
The timeout stopped the clock as the game was looking like it was going to be a tie. A tie between both teams would have secured a playoff spot for both teams. CLICK HERE FOR MORE SPORTS COVERAGE . Las Ve...
'This wasn't Bill and Ted's Excellent Adventure': Judge sentences pair of Capitol rioters to 30 days behind bars
Two friends who entered the US Capitol together on January 6, one of whom boasted about breaking in and smoking a joint, were sentenced to 30 days in jail each for unlawfully parading in the building. "This wasn't B...
Florida man disguises himself as a woman to carry out pair of armed robberies, authorities say
John M. Graham, 33, wore a woman's black wig, black fishnet stockings, knee-high boots, a hat, sunglasses and a face mask when he entered a Circle K store in DeBary just before 3 a.m., the Volusia Sheriff's Office sa...
Kanye West, Julia Fox and 'Slave Play' made for quite the night
Of course Kanye West went to see a controversial Broadway play. On Tuesday, the rapper/mogul/provocateur attended a performance of "Slave Play," which takes on race, sex, interracial relationships and trauma. But it...
Public backlash against Novak Djokovic's medical exemption to play in Australian Open
Adelaide, Australia Australians have responded with anger and skepticism to the news that men's tennis No. 1 Novak Djokovic has been granted an exemption to compete in this year's Australian Open in Melbourne. Ther...
Djokovic given medical exemption to play at Australian Open
The top-ranked Djokovic wrote on Instagram on Tuesday he has "an exemption permission." CLICK HERE FOR MORE SPORTS COVERAGE . Djokovic, who is seeking a record 21st Grand Slam singles title, has continually refu...
Chicago parents blast teachers union's 'power play' ahead of possible return to remote learning
CHICAGO PARENT WARNS REMOTE LEARNING HAS 'DEVASTATING EFFECTS' FOR FAMILIES AS UNION MULLS 'TEMPORARY' SHIFT Chicago father Ryan Griffin joined "Fox & Friends" on Tuesday, slamming the union for considering the s...
Afghanistan American Americans beat Biden Biden's bill Black border California calls China Coronavirus Court Covid' Covid19 dead death Democrats dies election family Florida Game home House killed media police race report school shooting Star state team Texas time Trump vaccine video White woman world 'The
Copyright 2022 © i898 All rights reserved.


Nice article. I like it.
Yep, keep them rolling in.
That was a very nice article as well, and I think it really hits on the truth of all the Shyamalan hating. It's simply that confidence is often misinterpreted as arrogance. I have this happen to me a lot actually, as people would tend to think I'm a very arrogant person at times, but in truth I'm just very confident in myself, what I believe, and how I see things. Like Night, I loathe the Hollywood establishment, and though I am an aspiring filmmaker, I do not ever plan on becoming enmeshed in their web. I'll probably be called an "arrogant p****" as well, but as long as I know I'm being true to myself, and to my audience, I frankly won't give a you know what about what the snobbish film critics and the Hollywood elite think of me. I don't make movies for them, and neither does Shyamalan. And that's one of the things I love about him. Keep up the good work Night!
M Night Shyamalan - tortured genius?
"Will his latest - portentously titled The Happening - arrest his decline?"
That was quite possibly the most poorly written article I have read in the past year. What a bunch of bull.
Didnt even finish the article, not worth it.
Yep, that article was horrible, o well, people are allowed to write what they wan't to, unfortunately though that article was not any good at all.


Your wedding day is approaching fast! Are you using a monthly checklist to carry out your plans? If you buy your wedding cake topper, decorations, favors, and attendant gifts as early as possible, you'll be able to relax a lot more the month before the wedding and enjoy everything you've put together. Plus it gives you a little room to take care of any last minute things that come up unexpectedly without the added stress.
In Part 1 of this four-part series, here are some unique handmade and vintage wedding cake toppers from Etsy shops to help you find what will be just right for you! Click photos to go to the shop listing for each item.
The wedding reception is a place to really let your personalities shine! Here are some awesome handmade votive and tea light candle holders for inspiration as you plan your table decor and lighting. After the wedding, what great favors for your guests to take home to remember you and your special day!
The wedding reception is your grand party – for toasting the two of you, sharing food and drink with family and friends, and general merry-making all around. Such a party usually requires that you, the host, decide who should sit next to whom, to bring new and old friends together in the best way possible.
To help you get started finding just the right place card holders, here are some delightful ones I found on Etsy. After the wedding, your guests can use these to hold photos, notes, etc., or as paperweights or decorative objects to display on a shelf or table. What a wonderful way to say thank you to your guests for being part of your special day!
Your wedding reception is going to be the most fabulous party ever! But what happens to all those fun and gorgeous things on the table after the party's over?
For your reception there will be some type of food served, whether it's a 5-course meal, a casual picnic, or simply dessert and beverages. So let's start some ideas flowing about the tables' place settings.
Here is an eclectic mix of silverware holders that would be perfect as decor & favors. After the wedding your guests can use these to hold a variety of items. What a wonderful way to say thank you to your guests for being part of your special day!
Her jewelry was made with stunning diamonds and rubies.
There are so many special touches for this wedding; every detail is custom and personalized.
The memorial charm that dangles from her bouquet, in honor of her father, whom she lost 7 years ago.


Lloyd Darden, former resident of San Clemente, has died of Alzheimer's at 87. Lloyd was married to his college sweetheart, Dotty Darden, for 50 years until her death in 2004. He married Kay Ketcham Darden in 2011, and she survives him. Lloyd and Dotty had two daughters, Ivy Darden and Julia Darden-Lentz. Lloyd marched for his daughters' right to marry, and later, proudly attended their respective marriages to Linda Arredondo and Cathy Darden-Lentz. Lloyd was a naval aviator, attaining the rank of Lt. Commander. He used his Spanish language skills working in Latin America simultaneously for John Deere and the CIA. Lloyd also worked as a reporter, an advertising executive, and a trade association executive. At NASA's request, he wrote a book for laymen on satellites; he founded and published a magazine for the plastics industry; and he wrote freelance throughout his life, well into his seventies. He served his community by traveling to Sri Lanka with Habitat for Humanity, traveling to Louisiana to play Santa for Hurricane Katrina's child victims, and working as a volunteer parole officer. Services for Lloyd will take place at St. Clement's Episcopal Church, 202 Avenida Aragon, San Clemente, November 10, 2018 at 1 PM.


text:
Jimmy Fallon Playing The Vanilla Ice Board Game Makes You Stop, Collaborate And Listen
By Bill Bradley
Ice is back with an embarrassing invention.
In Jimmy Fallon's first installment of his "Do Not Game List," the "Tonight Show" host introduced us to a bunch of different awful games, but Vanilla Ice Electronic Rap might be the most terribly awesome of them all.
In the game, players are given an electronic beat box and rap different rhyming words that don't make a lot of sense.
Fallon doesn't really explain how to win the game, but this might just be one of those cases where there aren't any winners.
"The Tonight Show Starring Jimmy Fallon" airs weeknights at 11:35 p.m. ET on NBC.
Bill Bradley
Entertainment Editor, HuffPost
Funny Videos Late Night Shows Jimmy Fallon Comedy Board Games

redpajama_set_name: RedPajamaCommonCrawl


text:
Casey Tingle
The Lobster: A Movie Review
July 7, 2017 July 7, 2017 / Casey Tingle / Leave a comment
Newly divorced, David is arrested and transferred to the Hotel where he has 45 days to find a matching mate. If he fails, he will be turned into an animal of his choice for the chance to find love in the Woods. As David's days begin to wind down, he turns to desperate measures to secure a partner.
Directed by Yorgos Lanthimos, The Lobster is a deadpan, black comedy where the actors speak in monotone and reveal no emotion. But in the case of this film, that is not a bad thing. I found the premise of The Lobster to be interesting and thought provoking. This movie takes an every day situation—a break up or the loss of a significant other—and makes the solution to the problem so absurd that you can't help but laugh at the situation. And the fact that the characters go along with the situation makes it even more absurd.
The comedy in it is dry, so may not be everyone's cup of tea. I remember when I originally saw a preview for this movie, I thought it was another Wes Anderson film, and found the style to be somewhat similar (although darker than the Wes Anderson films I have previously seen).
My only flag for viewers is to say that there is human and animal abuse in the film which people may find distasteful. Not a lot, but some. And I think it ties in with the absurdity of the movie and allows viewers to find the beauty hidden beneath the darkness of the film.
Guardians of the Galaxy Vol. 2: A Movie Review
May 31, 2017 May 29, 2017 / Casey Tingle / Leave a comment
When Rocket steals some Anulax Batteries from the Sovereigns, the Guardians are helped in their escape by a stranger flying by on the top of a spaceship. They are even more surprised when the man, known as Ego, introduces himself as Peter Quill's father. Wanting to know more, Quill, Gamora, and Drax return to Ego's planet to learn the truth. When Gamora's suspicions that there is something not right about the planet are proven true, the team must once again save the universe before it is too late.
I found Guardians of the Galaxy Vol. 2 to be just as hilarious as the first one, with great jokes and comebacks as well as continued character development. Behind the comedy, this movie showed the sadder sides to some of the characters—particularly Rocket, Yondu, and Nebula—while also showing some characters do have a romantic side and mixing it all together that nothing felt out of place. The special effects and costumes were also top notch, and although the movie was pretty long (over 2 hours), it kept me entertained the entire time to where I didn't even notice. I was actually pretty shocked when I came out of the movies and saw what time it was.
What would have to be my favorite part of the movie was the soundtrack. Not only do I enjoy 80's music, but I thought that this soundtrack in particular went really well with the overall feel of the movie. I loved how music seemed to be essential when it came to fighting the villains, and how mad Quill gets when his Walkman is crushed (beyond the sentimental factors at this moment, I find music to be a necessity in life).
So, if you're a fan of the first Guardians of the Galaxy, I highly recommend seeing Vol. 2 (if you haven't already). You will not be disappointed!
Get Out: A Movie Review
February 28, 2017 February 27, 2017 / Casey Tingle / Leave a comment
Invited by his girlfriend, Rose, to visit her parents out in the suburbs one weekend, Chris slightly reluctantly agrees to go. His main worry: he is Rose's first black boyfriend. Unsure of how her parents will react, he prepares for the worst—like being chased out of the house by Rose's father with a shotgun—but finds her family to be surprisingly accepting, if not a little stereotypical. However, Chris's paranoia heightens when a sudden family get together makes him feel that there is more going on with Rose's family than he is aware of.
When I saw the trailer for Get Out, my first reaction was: this looks like the corniest horror film ever. And I've seen some pretty corny horror films. But after seeing Get Out, I wouldn't classify it as a horror film, but more of a psychological thriller with comedic relief. And it wasn't bad. The plot was original and interesting, bringing forth a horror I'm sure not many viewers have seen before or even thought of. While there were bits of the plot that were a little obvious, I thought the movie took plenty of turns that kept the viewer on the edge of their seat, guessing.
One part of the movie that I found to be slightly annoying was several sections of extremely loud bursts of music—the sudden DUN! strategically placed to make viewers jump out of their seat (and skin) just at the right moment. I'm not a big fan of this tactic, anyway, and maybe it was just my theater, but I felt like those moments were a little too loud, making it more of a distraction. The other aspect of the film that I thought was overkill was the gruesome violence at the end. Yes, I did hide my eyes through most of it because I can't handle seeing random objects being shoved through other people's body parts. I definitely would've been happier if the gore was toned down a bit at the end so it didn't feel like it was being used as a shock factor.
However, despite the minimal downsides, Get Out was mind boggling and entertaining—a must see for lovers of not-so-serious horror films and psychological thrillers.
Lion: A Movie Review
When on a journey with his brother to look for work, Saroo becomes lost when he falls asleep on an out-of-service train and wakes up to find himself traveling away from his home town and everyone he knows. The train arrives in Calcutta, leaving Saroo stranded with no money and unable to speak Bengali. Eventually, he is sent to an orphanage before being adopted by an Australian couple. Years later, while studying to become a hotel manager, Saroo begins to have memories about a brother and mother he once had in India. With the help of Google Earth, Saroo begins his journey to find the town he came from and the family he lost many years prior.
I had never heard of this movie until my husband asked if I wanted to go see it. Once I read the synopsis, my immediate answer was yes. Lion was a powerful movie that told the heartwrenching story of a lost boy who finally finds his way home. Although some people may shy away from the movie because of this, I really appreciated that half of the movie used subtitles, which helped give authenticity to the story. I also liked that they included some real footage at the end of the film of Saroo and his family to show that this actually happened.
The only problem I had with the movie was I felt that it jumped around a bit too much. While the scenes provided enough of the story for the viewer to understand what was going on and how it was progressing, I wish I knew more of what happened during those time periods when he was a child. However, I do understand that not every little detail could be included in the movie, and I do think the writer and director found the best way to portray the movement of time throughout the film.
A Monster Calls: A Movie Review
January 29, 2017 / Casey Tingle / Leave a comment
When faced with having to cope with his mother's illness, Conor unknowingly calls upon an ancient tree monster for help confronting a secret he keeps bottled up inside of him.
Based on the book by the same name, A Monster Calls is a powerful film about loss and learning how to cope with grief. I was glad that I was able to see this movie while it was still in theaters. I loved the book when I had read it in 2015, and the movie was just as well done. It may be due to the fact that the author of the book, Patrick Ness, also wrote the screenplay, but I felt that the movie stayed true to the book. The only change that I think could have made the movie better was a bit more explanation in some parts. For instance, it felt like there was a bit of information missing from the bullying story line that makes the way that it culminates at the end a little confusing to those who had not read the book.
One of my favorite aspects of the film was the art that accompanied the stories told by the monster. The main reason why I bought the book was because of the illustrations by Siobhan Dowd and so I was very happy when the stories were illustrated on screen with an awesome water color type art. The make-up done for the mother (played by Felicity Jones) as her illness progressed was also believable and well done. While I did enjoy all of the actors involved, I didn't picture the grandmother being so young and there were some instances where I thought Liam Neeson's voice acting for the Monster was a little off for the character, making it not as serious as it probably should have been. Although, since the movie is a tearjerker, it did help to have the mood of the movie lightened a bit.
Overall, I highly recommend seeing A Monster Calls when it comes out on DVD, especially if you're in one of those moods where you need a good, long cry.
Rogue One: A Movie Review
January 8, 2017 / Casey Tingle / Leave a comment
In the battle against the Empire, the Rebel Alliance feels that all hope is lost when they learn of the Empire's newest weapon: the Death Star. However, learning of a flaw in the design plan that could take down the weapon, a handful of the members of the rebellion set out to save the galaxy by stealing the blue prints of the Death Star.
As someone who would not consider themselves a Star Wars fan, I enjoyed Rogue One more than I thought I would. The acting was superb (I became teary eyed at several points during the film), and I enjoyed seeing a range of actors of all genders and ethnicities being represented in leading roles. While the overall plot of the story was serious, the audience received a nice dose of comic relief from the resident robot K-2SO, voiced by Alan Tudyk, which helped balance everything out. Probably my favorite aspect of this movie was how it flawlessly segued into the original Star Wars trilogy, which I found to be an advantage for audience members just getting into the franchise.
However, for me, one major weakness in the movie was the amount of jumping around that occurred in the beginning. It was hard for me to keep track of where they were and who all of the people introduced were. Despite being able to remember all of the characters relations to one another, I can hardly remember half of the characters names. I personally think this could have been avoided if in the beginning there was the traditional roll on synopsis (which was absent in this film) that helped explain what was going on before the movie actually started. Because although it starts in the beginning, it still starts at a middle point: the Death Star had already been built, and this is everything that happened after. I also thought the movie felt long. There was one point where I thought movie should've ended, but it kept going for about another 20 minutes or so. Luckily, I considered the ending of the movie to be one of the best parts so it was worth the extra time.
Overall, I thought Rogue One was a good movie. Despite the bit of confusion I had with certain parts, I think that both Star Wars fans and non-Star Wars fans would both enjoy this movie. And if you want to have a Star Wars marathon, it's definitely a great place to begin before watching the original movies.
Fantastic Beasts and Where to Find Them: A Movie Review
December 17, 2016 / Casey Tingle / Leave a comment
While working on his book on the fantastic beasts of the wizarding world, Newt Scamander finds himself in New York with his leather suitcase filled with magical creatures. When an accidental switch of suitcases leads Newt and a muggle named Jacob Kowalski on a search for some escaped critters, they soon discover that there is more dangerous magic occurring in New York than just a few beasts on the loose.
Screenplay written by J.K. Rowling and tied to the encyclopedia of the same name, Fantastic Beasts and Where to Find Them was just as magical as the Harry Potter franchise. The story was told at a good pace that kept me entertained—I laughed out loud several times—and wanting more without wondering how much longer until it was over. However, I did feel there were one or two subplots too many in this film, such as the introduction of Newt's previous love interest, but those were kept short and I'm sure will be expanded on in an upcoming film installment. While there were a few parts where I could tell the beasts were CGI, mostly when the actors were touching or interacting with the creatures, I still thought they were well done and kept true to the strangeness of the magical world.
I like that most of Newt's history is still to be learned because it leaves room for his character to develop more as the series continues. Eddie Redmayne did an excellent job at portraying Newt Scamander, staying curious throughout the film while also seeming genuinely concerned about the beasts he was carrying, and I also enjoyed Ezra Miller's performance as Credence Barebone. He's an actor I like to keep my eye out for because I always enjoy his performances, and even though I had learned a few weeks back that he was in this movie I actually had forgotten and didn't even recognize him until half way through.
Overall, if you're a fan of the Harry Potter franchise—whether book or movie—I highly recommend seeing Fantastic Beasts and Where to Find Them. It has a little bit of everything: action, adventure, romance, and, of course, magic, and is guaranteed to keep both kids and adults entertained.
Arrival: A Movie Review
November 29, 2016 November 29, 2016 / Casey Tingle / Leave a comment
When 12 unidentified objects appear in different locations over the globe, linguist Louise Banks is recruited by the United States government to translate the alien language of their visitors to find out why they are here. Working with scientist Ian Donnelly, the two are pressed for time as the Chinese and Russians are quickly resorting to war with the beings they know nothing about.
In my opinion, Arrival is probably the best movie I saw in theaters this year. The story line is both simple and complex: simple because the main focus is on deciphering an alien language, but complex because there is a deeper story going on that the viewer may not be fully aware of until the end.
I didn't know much about the movie going in to it. I only saw one trailer, and I hadn't looked up anything else about it so I wasn't completely sure what to expect. The performances by Amy Adams and Jeremy Renner were well done, with the characters developing at an appropriate speed. But what I think made the movie is how the story line was written: with the bigger story, and the twist, perfectly hidden so the viewer does not know what is going on until closer to the end, and not everything made sense until the big twist. Even after the credits were rolling, I had to sit and think about what happened because I was still in awe of how well it was played out without being given away. Overall, Arrival is one of those movies that you may have to watch several times to catch everything, but everything about it is so well done that I personally would have no problem with that.
Zootopia: A Movie Review
Ever since she was a little bunny, Judy Hopps knew how to dream big. Instead of working with her family on their carrot farm, she wanted to be the first bunny police officer. Despite those who told her she couldn't do it, and with hard work and dedication, Judy becomes a police officer of Zooptopia, and is quickly immersed in a case of missing mammals occurring throughout the districts. But when she hits a dead end just after taking on the case, she enlists the help of a con-artist fox named Nick Wilde to crack the case.
For a kids movie, Zootopia touches on some deep topics, specifically the discrimination of others based on their background. Being accepting of others and not fearing others because of what they may look like or believe in is an important lesson to teach children at a young age so as they grow older and start to venture out on their own they will be more open minded about the world around them.
Another topic the movie touches on is to always follow your dreams, no matter how outlandish they may seem, and that hard work and dedication are important in achieving those dreams. There are many people in the world who will tell kids to go for the careers that they would make the most money or be the most successful in, even if it's something they have absolutely no interest in. It may be cliche, but it's true: being happy with what you do for a living and how you live your life is what counts.
By highlighting those topics alone, I feel like this movie is a must watch for families because it may help strike up important conversations for kids who may not have experienced or fully understand the importance of accepting others or being who you are. Plus, it's a super cute movie with a plot and characters that will keep adults as immersed as their kids.
Doctor Strange: A Movie Review
A neurosurgeon who can solve the most difficult cases, Dr. Stephen Strange experiences tragedy when he is in a car accident that damages the nerves in his hands. With his ego challenged, Dr. Strange is determined to find a way to stop his hands from shaking so he can return to work. He travels to Kathmandu seeking to learn the art of healing through the mind, only to discover a hidden world of mysticism and alternate dimensions being manipulated by a group bent on destroying the world in their search for immortality.
There wasn't much lacking for Doctor Strange. It was on par with most Marvel origin stories: great acting and an interesting plot that moves a bit fast but not so fast that it is confusing or glosses over anything. What I thought made Doctor Strange rise above other Marvel movies was the special effects, which were far beyond what one would normally see in a Marvel film. The complexity of the special effects added to the film as a whole, and luckily did not look cheesy because, for me, that would have taken away from the movie instead of adding to it. One aspect with the acting that I found funny was that almost every time Benedict Cumberbatch spoke, his voice sounded exactly like Hugh Laurie's in his role as House, which actually fit really well since the characters Dr. Strange and Dr. House are very similar.
So if you are a fan of the Marvel movies, don't miss out on seeing Doctor Strange, especially for the tease at the end for the next Thor film.


text:
from __future__ import absolute_import, unicode_literals
from gaegraph.business_base import NodeSearch, DeleteNode
from cliente_app.commands import ListClienteCommand, SaveClienteCommand, UpdateClienteCommand, \
    ClientePublicForm, ClienteDetailForm, ClienteShortForm

def save_cliente_cmd(**cliente_properties):
    """
    Command to save Cliente entity
    :param cliente_properties: a dict of properties to save on model
    :return: a Command that save Cliente, validating and localizing properties received as strings
    """
    return SaveClienteCommand(**cliente_properties)

def update_cliente_cmd(cliente_id, **cliente_properties):
    """
    Command to update Cliente entity with id equals 'cliente_id'
    :param cliente_properties: a dict of properties to update model
    :return: a Command that update Cliente, validating and localizing properties received as strings
    """
    return UpdateClienteCommand(cliente_id, **cliente_properties)

def list_clientes_cmd():
    """
    Command to list Cliente entities ordered by their creation dates
    :return: a Command proceed the db operations when executed
    """
    return ListClienteCommand()

def cliente_detail_form(**kwargs):
    """
    Function to get Cliente's detail form.
    :param kwargs: form properties
    :return: Form
    """
    return ClienteDetailForm(**kwargs)

def cliente_short_form(**kwargs):
    """
    Function to get Cliente's short form. just a subset of cliente's properties
    :param kwargs: form properties
    :return: Form
    """
    return ClienteShortForm(**kwargs)

def cliente_public_form(**kwargs):
    """
    Function to get Cliente'spublic form. just a subset of cliente's properties
    :param kwargs: form properties
    :return: Form
    """
    return ClientePublicForm(**kwargs)

def get_cliente_cmd(cliente_id):
    """
    Find cliente by her id
    :param cliente_id: the cliente id
    :return: Command
    """
    return NodeSearch(cliente_id)

def delete_cliente_cmd(cliente_id):
    """
    Construct a command to delete a Cliente
    :param cliente_id: cliente's id
    :return: Command
    """
    return DeleteNode(cliente_id)

redpajama_set_name: RedPajamaGithub


text:
Home » A detailed look at Salesforce Nonprofit CRM
A detailed look at Salesforce Nonprofit CRM
By Robert Ulrich	 20 Jul 2020
The world of non-profit organizations is not free from management issues, communication barriers, and backlogs. In order for a non-profit organization to work effectively, it is essential for the team to seamlessly communicate with each other, efficiently work to gather supporters and beneficiaries and commit to the shared view of the organization.
Salesforce non-profit cloud offers a perfect remedy to this need by providing a single, well-connected platform that allows different departments that make up the team to connect with each other in their shared goal to give back. With an emphasis on improving fundraising techniques, project management as well as marketing strategies, the non-profit cloud aims to meet the unique needs of non-profits.
The Salesforce non-profit platform comes equipped with tools such as the Non-Profit Success Pack (NPSP) which turns a regular business CRM platform to a Constituent Relationship Management system as well as foundationConnect. Without further ado, let's dive in to see all that the Salesforce non-profit has to offer.
Fundraising Made Easy
The non-profit cloud focusses on the donors in an effort to make them feel like they are a part of the organization by virtue of their contributions. Building personalized, one-on-one relationships with the donors not only cultivate lasting relationships, but also enables the organization to attract more donors. One way to do so is to engage in direct contact with the donors over digital means of collecting funds, for example, the Salesforce Payment Services allow donors to easily transfer funds without putting in too much effort.
Users can also leverage the data available to keep in regular touch with recurring donors and regularly update any changes in their information. With the help of the cloud, non-profits can easily manage their operations by viewing the total funds and their subsequent allocations all from a single interface. Additionally, users can seamlessly combine direct mail with their digital platform and expand their outreach as a result. To analyze the overall impact of the organization, intelligent and thorough reports can help non-profits plan ahead to keep their momentum going by making regular improvements.
Efficient Program Management
In order to run a successful fundraising campaign, organizers must be able to manage programs and adjust their services according to the needs of their clients. With the help of the program management module in the on-profit CRM platform, users can manage multiple programs simultaneously, regardless of their complexities, without losing track of their particulars.
Another way to effectively manage programs is to keep in touch with donors at any time and from anywhere with the help of the Salesforce service cloud which makes the non-profits accessible from a multitude of platforms ranging from SMS to social media. Volunteers can also be kept in touch with using apps such as Volunteers for Salesforce available on the AppExchange.
Targeted Marketing and Engagement
Without the right marketing strategy, no non-profit can hope to gain sufficient funding. It is essential for the organization to spread its cause to just the right donors. For this purpose, the organization must get to know their constituents and build meaningful and lasting relationships with them. This can be achieved by studying the constituent data available and making inferences about them on the basis of the information.
Non-profits can also leverage AI to determine which donors are likely to engage in which particular causes. This can be done even better via the journey builder application where users take donors through their entire journey with the organization, whilst staying in touch with them via multiple channels.
Non-Profit Success Pack
The NPSP is the flagship CRM platform that is used by non-profit organizations in order to manage their day-to-day operations. On top of the regular Salesforce CRM features, NPSP enables teams across the organization to be able to share all the relevant information about donors and cohesively aim to further the cause of the non-profit. Teams like marketing, fundraising, and program management can pool in their data to collectively ensure that the right donor is being approached in the right way.
NPSP also assists users with the management of various types of programs as discussed earlier. Additionally, the Gift Entry feature enables users to enter large volumes of gifts in the system in a way that is fast, efficient, and reliable, whether the user chooses to enter in bulk or as single entries. All donations and incomes, as well as an overall analysis report, can be made available to the NPSP users who can then use the data available to them to make the changes required to keep moving successfully ahead.
FoundationConnect
Grants can be managed by the non-profits using the foundationConnect tool, which provides an end-to-end solution for both grantors and grantees, in an effort to make the process more efficient and convenient. With the combination of the NPSP and the grant management system, users can have a complete 360-degree view of the organization, starting from grantees to vendors, and even the partners and the members. With additional email integration, users can access CRM data right from their email platforms. FoundationConnect also facilitates users with easy grant management and grant distribution, which involves the use of e-signatures for payments.
Case management allows non-profits to help guide donors through their journey with the organization by understanding their current position and guiding them through the future steps that are needed to be taken. The management is made easier by the case manager home page that gives out updated information as well as the ability to create personalized plans for each donor taking their individual case into consideration.
Our Two Bits!
Salesforce non-profit cloud is the go-to solution for non-profit organizations when it comes to managing donations and programs. With such a comprehensive solution available, users can easily market their organization to reach just the right donors. RT Labs can help you tailor your non-profit cloud with its Salesforce customization services to further address your specific needs and boost overall efficiency.
RT Labs, being an Official Salesforce Partner firm, is an expert provider of services including Salesforce Migration, Integration, Customisation, and Support. Get in touch with us today by filling out our contact form. We will be glad to assist you!
Need Help? Get Free Consultation
By clicking you agree to our Terms and Conditions


text:
Q: Update or Delete in SQL Server table based on condition I have a SQL Server table called MainTable, and I want to do two different actions (Delete Or Update) to it by joining it to a Lookup table called LKP.
MainTable                 LKP

ID                        OldID   NewID
------                    ---------------
101                       101     103
102                       102     104
103

I join the MainTable with LKP on ID = OldID to get the NewID for each ID.
Delete scenario
When the NewID is already in MainTable, then delete the ID in MainTable.
Eg. the NewID for 101 is 103, and 103 is already in MainTable, so delete 101 from MainTable.
Update scenario
When the NewID is not in the MainTable, then update the ID with the NewID.
Eg. NewID for 102 is 104 and 104 is not in the MainTable, therefore update 102 to 104.
Finally the MainTable should look like this:
ID
----
104
103

I tried different case statements with no luck. Please help

A: You can try this if exists to check whether data is already available in the table or not. Based on the result you can perform further operation either Update or delete.
 Create procedure uspUpdateDel
 @Id int
 as
 Begin

 if exists (Select 1 from maintable join LKP on  ID = OldID where id = @Id)
 begin
   Delete from Maintable where id = @Id
 end
 else
 begin
   update Maintable set id = ... where ...
 end
End

Apart from the above, you can use the @@ROWCOUNT (Transact-SQL) to check & return the number of rows involved or affected by any specific SQL Server statement as shown below and perform the action accordingly.
USE AdventureWorks2012;
GO

UPDATE HumanResources.Employee
SET JobTitle = N'Executive'
WHERE NationalIDNumber = 123456789

IF @@ROWCOUNT = 0
    PRINT 'Warning: No rows were updated';
ELSE
    PRINT 'Warning: Some rows were updated';
GO

A: You would need to perform 2 DML statements here; 1 DELETE and 1 UPDATE. As it appears that the DELETE has the "higher priority" then I have put that first. Otherwise this would delete the row that was updated to have a value of 103 for ID:
CREATE TABLE dbo.MainTable (ID int);

INSERT INTO dbo.MainTable (ID)
VALUES (101),
       (102),
       (103);
GO

CREATE TABLE dbo.LKP (OldID int,
                      [NewID] int);

INSERT INTO dbo.LKP (OldID,
                     [NewID]) --NEWID is a function's name, I suggest a different name
VALUES (101, 103),
       (102, 104);
GO

DELETE MT
FROM dbo.MainTable MT
     JOIN dbo.LKP L ON MT.ID = L.[NewID];

UPDATE MT
SET ID = L.NewID
FROM dbo.MainTable MT
     JOIN dbo.LKP L ON MT.ID = L.OldID;

GO

SELECT *
FROM dbo.MainTable;
GO

DROP TABLE dbo.MainTable;
DROP TABLE dbo.LKP;

A: You should use a cursor over the LKP table... and do the correct action on the MainTable based on a condition.  Like this.
Declare
    @oldID int,
    @newID int;

Declare ids CURSOR
FOR Select
        OldID,
        NewID
    From
        LKP;

Open ids;

Fetch Next From ids Into @oldID, @newID;

While @@FETCH_STATUS = 0
    Begin

        if exists (Select 1 from MainTable where id = @newID)
        begin
            Delete from MainTable where id = @oldID
        end
        else
        begin
            update MainTable set id = @newID where id = @oldID;
        end;

        Fetch Next From ids Into @oldID, @newID;
    End;

Close ids;
Deallocate ids;

redpajama_set_name: RedPajamaStackExchange


text:
import winston from 'winston';
import config  from '../config';

export default getLogger;

function getLogger(module) {
    const path = module.filename.split('/').slice(-2).join('/');

    return new winston.Logger({
        transports: [
            new winston.transports.Console({
                colorize: true,
                level: (config.get('development')) ? 'debug' : 'error',
                label: path
            })
        ]
    });
}


Goodness of fit procedures are essential tools for assessing model adequacy in statistics. In this work, we present a general theory and approach to goodness of fit techniques based on U-processes for the accelerated failure time (AFT) model. Many of the examples will focus on U-statistics of order 2. While many authors have proposed goodness of fit tests for U-statistics of order one, less has been developed for higher order U-statistics. In this paper, we propose goodness of fit tests for U-statistics of order 2 by using theoretical results from Nolan and Pollard (1987) and Nolan and Pollard (1988). We propose a resampling approach which is a generalization of that proposed in Lin et al. (1996). Simulation studies are used to illustrate the proposed methods.


Ever wanted to discover your destiny and how to unleash it? Ever wanted to discover who you are in Christ and what He has planned for you? With this book you can unlock your destiny and succeed in life – both in the physical world and in the spiritual world. Unveiling Spiritual Mysteries of your Destiny tells you how to regain your identity, authority and position, how to break strongholds and understand the seasons of your life and calling. Spiritual truths will open your eyes on your relationship with God and what the Devil is trying to do in order to prevent you from achieving your destiny. This is the book to read if you want God to make you the best that you can be!
Rev. Augustino C. Lyimo was part of Jesus Celebration Centre (JCC) Mombasa, Kenya, and from 1986 a spiritual son of Bishop Dr.Wilfred Lai. He was actively involved with the praise and worship, hospital ministry and outreach ministries.
JCC Mombasa then released Augustino to come to the UK to attend the School of Ministry at Kingdom Faith Bible College under Colin Urquhart. He undertook further studies with Elim Church. After completing his 4-year education the college sent Augustino to various churches to help.
In 2000 Augustino took his family back to Arusha in Tanzania where he started Zion Courts of Praise, which was and still is part of JCC Mombasa. In 2001 he heeded God's call to return to the UK.
In 2005 Augustino established JCC UK, a ministry of JCC Mombasa,which will serve as the headquarters for branches in Europe. He is married to Susan Vivian Lyimo and they are blessed with three children, Elishama Reuben, Gabrielle Gwennan and Ruth Aquilah Lyimo. In 2011, after seven years of faithful service, Augustino was ordained to the status of Reverend by Bishop Dr.Wilfred Lai.


text:
'use strict';

/**
 * Module dependencies.
 */
var fs = require('fs');

// Walk function to recursively get files
var _walk = function (root, includeRegex, excludeRegex, removePath) {
	var output = [],
		directories = [];
	includeRegex = includeRegex || /(.*)\.(js|coffee)$/;

	// First read through files
	fs.readdirSync(root).forEach(function (file) {
		var newPath = root + '/' + file,
			stat = fs.statSync(newPath);

		if (stat.isFile()) {
			if (includeRegex.test(file) && (!excludeRegex || !excludeRegex.test(file))) {
				output.push(newPath.replace(removePath, ''));
			}
		} else if (stat.isDirectory()) {
			directories.push(newPath);
		}
	});

	// Then recursively add directories
	directories.forEach(function (directory) {
		output = output.concat(_walk(directory, includeRegex, excludeRegex, removePath));
	});

	return output;
};

/**
 * Exposing the walk function
 */
exports.walk = _walk;


text:
Tame är en ort i Colombia.   Den ligger i departementet Arauca, i den centrala delen av landet,  km nordost om huvudstaden Bogotá. Tame ligger  meter över havet och antalet invånare är .

Geografi
Terrängen runt Tame är platt åt sydost, men åt nordväst är den kuperad. Terrängen runt Tame sluttar brant österut. Den högsta punkten i närheten är  meter över havet,  km nordväst om Tame. Runt Tame är det glesbefolkat, med  invånare per kvadratkilometer. Det finns inga andra samhällen i närheten. Omgivningarna runt Tame är huvudsakligen savann.

Klimat
Årsmedeltemperaturen i trakten är  °C. Den varmaste månaden är april, då medeltemperaturen är  °C, och den kallaste är augusti, med  °C. Genomsnittlig årsnederbörd är  millimeter. Den regnigaste månaden är maj, med i genomsnitt  mm nederbörd, och den torraste är januari, med  mm nederbörd.

Infrastruktur
Utanför Tame ligger Gabriel Vargas Santos flygplats.

Kommentarer

Källor

Externa länkar

Orter i Arauca (departement)

redpajama_set_name: RedPajamaWikipedia


text:
Q: Re: JIRA 4.1.2. What makes this query call? We are using an unsupported version of JIRA and Atlassian offers no support to us on the topic even though we have a support license.
There was a patch on our database put out this past week and we saw the number of queries on the system jump from 800k to over 36 million per day. The JIRA system is attempting to delete users from groups. The following is what is captured by our EnterpriseDB logs
"execute <unnamed>: DELETE FROM public.membershipbase WHERE USER_NAME=$1 AND GROUP_NAME=$2"
We don't understand why it attempts to do this at all and would greatly appreciate any help with identifying the cause of this. I have checked all of the code that we have, I have checked all functions in the DB, I have looked for stored procedures and have even looked into all the views. I am seeing nothing that makes the above call. If you have any experience with this version of JIRA please provide any suggestions you may have. From what I have read the USERBASE and MEMBERSHIPBASE tables have been removed as of version 5.0 which is why I am asking for those with 4.1.2 knowledge.

A: A library package called opensymphony is implemented in this project that creates the query.
Why don't people just learn to write their own SQL. It's cleaner and easier IMO.

A: The membershipbase table, as you pointed out, contains the users which belong to JIRA's internal groups. My best guess is that you might have JIRA set up to use LDAP/AD for authentication (using Crowd?) and that it is trying to sync changes in group memberships into JIRA.
If, for example, JIRA were configured with a too-wide LDAP filter for groups that included mailing lists and so on in a huge company, and another company admin were to delete and/or move a bunch of entries in the LDAP tree outside of the filter, I could see this resulting in a large number of deletes happening in JIRA.
A helpful command to run would be this (which, from your above comments, I guess you will need to request from your dBAs):
SELECT GROUP_NAME, count(1) FROM public.membershipbase GROUP BY GROUP_NAME ORDER BY 1 DESC

This reports the number of users in each group. Then run the same command again a minute later, and diff the output. That should give you an idea of which group(s) are being modified without necessarily having to install SQL monitoring tools. (You might also want to look at how many groups are in JIRA in total, and verify that it seems like a reasonable number.)
Either way, you can then dig into the actual users being updated/deleted and also start asking around with other sysadmins.
You could also try restarting JIRA to see if the updates go away. If it's a legitimate/intended LDAP sync operation, I imagine that the DELETEs would start back up again fairly away.
Edited to add:
Instead of the SQL query, the Group Browser in the admin UI will also show you some of the same information, although not it's particularly suited for diffing.

A: The fix was to change the limit of 1000 entries into the cache of users that was coded to 100,000.
I say it is a hack fix because we don't understand the intent of what was coded. There are no comments in the code, nor any documentation behind why it was set to such a low number.

Updated: 9/17/2015 After speaking with a trainer for Jira 6.x they
  said that this issue was not Jira based. Someone had modified the
  source code. Jira 4.x has no such limiter of 1000 for
  caching.


Goal of game is to press the button faster that the other players when the white led light up. The first player that reach 10 points wins the game.
Arduino reaction game for four players. The project uses 4 mcp23017, 40 leds (a set of 10 for each player), one bright led that let you know when you are allowed to press the button.
Vreau sa pun un bluethooth audio pe un arduino inpreuna cu un shier sd card..
Si vreau sa trimt muzica prin bluethooth din telefon..si sa se memoreze automat pe cardul de memorie..


text:
Lusso Limo Rent a car
2020-10-27 13:19 DUBAI EVENTS
DUBAI (Reuters) - Expo 2020 Dubai is expected to be delayed by up to a year due to the global coronavirus pandemic, according to three sources familiar with the matter.
Organizers estimated last year that 11 million overseas visitors would attend the event, billed as a showpiece of culture, business and technology with pavilions from 192 countries plus concerts and other events.
The Expo 2020 steering committee, comprising of officials from the United Arab Emirates and foreign countries participating in the event, are expected to recommend a delay when they meet virtually on Monday later in the afternoon.
An Expo spokesman declined to comment.
A final, binding decision would be made at a later meeting of member states of the Bureau International des Expositions (BIE), which awards the event, though it is unlikely they would go against the recommendation, two of the sources said.
Organizers have been considering delaying the event by at least a few months as the pandemic, which has infected over half a million globally, wreaks havoc on the global economy, the sources said.
One of those sources, and a fourth, said organizers were also considering delaying the event by a year.
Countries have closed their borders, imposed curfews and some industries, such as aviation, have ground to a near halt, making it extremely difficult to host any event.
Expo 2020, which is scheduled to run from October 20 to April 10 2021, is currently the last major event still officially planned after the 2020 Tokyo Olympics were last week postponed by a year, the first such delay in the Games' 124-year modern history.
Dubai has spent billions of dollars of infrastructure in preparation and local officials and executives have said the world event would be a major driver of economic growth.


Some slamming 1978 Disco HEAT from the Salsoul stable! 'Pass The Buck' is a very popular LP cut from the group's sole long player 'Law & Order', naturally any Tom Moulton mix from that period is well worth your ears and your time if you consider yourself a Disco lover, the man's hands were all over a ton of classics and he had the magic touch for real. 'Pass The Buck' has all the hallmarks of the bombastic 'Philly Sound', arranged by the legendary Ron 'Have mercy' Kersey and his team and mixed by Moulton, this blast of FUNK opens side B of said long player. Mysteriously never released as a 12", this is one TM mix that really benefits from a nice loud pressing as it is presented here on this special RSD 19 12" reissue. That's not all, throw in a super, extended, cosmically overdubbed and tweaked re-edit from NYC's master of such disciplines - Joe Claussell - and we're talking some serious business, right? Well, that's what you get on this special limited release, the full 9+ minutes of Joe's very special reinterpretation, this one's all killer and no filler. Spiritual Discofied-Funk straight outta NYC for your enjoyment! Fully licensed, sanctioned and released by Above Board distribution and Salsoul Records. Accept no imitations!


Mitchell Jester played for the North Carolina Contenders (NC) during Week 7 in 2006. He most remembers hitting a home run and winning four games in the tournament.
Mitchell attends South Mecklenburg High School (Charlotte, NC). At South Mecklenburg, Mitchell hopes to be a three sport athlete. As a freshman, Mitchell was a center on the JV football team and played multiple positions for the JV Sabre baseball team. In the near future, Mitchell hopes to try out for the basketball team as well.
In the classroom Mitchell held a 4.5 GPA and was ranked in the top ten of his class. When not studying or playing sports, Mitchell likes to play the saxophone.


Every trade show you attend represents a big investment of time and money for your brand. You want to make sure those marketing resources aren't going to waste. Determining the ROI of your trade show booth is a critical part of any trade show manager's job. But, how can you make sure that the ROI you're calculating is accurate? According to a survey by MediaPost, it starts with good, clean data.
When your ROI is based on number of leads generated or qualified contacts, bad emails and incomplete data can pollute your analysis. Better data = more accurate ROI. Here's how to do it.
In the lead-up to your show, make sure your invitation mailing lists don't contain bad emails or out-of-date contact info. Experts say that up to 15% of emails on marketing lists are invalid, which can significantly alter your ROI calculations.
When sending emails, use verification products to ensure messages are delivered successfully. And, if you use lead forms, make sure to integrate an API that checks the validity of email addresses, so you don't end up adding bogus addresses to your list.
The same email verification products you use before the show come in handy during the show.
In addition to collecting clean data, make sure staff are clear on exactly what data you want to collect. Consistent, accurate information is the best way to power a clear post-show analysis.
Good data-collection practices before and during the show should minimize post-show data cleanup. But, it's always good to give your contact info and numbers a once-over before you conduct your analysis. Consider using a third-party product to help remove duplicates and verify your data before you determine your ROI.
From collecting clean data to setting smart goals, get the tips you need to rock your next trade show by downloading our white paper: 7 Keys To An Irresistible Trade Show Campaign.


text:
package org.wycliffeassociates.translationrecorder.Recording;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;

import org.wycliffeassociates.translationrecorder.AudioInfo;
import com.door43.tools.reporting.Logger;
import org.wycliffeassociates.translationrecorder.wav.WavFile;
import org.wycliffeassociates.translationrecorder.wav.WavOutputStream;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.LinkedList;
import java.util.List;

public class WavFileWriter extends Service {

    public static final String KEY_WAV_FILE = "wavfile";
    private String nameWithoutExtension = null;
    public static int largest = 0;

    public static Intent getIntent(Context ctx, WavFile wavFile) {
        Intent intent = new Intent(ctx, WavFileWriter.class);
        intent.putExtra(KEY_WAV_FILE, wavFile);
        return intent;
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        super.onStartCommand(intent, flags, startId);
        final WavFile audioFile = intent.getParcelableExtra(KEY_WAV_FILE);
        String name = audioFile.getFile().getName();
        nameWithoutExtension = name.substring(0, name.lastIndexOf("."));
        Thread writingThread = new Thread(new Runnable() {
            @Override
            public void run() {
                boolean stopped = false;

                try (WavOutputStream rawAudio = new WavOutputStream(audioFile, true)) {
                    //WARNING DO NOT USE BUFFERED OUTPUT HERE, WILL CAUSE END LINE TO BE OFF IN PLAYBACK
                    while (!stopped) {
                        RecordingMessage message = RecordingQueues.writingQueue.take();
                        if (message.isStopped()) {
                            Logger.w(this.toString(), "raw audio thread received a stop message");
                            stopped = true;
                        } else {
                            if (!message.isPaused()) {
                                rawAudio.write(message.getData());
                            } else {
                                Logger.w(this.toString(), "raw audio thread received a onPauseRecording message");
                            }
                        }
                    }
                    Logger.w(this.toString(), "raw audio thread exited loop");
                    RecordingQueues.writingQueue.clear();
                    Logger.e(this.toString(), "raw audio queue finishing, sending done message");
                } catch (FileNotFoundException e) {
                    Logger.e(this.toString(), "File not found exception in writing thread", e);
                    e.printStackTrace();
                } catch (InterruptedException e) {
                    Logger.e(this.toString(), "Interrupted Exception in writing queue", e);
                    e.printStackTrace();
                } catch (IOException e) {
                    Logger.e(this.toString(), "IO Exception in writing queue", e);
                    e.printStackTrace();
                } finally {
                    try {
                        RecordingQueues.doneWriting.put(new Boolean(true));
                    } catch (InterruptedException e) {
                        Logger.e(this.toString(), "InterruptedException in finally of writing queue", e);
                        e.printStackTrace();
                    }
                }
            }
        });

        Thread compressionThread = new Thread(new Runnable() {
            @Override
            public void run() {
                Logger.w(this.toString(), "starting compression thread");
                int increment = AudioInfo.COMPRESSION_RATE;
                boolean stopped = false;
                boolean stoppedRecording = false;
                LinkedList<Byte> byteArrayList = new LinkedList<>();
                try {
                    while (!stopped) {
                        RecordingMessage message = RecordingQueues.compressionQueue.take();
                        if (message.isStopped()) {
                            Logger.w(this.toString(), "Compression thread received a stop message");
                            stopped = true;
                            stoppedRecording = true;
                            Logger.w(this.toString(), "Compression thread writing remaining data");
                            writeDataReceivedSoFar(byteArrayList, increment, stoppedRecording);
                        } else {
                            if (!message.isPaused()) {
                                byte[] dataFromQueue = message.getData();
                                for (byte x : dataFromQueue) {
                                    byteArrayList.add(new Byte(x));
                                }
                                if (byteArrayList.size() >= increment) {
                                    writeDataReceivedSoFar(byteArrayList, increment, stoppedRecording);
                                }
                            } else {
                                Logger.w(this.toString(), "Compression thread received a onPauseRecording message");
                            }
                        }
                    }
                    Logger.w(this.toString(), "exited compression thread loop");
                    RecordingQueues.compressionQueue.clear();
                    Logger.w(this.toString(), "Compression queue finishing, sending done message");
                } catch (FileNotFoundException e) {
                    Logger.e(this.toString(), "File not found exception in compression thread", e);
                    e.printStackTrace();
                } catch (InterruptedException e) {
                    Logger.e(this.toString(), "Interrupted Exception in compression queue", e);
                    e.printStackTrace();
                } catch (IOException e) {
                    Logger.e(this.toString(), "IO Exception in compression queue", e);
                    e.printStackTrace();
                } finally {
                    try {
                        RecordingQueues.doneCompressing.put(new Boolean(true));
                    } catch (InterruptedException e) {
                        Logger.e(this.toString(), "InterruptedException in finally of Compression queue", e);
                        e.printStackTrace();
                    }
                }
            }
        });

        Thread compressionWriterThread = new Thread(new Runnable() {
            @Override
            public void run() {
                boolean stopped = false;

                File dir = new File(getExternalCacheDir(), "Visualization");
                if (!dir.exists()) {
                    dir.mkdirs();
                }
                File file = new File(dir, nameWithoutExtension + ".vis");
                if (!file.exists()) {
                    file.getParentFile().mkdirs();
                    try {
                        file.createNewFile();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                    Logger.w(this.toString(), "created a new vis file");
                }
                try (FileOutputStream fos = new FileOutputStream(file);
                     BufferedOutputStream compressedFile = new BufferedOutputStream(fos);
                ) {
                    compressedFile.write(new byte[4]);
                    while (!stopped) {
                        RecordingMessage message = RecordingQueues.compressionWriterQueue.take();
                        if (message.isStopped()) {
                            Logger.w(this.toString(), "raw audio thread received a stop message");
                            stopped = true;
                        } else {
                            if (!message.isPaused()) {
                                compressedFile.write(message.getData());
                            } else {
                                Logger.w(this.toString(), "raw audio thread received a onPauseRecording message");
                            }
                        }
                    }
                    compressedFile.flush();
                    try (RandomAccessFile raf = new RandomAccessFile(file, "rw")) {
                        raf.seek(0);
                        raf.write('D');
                        raf.write('O');
                        raf.write('N');
                        raf.write('E');
                        raf.close();
                    }
                    Logger.w(this.toString(), "raw audio thread exited loop");
                    RecordingQueues.compressionWriterQueue.clear();
                    Logger.e(this.toString(), "raw audio queue finishing, sending done message");
                } catch (FileNotFoundException e) {
                    Logger.e(this.toString(), "File not found exception in writing thread", e);
                    e.printStackTrace();
                } catch (InterruptedException e) {
                    Logger.e(this.toString(), "Interrupted Exception in writing queue", e);
                    e.printStackTrace();
                } catch (IOException e) {
                    Logger.e(this.toString(), "IO Exception in writing queue", e);
                    e.printStackTrace();
                } finally {
                    try {
                        RecordingQueues.doneWritingCompressed.put(new Boolean(true));
                    } catch (InterruptedException e) {
                        Logger.e(this.toString(), "InterruptedException in finally of writing queue", e);
                        e.printStackTrace();
                    }
                }
            }
        });
        compressionThread.start();
        compressionWriterThread.start();
        writingThread.start();

        return START_STICKY;
    }

    private void writeDataReceivedSoFar(List<Byte> list, int increment, boolean stoppedRecording) throws IOException {
        byte[] data = new byte[increment];
        byte[] minAndMax = new byte[2 * AudioInfo.SIZE_OF_SHORT];
        //while there is more data in the arraylist than one increment
        while (list.size() >= increment) {
            //remove that data and put it in an array for min/max computation
            for (int i = 0; i < increment; i++) {
                data[i] = list.remove(0);
            }
            //write the min/max to the minAndMax array
            getMinAndMaxFromArray(data, minAndMax);
        }
        //if the recording was stopped and there is less data than a full increment, grab the remaining data
        if (stoppedRecording) {
            System.out.println("Stopped recording, writing some remaining data");
            byte[] remaining = new byte[list.size()];
            for (int i = 0; i < list.size(); i++) {
                remaining[i] = list.remove(0);
            }
            getMinAndMaxFromArray(remaining, minAndMax);
        }
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    private void getMinAndMaxFromArray(byte[] data, byte[] minAndMax) {
        if (data.length < 4) {
            return;
        }
        int max = Integer.MIN_VALUE;
        int min = Integer.MAX_VALUE;
        int minIdx = 0;
        int maxIdx = 0;
        for (int j = 0; j < data.length; j += AudioInfo.SIZE_OF_SHORT) {
            if ((j + 1) < data.length) {
                byte low = data[j];
                byte hi = data[j + 1];
                short value = (short) (((hi << 8) & 0x0000FF00) | (low & 0x000000FF));
                if (max < value) {
                    max = value;
                    maxIdx = j;
                    if (value > largest) {
                        largest = value;
                    }
                }
                if (min > value) {
                    min = value;
                    minIdx = j;
                }
            }
        }
        minAndMax[0] = data[minIdx];
        minAndMax[1] = data[minIdx + 1];
        minAndMax[2] = data[maxIdx];
        minAndMax[3] = data[maxIdx + 1];
        try {
            RecordingQueues.UIQueue.put(new RecordingMessage(minAndMax, false, false));
            RecordingQueues.compressionWriterQueue.put(new RecordingMessage(minAndMax, false, false));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}


For some time now, the country has been led to believe that work is not being done by the People's Partnership Government in The East West Corridor, or more generally North Trinidad. This sort of propaganda is baseless as there are numerous projects of great significance completed as well as ongoing in the East West Corridor.
I will like to list some of these projects for the information of the media in particular who have also at times insinuated that there is a great imbalance.
The above incomplete list challenges the perception that the govt has been neglecting the East West Corridor!