Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: OCCASparky
Boston Globe Editorial auto page generator 1.0

string[] libLies = {"Stimulus","Tarp","Closing Gitmo","Iran","Anything Else"}

for(int i=0,i < libLies.Length,i++)
{

string.format("This {0} plan worked to deny it is more blind partisanship, the kind that permeated our political culture the last 8 years",libLies[i])
}

Sorry little computer programmer nerd humor.

51 posted on 02/21/2010 5:45:44 AM PST by pburgh01
[ Post Reply | Private Reply | To 34 | View Replies ]


To: pburgh01

What’s scary is that I actually UNDERSTAND that, despite my last script/programming experience being in LINUX 3-4 years ago.


53 posted on 02/21/2010 5:47:06 AM PST by OCCASparky (Obama--Playing a West Wing fantasy in a '24' world.)
[ Post Reply | Private Reply | To 51 | View Replies ]

To: pburgh01
Total crap. I'm goin' Linq2SQL with a table containing those values. More maintainability; you don't need to deploy a new webapp for every new program.

DATA LAYER:

        public List LieAboutAllPrograms()
        {
            MediaLiesDataContext sc = new MediaLiesDataContext();
            List lp = new List();
            var programlist = sc.GetAllPrograms();
            foreach (LieAboutAllProgramsResult program in programlist)
            {
                Program p = new Program(
                        0
                    , program.ProgramOrder
                    , program.ProgramButtonText
                    , program.ProgramDescription
                    , program.ProgramButtonBackColor
                    , program.ProgramButtonForeColor
                    , program.ProgramButtonURL
                    , program.ProgramEnabled
                    , Database.NullableDate(program.ProgramStartDate)
                    , Database.NullableDate(program.ProgramEndDate));

                lp.Add(p);
            }
            return lp;
        }

PRESENTATION LAYER:

                MediaLiesDAO sc = new MediaLiesDAO();
                List lp = sc.LieAboutAllPrograms();
                // add the buttons
                foreach (Program p in lp)
                {
                    if (p.ProgramEnabled)
                    {
                        Button b = new Button();
                        b.Text = "This "+p.ProgramButtonText+" plan worked to deny it is more blind partisanship, the kind that permeated our political culture the last 8 years";
                        b.PostBackUrl = p.ProgramButtonURL;
                        b.Width = Unit.Pixel(202);
                        ButtonPlaceholder.Controls.Add(b);
                    }
                }
            //}
        }

By using simple 2.0 Generics and Linq2Sql I have rendered an array of buttons with URLS and the lies all in a Master Page.

When will you C++ hackers ever learn.

57 posted on 02/21/2010 5:59:27 AM PST by Lazamataz (Do it for the children.)
[ Post Reply | Private Reply | To 51 | View Replies ]

To: pburgh01
string[] libLies = {"Stimulus","Tarp","Closing Gitmo","Iran","Anything Else"} for(int i=0,i < libLies.Length,i++) { string.format("This {0} plan worked to deny it is more blind partisanship, the kind that permeated our political culture the last 8 years",libLies[i]) } Sorry little computer programmer nerd humor.

But this is an infinite loop. Where is the exit from it? After all, liberals lie infinitely.

59 posted on 02/21/2010 6:00:26 AM PST by ProudFossil
[ Post Reply | Private Reply | To 51 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson