November 22, 2006

alphaCap() 2.01

Filed under: ColdFusion — Phillip Holmes @ 10:20 am

This bit of code is a total rewrite from some of the code library we used back in the days of my old CF hosting and development operation (Media Resolutions Inc.). Version one was written by Jerry Martilik. However, this version offers substantial structure changes / improvements and a list of words that are exceptions combined with an additional exception argument.

CODE:

  1. <cffunction name="stringToArray" returntype="array" output="false" access="public">
  2.      <cfargument name="str" required="yes" type="string" />
  3.      <cfscript>
  4.         var ar = Array();
  5.         for(i=1; i lte Len(str); i=i+1){
  6.            ar[i] = mid(str,i,1);
  7.         }
  8.         return ar;
  9.      </cfscript>
  10. </cffunction>
  11.  
  12.  
  13. <cffunction name="alphaCap" returntype="string" output="true" access="public">
  14.     <cfargument name="str" required="yes" type="string" />
  15.     <cfargument name="exceptions" required="no" type="string" default="" />
  16.     <cfscript>
  17.     // cap and lowers string handed to it (for titles and such)
  18.         var result ='';
  19.  
  20.         if(len(trim(arguments.exceptions)) EQ 0) {
  21.             lst_exception = 'an,the,at,by,for,of,in,up,on,to,and,as,but,if,or,nor,a';
  22.         } else {
  23.             lst_exception = 'an,the,at,by,for,of,in,up,on,to,and,as,but,if,or,nor,a,' & arguments.exceptions;
  24.         }
  25.  
  26.         for(i=1; i lte ListLen(trim(str),' '); i=i+1) {
  27.             str_first = '';
  28.             str_last = '';
  29.             str_word = ListGetAt(Trim(str),i,' ');
  30.             count = len(trim(str_word));
  31.             ar = ArrayNew(1);
  32.             ar = stringToArray(trim(str_word));
  33.             for(j=1; j LTE count; j=j+1) {
  34.                 if(ar[1] IS ar[j]) {
  35.                     if(i NEQ 1 AND listfind(lst_exception,str_word,',') GT 0) {
  36.                         str_first = ar[1];
  37.                     } else {
  38.                         str_first = UCase(ar[1]);
  39.                     }
  40.                 } else {
  41.                     str_last = str_last & lcase(ar[j]);
  42.                 }
  43.             str_temp = str_first & str_last;
  44.             }
  45.             result = result & ' ' & str_temp;
  46.         }
  47.         return trim(result);
  48.     </cfscript>
  49. </cffunction>

November 20, 2006

Aiden’s Daycare Pics

Filed under: Fun Stuff! — Phillip Holmes @ 1:42 am

Here is our little guy at daycare. Much to our surprise, he seems to have a new little girlfriend!

One
Two
Three
Four
Five
Six
Seven

November 14, 2006

Conservationist Sounds Alarm on Global Warming

Filed under: Fun Stuff! — Phillip Holmes @ 4:02 pm

By Kate Cheney Davidson
Anchorage Daily News

Anchorage, Alaska (SHNS) -- For a woman committed to a depressing subject, Deborah Williams is disarmingly optimistic. Like her hero Paul Revere, Williams has crisscrossed the state over the past 10 months spreading the alarm, and the need for hope, about global warming.

A year ago, Williams left her position as executive director of the Alaska Conservation Foundation to spread word of global warming's dangers. Part passionate conservationist, part savvy politician, she calls it the biggest threat to Alaska and the world. On a warm summer day in Anchorage, Williams doesn't so much sit at her desk as scoot between ringing phones, dinging e-mails and frequent trips to answer the door. The looming question is: Can a one-woman show change comfortable habits and spur the audience to action?

Our conversation was edited for space and clarity.

Q. What sparked your interest in global warming?

A. I was first introduced to the issue of global warming as it was impacting Alaska when I was special assistant (to) the secretary of the interior (for) Alaska. Since then, the science has evolved and the clear seriousness of this issue has grown. I realized that if I was going to effectively be a part of protecting Alaska for present and future generations, it was time to focus on the greatest threat to Alaska: global warming.

Q. What would you say is the biggest adverse impact on Alaska as a result of global warming?

A. Actually, I think there are four.

