text
stringlengths
1
330k
Feb. 6, 2009, is a time when Barry Bonds is battling more court judges than starting pitchers, and signing more checks to his lawyer than autographs.
Ironically, this date also represents the 114th birthday of George Herman "Babe" Ruth. The greatest hitter of his generation, and possibly in baseball history. Ruth slugged 714 homeruns while ingesting thousands of hot dogs instead of performance enhancers.
The truly staggering stat produced by The Babe has to do with his batting average, as opposed to his power. Ruth hit .370 or better in six of his Yankee seasons.
Possessing the ability to hit for such a high average while leading the league in home runs is a truly remarkable feat. His pitching prowess makes him one of the most dynamic baseball players to ever play the game.
"The House that Ruth Built," may have taken its last breath in 2008, but the memories of The Babe and his building will never die.
Take the tour ×
To get my PHP and Wordpress skills, I've been trying to code a small plugin a day. Today's project was to create a plugin that searched over every word in my posts, checked if http://reddit.com/r/$word was a valid link, and added the link to the word if it was.
The plugin works correctly for the first post.
"**trees**" links to **http://reddit.com/r/trees**
"**php**" links to **http://reddit.com/r/php**
However, for every other post, the $word variable does not change.
"**trees**" links to **http://reddit.com/r/$word**
I've been scratching my head for the past hour trying to get this plugin to work. Here's the code:
add_filter('the_content', 'subreddit_replacer');
function subreddit_replacer($content) {
global $id;
$post_id = get_post($id);
$post_content = $post_id -> post_content;
//delete_post_meta($id, 'jordan'); die;
$derp = get_post_meta($id, 'jordan');
if (empty($derp)) {
$words = preg_split('@[\W]+@',$post_content);
$derp = array();
foreach ($words as $word) {
$link = "http://reddit.com/r/$word";
$x = get_headers($link);
$wordf = ($x[6] == 'HTTP/1.0 200 OK') ? '<a href= "' . $link . '" >' . $word . '</a>' : $word;
$derp[] = $wordf;
add_post_meta($id, 'jordan', $derp, 1);
$derp = is_array($derp[0]) ? $derp[0]: $derp;
return implode($derp, " ");
Any guesses on what this problem could be?
share|improve this question
add comment
1 Answer
Stop! Stop! You will make your site supper slow / can be banned on reddit (if that ever be posible).
1. You can try to use save_post and filter your post_post content body.
2. You can setup it a crop scheldules to parse your post's.
as for your code... Read about get_post_meta last optional attribute there is difference in return if you will use that last attribute. Thats can be a problem isn't it?
share|improve this answer
add comment
Your Answer
Seeking Alpha
Seeking Alpha Portfolio App for iPad
Akeena Solar (AKNS) will be reporting their Q3 2007 earnings on Tuesday, Nov. 17th, and I wanted to give a little preview of what to expect. They install residential and small business solar systems in CA and NJ and have been on a tear lately, opening 5 new offices in 11 months in California. 85% of the nation's solar ...
Akeena's Q2 earnings grew 168% compared to Q2 2006 and overall 2007 revenue is expected to increase 135% compared to 2006 (est. $31.4ML). To put that in perspective, Akeena at $8 is trading at 6.5x 2007 sales (est.) This compares very favorably to Suntech (10x sales); First Solar (50x sales) and Sunpower (20x sales); p...
Akeena has raised an addtional $26ML in a private placement at about $7.00 share, and has a new patented solar panel that requires 25% less attachment points and 70% less parts. This panel reduces installation costs by (-$.50 to -$1.00/watt), reduces time for installation by 50%, and will be manufactured by Suntech (ST...
Follow this link for Akeena's recent presentation at the Pacific Growth Equities Clean Technology and Industrial Growth Conference.
I am looking for Akeena to hit $10 by the end of December..
Solar Sociology
What a week for solar companies! On Tuesday and Wednesday First Solar (FSLR) leapt 65 points and Sunpower (SPWR) 35 points; all this while the Dow dropped -360 points and the Nasdaq -75. How's that for relative strength? I haven't seen stocks move like this since the Internet days of yore.
Yet as most investors in this industry know, we still are in the earliest of innings, especially the United States. Market advances in technology are led by exciting new ideas, a momentum that is part enthusiasm, part reality, and part froth. Yes it's speculative, but when a tech idea grips the investing public it's a ...
But a virtuous circle can accompany speculation if the entry point is timed correctly. Speculative fervors usually run 5-7 years before they exhaust themselves, and while they run you can do very well.
Let's do a little review from recent market history: large cap tech from 1993 to 2000; Internet stocks from 1996-99; oil stocks 2003-Present; Real Estate & homebuilders 2000-2005; financials 2003-2007; International emerging markets and Eastern European stocks 2003-2006
Now it's the solars' turn and we're only into this 16 months. Solar in 2007 is like investing in Yahoo in 1996.
Over 30% of venture capital allocation in 2006 went to Alternative Energy. It's probably more than that in 2007. Much of that investment will be coming onstream in the next two years. For all the hullabaloo about too much supply and too many solar IPOs, there's still not enough to meet the demand for product, and there...
Solar companies with ramping earnings are making their current revenues from Germany (#1), Spain, and Italy. What will happen to those revenues when the big three geographic customers are USA, China, India? It will be exponential. Suntech opened their U.S. headquarters in San Francisco last week, and the CEO said that ...
Solar power obviates the need for purchasing energy. It's free. Its benefit goes right to the bottom line ($) of whoever uses it. Unlike wood, coal, oil, or natural gas - you extract it electronically from the sun with the flip of a switch. You pay for the machinery that does the extracting, not for the power itself. T...
Once upon a time (a few years ago) the Internet seemed only the province for geeks. Look at it now. It's ubiquitous. What happens when AE becomes mainstream, or when our government supports it? Polls continue to show that the current slate of legislators are viewed as out of touch with their constituents. There is stro...
Solar energy is efficient and keeps pace with the tech world - doing more with less energy. It's a virtuous circle of cost savings and innovation that has the potential to go right to the bottom line of large warehouses and merchandisers. That's why I don't think alernative energy will be "going away" any time soon. Wh...
So I maintain my stance that we remain in the early innings for many of these solar companies, and at every new resurgence in the markets, these stocks will find their way towards the top (again). The next leg up is here.
Analysts at UBS securities are predicting a quadrupling of polysilicon supply in the next two years as more factories come onstream to supply the voracious market demand for polysilicon wafers. The single biggest cost to solar cell makers - and the single biggest detriment to solar adoption today - is the high price of...
All that's about to change. UBS estimates the cost of raw silicon for wafers is going to fall 66% over the next 3 years, from $300/kg to $100/kg. Solar has overtaken the market share for raw silicon once held by the semiconductor industry (for decades). This acceleration in polysilicon supply will reduce the materials ...
There are two more aspects to this picture: government subsidies and technological improvements. The explosive profits in the solar sector have thus far been coming from Germany, Portugal, and Spain. In two years a Democratically-controlled congress (by a wide margin) will be the majority ruler and it is very likely we...
Green is growing in popularity daily and $100/bbl oil encourages policy initiatives. California already pays a solar construction rebate of $2.25/watt for residences and businesses, and $3.25/watt for non-profits. If a Federally sponsored bill was added to that (and this seems likely), it would encourage homebuilders a...
The last piece of this puzzle is Moore's law, named for Gordon Moore, the Intel executive, who opined that semiconductors could double their performance capacity while reducing their costs as tech cycles sequenced into the future. These kinds of technology advances are already happening in the development of silicon so...
In summary, several trends are creating a virtuous circle for the adoption of solar energy in the U.S.: venture capital research and development; semiconductor companies leveraging their experience with silicon into solar ventures (to diversify their portfolio of offerings); an informed public demanding the political w...
It's estimated that a solar farm on a barren 50 square mile chunk of the Nevada desert would create enough power for 20% of the Western United States. I agree with several commentators who've said that alternative energy is indeed the investment opportunity of the decade. Watching First Solar go up $60 in a single day ...
Source: Is Akeena the Next Solar Flare?
Added to your bookmarks on the Seeking Alpha homepage
Remove Bookmark
hide cookie message
70,664 News Articles
Drug maker goes social to end supply chain crisis
Pharmaceutical company uses social collaboration to get everyone communicating
Antonio Martins, vice president, supply chain, Teva Canada A few years ago, a Canadian pharmaceutical company found that it was in constant crisis mode, and its way out of the chaos lay in getting everyone to communicate.
The company, Ratiopharm Canada, was having a hard time being flexible enough to meet changes in demand. For example, the supply chain unit might not know for as long as four months that there had been a slowdown in production because of a manufacturing snafu or a quality control issue.
Ratiopharm found the answer was to get everyone to communicate. The generic drug manufacturer made that happen by using social collaboration tools .
"When the entire operation is stressed, it reverts to crisis mode," said Antonio Martins, who was vice president of supply chain in 2005 when he first introduced social collaboration tools at Ratiopharm. "We were in constant crisis mode. When the stress is lifted, suddenly things can be more orderly.... The entire oper...
Martins, who today is vice president of supply chain at Teva Canada , which bought Ratiopharm in 2010, said the problem stemmed from a lack of communication in the supply chain. If something went wrong anywhere in the supply chain process, it might be two to four months before the people who needed to know found out ab...
So how do you bridge such a chasm of communication? Martins turned to Web 2.0 technology and social collaboration tools, starting with Microsoft 's SharePoint, then switching to tools from Strategy-Nets and later Moxie Software, which is what the company uses today.
Martins said collaboration tools fixed the communication problems employees were having, and the improvement in communication fixed Ratiopharm's supply chain problem. Addressing those issues ultimately fixed the company's service problems and eventually saved jobs and enabled the company to survive during rocky times i...
Martins also noted that he worked on the backbone of the supply chain, tweaking processes and systems. However, the collaboration changes were the key that enabled the company to be flexible and handle ordering and market surprises.
"If you look at a supply chain, you want it to go smoothly," Martins told Computerworld. "No problems. No delays. No snags. But that never happens. The supply chain gets interrupted many, many times because of surprises.... Any time there was a problem to stop the supply chain, like a technical problem or customers' wa...
Martins explained that back around 2005, Ratiopharm was having trouble because it took so long to find out that there had been a snafu somewhere along the supply chain. For instance, if unsightly black specks from a foreign substance suddenly appeared in the ingredients used to make a batch of tablets, the manufacturin...
"That batch that's sitting in barrels -- we're waiting for them and we don't know something is wrong," he said. "We have to detect what's going on as soon as possible.... We didn't want the situation to go through a hierarchy because that takes too long for bosses to talk to bosses."
Martins noted that at that point, the company had started using SharePoint, so he got his employees to use the software's message board. "Individuals would post the problem and other individuals would solve the problem," he explained. "We went from it taking two to four months to find out there was a problem, to two to...
Before Ratiopharm started using collaboration software, the company's service level, which refers to the percentage of orders that are fulfilled on time, was around 82% to 85%. Calling that level "terrible," Martins said the company shoots for a service level of 98%.
"When you're talking about medication, it can be very serious," he added. "We raised service levels in the first six months to around 95%. It was extremely important. When you go from 10% shortages to 5%, you have half the shortages. The stress in the supply chain and the company is cut substantially."
Martins noted that, at that point, the company didn't achieve the 98% goal but it did maintain a level of 95%.
Dan Olds, an analyst at Gabriel Consulting Group, said Martins turned to enterprise 2.0 technology in a smart way.
"He used the right tool -- collaboration -- to get the right parties talking," Olds said. "He wasn't just using social technology to use something new and fun. The lesson is that collaboration in business is a tool that helps bring about solutions to big problems. It's easier to get people to chime in on something like...
He added that Web 2.0 tools can be highly useful in the enterprise , but he stressed that companies should have a specific goal or a specific problem to solve before they deploy them.
"It's important to keep in mind that these are tools and that they need to be implemented in a way that makes them useful and not just time-wasters," Olds said. "You have to have a good idea of what you want the end result to be before you just willy-nilly put something in place."
Martins and Ratiopharm did have a specific goal in mind when it decided to start using collaboration software, and the technology continued to be useful when the pharmaceutical industry was hit with Canadian regulatory changes in 2006. The changes, which varied by province, adjusted prices and imposed limits on the dis...
Sharepoint had worked well, but Ratiopharm wanted more social tools, so in 2007 Martins moved to Strategy-Nets software and extended the collaboration program beyond the supply chain to include customer service, sales and marketing.
From Strategy-nets, Ratiopharm moved to Moxie Software, which includes tools for real-time conversations, blogs, wikis and document-sharing. Martins said he also liked Moxie's offering because it has a sound architecture and is based on an open-source platform.
"That's how we came out of the hole," said Martins. "Prior to 2006, the market was very stable. Customers purchased pretty much in the same way all the time.... In 2006, the market became less predictable because of regulations and price changes. We were in a position where we couldn't supply the right things because w...
And it worked.
Once people in different departments were connected, they could make better market predictions and "react before business flash-floods hit," Martins said.