Home | Video | Games | Resume | Arcade | My Projects
   Sign In      Register

the Mormon channel

The church finally made a 24/7 radio station.  Its available streaming online, on HD radio and other sources.  Check out the website at http://radio.lds.org/mc/eng/

 Unfortunately, I think they were getting too much traffic when I tried, since the streaming radio did not work for me.  I checked with other streaming radio stations on the net, and they seemed to work fine.  C'mon church!  

 


May 19, 2009 Posted by Administrator | religion, mormons in the news | COMMENTS (0)

Regular Expression Quick Reference

No matter what language I am programming in, regular expressions always seem to come in handy.  Below are some commonly used items, and if I have some time later I will post some examples.

^ start of string
$ end of string
[a-z] letters a-z inclusive in lower case
[A-Z] letters A-Z inclusive in upper case
[0-9] numbers 0-9 inclusive
[^0-9] no occurrences of numbers 0-9 inclusive
? zero or one of the preceding character(s)
* zero or more of preceding character(s)
+ one or more of preceding character(s)
{2} 2 of preceding character(s)
{2,} 2 or more of preceding character(s)
{2,4} 2 -- 4 of preceding character(s)
. any character
(a|b) a OR b
\s empty space (known as whitespace) 


April 17, 2009 Posted by Administrator | work, tech | COMMENTS (0)

Easter Message

Amazing how some videos become viral on the internet.  The Church posted a video created partly from Elder Holland's address in General Conference, and it quickly spread on the internet.  This was my favorite talk in Conference, check out the video:

 


April 14, 2009 Posted by Administrator | religion, mormon doctrine and talks | COMMENTS (0)

Create Google Sitemaps

Most websites these days create dynamic pages based on data in a database.  To be indexed in Google or other search engines, Google bots need to know where these pages can be found.  There are a few ways to create your xml sitemaps for your website.  This blog will describe some of the ways that I have done it, then give a recommendation.

Using only MySQL (small sitemap),

/*script to create sitemap to submit to google*/
SET SESSION group_concat_max_len = 4294967295;/*largest value a TEXT/BLOB can have*/
SET @fieldname = 'AA';
SET @out_file = (select concat('"C:\\\\\\\inetpub\\\\\\\wwwroot\\\\\\\sitemapsTemp\\\\\\',@fieldname,'_sitemap.xml"'));
SET @g_start = '\\';
SET @g_end = '\';
SET @g_urls = (select group_concat('\\http://www.yoursite.com/',fieldname,'/something/\\',CURDATE(),'\\monthly\\') from tablename where fieldname = @fieldname);
SET @c = CONCAT('select CONCAT(\'',@g_start,'\',\'',@g_urls,'\',\'',@g_end,'\') into outfile', @out_file,'');
PREPARE runquery FROM @c;
EXECUTE runquery;
DROP PREPARE runquery;

 Problems with the above:  I am putting stuff into variables and using CONCAT, so 1024 is the max amount of characters you are going to get.  Granted, you can get around that problem using some more advanced MySQL, but I would just recommend using a combination of PHP and MySQL.  Here is I how I accomplished the goal:

Using PHP with Ajax:

