One month ago, Facebook seemed to be on the brink of demise, with CEO Mark Zuckerberg testifying before Congress about a data-harvesting scandal that affected millions of users. "Facebook seemed like it was running amok and was about to be leveled by the government," CNBC's Jim Cramer, the host of "Mad Money," recalled on Wednesday. "No wonder the stock traded down to 18 times earnings." But since the scandal — which on Wednesday spurred the shutdown of the data-harvester, Cambridge Analytica — four things have brought Facebook back from near-death, Cramer said. Cramer argued that Facebook's comeback is symptomatic of a broader problem in the stock market: the negativity that gets directed at seemingly countless stocks and situations. Take President Trump's trade tiff with China. Plenty of investors think the president has met his match and that the People's Republic could retaliate if U.S. lawmakers go too far. But when he interviewed Apple CEO Tim Cook with CNBC's Josh Lipton ahead of the tech giant's second-quarter earnings report, Cramer liked what he heard. When asked about the impact of potential trade war escalation, Cook seemed surprisingly sanguine about the state of U.S.-China relations. "I am pretty optimistic there," Cook told CNBC. "I think that China and the U.S. have this unavoidable mutuality where the U.S. can only win if China wins, China can only win if U.S. wins and the world can only win if both win." "So if you look at what history tells us — that countries that are the most open and most diverse do the best, and the folks that are closed and least diverse, their citizens do the worst — ... it tells us that again and again and again," Cook continued. "And I think both countries know that."

The new Apple

Apple employees cheer as the doors are opened for customers at the Fifth Avenue Apple Store, in New York City. Getty Images

Apple's service stream revenue has never been quite as important as it became in the second quarter of 2018, Cramer argued on Wednesday. "[It] simply didn't have enough critical mass to make a difference until, well, now," the "Mad Money" host said. "With last night's blowout quarter, which had huge China sales and fabulously better than expected numbers for even the much derided iPhone X, that narrative is now gone." "The key takeaway was that the service business has finally arrived," Cramer said. Apple grew its subscriber count to 270 million people in the second quarter, up by 100 million year over year. Its services revenue was more than $9 billion.

Baby got buyback?

An employee works inside the cockpit of a C-17 Globemaster III military cargo jet being manufactured for the Indian Air Force. Patrick T. Fallon | Bloomberg | Getty Images

Coupa Software CEO on key opportunity: Optimizing spending

Rob Bernshteyn, CEO, Coupa Software Scott Mlyn | CNBC

Coupa Software Chairman and CEO Rob Bernshteyn finds it "unbelievable" how many companies are behind in his cloud play's flagship service: spending optimization, he told Cramer on Wednesday. "It's unbelievable how much of this stuff is being done with paper, how much of this is being done in a way where companies just don't understand where they're spending their money," the CEO said in a "Mad Money" interview. Tesla, Snap and Uber are among Coupa Software's roster of high-profile customers. Even Salesforce.com, a leader in digitization and automation, has been Coupa's customer for more than seven years. "We're building our way into this huge market opportunity," Bernshteyn told Cramer. "We're helping companies get their arms around hundreds of billions of dollars in spend, optimize it, save money, get smarter about the way they interact with suppliers – everything that has to do with spending money on the goods and services companies need, we help them apply best-in-class cloud platform technology to get it done."

Dominion Energy CEO: Top tech clients pushing for renewables

Dominion Energy Chairman and CEO Tom Farrell's utility giant serves top-tier tech companies in a very different way. More than half of the internet traffic in the United States runs through Dominion's electric service territory, and the company powers data centers for the likes of Facebook, Amazon and Microsoft. Farrell told Cramer in a Wednesday interview that lately, "we've had a lot of negotiations with large customers like that to provide them all solar for their needs. [There's] going to be a new, very large Facebook data center here in Virginia. Microsoft we have contracts with, Amazon we have contracts with, all for data centers to provide renewable power as their source of power." Farrell added that the shift is fairly broad-based. Dominion added over 2,000 megawatts of solar capabilities across the country in the last four years.

Lightning round: Don't discount TXN