Melting ice: Since 1979, the summer extent of the Arctic ice cap has shrunk significantly; the equivalent of two Texases' worth of ice has disappeared.

Now we are beginning to see the biological impact of that melting ice on the species that depend on it for habitat. Probably the most recent, and the most dramatic, is polar bear cannibalism. Prior to 2004, there was no reported evidence of polar bear cannibalism for food (as opposed to territory) in Alaska or Canada. Over the course of 2 1/2 months in 2004, a period of extreme ice retreat, there were three separate instances of polar bear cannibalism for food in Alaska and Canada. Probably the most shocking of these was a male polar bear that attacked a den containing a mother and two cubs. The cubs were smothered, and the female was dragged from the cave and eaten. This is the brutal evidence of global warming. It is shocking, but it's not surprising.

Drying forests: Trees like white spruce, black spruce and birch, are experiencing reduced growth with warmer temperatures. They are also being adversely affected by a whole range of diseases that weren't problems before, such as spruce bud worm, various leaf miners and much more intense instances of spruce bark beetle. Combined with that, you have melting permafrost, which causes big areas of collapse and tree death, and increased fire. Scientists like Dr. Glenn Juday at the University of Alaska Fairbanks are predicting that we will no longer have boreal trees in Interior Alaska by the end of the century if we continue emitting carbon dioxide at rates similar to today.

Diseased salmon: This represents a threat that is really underappreciated by Alaskans. Increased water temperatures are impacting both salmon eggs and allowing diseases to proliferate in adults. Siltation from melting glaciers is also disrupting the salmon's food chain. The Alaska Department of Fish and Game says that salmon eggs should not be exposed to water temperatures above 55 degrees Fahrenheit, but we are seeing these temperatures in salmon streams throughout the state. In the Yukon, a disease called ichthyophonus is infecting our salmon. Ichthyophonus is a dreadful protozoan parasite that attacks salmon muscle, spoils the meat and kills them.

Coastal communities and inundation: The communities on the Bering Sea and the Arctic Ocean are losing their land at unprecedented rates due to sea level rise and stronger storm cycles. I believe we have an obligation to move these communities intact to suitable land. Shishmaref, for example, has been an intact tribe for at least 4,000 years in that area, and to expect these peoples, who do not contribute much carbon dioxide, to dissipate and lose their tribal ties is reminiscent of the extermination of tribal activities in the 19th century. And it's not going to get better. Scientists now believe that if we triple the level of carbon dioxide in our atmosphere, we are at risk of raising sea levels by up to 20 feet. When you map out what Alaska looks like under 13 to 20 feet of water (rise), it's a devastating portrayal. Take the Bethel region, for example. Under 13 feet of water, almost every community in that area will be inundated, and all the critical goose habitat in the Yukon Delta Wildlife Refuge will be underwater. This should be unacceptable to the American public.

Q. You've called Alaska the Paul Revere of global warming. What do you mean by that?

A. Alaska is indeed the Paul Revere of global warming. Alaska has warmed 4 degrees Fahrenheit on average over the last 50 years -- that's four times the average global warming. We see the threat more acutely than anyone else, and we must spread the word.

Q. So you do you see global warming as a moral issue?

A. I feel strongly that we have a moral responsibility to reduce human-caused emissions. We have a moral responsibility to protect, not diminish, biodiversity and the richness of species. There are predictions that if we continue on our reckless emission curve that we will reduce both plant and animal species by 25 percent by midcentury. We are stealing from future generations if we do not act responsibly on global warming. For those people who may not feel the moral imperative to reduce carbon dioxide and methane emissions, I think there are compelling reasons to do it for economic purposes.

Q. What are some realistic adaptations and/or solutions to global warming? A. To address global warming, we need to take steps at the individual, local, state, federal and international levels.

As individuals, we can do several things. First, look at your patterns of activity and consumption and ask if there are areas in which you can conserve. Second, use the most energy-efficient appliances, light bulbs and vehicles that you can. This will save money in the mid- and long term, and it will reduce emissions significantly. Lastly, express your concerns about global warming, and demand action on local, state, federal and utility levels.

I believe every municipality or local government has the responsibility to be leaders on carbon dioxide and methane emission reductions for their community. Fortunately, there are organizations that can help municipalities first assess the amount of carbon dioxide and methane emissions they are responsible for and come up with a very practical, cost-effective way to reduce emissions. The primary organization that is doing this work is called ICLEI (the International Council for Local Environmental Initiatives).