01.   <?php
02.   
03.   switch ($_GET["tablename"]) {
04.       case "tablename":
05.           $myDirectory = opendir('C:\\someDirectoryTemp\\');
06.           while($entryName = readdir($myDirectory)) {
07.               $dirArray[] = $entryName;
08.           }
09.           closedir($myDirectory);
10.           //    count elements in array
11.           $indexCount    = count($dirArray);
12.           //$indexCount = ($indexCount -2);
13.           $indexCount2=($indexCount - 2);//take care of hidden files we dont care about
14.           Print ("$indexCount2 files
15.   n");
16.   
17.           sort($dirArray);
18.   
19.     /*
20.   This stupid content editor keeps eating my code... I will figure it out and get the code post soon:)
21.   */
22.   
23.   ? >


April 9, 2009 Posted by Administrator | work, tech | COMMENTS (0)

Word of Wisdom vs. A Glass of Wine a Day

redwineI have finally decided to put some of my thoughts and findings down in relation to the "glass of wine a day" thinking that is becoming more and more prevalent.  Disclaimer for those who don't want to read the whole blog:  I don't dispute that moderate amounts of alcohol can be beneficial, but I am going to show why I still believe it is much wiser to avoid alcohol altogether.

Here are the facts (as we know it currently - it seems scientific facts can change over time :) )

FACT 1:  moderate amounts of alcohol can raise your good cholesterol (HDL-cholesterol) and thin your blood.

FACT 2:  Non-alcoholic phytochemicals in wine, such as flavanoids and resveratrol, act as antioxidants and prevent molecules known as "free radicals" from causing cellular damage in the body.

FACT 3:  These same non-alcoholic chemicals that are found in wine also have "shown to prevent blood clotting and plaque formation in arteries by altering lipid profiles and plasma viscosity. Findings from a recent study suggest that resveratrol can produce potent anti-thrombotic agents that can potentially improve cardiovascular health and lower the risk for coronary heart disease." (Joy Bauer MS, RD, CDN - NBC News)

FACT 4:  Studies have shown cultures that consume wine as a regular part of daily meals have a lower risk of cardiovascular disease and heart problems.

------------------------------------------------

Did the Word of Wisdom get it wrong?  Should alcoholic beverages been in the same category as meats - should it have counseled us to drink in moderation?  The above facts seem to show that it would be wise for us to have a glass of wine or two a day!

Lets continue on our fact search....

FACT 5: "Mormon men had only 34 percent of the normal cancer death rate and only 14 percent of the normal cardiovascular-disease death rate." (James E. Ernstrom, epidemiologist at UCLA... printed in Dallas Morning News).

So a culture that drinks every day has a lower rate of cardiovascular disease and a culture that doesn't drink at all has a lower rate of cardiovascular disease. 

FACT 5.1:  Mormons who adhere to the word of wisdom are also counseled to avoid all addictive substances, drugs, and to exercise and be good to their body.  That certainly can help with the cardiovascular disease rate.... 

on the other hand....

FACT 5.2 Studies have also shown that in those same cultures mentioned in FACT 4 above, (Portugal and France for example, 2 of the top 3 countries for consumption of wine), that the population walks more (more exercise) and snacks less, which are also major contributors to heart health. 

So to use a cultural study doesn't appear to be effective for either side of the argument.  There are far too many variables. 

On with the fact search.....

---------------------------------------------------

FACT 6:   Wine can elevate triglyceride levels, which is associated with health problems such as diabetes.  (Joy Bauer MS, RD, CDN - NBC News)

FACT 7:   Breast Cancer Risk: Studies have shown alcohol can increase estrogen levels and raise tumor progression in women.

FACT 8:  Studies show wine to be a migraine trigger.

FACT 9:  Weight Gain: People who drink alcohol also consume empty calories, calories that lack nutrients and can lead to weight gain.(There are some alcoholic beverages with no carbs or fats however, and substituting large sodas for the wine is just as bad in this regard...)

FACT 10:  Alcohol can be addictive.  Even if your doctor lets you know you could benefit from moderate alcohol consumption, are you going to always be able to stop at just 1 drink?  Or do you start to abuse alcohol from time to time?  Alcoholic abuse can be defined as little as 3 drinks for women or 5 drinks for men.  That's when the following facts come into play:

------abuse facts------

FACT 11:  alcohol consumption is a leading cause of car accidents and traumatic death, not to mention child and spouse abuse.

FACT 12:  alcohol can lead to cirrhosis (liver disease), hypertension,  stroke and cancer.

FACT 13:  Excessive consumption of alcohol by a pregnant woman can lead to Fetal Alcohol Syndrome of a child, where victims suffer serious physical deformities and often mental deficiencies.

FACT 14:  Even mild-to-moderate drinking can adversely affect cognitive functioning, but thousands of studies of alcohol abuse show brain damage as a major side effect.  (http://alcoholism.about.com/od/brain/Brain_Damage_and_Alcohol_Consumption.htm)

FACT 15:  Even proponents of the moderate consumption of alcohol agree:  If you are going to decide to drink daily, "it's vital you seek the advice of your personal physician", so that you know you are not at risk for one of the many detrimental effects of alcohol.  (Joy Bauer MS, RD, CDN - NBC News) because alcohol affects each of us differently. 

 

CONCLUSION:

With all these facts and not stopping after reading the first few, it is much more understandable why the Lord counseled us to avoid alcohol, rather than to drink it in moderation.

Still, there are some convincing arguments on both sides.  So how do we know which experts to trust?  I think I'll trust God is the leading expert on the subject.  1 Corinthians 3:16: "For the wisdom of this world is foolishness with God." Gods law of health, or the Word of Wisdom, has been proven to be wise council since the saints were able to abide by it and it became a commandment.  I believe it will continue to prove wise council, even as the world may have different ideas of health, and the blessings for following the Word of Wisdom make the benefits of alcohol seem insignificant.  Read the blessings here, if you don't know what I am talking about.

I don't believe that drinking in moderation is bad for all people.  In fact, I believe that a glass of wine a day can be and is beneficial for certain people, even many people, but certainly not all people.  I am just saying that I think following the Word of Wisdom is more important for those that believe in it, and for those who don't believe in God or the LDS theology, I still say all the facts make me agree with Dr. Judith Reichman, another published doctor and "expert" on the subject who says any benefits of alcohol are far outweighed by the risks.

That's my position, and I'm sticking to it, regardless of the most recent study results!


April 8, 2009 Posted by Administrator | signs of the times, religion, news and facts, mormon myths, mormon doctrine and talks | COMMENTS (3)
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>
Talk to Me
Close Chat

Start Chatting!
Hook Me Up!
Blog Filter

Work Family Funny Politics Tech Amazing Economy Sports Religion Sad

Calendar
March
S M T W T F S
28 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 1 2 3
Copyright © 2009 Brett Peterson
Home | All Blogs | Video | Links | Resume | Contact Me