text:
FSU | Arts and Sciences
This Site FSU Sites Faculty & Staff Directory Departments & Services
Spectrum Magazine
Florida State University remembers renowned structural biologist Donald Caspar
Tom Morgan
| Wed, 01/12/22
Donald Caspar, professor emeritus in Florida State University's Institute of Molecular Biophysics and a celebrated scientist who spent much of his career studying viruses, died Nov. 27. He was 94.
Caspar coined the term "structural biology," now used by researchers worldwide to describe the field focused on identifying the molecular structures and interactions of biological molecules.
He was a pioneer in the field, including being the co-author of the Caspar-Klug quasi-equivalence theory, which revolutionized understanding on how proteins work, namely the changes of protein shape (conformation) underpinning nearly all biological functions, from response to outside signals, catalytic action or mechanical work. These conformational changes in proteins drive biology on a molecular level.
"As a scientist, Don was absolutely brilliant. He was an integral part of the research community at the time of the greatest discoveries of the last century," said Ava Bienkiewicz, associate professor in FSU's Department of Biomedical Sciences. "Don valued creativity and was unfazed by the pushback that often accompanies unorthodox ideas."
After earning his bachelor's in physics from Cornell University in 1950 and a doctorate in biophysics from Yale University in 1955, Caspar was a postdoctoral fellow at Cambridge, and collaborated with Rosalind Franklin, who helped discover the iconic double-helix structure of DNA, at Birkbeck College. He was portrayed as one of the characters in the play "Photograph 51" about Franklin's story.
Throughout his career, Caspar held positions at Yale, Harvard, Caltech and Brandeis University, among several others before joining the FSU biology department and the Institute of Molecular Biophysics, or IMB, in 1994. The year he arrived at FSU, Caspar received a Guggenheim Fellowship and was elected as a member of the Biophysics and Computational Biology section of the prestigious National Academy of Sciences.
Caspar's impact on Florida State was both transformational and immediate, said Peter Fajer, professor in the FSU Department of Biological Science and past director of IMB.
"Don's arrival at FSU put us instantly on the map. The Structural Biology program in the institute was in its infancy," Fajer said. "Don's presence was a key factor in the institute obtaining a National Science Foundation Research Training grant, which provided us with fellowships for graduate students and postdoctoral associates."
Over time, Caspar's effort and vision for the program attracted and retained other top researchers and made the institute a powerhouse in electron microscopy.
His influence also extended across multiple scientific fields, said Tim Logan, associate dean in the College of Arts and Sciences and a professor in the Department of Chemistry and Biochemistry.
"He was essentially a physicist interested in biology and he spanned most of that space. His broad interests led him to seek out people in a variety of areas to see what he could learn from them," Logan said.
Caspar also had artistic talent, clearly demonstrated in the superb drawings of virus structures that complemented his scientific writing, Bienkiewicz said.
As large as his scientific achievements were, his humanity was even bigger, Fajer said.
"At the 2017 Caspar Structural Biology Symposium, which attracted 15 members of National Academy of Sciences, four Fellows of Royal Society and two Nobel Prize winners — all coming on their own dime to Tallahassee to honor him — the common thread was 'Don was an inspiration and mentor for me,'" he said.
For many, Caspar was a father figure who leaves a legacy marked by his deep caring for others. He was also an ardent supporter of women in science even during a time when, regrettably, many were not, Bienkiewicz said.
Caspar technically retired from FSU nearly 20 years ago, but continued coming into his office, attending seminars, and encouraging faculty and students well into his 10th decade of life, Logan said.
"Don was truly remarkable — not only an accomplished scientist, but also a kind, generous, and compassionate mentor and friend, who impacted the career journeys and lives of many," Bienkiewicz said.
Florida State researchers identify link that plays a role in regulating neuropsychiatric brain disorders
Student Spotlight: Behrouz Ghazi Esfahani
FSU oceanographer earns grant to research nitrous oxide, climate change
Researchers find key hormone influences social behavior from areas outside the brain
Alumni Spotlight: Becky Bolinger
Ditching cigarettes in the new year? FSU psychologist weighs in on popular resolution
FSU Research Team Receives 2021 AHIC Best Interdisciplinary Research Award
110 Longmire Bldg.
P.O. Box 3061280
Tallahassee, FL 32306-1280
CoAS SharePoint (Intranet)
myFSU Portal
CoAS IT Units & Request Support
Follow the college on social media


PHIPPSBURG – David M. Pratt, 70, of Clifford Road, went to be with his Lord and Savior on March 8, 2015. After a five year battle with prostate cancer, he passed away peacefully at his home surrounded by his family.
A lifelong resident of Phippsburg, he was born in Bath, Maine on July 31, 1944, the son of Shirley E. and Anna M. (Perkins) Pratt. In 1963, he graduated from Morse High School. On October 26, 1968, he married Joan A. Wright and together they shared a wonderful life for the past 46 years.
After High School, he joined the Army National Guard Reserves and was employed for 13 years by the State of Maine as a custodian at the Bath Armory. He worked part-time for 7 years as a Deputy at the Sagadahoc County Sheriff's Department, as well as many years alongside his father with small engine sales and service. As a dedicated Reservist, David joined the Military fulltime in 1986 as a Staff Sergeant Army National Guard Recruiter. Having served faithfully and honorably for 23 years, David retired from the United States Army in 1993.
As an avid sportsman, he enjoyed hunting, fishing, boating, motorcycling, NASCAR and camping with family and friends. He had a passion for antique autos and loved to "wheel and deal". David enjoyed meeting up with friends at one of his two favorite coffee shops in Bath to catch up on the day's news.
As a dedicated husband, father and grandfather, David spent much of his time with his family and loved spending time with his grandchildren. He attended their sports games with great pride and enjoyed carrying on a family tradition of taking them hunting Downeast in Penobscot, Maine.
David was a member of Small Point Baptist Church; a 26 year member of the Solar Lodge of Masons; the Kora Shriners Temple of Lewiston; the American Legion Smith Tobey Post 21; the Bath Elks Club; and a past member of the Downeast Yacht Club in Boothbay Harbor.
David is survived by his wife, Joan Pratt; three daughters, Lisa Woods and her husband, James, of Nashua, NH; Jeanne P. Daigle of Phippsburg; and Tanya Kaler and her husband, Michael, of Bath; five grandchildren, Jillian Curtis, Wade Daigle, Paige Daigle, Joshua Dunning and Vincent Kaler; a sister, Gloria Barnes and her husband, David, of Phippsburg; an aunt, Beulah Dunton of Freeport; and several nieces and nephews. He was predeceased by his parents, Shirley and Anna Pratt.
The family would like to express their gratitude to his Hospice Nurse, Amanda, as she provided David and the family with such warmth and compassion during the final stages of his illness.
A Celebration of Life will be held on Saturday, March 21, 2015 at 10:30 a.m. at Small Point Baptist Church in Phippsburg with Rev. Daniel C. Coffin officiating. A luncheon will immediately follow.
In lieu of flowers, memorial contributions can be made to The Shriners Hospitals for Children, 51 Blossom St., Boston, MA 02114 or Phippsburg Volunteer Fire and Rescue, 1042 Main Rd., Phippsburg, ME 04562.


best selling high quality rock crusher China supplier stable stone jaw crusher with CE ISO selling jaw crusher with ISO standard and best price.
ZENITH rock crusher, High performance china good mini portable rock crusher with ce iso. easy maintenance; 2.stable performance more.
hydraulic rock crusher price Wyatt Yeager is perhaps best known for his Stone crusher 1 Simple structure.2 Easy maintenance.3 Stable performance.4 ISO, CE.
Low Operation Cost Professional Cone Rock Crusher Price. high performance low price stone jaw crusher made in good mini portable rock crusher with ce iso.
ISO/CE Warranty 1 year Product Details; Building waste crusher with stable performance competitive price and professional services.


It's infuriating. I keep finding people's stolen work on sites like Etsy when looking for mine and it seems impossible to find anyone's contact details to let them know so they can send a simple DMCA and stop someone profiting off their work.
I've wasted ages today googling around trying desperately to find contact details.
Is there a way to easily PM someone on SS for example from their portfolio? I think you can if you find them on the forum, or am I wrong? It's a nightmare.
no, I don't think so, for a couple of reasons.
a) There would be spammers spamming the crap out of contributors ('buy viagra!', etc).
c) and kind of along the same lines of b, the sites want the contributors to depend on the sites, not realize they can do things on their own (i.e., custom deals/cheaper prices/etc).
There are ways (although a lot of work) to find contributors if they have their own independent site, but not sure if it is worth the effort for you. Noble that you would want to contact them - but not that easy.
Thanks, I know why really it's just super frustrating. Do you know which sites will let me PM a contributor? I couldn't find a way on AS/FL or SS, am I missing something?
Dreamstime do or at least did as I've had a few messages in the past.
I am in the same boat - finding so many stolen images these days and I think the only way to alert folks is to post them in forums like these.
Yay, found them on DT, still can't work out how to message them!!!
Any idea anyone? there's no obvious link to message from a profile page.
Yes it's not easy but you can leave a comment on one of their photos. Once you're on the photo page, click on the 3 dots on the right near extended licences. It will appear in the comments section on their dashboard.
The agencies do not want side deals either, I got contacted about a clip someone saw on SS through another site I shoot video on. They wanted a different license so I agreed on a price and did it. I would love to be able to work those deals more!
Wedding photography - the safe easy way to make money!
Are you looking for shortcuts to make easy money online?


text:
Apple Tv Taking Too Long To Load
It's a huge move for emulators, too, such as the popular GBA4iOS, which works for both the iPhone and iPad as long as the handset is jailbroken. *Depending on your country or region, and your carrier, the download limit might be higher. On your Roku remote, you'll need to access the Secret Screen. Apple TV Plus will launch Nov. Too many tabs in Safari take a toll on the performance of your iPhone or iPad. Read posts at several forums and did the fix. If you have an iPhone, iPad, Mac, or Apple TV, you already have the Apple TV app — the ultimate way to watch Apple TV+. She knows what it's going to take—a team of the best in their field, starting with her partner-in-crime Lou Miller (Cate Blanchett). After connecting with Tarek on a deeper level, Oscar is finally ready to open up more – or so he thought. To start watching, simply tap on the thumbnail. It's built for the most demanding users and beautifully designed to be the perfect centerpiece of your entertainment center. If you don't have your device handy, Rene has a great how-to on manually setting up your Apple TV ; otherwise, the easiest and best way is to use your iPhone, iPad, or iPod touch. It only takes a minute to sign up. So people are asking me via email or comments about my iPhone won't turn on suddenly and trying to fix my self but doesn't work. I was designing more and more Android interfaces at Twitter and realized I needed to more intimately grok Android UI paradigms. Specifies whether the app supports HDR mode on Apple TV 4K. We use cookies to give you a better service e. New Movie ReleasesSee more. Yes, turning on the Apple Watch takes about 2 minutes to fully turn on, this is normal, I just tested this myself this morning. So, how long does it take to get to Venus from Earth? The first spacecraft ever launched towards Venus was the Soviet Venera 1 spacecraft. I was going to go right back to my iPhone after a week. Find low everyday prices and buy online for delivery or in-store pick-up. We can assist with solving the most frequently encountered issues including, programming your remote control, scheduling your Contour DVR or refreshing your cable boxes or CableCards. follow the link and read the instructions. Netflix executives have long said that getting. Apple Watch Apple TV Mac IOS 10. After two months of frustration I tried it, and it has been working normally now for about two months with no issues. 1 sound with Apple TV, connect Apple TV with AV receiver and pass-through AC3 to the amplifier. I've bought a new iphone 6s and it's taking about an hour to update my iCloud settings, What can I do to speed it up?? Why is it taking so long to update iCloud settings on my new iPhone 6s? - iPhone, iPad, iPod Forums at iMore. Sign in to YouTube on Apple TV If you're using the YouTube app on Apple TV (3rd, 4th, and 5th generation), you can follow the directions below to sign in with your Google account. Stylish, minimal design and clean interfaces make Apple products instantly. Find local TV listings, watch full episodes of your favorite TV Shows and read the latest breaking news on TV shows, celebrities and movies. iTunes Store allows users to purchase and download items directly to portable Apple devices, such as the iPhone, iPad, Apple TV and iPod Touch. Did anyone try and check there status and the site just says they are doing a scheduled upgrade? is this normal im hoping this means that when it comes back. The excellent-sounding Vizio SB36512-F6 is the only Dolby Atmos sound bar we can heartily recommend, and it doesn't cost a king's ransom. Are you having Hulu login and password issues? Is the Hulu website down for you? These are just two questions about the American online video service and its website, and if you are having issues of any type with Hulu including the two above please do share with the community below of your troubles. This is a peer to peer community where your questions are answered by users like you. apple id setup Oct 07, 2019 · If you set up the Apple TV app on your smart TV and need to create an Apple ID, you might be redirected to activate. How to download apps on the Apple TV The easiest way to download apps on the Apple TV is right. To ensure it can bid against Disney, Apple, WarnerMedia, and NBCUniversal, Netflix has increased its debt load in order to spend more on content. See the infra-red camera pictures showing clearly the effect of the fan on and off. Does activating process in the apple tv takes too long? Youtube not running properly buffring takes lot of time 10minutes? Apple tv taking long time to activate. The experience hasn't really moved on much over the last two years. Apple's Calendar app has been a fine performer since the debut of iOS years ago. All of a sudden Apple TV is telling me it will take up to 4 hours then 6 hours to load. Sign in to iCloud to access your photos, videos, documents, notes, contacts, and more. It takes forever to load to even get in the app, then forever to load the stats. You'll learn the easy and helpful methods to fix the problem here. And Apple wants to use Apple TV+ to attract users to its TV app, where it will sell subscriptions to other services, like HBO and Starz, and then take a cut from those transactions. iTunes (Windows, Mac, iOS): Apple's iTunes is available for Windows and included on Mac, iPhone, and iPad. As two of the biggest tech companies in the world, it's no surprise that Netflix and Apple have teamed up to provide access to Netflix's expansive library of TV shows and movies on Apple TV. Constant buffering usually occurs if your Internet connection is slow. You will get an invite in the coming weeks. An Office 365 subscription offers an ad-free interface, custom domains, enhanced security options, the full desktop version of Office, and 1 TB of cloud storage. Apple Card, Apple Music, Apple Pay, iCloud MacRumors attracts a broad audience of both consumers and professionals interested in the latest technologies and products. For the other Roku users thinking about making the switch, DirecTV Now on the Apple TV 4K starts as soon as the app is launched. If you still have issues with apps on your device, contact Apple Support. CNET - Ty Pendlebury. The original "DMZ" comic, which ran from 2005 to 2012. As of this moment is it still not downloaded. Plus, many of our tutorials on here have Cydia Impactor as a prerequisite before proceeding further into the instructions. A Hulu + Live TV subscription allows you to watch on up to two screens at a time. When they do load they are incomplete sometimes. Nothing is set up like the website, I find it harder to use. NPR In California, Air Tanker Pilots Help Keep Wildfires At Bay. Free Shipping on Orders $35+ or Pickup In-Store and get a Pickup Discount. One of the best bits, though, is the no-strings three-month free trial, which makes the 30 days you get with rival services seem miserly. Most likely the connection between the server containing the Apple content and your ISP is congested, while the equivalent paths for Netflix content is not. This wikiHow teaches you how to view your Mac's screen on your Apple TV by using AirPlay. Use your Apple ID or create a new account to start using Apple services. My connection is fine cause another computer uses it fine. Freeform's Party of Five has a more ambitious goal. Among other things, it automatically retrieves the latest watchOS software from Apple's servers as soon as it becomes available to download. which takes a few hrs. Starting with iOS 11, Apple began offering a new feature that provides suggestions on how you can save space on your iOS device. In this article, we will. Five years, eight months, 12 daysand counting. How to Transfer Videos from iPhone to Computer Selectively Step 1: Download AnyTrans for iOS on your computer and run it > Connect your iOS device to the computer via a USB cable > Click on "Device Manager" mode, and then choose the "Videos" option. The repair, particularly if you just replace capacitors will not last very long unless you improve the cooling. 1 primarily for bug fixes but based on Apple Discussions boards and news around the blogosphere; it appears that there is still an issue affecting many users of iPhone firmware 2. Get rid of them. So, how long does it take to get to Venus from Earth? The first spacecraft ever launched towards Venus was the Soviet Venera 1 spacecraft. So you can register your little cousins device, your girlfriend's device, or your dad's device without a care. Find helpful answers to questions about anything and everything Verizon Fios products and services. 3/12 Update Freezing and Taking Too Long. The Apple Watch is solid first draft of a new kind of product. Apple TV joins the fun. Although, whenever i go to browse the apple store, it simply does not load, or takes 10 minutes to load each page. Kodi will take a minute or so to install and when it is finished click OPEN. I don't even try to watch game film on the app, it takes too long. The site could be temporarily unavailable or too busy. She knows what it's going to take—a team of the best in their field, starting with her partner-in-crime Lou Miller (Cate Blanchett). Apple clarified that the iTunes Store app for iOS will continue to be the place for iPhone and iPad users to purchase and download music, as well as buy or rent movies and TV shows. Infra-Red pictures of Time Capsule Apple built the TC with a fan, but it is not used in normal operation. Here are the latest computer tips from Komando. I was designing more and more Android interfaces at Twitter and realized I needed to more intimately grok Android UI paradigms. I have the exact same setup on my upstairs tv with the same wireless STB and this tv is further away from the WAP. Apple TV, Fire TV, Roku, Chromecast if you're looking to stream online TV shows, films, and video apps in your home, where are you meant to start? Long gone are the days when only one or two. The new SHIELD Pro takes this performance to the next level. Apple tv takes a long time to activate. Why does it take so long to load videos on hulu? All I want to do is watch a TV show called Bleach and it takes forever to load the video. It's annoying, but it kinda makes me laugh now. iTunes (Windows, Mac, iOS): Apple's iTunes is available for Windows and included on Mac, iPhone, and iPad. Apple TV Plus will launch Nov. The Apple tv can access them rather quickly but now home sharing on the iPad ans iPhone is extremely slow, taking almost 15-20 minutes to load up the library. Take a look at this AppList to learn more about what else is available. Apple to Start Offering iTunes on the Windows Store. I was designing more and more Android interfaces at Twitter and realized I needed to more intimately grok Android UI paradigms. The death of Flash has been a long time coming and a long time going on, too. The new SHIELD Pro takes this performance to the next level. The all-new Apple TV app is available today for 1 last software express vpn windows10 update 2019/09/22 iPhone, iPad and Apple TV customers in over 100 countries with iOS 12. If you've ever left your iPhone in the sun or in a hot car for too long, you've probably see a temperature warning message — which restricts the iPhone's use until it cools down. If you are experiencing issues with your Apple TV, try one of these easy fixes for five common problems. Backup Photos to iCloud: Photos hogged more than 2GB of memory on my iPad. The first thing you'll need to do once you get a hold of the new gadget is pair. It allows you to rent movies, purchase individual episodes or entire seasons of TV shows, or purchase movies. Create a professional website for free with the Website. Alfonso Cuarón Was a Pioneer With Netflix, but Signed an Exclusive TV Deal With Apple After earning Netflix three Oscars for "Roma," Cuarón switched his creative allegiance to Apple and all the. Why is is taking so long?. You can decrease the amount of buffering that occurs throughout a streaming video in Windows Media Player by adjusting the buffer time. An Apple ID is the personal account you use to access Apple services like the App Store, iTunes Store, iCloud, iMessage, the Apple Online Store, FaceTime, and more. Sep 13, 2016 · Apple's "biggest iOS release ever" got off to a rough start on Tuesday night with social media filled with complaints from users attempting to install the upgrade. If you want to enjoy Hulu + Live TV simultaneously on more than two supported devices, you can always add the Unlimited Screens option, so everyone in your household gets to watch at home whenever they want. is a consumer technology company based in Cupertino, California. It isn't even high definition its, 360p. Subscribe to CNET: http://cnet. Apple TV tips and tricks Fine tuning Siri on the HomePod You can fine tune Siri to some extent in the Home app on your iPhone or iPad although the control you have is limited. We are the go-to provider for any small business or large enterprise. How do i fix it every time i try to play a game or watch youtube from google chrome it shows the sighn, "couldn`t load plug in," help?. Amazon's Fire TV and Fire TV stick technically runs Android…but you wouldn't know it from looking. Keep in mind that your television must be connected to the Internet in order to download apps. And in the future, we'll be bringing the Apple TV experience to even more smart TVs, streaming boxes, and streaming sticks. Apple has brought 4K HDR content to the iTunes store, which is perfect for those who are planning to pick up the new Apple TV 4K. Apple Watch not working? Don't worry! Our troubleshooting guide will help you fix frozen screens, battery and charging problems and much more Apple Watches tend to be reliable little things, but. The person who gave it to me feels so bad they bought a junk gift. Read posts at several forums and did the fix. If you want it to, Apple Music will upload these tracks to the cloud as well, and you'll be able to listen to them on other devices too, but with one caveat: Apple Music places DRM on any of these. Most DSL or broadband connections these days can do this, but if you're having problems with streaming, your Internet speed might be the. So I am suggesting to take rest and read this tutorial that helps to find exact issues means where is the problem and how to fix DIY. Shop AT&T's selection of Tablets, iPads, & e - Readers. This is a server side problemin my opinion and honestly has taken Apple waaaaaay too long to even address. 4 to iOS 13. Superfast fibre, broadband, TV packages & mobile deals from Sky. With an Apple TV you can play video, music and movies from your iPhone, iPad via AirPlay or browse the myriad of apps and games available. How to Transfer Movies/Videos to iPad from PC or Mac Easily How do you manually transfer movies/videos to iPhone or iPad from Mac or PC easily? Head over to this quick guide to move your media from your computer to iOS device. Your Apple TV will go to sleep automatically, but if that's too long to wait, you can put your Apple TV to sleep immediately by holding down the Home button on the Apple TV remote and selecting. If the title is too long for one line and you have not specified when choosing which file to load. This wikiHow teaches you how to view your Mac's screen on your Apple TV by using AirPlay. Use AirParrot in combination with Reflector to create a seamless mirroring experience to any computer or device. By Daniel Eran Dilger Friday, October 11, 2019, 08:33 am PT (11:33 am ET) This summer, Apple finally revealed the design and specifications of its. In an Hour of Advertising, Matt Williams sits down for a drink and a chat with some of the industry's most inspirational people. Learn more about our easy-to-use security products & download our free antivirus software trial today! Download Antivirus for Mac, PC & Mobile - Free 30 Day Trial! | McAfee. To fix slow streaming on your third-generation Apple TV, you can make adjustments to its software, adjust your network or change the content quality of what you're watching. The motor works without brushes, which helps to reduce the number of separate moving parts and friction, making for a low vibration motor with a quiet wash cycle. (This process may take as long as 45 seconds. PayPal is the faster, safer way to send money, make an online payment, receive money or set up a merchant account. I was designing more and more Android interfaces at Twitter and realized I needed to more intimately grok Android UI paradigms. It also unveiled which of its original series and projects will be available on Day 1. If they don't have anything specific to doing this on a USB device, you can follow the instructions they have to creating a network install point on a server but you just create it on your local system, then copy the resulting folder to your USB device to have a portable installation kit with all. It will be set to some standard settings that are both too bright and has off color. But the Fitbit Versa 2 works on iOS and Android and costs $20. There are, however, a few differences that are worth noting. You have to work (relatively) hard to get video on demand out of your pay-TV provider. I don't even try to watch game film on the app, it takes too long. Welcome to the Verizon Fios Community. How to Install an Apple TV. Watch the latest movies, tv shows, live sports and kids entertainment live and on demand. How to Optimize Your Movies and TV Shows For Smooth Plex Playback Jason Fitzpatrick @jasonfitzpatric Updated July 14, 2017, 10:52pm EDT The Plex Media Server experience is generally pretty smooth, unless you do a lot of streaming when you're away from home or your server hardware is underpowered. If you plan to upload many videos, 5 GB may not last long. For years we've heard that it's on its way out, but who among us has not found an errant Flash video or widget in the l. If you cannot access your Apple ID at all or the email associated with it, it may be difficult or nearly impossible to retrieve that Apple ID. So you cannot calibrate a TV and then use the Netflix app from it. But I would recommend if you can to download to your computer via Itunes and then stream. The Apple tv can access them rather quickly but now home sharing on the iPad ans iPhone is extremely slow, taking almost 15-20 minutes to load up the library. 1 surround sound, and how to play AC3 5. It's been going on for over an hour so far and I had 12GB free on it. Listen to Amy without incurring data overage charges. Now, I don't want to spoil too much of the game for you, but there's one more scene I. To start watching, simply tap on the thumbnail. I never bought it for such a use but I feel I need to talk about it because people are so determined to compare it to the Microsoft Surface Pro. Fix the "programs take forever to open" issue. AirTV Player Review: Android TV Meets Antenna TV but it generally didn't take too long for me to load apps, navigate among screens and jump between Sling TV channels. Ask Different is a question and answer site for power users of Apple hardware and software. Apple deserves credit for taking on some of the most annoying problems of the TV app world without pushing its own service (iTunes) too much. Portrait mode has been making folks look great since the iPhone 7 Plus and 8 Plus—taking great portraits has never been so easy as picking a Portrait Lighting mode and letting the iPhone work its magic. Five years, eight months, 12 daysand counting. or you specifically off-load the data by other means. Richard Lawler, @Rjcc. She knows what it's going to take—a team of the best in their field, starting with her partner-in-crime Lou Miller (Cate Blanchett). Apple TV 4K Review: 13 Reasons You Should Buy One from heaven to long-suffering AV fans all too familiar with buying favorite films first on DVD, then on Blu-ray and finally on 4K Blu-ray. We troubleshoot iOS problems, and post latest news, rumors as well as apps and accessories reviews. If you're still receiving errors or seeing a long wait time, continue on. " - TSquared - "I've used the HD60 to record countless hours of gameplay for my YouTube channel. I started using a Nexus 4. Listen to Amy without incurring data overage charges. Even my Blu-Ray player has media apps that are faster than my TV. 1 surround sound, and how to play AC3 5. Apple deserves credit for taking on some of the most annoying problems of the TV app world without pushing its own service (iTunes) too much. Netflix executives have long said that getting. He said it would take $185 to $300 and 8 days to fix it. Subscribe to CNET: http://cnet. For someone who only has 100 bytes of memory left, every bit counts. Try again in a 50 gb vpn few moments. They're beautiful. According to a variety of reports. Apple's new streaming TV. iGeeksBlog is all about iPhone, iPad, iOS, Apple Watch. As fires blaze across the state, California firefighters have called in some of the biggest air tankers for help. They look like new. Moreover, streaming videos directly from youtube on my iphone over airplay may cause the video to be very blurry for a few secs and then back to normal (HD), this might be due to buffering but im not sure if the internet connection has an impact on that. iPhoto 5 can be very slow to load, and even slower (7 minutes) to unload for some users. AirTV Player Review: Android TV Meets Antenna TV but it generally didn't take too long for me to load apps, navigate among screens and jump between Sling TV channels. We won't take you step-by-step through getting iTunes content up on your Apple TV as you can no doubt figure it out yourself—try the built-in TV shows or Movies apps if you're stuck. We use cookies to give you a better service e. Your Apple TV will go to sleep automatically, but if that's too long to wait, you can put your Apple TV to sleep immediately by holding down the Home button on the Apple TV remote and selecting. Amazon has a wall of content for its set-top box, and doesn't want Google (with its own competing platform) to crash the party. Very quiet machine too. They're almost a reason to buy an Apple TV in and of itself. If you've ever downloaded an app on the iPhone or iPad you'll feel right at home downloading—and re-downloading—apps on the new Apple TV. For too long, the smart home hasn't been very smart. And again, I'll test the speeds before trying to watch anything, and they're all very high. Then he publishes the results pretty much verbatim. Five years, eight months, 12 daysand counting. So if you're in the market for a wearable that seamlessly syncs activity into Apple's ecosystem then that's one more reason to buy Apple's timepiece. Watch MeTV for memorable entertainment television from America's #1 classic television network. An anonymous reader writes "Computers take too long to boot up, and it doesn't make sense to me. Ask Different is a question and answer site for power users of Apple hardware and software. The motor works without brushes, which helps to reduce the number of separate moving parts and friction, making for a low vibration motor with a quiet wash cycle. Apple makes a little black box that hangs out on your network and waits for you to need it. The Apple CarPlay in-car ecosystem has been a long-standing part of Apple's portfolio, and the company was recently awarded a patent that described how a car could be controlled, in part, by an. Not only can the iPad control the device, taking over for the Siri Remote that comes with Apple TV, but the iPad's display can also be sent to Apple TV through AirPlay, which lets you view the iPad on your big-screen television. I was going to go right back to my iPhone after a week. iTunes Store allows users to purchase and download items directly to portable Apple devices, such as the iPhone, iPad, Apple TV and iPod Touch. It takes forever to load to even get in the app, then forever to load the stats. What's worse is Sony decided that when you use netflix from the TV app you don't need to change the picture settings. How to Install an Apple TV. Note: This long-range Bluetooth Headphone also supports other Apple Products like Apple Watch Series 3/2/1 and Apple TV 4K and Apple TV 4 or New. Once I have used an app, I make sure to quit it as leaving apps in the background not only drain the battery but also slow down the device. Is this an indexing issue, or something else?. Peter Kafka in News on December 20, 2013 at 8:00 am PT. With the TV app and single sign-on, it makes the Apple. Another way to connect your laptop and TV is with a dedicated media stream, with the most common being Google's Chromecast*, Roku's Streaming Stick*, Amazon Fire Stick*, or Apple's TV*. So, how long does it take to get to Venus from Earth? The first spacecraft ever launched towards Venus was the Soviet Venera 1 spacecraft. Does activating process in the apple tv takes too long? Youtube not running properly buffring takes lot of time 10minutes? Apple tv taking long time to activate. Here are the latest computer tips from Komando. But it's all for your own good, because Apple typically denies access to your account when somebody enters your password incorrectly too many times. When you're updating over the air, keep your device connected to a power source. The Starter TV package is not an eligible Bell service. Apple deserves credit for taking on some of the most annoying problems of the TV app world without pushing its own service (iTunes) too much. International Mobile App Due to streaming rights, channels may vary. Learn more about our easy-to-use security products & download our free antivirus software trial today! Download Antivirus for Mac, PC & Mobile - Free 30 Day Trial! | McAfee. The all-new Apple TV app is available today for 1 last update 2019/10/07 iPhone, iPad and Apple TV customers in over 100 countries with iOS 12. 1, 2018, YouTube TV's live (and Cloud DVR-recorded) content can now be seen on that over-the-top box without forcing you to jump through. As I said, Apple Watch software updates are handled by the Watch app on your paired iPhone. Apple offers several tiers of paid storage beginning with 50 GB for $0. The 3rd-generation Apple TV is no longer available from Apple, but you can still find it at third-party sellers, and it's still a solid set-top for you to get all your iTunes and other content onto your big screen TV. Even my Blu-Ray player has media apps that are faster than my TV. Your Apple Watch is a fantastic tool that can help you perform daily tasks on your iPhone. You'll use your remote's arrow keys to scroll down to Apps and the remote's multicolored "Select" button respectively to do this. Check out more of my editorials, How-To guides, and reviews for 9to5Mac here! I've covered a lot of different topics of interest to Mac, iPad, iPhone, iPod, Apple TV, and Apple Watch users. It's easy to enjoy SiriusXM at home on tons of devices you may already own. The other way for apple tv 4 is side load from cydia impactor. Watch MeTV for memorable entertainment television from America's #1 classic television network. 2 "Helix", the last version of Kodi to run on the Apple TV 2. Telstra TV Box Office: Buying a movie or TV show on Telstra TV Box Office allows you to stream that title as often as you like using your Telstra TV Box Office/ BigPond Movies account for as long as we have the right to make the title available to you. For instance, you take a photo on your iPhone on day-one. With any Apple device, you get 5GB of iCloud storage. If this step gets you streaming again: If you've bypassed your router and successfully connected to Netflix directly through your modem, it's likely that the router itself is the source of the problem. You'll need an iPhone, iPod, or iPod Touch with Safari on iOS 10 or later. Buy online with free express shipping, pick - up in store, or get same day delivery in select markets. The home of world-class live sport brings you 24/7 TV channel streaming plus exclusive videos and latest news in football, rugby union, MotoGP, UFC, and more. Apple is an equal opportunity employer that is committed to inclusion and diversity. Another way to connect your laptop and TV is with a dedicated media stream, with the most common being Google's Chromecast*, Roku's Streaming Stick*, Amazon Fire Stick*, or Apple's TV*. So we're simplifying things and bringing together all Nest and Google Home products under one roof. It allows you to rent movies, purchase individual episodes or entire seasons of TV shows, or purchase movies. We get the shows we like, that we're curious to see, and watching as we want, when we want, to pause when we need to, no commercials, I'm all for it. So you cannot calibrate a TV and then use the Netflix app from it. After c ity removed Virgin Mary statue from Veterans Memorial Park due to anonymous complaint, the park caretaker responded with a defiant gesture. Sign in to YouTube on Apple TV If you're using the YouTube app on Apple TV (3rd, 4th, and 5th generation), you can follow the directions below to sign in with your Google account. iCloud, actually, allows you to save your progress across devices, so you can pick back up where you left off, whether you're playing on the iPad, iPhone, or on Apple TV. Does the second generation majorly fix that, or do we need to wait for the next?. If you choose to rent a movie, you'll have thirty days to start watching it. Listen to Amy without incurring data overage charges. The death of Flash has been a long time coming and a long time going on, too. Keep in mind, not all the apps, music, TV shows, movies or books are available everywhere in the world. How I created a new digital identity—and you can too Even the most privacy conscious leave digital breadcrumbs back to their identity. The 3rd-generation Apple TV is no longer available from Apple, but you can still find it at third-party sellers, and it's still a solid set-top for you to get all your iTunes and other content onto your big screen TV. Netflix super slow to load/play movies and shows through AppleTV On my bedroom tv, I have the cisco wireless stb with a 3rd gen appletv connected to the ethernet port on the back of the wirelss STB. Amazon, Apple, Google, and Roku streaming devices dominate the market. Extend the purging to your iTunes music too, or switch to an online service like Spotify or Pandora. 5: Select Reset All Settings. For too long, the smart home hasn't been very smart. You can be close to. Amazon Prime Video is an app that works on some generations of Apple TV. Netflix executives have long said that getting. Step 1, Click on the Apple iTunes Movies link provided to you in the Sources section of this article. But first you'll need to make sure you have the right. Driving is the perfect time to catch up on your favorite podcasts or stations, from anywhere in the world. Note: This long-range Bluetooth Headphone also supports other Apple Products like Apple Watch Series 3/2/1 and Apple TV 4K and Apple TV 4 or New. Nothing is set up like the website, I find it harder to use. Find local TV listings, watch full episodes of your favorite TV Shows and read the latest breaking news on TV shows, celebrities and movies. The announcement comes as Netflix prepares for the Walt Disney Company and Apple to each launch their competing streaming services next month. It is terrible if iOS 12 update takes too long. Alfonso Cuarón Was a Pioneer With Netflix, but Signed an Exclusive TV Deal With Apple After earning Netflix three Oscars for "Roma," Cuarón switched his creative allegiance to Apple and all the. To watch movies in 4K HDR on Apple TV 4K, make sure that you're using an HDMI 2. Apple is putting all the building blocks in place. Here's the question: given that if i leave my pod on the. The service stores all of the user's photos, maintaining their original resolution and metadata. Question: Q: Apple TV downloading HD movie is taking too long I purchased an HD movie and began the download, however it is taking an extremely long time to down load. But I would recommend if you can to download to your computer via Itunes and then stream. An anonymous reader writes "Computers take too long to boot up, and it doesn't make sense to me. Apple's digital media device, the Apple TV, allows users to stream videos, music and TV, using a high-speed Internet connection. Here's the question: given that if i leave my pod on the. 7: Once your Apple TV has completely reset, you'll need to select your language and configure your Wifi connection. However, it looks like 4K content can only be streamed and can't. 10) of later, plus web app access. Apple explains that the reason for this is to give your other devices, including your Mac, plenty of time to connect and download the photos. or you specifically off-load the data by other means. Apple has now made it even easier to get apps directly from your Watch, too, with the on-watch App Store launching through the watchOS 6 update. Even if you have Apple Airpods, then hang it with Airpods Strap and reduced the chances of the loss an Airpod. Part 2: 5 Ways to Solve iOS 13/12. When you load a site. We take affirmative action to ensure equal opportunity for all applicants without regard to race, color, religion, sex, sexual orientation, gender identity, national origin, disability, Veteran status, or other legally protected characteristics. TuneIn is integrated in hundreds of car models and is compatible with both Android Auto and Apple CarPlay. And for them, the procedure remains the same. This new tool includes support for the 16:9 aspect ratio now used in the TV app as well as a load of high-res imagery Apple uses from ultrawide banners and background screen captures to logos and parallax files. If you start a playlist on your iOS device or Mac, it too will play on the Apple TV. How to add, use and remove passes in Apple's Wallet app for iOS. This is a server side problemin my opinion and honestly has taken Apple waaaaaay too long to even address. I don't think you can charge it while it is off. Low fuss for a long time - digital inverter motor with a 11 year parts warranty. Keep holding both until you see the screen go black — and then keep holding until the device boots back up again and you see the Apple logo. Portrait mode has been making folks look great since the iPhone 7 Plus and 8 Plus—taking great portraits has never been so easy as picking a Portrait Lighting mode and letting the iPhone work its magic. Please fix!!!!! And the ads they play are the same ones over and over again. I depends on how long you have had it and the model. Get Help and Support for setting up or troubleshooting your Cox Advanced TV and Contour TV service. Apple Watch not working? Don't worry! Our troubleshooting guide will help you fix frozen screens, battery and charging problems and much more Apple Watches tend to be reliable little things, but. How to stream from phones and tablets to TV HTC's Media Link HD (£30) is a little dongle-sized device which you plug in to the HDMI port of your TV set. The company launched its iOS 10. first you have to disconnect apple tv from internet or make forget your wifi network. Hello iMore, Does anyone else have a problem with Home Sharing taking forever to load? If so are there any workarounds? Home sharing takes forever to load library, anyone else? - iPhone, iPad, iPod Forums at iMore. Welcome to the Verizon Fios Community. In fact, broadcast television seems, in some ways, to be headed the way of print newspapers, toward the annals of media history. Arduino and Apple HomeKit Integration - Control Your Home From Siri! IoT Is Here: This Instructable will give you a quick and easy way to add an arduino board to Apple's HomeKit on an iOS device.