On the state level, we should have a leadership role not only in determining the cost of global warming and ways to reduce its impacts but also in setting standards. Many states throughout the nation have set standards of how much renewable energy should be part of a utility's energy base -- these are called renewable portfolio standards. They set standards, and then the utility companies respond appropriately.

On a national level, there are two major categories of laws that need to be passed. One is embodied by the McCain-Lieberman legislation, which essentially caps the amount of emissions and then allows companies to trade their emission reductions. The other thing that Congress must do is increase the required fuel efficiency of vehicles.

Distributed by Scripps-McClatchy Western Service, http://www.shns.com.

Yukon Salmon In Trouble

Filed under: Fun Stuff! — Phillip Holmes @ 12:26 pm

Source

SCOTT JAGOW: When we talk about climate change, we can't forget about the animal world. A conservation group says unchecked global warming could wipe out more than two-thirds of the bird species in some places. That report came out at the United Nations' climate talks today in Kenya. The UN is also worried about disease, in fish, for example. Reporter Sam Eaton from our Sustainability Desk went to Alaska to find out more.



SAM EATON: Alaska's mighty Yukon River holds one of the last wild salmon runs in North America. The dams and pollution that have all but shut down salmon fisheries in the lower 48 are nonexistent here, but fishermen say despite the pristine conditions, the famed Yukon salmon are in trouble.

STAN ZURAY: Now this is a big female and as you can see this is really sick flesh.

Stan Zuray is gutting his catch on a remote stretch of the Yukon River near Fairbanks. He says many of the giant king salmon he lands are inedible because of a disease called Ichthyophonus. It riddles their flesh with white, fruity-smelling spores that sour the meat.

ZURAY: There's not a single fisher I know that would cut something like this for people food.
Ichthyophonus is common throughout the world's oceans but has only recently become a problem.

University of Washington fisheries professor Richard Kocan has looked at records of the disease going back about a century.

RICHARD KOCAN: And you rarely ever see it described or mentioned, but since the mid-1980s it's suddenly showing up in species everywhere. It's showing up in rockfish, it's showing up in herring. We've seen reports now that it's in Sockeye salmon in British Columbia. So it's appearing in fish all up and down the Pacific coast.

Kocan says climate change is the likely cause. The Yukon River has warmed nine degrees over the last 20 years. Summer water temperatures are reaching nearly lethal levels for these cold water fish, stressing their immune systems and making them vulnerable to outbreaks.

KOCAN: When the conditions are just right in the environment, the advantage goes to the pathogen.
Kocan's research suggests that as many as two-thirds of the infected salmon aren't making it to the spawning grounds, but Alaska fisheries managers have yet to do anything about it because they say the science is inconclusive.

In Fairbanks, fish processor Virgil Umphenour worries it will be too late before anything is done. He says Ichthyophonus is already digging into his bottom line. He buys whole fish directly from fishermen, which means he doesn't know which ones are diseased until he cuts them into fillets back at the warehouse.
VIRGIL UMPHENOUR: So if they are, then they go in the trash can and we give them away to dog mushers as dog food is what we do. So it's a total loss, those fish are, financially.
Umphenour says lately he's had to toss as many as half the salmon he buys.

November 6, 2006

Supplemental - GOP: Give Out Porn?

Filed under: Politics — Phillip Holmes @ 2:52 am

As a supplement for my GOP sex scandles post, I'd like to add Mark Foley's name to the disgraced list of GOP members. Foley resigned as allegations surfaced that he had sent suggestive emails and sexually explicit instant messages to young men who had formerly served as house pages. No criminal charges have been brought as of this post because there have been no allegations of actual sexual contact with any of the underage boys that received Foley's inappropriate instant messages.

Also, as an honorable mention, Ted Haggard (Senior Pastor of New Life Church) has made my list even though his sexual misconduct was not actually with a child. I do this for the simple reason that Haggard was a "family values" counselor for the GOP run Whitehouse.

Again, the GOP continue to prove my point about sexually repressed individuals that try to portray a "family values", sexually restrictive, anti-gay platforms are generally the ones that have the most to hide.

The Holmes Blog