redpajama_set_name: RedPajamaCommonCrawl


text:
namespace _LTSimplePath {

LTSimplePath::LTSimplePath(AnyOption *opt1) : freeTuples(NULL), freeTuplesSize(0) {
    opt = opt1;

    outdir = opt->getValue("outdir");
	probGraphFile = opt->getValue("probGraphFile");
//	tol = strToFloat(opt->getValue("tol_ldag"));
	graphType = DIRECTED;

    userNodes = new map<UID, xNode *>();
    //adjMap = new map<UID, set<UID> *>();
    outsideCovMap.clear();

    //path_tol = strToDouble(opt->getValue("path_tol"));
    cutoff_tol = strToDouble(opt->getValue("cutoff"));
    countIterations = strToInt(opt->getValue("mcruns"));
    setModel(opt);

	topl = strToInt(opt->getValue("topl"));
    celfPlus = strToInt(opt->getValue("celfPlus"));

    srand(time(NULL));

    optimal = 1;
    //optimal = 0;

}

LTSimplePath::~LTSimplePath() {
    cout << "Total time taken : " << getTime() << endl;
    for (map<UID, xNode *>::iterator i = userNodes->begin(); i != userNodes->end(); ++i) {
        xNode *p = i->second;
        delete p->N_out;
        delete p->N_in;
        delete p;
    }
    delete userNodes;
}

void LTSimplePath::setModel(AnyOption *opt) {
    m = opt->getValue("propModel");
    model = LTNew; // just by default

    if (m.compare("LT") == 0) {
		model = LT;
	} else if (m.compare("IC") == 0) {
		model = IC;
	} else if (m.compare("PC") == 0) {
		model = PC;
	} else if (m.compare("LTNew") == 0) {
        model = LTNew;
    }
}

void LTSimplePath::doAll() {

    setprecision(8);
    init_linked_list(); // allocate memory space for storing nodes
    readInputData(); // read graph date from a file

    time(&startTime);

    if (optimal == 1) {
        vertexCoverMaxDeg();
    }

    int phase = strToInt(opt->getValue("phase"));

    openOutputFiles();

    if (phase == 17) {
        problem = "SimPath";
        cout << "model is : " << model << ". problem is : " << problem << endl;

        seedVec.clear();

        if (celfPlus == 1) {
            cout << "CELF++" << endl;
            mineSeedSetPlus(); // CELF++
        } else {
            cout << "CELF" << endl;
            mineSeedSet(); // CELF
        }
    }

    outFile.close();
	hopsOutFile.close();

    // true: do MC to evaluate coverage; false: will not do.
    bool flag = true;
    if (optimal == 1 && flag == true) {
        MC* mc = new MC(opt);
        mc->readInputData();
        mc->writeCovInFile(seedVec, 0);
    }
}

// mineSeedSet, SimPath + VC + CELF + Look-Ahead Optimization
double LTSimplePath::mineSeedSet() {

    cout << "In mineSeedSet()..." << endl;

    curSeedSet.clear();
    int budget = strToInt(opt->getValue("budget"));
    totalCov = 0;
    int countUsers = 0;

    multimap<double, UID> covQueue;

    if (optimal == 0) {
        cout << "Optimizations are NOT used..." << endl;
        outsideNodes.clear();
        outsideCovMap.clear();
        vertexCover = users;
    }

    // initialize coverage of nodes outside VC to be zero
    for (UserList::iterator i = outsideNodes.begin(); i != outsideNodes.end(); ++i) {
        outsideCovMap.insert(std::make_pair(*i, 0.0));
    }

    // first pass, without CELF, computing simple-path-based coverage for nodes in vertex cover
    // for each Vertex Cover node, compute its coverage by enumerating simple paths
    for (UserList::iterator i = vertexCover.begin(); i != vertexCover.end(); ++i) {
        UID v = *i;

        double newCov = 0;
        UserList S;
        S.insert(v);
        UserList T;

        if (model == LTNew) {
            newCov = simPath(S, T, 1); // iteration is 1
        }//endif

        covQueue.insert(std::make_pair(newCov, v));
        ++countUsers;

        if (newCov > totalCov) {
            totalCov = newCov;
            curSeedSet.clear();
            curSeedSet.insert(v);
        }

    } //endfor

    // for each Non Vertex Cover node...
    for (map<UID, double>::iterator i = outsideCovMap.begin(); i != outsideCovMap.end(); ++i) {
        UID v = i->first;
        double newCov = 1 + i->second; // don't forget to add 1 to vertex cover based coverage: very important

        covQueue.insert(std::make_pair(newCov, v));
        ++countUsers;

        if (newCov > totalCov) {
            totalCov = newCov;
            curSeedSet.clear();
            curSeedSet.insert(v);
        }
    }

    // $$$$$$$ END OF 1ST ITERATION $$$$$$$$//
    cout << "1st iteration done... time: " << getTime() << endl;

    if (curSeedSet.size() != 1) {
        cout << "Some problem: first pass: seed set size != 1... it is " << curSeedSet.size() << endl;
    }

    seedVec.push_back(*curSeedSet.begin());
    writeInFile(*curSeedSet.begin(), totalCov, totalCov, 0, 0, 0, countUsers);
    cout << "Number of nodes examined in this iteration: " << countUsers << endl << endl;

    multimap<double, UID>::iterator i = covQueue.end();
    i--;
    covQueue.erase(i);

    // first seed picked, now subsequent iteration starts! CELF / CELF++
    countUsers = 0;
    UserList usersExamined;
    int l = topl;  // top-l elements from CELF queue

    if (covQueue.size() < l) {
        l = covQueue.size() - 1;
    }

    // repeated evaluate MG and pick seed until budget is exhausted
    while (curSeedSet.size() < budget) {
        bool flag = false;
        UserList T;

        if (covQueue.empty()) {
            cout << "CELF already empty, no more seed to pick" << endl;
            break;
        } //endif

        multimap<double, UID>::iterator iter = covQueue.end();
        iter--; // top position at CELF queue

        UID node_to_compare = 0;
        double MG_to_compare = 0;
        bool examined_reached = false;
        for (int i = 0; i < l; i++) {
            UID x = iter->second;

            if (usersExamined.find(x) == usersExamined.end()) {
                // if this node has not been exmained yet, it should be a candidate
                T.insert(x);
                usersExamined.insert(x);

                //cout << "pick a candidate node to T: " << x << endl;

                countUsers++;
            } else {
                // reach the first examined node, stop adding nodes to T
                examined_reached = true;
                node_to_compare = x;
                MG_to_compare = iter->first;

                if (i == 0) {
                    flag = true; // if the top-1 node has been already examined
                } //endif

                break;
            } //endif

            iter--; // move to the next position
        } //endfor

        // if the top-1 node is already examined, then it's automatically seed!
        if (flag == true) {
            totalCov += MG_to_compare;
            curSeedSet.insert(node_to_compare);
            seedVec.push_back(node_to_compare);

            writeInFile(node_to_compare, totalCov, MG_to_compare, 0, 0, 0, countUsers);
            countUsers = 0;
            usersExamined.clear();

            if (iter->second != node_to_compare) {
                cout << "Some trouble in CELF...." << endl;
                exit(0);
            }

            covQueue.erase(iter);
            continue;
        }

        // if all top-l have not examined before, then we need to compare with the l+1 guy
        if (examined_reached == false) {
            iter--;
            node_to_compare = iter->second;
            MG_to_compare = iter->first;
        }

        if (node_to_compare == 0 || MG_to_compare == 0) {
            cout << "Some trouble 2 in CELF...." << endl;
        }

        // delete all candidate from covQueue now
        for (int i = 0; i < T.size(); i++) {
             multimap<double, UID>::iterator iter = covQueue.end();
             iter--;
             covQueue.erase(iter);
        }

        // compute cov(S) and cov(S) on V-x for all x \in T
        covSMap.clear();
        covXMap.clear();
        double cov_S = simPath(curSeedSet, T, curSeedSet.size() + 1);
        // covSMap should be already updated within simPath;

        // compute cov(x) on V-S for all x in T
        UID winnerID = 0;
        double winnerMG = 0;

        for (UserList::iterator i = T.begin(); i != T.end(); ++i) {
            UID x = *i;
            double cov_X = backtrackBasic(x, curSeedSet);

            //cout << "candidate id, cov(x) = " << x << ", " << cov_X << endl;

            //covXMap.insert(std::make_pair(x, cov_X));

            // compute node x's marginal gain;
            double xMG = covSMap.find(x)->second + cov_X - totalCov;
            covXMap.insert(std::make_pair(x, xMG)); // pair(ID, newMG)

            // find the node with max new MG among all top-l candidates
            if (xMG > winnerMG) {
                winnerMG = xMG;
                winnerID = x;
            }
        } //endfor

        // Examine whether we can claim the next seed node or not
        if (winnerMG >= MG_to_compare) {
            // if one of top-l is larger than the next node is seed
            totalCov += winnerMG;
            curSeedSet.insert(winnerID);
            seedVec.push_back(winnerID);

            writeInFile(winnerID, totalCov, winnerMG, 0, 0, 0, countUsers);
            countUsers = 0;
            usersExamined.clear();

            // re-insert other losers into the queue
            for (UserList::iterator k = T.begin(); k != T.end(); ++k) {
                if (*k != winnerID) {
                    UID loserID = *k;
                    double loserMG = covXMap.find(loserID)->second;
                    covQueue.insert(std::make_pair(loserMG, loserID));
                } //endif
            } //endfor

            continue;

        } else {
            // otherwise, re-insert all losers into the queue
            for (UserList::iterator k = T.begin(); k != T.end(); ++k) {
                UID loserID = *k;
                double loserMG = covXMap.find(loserID)->second;
                covQueue.insert(std::make_pair(loserMG, loserID));
            } //endfor

        } //endif

    } //endwhile

    return totalCov;
}

// an interface function to call backtrack algo
double LTSimplePath::simPath(UserList &S, UserList &T, int iteration) {

    //cout << "enter simPath" << endl;

    double cov = 0.0;

    if (iteration == 1) {
        // first iteration, only one node in set S
        UID u = *S.begin();
        T.clear();

        xNode *startNode = NULL; // xNode struct ptr for v
        startNode = userNodes->find(u)->second; // look up v in the global node map

        multimap<double, xNode *> *inNeighbors = startNode->N_in; // get u's in-neighbors x
        map<UID, double> probMap; // map<x, b(x,u)>
        for (multimap<double, xNode *>::iterator j = inNeighbors->begin(); j != inNeighbors->end(); ++j) {
            UID x = j->second->id;
            probMap.insert(std::make_pair(x, j->first));

            if (outsideNodes.find(x) != outsideNodes.end()) {
                T.insert(x);  // if an in-neighbor of u is not in VC, add it into T
            } //endif
        } //endfor

        // S-current seed set, T-the nodes we want partial coverage
        cov = backtrackFirst(startNode, T, probMap);

    } else if (iteration > 1) {
        // subsequent iterations...
        // mineSeedSet() will give seed candidates T from CELF queue. \
        // S is the curSeedSet
        // then for each x \in T, compute cov(S) on V-x and cov(x) on V-S
        //map<UID, double> covSMap; // store cov(S) on V-x for each x

        // initialize all coverages to be zero
        for (UserList::iterator k = T.begin(); k != T.begin(); ++k) {
            covSMap.insert(std::make_pair(*k, 0.0));
        } //endfor

        // compute coverage of each seed node and accumulate them...
        // within backtrackSubSequent, covSMap is updated
        for (UserList::iterator i = S.begin(); i != S.end(); ++i) {
            UID u = *i; // one seed node
            xNode *startNode = userNodes->find(u)->second;
            cov +=  backtrackSubsequent(startNode, curSeedSet, T);
        } //endfor

        //cout << "Coverage of S = " << cov<< endl;

    } else {
        cerr << "Something is wrong, iteration number should be >= 1" << endl;
    } //endif

    return cov;

}

// mineSeedSetPlus: using CELF++
double LTSimplePath::mineSeedSetPlus() {

    cout << "In mineSeedSetPlus" <<endl;

    curSeedSet.clear();
    int budget = strToInt(opt->getValue("budget"));

    totalCov = 0;
    int countUsers = 0;

    Gains gainTable;
    MGStruct *pBestMG = NULL;
    UID lastSeedID = -1;
    double lastSeedMG = 0;

    // initialize coverage of nodes outside VC to be zero
    for (UserList::iterator i = outsideNodes.begin(); i != outsideNodes.end(); ++i) {
        outsideCovMap.insert(std::make_pair(*i, 0.0));
    }

    // first pass, without CELF, computing simple path based coverage for nodes in vertex cover
    // for each Vertex Cover node, compute its coverage by enumerating simple paths
    for (UserList::iterator i = vertexCover.begin(); i != vertexCover.end(); ++i) {
        //UID v = *i;
        MGStruct* pMG = new MGStruct;
		pMG->nodeID = *i; // set "1st column"

        UserList S;
        S.insert(*i);
        UserList T;

        if (model == LTNew) {
            // computer pMG->gain now
            simPathPlus(pMG, pBestMG, S, T, 1);
        }

        pMG->flag = 1; // set "5th column" -- only one seed, so flag is only 1
        gainTable.insert(std::make_pair(pMG->gain, pMG));
        ++countUsers;
    } //endfor

    // for each Non Vertex Cover node...
    for (map<UID, double>::iterator i = outsideCovMap.begin(); i != outsideCovMap.end(); ++i) {
        MGStruct* pMG = new MGStruct;
        pMG->nodeID = i->first;
        pMG->gain = 1 + i->second;

        pMG->flag = 1;
        gainTable.insert(std::make_pair(pMG->gain, pMG));
        ++countUsers;
    } //endfor

    // pick the 1st seed
	Gains::iterator iter = gainTable.end();
	iter--;
	MGStruct* pTop = (MGStruct *) (iter->second);
    if (pTop == NULL) {
		cout << "Some problem: pTop is NULL pointer" << endl;

    } else {
		lastSeedID = pTop->nodeID; // record the last selected seed
        lastSeedMG = pTop->gain;

		curSeedSet.insert(pTop->nodeID); // the top-1 becomes a seed
		seedVec.push_back(pTop->nodeID);
        totalCov += pTop->gain; // update the current seeds' coverage

        writeInFile(pTop->nodeID, totalCov, totalCov, 0, 0, 0, countUsers);
		gainTable.erase(iter); // remove that seed from queue
	}

    // CELF++, from 2nd pass
    pBestMG = NULL;
    MGStruct * pCurr = NULL;
	MGStruct * pNext = NULL;
	countUsers = 0; // # of users need recomputation!

    while (curSeedSet.size() < budget) {
        Gains::iterator iter = gainTable.end();
		iter--;
		pCurr = (MGStruct *) (iter->second); // pointing to the current node

		if (pCurr == NULL) {
			cout << "Some problem: pCurr is NULL pointer" << endl;
		} //endif

        // if it has been visited again, pick it as seed
        if ( pCurr->flag == (curSeedSet.size() + 1) ) {
            lastSeedID = pCurr->nodeID;
            lastSeedMG = pCurr->gain;

			curSeedSet.insert(pCurr->nodeID);
            seedVec.push_back((pCurr->nodeID));
			totalCov += pCurr->gain;
			writeInFile(pCurr->nodeID, totalCov, pCurr->gain, 0, 0, 0, countUsers);

            gainTable.erase(iter);
			pBestMG = NULL;
			countUsers = 0;
			continue;

        } else {  // it has NOT been vistied yet, in this iteration of seeking new seed
            int old_flag = pCurr->flag;
            pCurr->flag = curSeedSet.size() + 1;

            iter--;
			pNext = (MGStruct *) (iter->second); // pointing to the next

            if (pCurr->v_best == lastSeedID && old_flag == curSeedSet.size()) {

                curSeedSet.insert(pCurr->nodeID);
                double cov1 = backtrackBasic(lastSeedID, curSeedSet); // compute cov(prev_best) on G-S-u;
                curSeedSet.erase(pCurr->nodeID);
                double cov2 = pCurr->gain_next;  // placeholder: cov(S+x) on G-prev_bext
                pCurr->gain_next = cov2 + cov1 - totalCov - lastSeedMG;

                if (pCurr->gain_next >= pNext->gain) {
                    lastSeedID = pCurr->nodeID;
                    lastSeedMG = pCurr->gain_next;

				    curSeedSet.insert(pCurr->nodeID); // update the seed set
                    seedVec.push_back((pCurr->nodeID));
				    totalCov += pCurr->gain_next; // update current seeds' coverage
				    writeInFile(pCurr->nodeID, totalCov, pCurr->gain_next, 0, 0, 0, countUsers);

                    iter++;
				    gainTable.erase(iter); // delete new seed from queue
				    pBestMG = NULL;
				    countUsers = 0;
				    continue;

                } else {
                    // IF v_best is still the last seed, just move the previouly 4th column value to the 2nd column
				    // To avoid re-computation
                    pCurr->gain = pCurr->gain_next;
                    pCurr->v_best = 0;
                    pCurr->gain_next = 0;
					pCurr->flag = curSeedSet.size() + 1;

                    if (pBestMG == NULL) {
						pBestMG = pCurr;
					} else {
						if (pCurr->gain > pBestMG->gain) {
							pBestMG = pCurr;
						} //endif
					} //endif

                    iter++;
					gainTable.erase(iter);
					gainTable.insert(pair<float, MGStruct *>(pCurr->gain, pCurr));

                } //endif

			} else {
                // recompute MG
                bool isBest;

                if (model == LTNew) {
                    UserList T;
                    isBest = simPathPlus(pCurr, pBestMG, curSeedSet, T, curSeedSet.size()+1);
                } //endif

                pCurr->flag = curSeedSet.size() + 1;
                countUsers++;

                if(pCurr->gain >= pNext->gain) {  // pick it as seed
                    lastSeedID = pCurr->nodeID; // record it to be the last added seed
                    lastSeedMG = pCurr->gain;

                    curSeedSet.insert(pCurr->nodeID); // add it to seed set
                    seedVec.push_back(pCurr->nodeID);
                    totalCov += pCurr->gain; // update current seeds' coverage
                    writeInFile(pCurr->nodeID, totalCov, pCurr->gain, 0, 0, 0, countUsers);

                    iter++;
                    gainTable.erase(iter); // remove new seed from queue
                    pBestMG = NULL;
                    countUsers = 0;
                    continue;

                } else {
                    // cannot be seed for now, re-insert it into table (at another position)
                    if (isBest == true) {
                        pBestMG = pCurr;
                    }
                    iter++;
                    gainTable.erase(iter);
                    gainTable.insert(pair<float, MGStruct *>(pCurr->gain, pCurr));

                    continue;
                } //endif

            } //endif
        } //endif
    } //endwhile

    return totalCov;

} // end of function

bool LTSimplePath::simPathPlus(MGStruct *pMG, MGStruct *pBest, UserList &S, UserList &T, int iteration) {

    bool ret = false;

    if (iteration == 1) {
        UID v = pMG->nodeID;
        T.clear();

        xNode *startNode = NULL; // xNode struct ptr for v
        startNode = userNodes->find(v)->second; // look up v in the global node map

        multimap<double, xNode *> *inNeighbors = startNode->N_in; // get in-neighbors of u
        map<UID, double> probMap; // map<x, b(x,v)>

        for (multimap<double, xNode *>::iterator j = inNeighbors->begin(); j != inNeighbors->end(); ++j) {
            UID x = j->second->id;
            probMap.insert(std::make_pair(x, j->first));

            if (outsideNodes.find(x) != outsideNodes.end()) {
                T.insert(x);  // if an in-neighbor of u is not in VC, add it into T
            } //endif
        } //endfor

        // S-current seed set, T-the nodes we want partial coverage
        double cov1 = backtrackFirst(startNode, T, probMap);
        pMG->gain = cov1;

    } else if (iteration > 1) {
        T.clear();
        UID u; // ID of the prev best node
        if (pBest != NULL) {
            u = pBest->nodeID;
            T.insert(u);
        }

        // calculate cov(S+x) on V-u
        S.insert(pMG->nodeID); // S = S + x now
        covPlus.clear();
        covPlus.push_back(0); // cov(S+x) on V
        covPlus.push_back(0); // cov(S+x) on V-u
        for (UserList::iterator i = S.begin(); i != S.end(); ++i) {
            UID u = *i;
            xNode *startNode = userNodes->find(u)->second;
            covPlus.at(0) += backtrackPlus(startNode, curSeedSet, T);
        } //endfor
        S.erase(pMG->nodeID); // remove x from S

        pMG->gain = covPlus.at(0) - totalCov;

        // decide whether pMG is better than pBest
        if (pBest == NULL) {
            pMG->v_best = pMG->nodeID;
            pMG->gain_next = 0;
            ret = false;

        } else {
            if (pMG->gain > pBest->gain) {
                // this node is better than the prev. best
                pMG->v_best = pMG->nodeID;
                pMG->gain_next = 0;
                ret = true;
            } else {
                // this node is no better than the prev. best
                pMG->v_best = pBest->nodeID;
                //S.insert(pMG->nodeID);
                //double cov1 = backtrackBasic(u, S); // cov(prevBest) on V-S-curNode
                //S.erase(pMG->nodeID);
                //pMG->gain_next = covPlus.at(1) + cov1 - totalCov - pBest->gain;
                pMG->gain_next = covPlus.at(1);
                ret = false;
            } //endif

        } // endif

    } else {
        cerr << "Something is wrong, iteration number should be >= 1" << endl;
    } // endif

} //end of function

// BACKTRACK and FORWARD with manual (naive) cut off
double LTSimplePath::backtrackFirst(xNode *startNode, UserList &T, map<UID, double> &probMap) {

    //double init_tol = 0.1; // initial tolerance that can be beared for the start node:
    double cov = 1; // cov(u), initially 1 (counting itself first)
    double pp = 1; // path prob.

    UID v = startNode->id;
    startNode->flag = true;
    startNode->cov = 1;
    startNode->pp = 1;

    map<UID, xNode *> TNodes;
    for (UserList::iterator j = T.begin(); j != T.end(); ++j) {
        xNode *u = userNodes->find(*j)->second;
        u->flag = false; // not on path right now
        u->cov = 1; // initialize cov^{V-u}(v) to be 1 (i.e., count v itself)
        TNodes.insert(std::make_pair(*j, u));
    }

    vector<xNode *> Q;
    set<UID> Q1;
    map< UID, set<UID> > D;

    Q.push_back(startNode);
    Q1.insert(startNode->id);
    int numOutNeighbors = startNode->N_out->size(); // number of out-neighbors of the start (seed) node

    uint64_t numCutOffs = (uint64_t)0;
    uint64_t numHops = (uint64_t)0;
	int maxHops = 0;
	int minHops = 10000;
    while (Q.empty() == false) {
        UID last_v = 0;

        while (true) {
            // FORWARD starts here!!!
            xNode *currentNode = Q.back(); // get the latest node on the path
            UID x = currentNode->id; // get its id
            //cout  << setprecision(15) << "** Q.last() = " << x << ", Q.size() =" << Q.size() << ", tol = " <<currentNode->tol << endl;

            if (x == last_v) {
                break;
            }
            last_v = x;

            pp = currentNode->pp; // get the current path prob. till this node

            multimap<double, xNode *> *outNeighbors = currentNode->N_out;
            if (outNeighbors == NULL || outNeighbors->empty() == true) {
                continue; // if the current node has no out-neighbors, do nothing....
            }

            for (multimap<double, xNode*>::iterator k = outNeighbors->begin(); k != outNeighbors->end(); ++k) {
                xNode *nextNode = k->second;
                UID y = nextNode->id;

                if (y == v) { // y is just v
                    D[x].insert(y);
                    continue;
                } else if (Q1.find(y) != Q1.end()) { // y already on path before, would create cycle
                    continue;
                } else if (D[x].find(y) != D[x].end()) { // y is an already-explored neighbor of x
                    continue;
                }

                double ppnext = pp * k->first; // pp = pp * b_{x,y}
                // cut off the path here
                if (ppnext < cutoff_tol ) {
                    cov += ppnext;
                    D[x].insert(y); // y is explored

					// for counting avg #hops
                    numCutOffs += 1;
					int curPathLen = (int) Q.size();
					numHops += curPathLen;  // add to cumulative length
					if (curPathLen > maxHops) // find max path length
						maxHops = curPathLen;
					if (curPathLen < minHops) // find min path length
						minHops = curPathLen;

                    continue;
                }

                // cout << setprecision(15) << "  next node = " << y << ", ppnext = " << pp * k->first << endl;
                cov += ppnext;

                nextNode->flag = true; // it's on the current path now
                nextNode->pp = ppnext; // path prob till this "nextNode"

                Q.push_back(nextNode); // add to the current path (queue)
                Q1.insert(y); // add to the current path (queue)
                D[x].insert(y); // y is explored

                // update partial coverage for nodes in T but not on this path (flag == false guys)
                for (map<UID, xNode *>::iterator it = TNodes.begin(); it != TNodes.end(); ++it) {
                    //xNode *tempNode = it->second;
                    if (it->second->flag == false) {
                        it->second->cov += ppnext;
                    }
                } //endfor

                break;
            } //endfor

        } // endwhile

        // BACKTRACK starts here!!!
        xNode *u = Q.back(); // pick the last node in the current path
        UID pop_id = u->id;
        if (Q.size() == 1) {
            // when you are backtracking to the start node now
            if (pop_id != v) {
                cout << "The only remaining node in Q is: " << pop_id << ", but not: " << v << endl;
                exit(1);
            }

            if (D[pop_id].size() < numOutNeighbors) {
                // have not explored all out neighbors of the start node, continue!!
                continue;
            }
        }

        // reset flag, as the node is being deleted from the current path
        map<UID, xNode *>::iterator it = TNodes.find(pop_id);
        if (it != TNodes.end()) {
            it->second->flag = false;
        }

        Q1.erase(pop_id);
        D.erase(pop_id);
        Q.pop_back();

        //cout << "## Q.pop() = " << pop_id << ", Q.size() =" << Q.size() << endl;

    } //endwhile

    // update partial coverage for its non Vertex Cover in-neighbors
    for (map<UID, xNode *>::iterator it = TNodes.begin(); it != TNodes.end(); ++it) {
        UID x = it->first;
        xNode *pX = it->second;
        outsideCovMap[x] += probMap[x] * pX->cov;

    }

	if (optimal == 0) {
		// store avg. number of hops for paths exiting this node (v).
		double avgNumHops = 1.0 * (double)numHops / (double)numCutOffs;
		//hopsMap.insert(std::make_pair(v, avgNumHops));

		// write into file
		hopsOutFile << v << " " << avgNumHops << " " << maxHops << " " << minHops << " " << cov << endl;
		cout << v << " " << avgNumHops << " " << maxHops << " " << minHops << " " << cov << endl;
		//cout << v << " " << numHops << " "  << numCutOffs << " " << avgNumHops << endl;
	}

    return cov;
}

// compute cov(u) on V-S-x+U, for subsequent iterations
double LTSimplePath::backtrackSubsequent(xNode *startNode, UserList &S, UserList &T) {

    double cov = 1; // cov(u), initially 1 (include itself first)
    double pp = 1; // path prob.

    UID v = startNode->id;
    startNode->flag = true;
    startNode->cov = 1;
    startNode->pp = 1;

    // initialize partial coverage for all node u in T
    map<UID, xNode *> TNodes;
    for (UserList::iterator j = T.begin(); j != T.end(); ++j) {
        xNode *u = userNodes->find(*j)->second;
        u->flag = false; // not on path right now
        u->cov = 1; // initialize cov^{V-u}(v) to be 1 (i.e., count v itself)
        TNodes.insert(std::make_pair(*j, u));
    }

    vector<xNode *> Q;
    set<UID> Q1;
    map< UID, set<UID> > D;

    Q.push_back(startNode);
    Q1.insert(startNode->id);
    int numOutNeighbors = startNode->N_out->size(); // number of out-neighbors of the start (seed) node

    while (Q.empty() == false) {
        UID last_v = 0;

        while (true) {
            // FORWARD starts here!!!
            xNode *currentNode = Q.back(); // get the latest node on the path
            UID x = currentNode->id; // get its id
            //cout  << setprecision(15) << "** Q.last() = " << x << ", Q.size() =" << Q.size() << ", tol = " <<currentNode->tol << endl;

            if (x == last_v) {
                break;
            }
            last_v = x;

            pp = currentNode->pp; // get the current path prob. till this node

            multimap<double, xNode *> *outNeighbors = currentNode->N_out;
            if (outNeighbors == NULL || outNeighbors->empty() == true) {
                continue; // if the current node has no out-neighbors, do nothing....
            }

            for (multimap<double, xNode*>::iterator k = outNeighbors->begin(); k != outNeighbors->end(); ++k) {
                xNode *nextNode = k->second;
                UID y = nextNode->id;

                if (y == v) { // y is just v
                    D[x].insert(y);
                    continue;
                } else if (Q1.find(y) != Q1.end()) { // y already on path before, would create cycle
                    continue;
                } else if (D[x].find(y) != D[x].end()) { // y is an already-explored neighbor of x
                    continue;
                } else if (S.find(y) != S.end()) { // y is a seed
                    D[x].insert(y);
                    continue;
                }

                double ppnext = pp * k->first; // pp = pp * b_{x,y}
                // cut-off here
                if (ppnext < cutoff_tol ) {
                    cov += ppnext;
                    D[x].insert(y); // y is explored
                    continue;
                }

                // cout << setprecision(15) << "  next node = " << y << ", ppnext = " << pp * k->first << endl;
                cov += ppnext;

                nextNode->flag = true; // it's on the current path now
                nextNode->pp = ppnext; // path prob till this "nextNode"

                Q.push_back(nextNode); // add to the current path (queue)
                Q1.insert(y); // add to the current path (queue)
                D[x].insert(y); // y is explored

                // update partial coverage for nodes in T but not on this path (flag == false guys)
                for (map<UID, xNode *>::iterator it = TNodes.begin(); it != TNodes.end(); ++it) {
                    //xNode *tempNode = it->second;
                    if (it->second->flag == false) {
                        it->second->cov += ppnext;
                    }
                } //endfor

                break;
            } //endfor

        } // endwhile

        // BACKTRACK starts here!!!
        xNode *u = Q.back(); // pick the last node in the current path
        UID pop_id = u->id;
        if (Q.size() == 1) {
            // when you are backtracking to the start node now
            if (pop_id != v) {
                cout << "The only remaining node in Q is: " << pop_id << ", but not: " << v << endl;
                exit(1);
            } //endif

            if (D[pop_id].size() < numOutNeighbors) {
                // have not explored all out neighbors of the start node, continue!!
                continue;
            } //endif
        } //endif

        // reset flag, as the node is being deleted from the current path
        map<UID, xNode *>::iterator it = TNodes.find(pop_id);
        if (it != TNodes.end()) {
            it->second->flag = false;
        }

        Q1.erase(pop_id);
        D.erase(pop_id);
        Q.pop_back();

        //cout << "## Q.pop() = " << pop_id << ", Q.size() =" << Q.size() << endl;
    } //endwhile

    // update partial coverage for its non Vertex Cover in-neighbors
    for (map<UID, xNode *>::iterator it = TNodes.begin(); it != TNodes.end(); ++it) {
        UID x = it->first;
        xNode *pX = it->second;
        //outsideCovMap[x] += probMap[x] * pX->cov;
        covSMap[x] += pX->cov;
    }

    return cov;
}

// very basic backtrack, simply compute cov(v) on V-S
double LTSimplePath::backtrackBasic(UID v, UserList &S) {

    //cout << "In backtrackBasic... ID = " << v << endl;

    double cov = 1; // cov(u), initially 1 (include itself first)
    double pp = 1; // path prob.

    xNode *startNode = NULL; // xNode struct ptr of the start node u
    map<UID, xNode *>::iterator i = userNodes->find(v); // look up u in the global node map
    if (i != userNodes->end()) {
        startNode = i->second;
        //startNode->flag = true;
        //startNode->cov = 1;
        startNode->pp = 1;
    } else {
        cerr << "Cannot find xNode struct for start node: " << v << endl;
        return 0.0;
    } //endif

    vector<xNode *> Q;
    set<UID> Q1;
    map< UID, set<UID> > D;

    Q.push_back(startNode);
    Q1.insert(startNode->id);
    int numOutNeighbors = startNode->N_out->size(); // number of out-neighbors of the start (seed) node

    while (Q.empty() == false) {
        UID last_v = 0;

        while (true) {
            // FORWARD starts here!!!
            xNode *currentNode = Q.back(); // get the latest node on the path
            UID x = currentNode->id; // get its id
            //cout  << setprecision(15) << "** Q.last() = " << x << ", Q.size() =" << Q.size() << ", tol = " <<currentNode->tol << endl;

            if (x == last_v) {
                break;
            }
            last_v = x;

            pp = currentNode->pp; // get the current path prob. till this node

            multimap<double, xNode *> *outNeighbors = currentNode->N_out;
            if (outNeighbors == NULL || outNeighbors->empty() == true) {
                continue; // if the current node has no out-neighbors, do nothing....
            }

            for (multimap<double, xNode*>::iterator k = outNeighbors->begin(); k != outNeighbors->end(); ++k) {
                xNode *nextNode = k->second;
                UID y = nextNode->id;

                if (y == v) { // y is just v
                    D[x].insert(y);
                    continue;
                } else if (Q1.find(y) != Q1.end()) { // y already on path before, would create cycle
                    continue;
                } else if (D[x].find(y) != D[x].end()) { // y is an already-explored neighbor of x
                    continue;
                } else if (S.find(y) != S.end()) { // y is a seed
                    D[x].insert(y);
                    continue;
                }

                double ppnext = pp * k->first; // pp = pp * b_{x,y}
                // cut-off here
                if (ppnext < cutoff_tol ) {
                    cov += ppnext;
                    D[x].insert(y); // y is explored
                    continue;
                }

                //cout << setprecision(15) << "  next node = " << y << ", ppnext = " << pp * k->first << endl;
                cov += ppnext;

                nextNode->pp = ppnext; // path prob till this "nextNode"

                Q.push_back(nextNode); // add to the current path (queue)
                Q1.insert(y); // add to the current path (queue)
                D[x].insert(y); // y is explored

                break;
            } //endfor

        } // endwhile

        // BACKTRACK starts here!!!
        xNode *u = Q.back(); // pick the last node in the current path
        UID pop_id = u->id;
        if (Q.size() == 1) {
            // when you are backtracking to the start node now
            if (pop_id != v) {
                cout << "The only remaining node in Q is: " << pop_id << ", but not: " << v << endl;
                exit(1);
            } //endif

            if (D[pop_id].size() < numOutNeighbors) {
                // have not explored all out neighbors of the start node, continue!!
                //cout << "AMIT AMIT AMIT" << endl;
                continue;
            } //endif
        } //endif

        Q1.erase(pop_id);
        D.erase(pop_id);
        Q.pop_back();

        //cout << "## Q.pop() = " << pop_id << ", Q.size() =" << Q.size() << endl;
    } //endwhile

    return cov;

}

// When CELF++ takes place, use this
double LTSimplePath::backtrackPlus(xNode *startNode, UserList &S, UserList &T) {

    double cov = 1; // cov(u), initially 1 (include itself first)
    double pp = 1; // path prob.

    UID v = startNode->id;
    startNode->flag = true;
    startNode->cov = 1;
    startNode->pp = 1;

    // initialize partial coverage for all node u in T
    map<UID, xNode *> TNodes;
    for (UserList::iterator j = T.begin(); j != T.end(); ++j) {
        xNode *u = userNodes->find(*j)->second;
        u->flag = false; // not on path right now
        u->cov = 1; // initialize cov^{V-u}(v) to be 1 (i.e., count v itself)
        TNodes.insert(std::make_pair(*j, u));
    }

    vector<xNode *> Q;
    set<UID> Q1;
    map< UID, set<UID> > D;

    Q.push_back(startNode);
    Q1.insert(startNode->id);
    int numOutNeighbors = startNode->N_out->size(); // number of out-neighbors of the start (seed) node

    while (Q.empty() == false) {
        UID last_v = 0;

        while (true) {
            // FORWARD starts here!!!
            xNode *currentNode = Q.back(); // get the latest node on the path
            UID x = currentNode->id; // get its id
            //cout  << setprecision(15) << "** Q.last() = " << x << ", Q.size() =" << Q.size() << ", tol = " <<currentNode->tol << endl;

            if (x == last_v) {
                break;
            }
            last_v = x;

            pp = currentNode->pp; // get the current path prob. till this node

            multimap<double, xNode *> *outNeighbors = currentNode->N_out;
            if (outNeighbors == NULL || outNeighbors->empty() == true) {
                continue; // if the current node has no out-neighbors, do nothing....
            }

            for (multimap<double, xNode*>::iterator k = outNeighbors->begin(); k != outNeighbors->end(); ++k) {
                xNode *nextNode = k->second;
                UID y = nextNode->id;

                if (y == v) { // y is just v
                    D[x].insert(y);
                    continue;
                } else if (Q1.find(y) != Q1.end()) { // y already on path before, would create cycle
                    continue;
                } else if (D[x].find(y) != D[x].end()) { // y is an already-explored neighbor of x
                    continue;
                } else if (S.find(y) != S.end()) { // y is a seed
                    D[x].insert(y);
                    continue;
                }

                double ppnext = pp * k->first; // pp = pp * b_{x,y}
                // cut-off here
                if (ppnext < cutoff_tol ) {
                    cov += ppnext;
                    D[x].insert(y); // y is explored
                    continue;
                }

                // cout << setprecision(15) << "  next node = " << y << ", ppnext = " << pp * k->first << endl;
                cov += ppnext;

                nextNode->flag = true; // it's on the current path now
                nextNode->pp = ppnext; // path prob till this "nextNode"

                Q.push_back(nextNode); // add to the current path (queue)
                Q1.insert(y); // add to the current path (queue)
                D[x].insert(y); // y is explored

                // update partial coverage for nodes in T but not on this path (flag == false guys)
                for (map<UID, xNode *>::iterator it = TNodes.begin(); it != TNodes.end(); ++it) {
                    //xNode *tempNode = it->second;
                    if (it->second->flag == false) {
                        it->second->cov += ppnext;
                    }
                } //endfor

                break;
            } //endfor

        } // endwhile

        // BACKTRACK starts here!!!
        xNode *u = Q.back(); // pick the last node in the current path
        UID pop_id = u->id;
        if (Q.size() == 1) {
            // when you are backtracking to the start node now
            if (pop_id != v) {
                cout << "The only remaining node in Q is: " << pop_id << ", but not: " << v << endl;
                exit(1);
            } //endif

            if (D[pop_id].size() < numOutNeighbors) {
                // have not explored all out neighbors of the start node, continue!!
                continue;
            } //endif
        } //endif

        // reset flag, as the node is being deleted from the current path
        map<UID, xNode *>::iterator it = TNodes.find(pop_id);
        if (it != TNodes.end()) {
            it->second->flag = false;
        }

        Q1.erase(pop_id);
        D.erase(pop_id);
        Q.pop_back();

    } //endwhile

    // update partial coverage for its non Vertex Cover in-neighbors
    for (map<UID, xNode *>::iterator it = TNodes.begin(); it != TNodes.end(); ++it) {
        UID x = it->first;
        xNode *pX = it->second;
        //outsideCovMap[x] += probMap[x] * pX->cov;
        covPlus.at(1) += pX->cov;
    }

    return cov;

}

void LTSimplePath::vertexCoverMaxDeg() {
    cout << "In vertexCoverMaxDeg()" << endl;

    multimap<int, xNode *> degQueue;
    for (map<UID, xNode *>::iterator i = userNodes->begin(); i != userNodes->end(); ++i) {
        xNode *uNode = i->second;  // node struct
        degQueue.insert(std::make_pair(uNode->in_deg, uNode)); // insert in-degree into sorted map
    } //endfor

    int deletedEdges = 0;
    multimap<int, xNode *>::reverse_iterator rit = degQueue.rbegin();
    while (vertexCover.size() + outsideNodes.size() < users.size()) {
        xNode *topNode = rit->second;
        UID v = topNode->id;
        ++rit;

        // insert v into VC if not already outside VC
        if (outsideNodes.find(v) == outsideNodes.end()) {
            vertexCover.insert(v);
        } //endif

        // delete incoming edges;
        multimap<double, xNode *> *in = topNode->N_in;
        for (multimap<double, xNode *>::iterator i = in->begin(); i != in->end(); ++i) {
            xNode *x = i->second;
            x->out_deg--;
            deletedEdges++;

            if (x->out_deg == 0 && x->in_deg == 0) {
                if (vertexCover.find(x->id) == vertexCover.end()) {
                    outsideNodes.insert(x->id);
                } //endif
            } //endif
        } //endfor

        multimap<double, xNode *> *out = topNode->N_out;
        for (multimap<double, xNode *>::iterator i = out->begin(); i != out->end(); ++i) {
            xNode *x = i->second;
            x->in_deg--;
            deletedEdges++;

            if (x->out_deg == 0 && x->in_deg == 0) {
                if (vertexCover.find(x->id) == vertexCover.end()) {
                    outsideNodes.insert(x->id);
                } //endif
            } //endif
        } //endfor

    }//endwhile

    cout << "Number of VC nodes: " << vertexCover.size() << endl;
    cout << "Number of outside nodes: " << outsideNodes.size() << endl;

}

float LTSimplePath::getTime() const {
	time_t curTime;
	time(&curTime);

	float min = ((float)(curTime - startTime))/60;
	return min;
}

void LTSimplePath::openOutputFiles() {

	if (outFile.is_open())
		outFile.close();

	string algorithm = "SimPath";
	cout << "problem : " << problem << endl;
	string filename = outdir + "/" + m + "_" + algorithm + "_" + opt->getValue("topl") + "_" + opt->getValue("cutoff") + ".txt";
	outFile.open (filename.c_str()); // file for storing seeds info

	if (outFile.is_open() == false) {
		cout << "Can't open file " << filename << " for writing" << endl;
		exit(1);
	}

	// for storing avg #hops.
	if (hopsOutFile.is_open())
		hopsOutFile.close();

	string hopFilename = outdir + "/" + m + "_" + algorithm + "_" + opt->getValue("cutoff") + "_Hops.txt";
	hopsOutFile.open(hopFilename.c_str());
	if (hopsOutFile.is_open() == false) {
		cout << "Can't open file " << hopFilename << " for writing" << endl;
		exit(1);
	}

}

void LTSimplePath::writeInFile(UID v, float cov, float marginal_gain, int curTimeStep, float actualCov, float actualMG, int countUsers) {
    cout << endl << endl << "Picked a seed node: " << v << ", total: " << curSeedSet.size() << endl;
	outFile << v << " " << cov << " " << marginal_gain << " " << curTimeStep << " " << getCurrentMemoryUsage() << " " << getTime() <<  " " << " " << actualCov << " " << actualMG << " " << countUsers << endl;
	cout << v << " " << cov << " " << marginal_gain << " " << curTimeStep << " " << getCurrentMemoryUsage() << " " << getTime() << " " <<  " " << actualCov << " " << actualMG << " " << countUsers << endl;
	//cout << endl << endl;
}

void LTSimplePath::readInputData() {
    edges = -1;

    string probGraphFile = opt->getValue("probGraphFile");
    cout << "Reading file " << probGraphFile << endl;
    ifstream myfile (probGraphFile.c_str(), ios::in);
	string delim = " \t";

    if (myfile.is_open()) {
        while (! myfile.eof() )	{
            std::string line;
			getline (myfile,line);
			if (line.empty()) {continue;}
			edges++;
			if (edges == 0) {continue;} // ignore the first line
			std::string::size_type pos = line.find_first_of(delim);
			int	prevpos = 0;

			// get first user
			string str = line.substr(prevpos, pos-prevpos);
			UID u1 = strToInt(str);

			// get the second user
			prevpos = line.find_first_not_of(delim, pos);
			pos = line.find_first_of(delim, prevpos);
			UID u2 = strToInt(line.substr(prevpos, pos-prevpos));

			if (u1 == u2) continue;

			// get the parameter
			double parameter1 = 0;
			prevpos = line.find_first_not_of(delim, pos);
			pos = line.find_first_of(delim, prevpos);
			if (pos == string::npos)
				parameter1 = strToDouble(line.substr(prevpos));
			else
				parameter1 = strToDouble(line.substr(prevpos, pos-prevpos));

			if (parameter1 == 0) {
                //cout << "Zero degree edge: " << u1 << " " << u2 << " " << parameter1 << endl;
                edges--;
                continue;
            }

            // ************************************************//
            std::pair<set<UID>::iterator,bool> ret1, ret2;
            ret1 = users.insert(u1);
            ret2 = users.insert(u2);

            if (edges % 1000000 == 0) {
				cout << "(node1, node2, weight, nodes till now, edges till now, mem) = " << u1 << ", " << u2 << ", " << parameter1 << ", " << userNodes->size() << ", " << edges << ", " << getCurrentMemoryUsage() << endl;
			}

            xNode *user1 = NULL;
            xNode *user2 = NULL;
            //set<UID> *nlist1 = NULL;
            //set<UID> *nlist2 = NULL;
            // get xNode struct for u1 here
            if (ret1.second == true) {
                // u1 is new, create a xNode struct for her
                user1 = getNewTuple(u1, false, 1, 1, 1, 1);
                user1->N_in = new multimap<double, xNode *>();
                user1->N_out = new multimap<double, xNode *>();
                userNodes->insert(std::make_pair(u1, user1));
            } else {
                // u1 already been encountered, just pull its xNode struct from the global map
                map<UID, xNode *>::iterator i1 = userNodes->find(u1);
                if (i1 != userNodes->end()) {
                    user1 = i1->second;
                } else {
                    cout << "cannot find xNode struct for user " << u1 << endl;
                }

            } //endif

            // get xNode struct for u2 here
            if (ret2.second == true) {
                // u2 is new, create a xNode struct for her
                user2 = getNewTuple(u2, false, 1, 1, 1, 1);
                user2->N_in = new multimap<double, xNode *>();
                user2->N_out = new multimap<double, xNode *>();
                userNodes->insert(std::make_pair(u2, user2));

                // create an adjacency list
                //nlist2 = new set<UID>();
                //adjMap->insert(std::make_pair(u2, nlist2));

            } else {
                // u2 already been encountered, just pull its xNode struct from the global map
                map<UID, xNode *>::iterator i2 = userNodes->find(u2);
                if (i2 != userNodes->end()) {
                    user2 = i2->second;
                } else {
                    cout << "cannot find xNode struct for user " << u2 << endl;
                }

            } //endif

            // now we should have xNode struct for both u1 and u2
            // so insert neighbor relationships here:
            user1->N_out->insert(std::make_pair(parameter1, user2));
            user2->N_in->insert(std::make_pair(parameter1, user1));

        } //endwhile

        myfile.close();

    } else {
        cout << "CANNOT OPEN friendship graph file, PROGRAM TERMINATED!" << probGraphFile << endl;
		exit(1);
    } //endif

    // gather in/out-degree information
    for (map<UID, xNode *>::iterator i = userNodes->begin(); i != userNodes->end(); ++i) {
        xNode *user = i->second;
        user->in_deg = user->N_in->size();
        user->out_deg = user->N_out->size();
    } //endfor

    cout << "BuildAdjacencyMatFromFile done" << endl;
    cout << "Size of the user set: " << users.size() << endl;
    cout << "Size of the global map: " << userNodes->size() << endl;
    cout << "Number of edges in the friendship graph are: " << edges << endl;

}

// end of name space here
}

redpajama_set_name: RedPajamaGithub