Kevin Bracken, Australian trade unionist stands up for 9/11 truth – PM discusses in Federal Parliament

A true Australian hero has emerged with enough courage and honor to stand up and point out the huge elephant in the room. In 2006 Kevin Bracken publicly stated:

“If they want to stop terrorism they’ve got to look at who was really behind September 11″.

Kevin Bracken

Kevin Bracken. Photo: Ken Irwin

More recently, sparked off by the Australian Greens request for a debate on the war in Afghanistan. Kevin Bracken, now president of the Trades Hall council and the secretary of the Maritime Union of Australia, stood up and made his views clear once again.

Bracken phoned in and stated to Jon Faine on his 774 ABC talk-back radio program:

“I believe the official story is a conspiracy theory that doesn’t stand up to scientific scrutiny,”

“In my mind the buildings were imploded.”

The 9/11 Truth Movement, with its extremely broad, far reaching and credible list of architects, engineers, scholars, scientists, patriots, military personnel, politicians, actors, artists, athletes and free thinking minds has once again provided a stable platform and support network for individuals to stand up and be counted.

Bracken has however, rightly stated that his opinions are his own, therefore giving his fellow unionists the opportunity to stand behind him in support. Even though, on the 28th of March 2008, the Victorian Trades Hall Council passed the following motion after lengthy debate.

“That this meeting of VTHC Executive Council calls for a thorough, independent enquiry into the tragic terrorist attacks of September 11.
The events of that day have been used to start pre-emptive wars “that will not end in our lifetime”. They have been used to attack civil liberties and legal principles that have been the cornerstone of civilized communities.
There is an urgent need to reassess the way we view the world after September 11 and we call for proper investigation into the events around that day.” – From the minutes, VTHC meeting 28th of March 2008.

Jon Faine on the other hand has inadvertently shown his true colours. As Kevin Bracken later made clear in an interview with John Bursill on the Visibility911.org podcast that Kevin had an email exchange with Jon Faine the night before and was invited to call in to 774 ABC talk-back radio show in Melbourne and make his views known.

Kevin Bracken - standing tall

Kevin Bracken - standing tall

Jon Faine

Jon Faine - ABC


The forked tongue of Jon Faine was clearly audible during the discussion on public radio as he damned Bracken for having an alternative opinion and pretended to have no idea that Kevin Bracken was going to call his radio show. It is clear that public figures in the corporate controlled media around the world can not and will not entertain alternative theories on 9/11 and continue to keep their listeners and viewers in the dark. As the ramifications surrounding this issue are serious indeed.

Jon Faine tried to slither away and resorted to spouting questions on JFK and the moon landings in an attempt to slander Kevin Bracken whilst refusing to debate Kevin on his points.

Kevin Bracken rightly retorted with:

“Unfortunately cowards like yourself have set the political agenda in this country for too long.”

It is however, refreshing that Australian news agencies like the ABC, news.com.au and the Herald Sun have covered Kevin’s statements, particularly on this important issue. For this they should be commended, even though most of their coverage has been negative.

It is becoming ever more clear that this issue is going to divide governments and the media, as they find themselves on the wrong side of this issue.

For over 6 years I have supported the 9/11 Truth Movement in an effort to help the world to wake up and question the events of September 11th 2001. The attacks of that tragic day have shaped the political climate in the world. In addition, the events of September 11 have created a pretense for wars of aggression and countless lives have been lost as a result. Yet we still have no official response to the expert evidence which supports the hypothesis that the buildings of the World Trade Center were collapsed with the use of explosives and exhibit all the characteristics of a planned demolition. We must bring into effect a new investigation into 9/11 and let the chips fall where they may.

Why won’t governments address and debate this issue? Why does Julia Gillard, the prime minister of Australia, dismiss alternative opinions like the valid points put forward by Kevin Bracken as “stupid and wrong”. Once again showing her inability to tackle issues of this magnitude whilst presenting no opposition to the arguments he puts forward. Is it because there is no opposition to his views which are supported by over 1,200 architects and engineers? Given that 76.79% of people voted overwhelmingly in support of Kevin Bracken and his views on this issue, Julia Gillard is alienating herself from the consensus of the people who democratically elected her. I suggest she give these views more attention otherwise she risks being in the minority when we do finally see a real debate on this in the Australian parliament.

Julia Gillard, to her credit, did quite rightly state on the floor of the Australian Federal Parliament that:

“The Labor Party is a large organisation, people join it as individuals – we don’t dictate what people think.”

One of the more courageous and ethical statements I have witnessed from Julia.

The gauntlet has been laid down by Kevin Bracken, lets hope that this issue is not swept under the proverbial rug once again. As we now know, there is tremendous support for his views both in Australia and abroad. Demand a new investigation and support the 9/11 Truth Movement now.

"Well, the fact is that aviation fuel doesn't get hot enough to melt steel," - Mr Bracken.

Haven’t seen the collapse of WTC7?
Have a look at this compilation of video footage of its collapse:

Still convinced that the official story provided by the 9/11 Commission report is accurate?
The 9/11 Commission Report – July 22, 2004
By The 9/11 Commission headed by Philip D. Zelikow – Executive Director

Start by watching 9/11 Blueprint for Truth (2008 Edition)
By Architects and Engineers for 9/11 Truth.

The 9/11 Commission Report: Omissions and Distortions
By David Ray Griffin in which he describes the 9/11 commission report as “A work of fiction”.

Don’t think that the USA could be involved in an event like 9/11 and state crimes against democracy?
The Grand Chessboard: American Primacy and Its Geostrategic Imperatives – 1997
By Zbigniew Brzezinski
A document describing that if the USA is to maintain global supremacy in the 21 century it must control the Middle East. However to galvanize support, America needs a catalyzing event like a “New Pearl Harbor”.

State Crimes Against Democracy
Professors Phillips & Huff

Catastrophic Terrorism: Tackling the New Danger – 1998 Foreign Affairs
By Ashton B. Carter, John Deutch, and Philip D. Zelikow (Zelikow later became the Executive Director of the 9/11 Commission)
Here’s a quote from this document:

“the resulting horror and chaos would have exceeded our ability to describe it. Such an act of catastrophic terrorism would be a watershed event in American history. It could involve loss of life and property unprecedented in peacetime and undermine America’s fundamental sense of security, as did the Soviet atomic bomb test in 1949. Like Pearl Harbor, the event would divide our past and future into a before and after. The United States might respond with draconian measures scaling back civil liberties, allowing wider surveillance of citizens, detention of suspects and use of deadly force. More violence could follow, either future terrorist attacks or U.S. counterattacks. Belatedly, Americans would judge their leaders negligent for not addressing terrorism more urgently.”

Project For A New American Century (PNAC) – 1997 to 2006
Overseen by neoconservatives William Kristol and Robert Kagan
A study and collection of documents that once again describes the need for a “New Pearl Harbor”

The National Security Strategy of the United States of America – 2002
By Philip D. Zelikow
A document released directly after 9/11 dictating the right to attack any country in the world preemptively as that country might become a threat some day, also referred to as the “Bush doctrine”.

Need proof that the 9/11 Truth Movement is making waves in the global arena?
Conspiracy Theories – Causes and Cures 2008
By Cass Susstein and Adrian Vermeule
A document calling for illegal infiltration by government sponsored private operatives to promote cognitive diversity within the 9/11 Truth Movement in an attempt to undermine it.

Cognitive Infiltration: An Obama Appointee’s Plan to Undermine the 9/11 Conspiracy Theory
By David Ray Griffin
A book written in response to Cass Susstein and Adrian Vermeules “Conspiracy Theories – Causes and Cures”.

Posted in 9/11, Discussion, Julia Gillard, Kevin Bracken, Politics, Privacy, Truth | Tagged , , , , , | 10 Comments

Chinese government “protects” China from the Nobel Peace Prize

Still want an Internet filter Australia? Liu Xiaobo, a political prisoner incarcerated by the Chinese government was awarded the Nobel Peace Prize for 2010 “for his long and non-violent struggle for fundamental human rights in China”. In response, it appears that the Chinese government has gone into overdrive censoring the Internet in China so that all searches for the terms “Nobel Peace Prize” or “Liu Xiaobo” return no results. No doubt nobelprize.org is now censored in China along with many other completely legitimate sites. So, for the average Chinese citizen, the Nobel Peace Prize no longer exists on the Internet. What an effective way to control the population don’t you think? Remove any reference to a long standing and revered international award for peace!
It raises a number of important questions. Should governments have the ability to filter anything they want from the population they govern? Does a government have the right to smother international recognition for something as fundamental as one mans struggle for human rights? I think I can safely say that an overwhelming majority of people in the “free world” would agree that people in power should have no control over the flow of information.
The censorship of the Nobel Peace Prize is an example of the type of control the Australian government will have if Stephen Conroy’s Internet Filter is allowed to continue. The Australian Internet filter is not something Australian citizens have voted on. In addition, one would have to be extremely foolish to think that Australian citizens will have any control over what the filter will be used to “shield” them from. Why does Julia Gillard think that an internet filter is a good idea for Australia? What are the real motives?

Posted in Australian Internet Filter, Discussion, Internet, Politics, Technology, Truth | Tagged , , , , , , , | Leave a comment

C# ASP .NET – Creating an asynchronous, threaded worker process manager and UpdatePanel progress monitor control

Introduction

Asynchronous Process Monitor Control

A screen grab of the monitoring control whilst monitoring a process

Often when creating a WebApplication, WebService, Website or any Internet based system, you will need to perform tasks that take a long time to run. This may be processing uploaded files or processing data from a database. If the execute time for the task takes longer than 10 seconds to complete, you are asking a lot of your users expecting them to wait for the process to complete and the page to reload. Making people wait just doesn’t cut it.
I recently had to write an app that processed large amounts of data from uploaded CSV text files, multiple MySQL databases and a MS SQL Server database. The data needed to be filtered and sorted, then the subset of data needed to a be submitted to a WebService. All this had to be controlled from an aspx page, and the processes also needed the ability to be run by users at any time (not just one off tasks). In addition I wanted the ability to cancel the operations at any point in time.
Due to the large amounts of data being processed, and the transport overheads grabbing the data from multiple sources, the execution time of the operations was considerable, even after optimization of the sorting and filtering algorithms.
To solve the problem of keeping the user informed of the progress of each operation and providing them with information on totals, error counts, the number of duplicates etc.. I decided to build an asynchronous, threaded worker process manager and an UpdatePanel control to monitor the progress of the working processes. I wanted some code that would allow me to reuse the classes in other projects and an architecture that makes it easy to add worker process classes to the system as needed in the future. It turned out to be an interesting exercise. So I thought I would share my code so that others can use it as well.
I looked around for free controls and libraries that would serve the purpose but I found nothing that fit the bill. Well… now my code is out there.

Technology Overview

The code for this project is written in C#. I’m using ASP .NET and Microsoft Visual Studio 2008 running on version 3.5 of the .NET framework. I am using Linq because I like being able to use List<> object collections. The code I am providing is like scaffolding, or a shell that you can build on. If you post questions in the comments I’ll do my best to answer them for you.

How to use the code

[the file is hosted on mediafire.com]

Source code: AsyncProcessor.zip
To implement my code in your project, you’ll need to download the source, extract the contents and include the files in your project. The project will run on your system if you have everything set up to run Visual Studio 2008 WebApplications and .NET 3.5. I’ve used static classes where possible and no namespaces so the classes should be good to go in your project once they are included. You’ll need to change the namespace on the aspx page and the ascx control though. The code is commented to a certain degree, and I’ve highlighted where you should add your code to do the work that your threaded worker processes need to do. I’ve included a basic CSS file for the example, however I have not spent time on making the example project look great. I am providing this code “as-is”. I have tested it. However I am not responsible for your implementation of it. Use it at your own risk.

Important files

Now onto the code. For the sake of brevity I am not going to include the entire source here for all classes. I will explain the main functions in the important classes. I am assuming you have some knowledge of coding in C# and you understand the concept of Threads. To view the complete class files you’ll need to download the source.

AsyncProcessorDetail.cs

This is the class that tells the AsyncProcessManager what it needs to do. It is used to store the details of the worker process. You’ll need to create one of these and pass it to the AsyncProcessManager.StartAsyncProcess method to kick off a new threaded process. This class is used to store the status of the running process and it keeps track of the running totals and counts. The worker process updates this class when it’s running and the asyncProcessingMonitor control reads this class before it displays the current status of the running process to the user.
The constructor is discussed in more detail in the Default.aspx.cs section a bit later because that’s where the object is instantiated.

AsyncProcessorDetail.cs

using System;
public class AsyncProcessorDetail
{
    // types, identifiers and control properties
    public int ID { get; set; }
    public string ProcessorType { get; set; }
    public bool Process { get; set; }
    public bool Processing { get; set; }
    public bool Stop { get; set; }
    public bool Complete { get; set; }
    public bool Test { get; set; }
    // properties for storing counts
    public int Total { get; set; }
    public int Processed { get; set; }
    public int ErrorCount { get; set; }
    public int Duplicates { get; set; }
    // Status properties
    public int RefreshStatusCount { get; set; }
    public string StatusText { get; set; }
    // properties for dealing with files
    public string FullFilePath { get; set; }
    public string FileName { get; set; }
    //Timing Information
    public DateTime StartTime { get; set; }
    public DateTime EndTime { get; set; }
    public AsyncProcessorDetail()
    {
    }
    public AsyncProcessorDetail(int id, string full_file_path, string filename, int total, string processor_type, int refresh_status_count)
    {
        Process = true;
        Processing = false;
        Stop = false;
        Complete = false;
        RefreshStatusCount = refresh_status_count;
        ID = id;
        FullFilePath = full_file_path;
        FileName = filename;
        Total = total;
        ProcessorType = processor_type;
    }
    public void Begin()
    {
        StartTime = DateTime.Now;
        Process = false;
        Processing = true;
    }
    public void UpdateCounts(int processed, int error_count, int duplicates, int total)
    {
        Processed = processed;
        ErrorCount = error_count;
        Duplicates = duplicates;
        Total = total;
    }
    public void UpdateStatusText(string status_text)
    {
        if (StatusText == null)
            StatusText = "";
        if (StatusText.Length > 0)
            StatusText += "<br />" + DateTime.Now.ToLongTimeString() + ": " + status_text;
        else
            StatusText = DateTime.Now.ToLongTimeString() + ": " + status_text;
    }
    public void End()
    {
        Stop = true;
        Processing = false;
        Complete = true;
        EndTime = DateTime.Now;
        TimeSpan.FromTicks(EndTime.Ticks - StartTime.Ticks).TotalSeconds.ToString();
        UpdateStatusText("Processing completed in "
            + TimeSpan.FromTicks(EndTime.Ticks - StartTime.Ticks).TotalSeconds.ToString()
            + " seconds");
    }
}

AsyncProcessManager.cs

This is the main class that manages the worker processes and starts the worker threads. It contains a static List<> of worker AsyncProcessorDetail objects. It contains methods and functions that are exposed to the pages in your WebApplication and the asyncProcessingMonitor control. It also contains the main AsyncProcessorThread class that instantiates the worker processor objects.

Firstly we have a List to store the AsyncProcessorDetail objects. The List is used to store all the processes that are currently running or are complete.

    public static List<AsyncProcessorDetail> ProcDetails { get; set; }

The StartAsyncProcess() method is called by Default.aspx.cs or one of your pages to initiate processing. It first checks to see if another process with the same ID is running. If there is another process running with the same ID this function will return a 1, otherwise it will add the new AsyncProcessorDetail to the List and start a new Thread by calling the StartProcessorThread() method and return 0 for success.

    public static int StartAsyncProcess(AsyncProcessorDetail input_detail)
    {
        if (ProcDetails == null)
            ProcDetails = new List<AsyncProcessorDetail>();
        bool error = false;
        foreach (AsyncProcessorDetail detail in ProcDetails)
        {
            if (detail.ID == input_detail.ID)
            {
                // task is already being processed
                if (detail.Processing)
                {
                    error = true;
                }
            }
        }
        if (!error)
        {
            // removing any existing instances of this detail in the list
            ProcDetails.RemoveAll(z => z.ID == input_detail.ID);
            // Add the detail to the list
            ProcDetails.Add(input_detail);
            // Start processor thread
            Thread processorThread = new Thread(new ThreadStart(StartProcessorThread));
            processorThread.IsBackground = false;
            processorThread.Start();
            return 0;
        }
        else
            return 1;
    }

Next we have the AsyncProcessorThread class itself. This class consists of one public constructor: AsyncProcessorThread(). This grabs the next AsynchProcessorDetail object from the List that has a Process value of true. It then instantiates a new worker process class based on the ProcessorType value that was set when the AsynchProcessorDetail was created.

    public class AsyncProcessorThread
    {
        // Main processor thread
        public int ID { get; set; }
        public AsyncProcessorThread()
        {
            try
            {
                ID = GetNextIDToProcess();
                ProcDetails.SingleOrDefault(z => z.ID == ID).Begin();
                AsyncProcessorDetail fd = ProcDetails.SingleOrDefault(z => z.ID == ID);
                // Add a case statement for each of the processor classes you create
                switch (fd.ProcessorType)
                {
                    case "ProcessorTemplate":
                        ProcessorTemplate processorTemplate = new ProcessorTemplate(fd);
                        break;
                    case "ProcessorExample":
                        ProcessorExample processorExample = new ProcessorExample(fd);
                        break;
                    default:
                        ProcDetails.SingleOrDefault(z => z.ID == ID).StatusText = "No ProcessorType found. Exiting..";
                        ProcDetails.SingleOrDefault(z => z.ID == ID).End();
                        break;
                }
            }
            catch (Exception ex) { }
        }
    }

The following methods are utility methods that start, stop and finalize the running process. There is also the Continue function that the worker class will call at set intervals based on the AsyncProcessorDetail.RefreshStatusCount to determine if it should continue processing or not.

    private static void StartProcessorThread()
    {
        AsyncProcessorThread processor = new AsyncProcessorThread();
    }
    private static void UpdateCounts(int file_id, int processed, int error_count, int duplicates, int total)
    {
        ProcDetails.SingleOrDefault(z => z.ID == file_id).UpdateCounts(processed, error_count, duplicates, total);
    }
    private static int GetNextIDToProcess()
    {
        return ProcDetails.SingleOrDefault(z => z.Process == true).ID;
    }
    public static AsyncProcessorDetail GetProcessorDetail(int file_id)
    {
        try
        {
            return ProcDetails.SingleOrDefault(z => z.ID == file_id);
        }
        catch (Exception ex)
        {
            return null;
        }
    }
    public static bool Continue(int id)
    {
        return !ProcDetails.SingleOrDefault(z => z.ID == id).Stop;
    }
    public static void StopProcessor(int id)
    {
        ProcDetails.SingleOrDefault(z => z.ID == id).Stop = true;
        ProcDetails.SingleOrDefault(z => z.ID == id).Processing = false;
    }
    public static void FinalizeProcess(int id)
    {
        ProcDetails.SingleOrDefault(z => z.ID == id).End();
    }

Default.aspx.cs

Default.aspx

Default.aspx before monitoring begins

The most important method in the Default.aspx.cs class is StartAsynchProcess(). This is called from the start button click event handler. You will notice that this method creates a new AsyncProcessorDetail object. The constructor takes in the following values:

  • int id – A unique id for the process. In the example I have used a random number however in a real implementation I insert the details of the process into a database and use a unique id from the inserted row.
  • string full_file_path – If you are processing files this should be the full path to the file. The worker process can then use this to grab the file.
  • string filename – The filename if you are processing a file.
  • int total – If you know the total number of iterations your process will complete at this point pass the value in. In practice though the total is normally determined by the processor class and is not known before hand.
  • string processor_type – This is a string that identifies what processor class you want to use. The AsyncProcessorThread class uses this string to determine which class to instantiate to begin processing.
  • int refresh_status_count = This int determines how often the running process should update the status of the AsyncProcessorDetail for display to the user. For example if your process has to run through around 10 iterations you would probably set this to 1, however if you are expecting large files to be processed with say 100,000 lines in the file, you might want to set this to 1000. Therefore in the case of a large file, the process would only update the progress counts on every 1,000th iteration.

The StartAsynchProcess() method calls the StartAsyncProcess() method on the static AsyncProcessManager and passes it the created detail which in turn kicks off the new thread and processing will begin.
The last line of code in this method is the function call on the asyncProcessingMonitor custom control. It gets passed the ID of the process so it knows what to monitor and two other variables that tell the monitor control what to do when it is finished monitoring the process: redirectWhenComplete and the redirectURL. These are discussed in more detail later.

Default.aspx.cs

        private void StartAsynchProcess()
        {
            // generate a sudo random number for this process
            // I suggest adding the process to a database and using the unique id
            // generated. that way you have a record of the process running
            int seed = int.Parse(DateTime.Now.Ticks.ToString().Substring(0, 9));
            int unique_proc_id = new Random(seed).Next();
            // create a new AsyncProcessorDetail
            AsyncProcessorDetail detail = new AsyncProcessorDetail(unique_proc_id, "c:\\path\\to\\your\\file", "filename", 0, "ProcessorExample", 1);
            // call the AsyncProcessManager and pass it the AsyncProcessorDetail to be processed
            AsyncProcessManager.StartAsyncProcess(detail);
            // start the asyncProcessingMonitor control
            asyncProcessingMonitor1.Start(unique_proc_id, true, "Default.aspx");
        }

ProcessorExample.cs

I’ve included two processor classes in the example project. This ProcessorExample class is really simple but it illistrates how to use the template class provided. Your implementations of these classes will no doubt me much more complex. These classes are where the actual work is done. Examples are reading from a file, grabbing data from a database, calling webservices, updating other systems, basically any task that needs to be executed by a seperate process to the UI.
This class provides an example of calling the UpdateStatusText method to provide feedback via the asyncProcessingMonitor control.
In my example I simply create a loop that counts to ten. On each iteration the processor updates the AsyncProcessorDetail counts and sleeps for 1 second.
The Update() function calculates wether or not to update the counts or check if the process has been canceled. You should always include the Update function call and a Continue check in for, foreach or while loops so that processing can be canceled if the user clicks the Cancel button on the monitoring control.

ProcessorExample.cs

using System;
using System.Net;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
public class ProcessorExample
{
    // This class is an example of how to use the ProcessorTemplate.
    // This class will simply count to ten in ten seconds
    private AsyncProcessorDetail ProcessorDetail;
    public ProcessorExample(AsyncProcessorDetail processor_detail)
    {
        ProcessorDetail = processor_detail;
        Process();
    }
    public void Process()
    {
        AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateStatusText("Processing has started");
        try
        {
            int rowcount = 0;
            int duplicates = 0;
            int errorCount = 0;
            int processed = 0;
            int total = 0;
            total = 10;
            AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateStatusText("Commencing processing loop");
            while (true)
            {
                rowcount++;
                processed++;
                if (UpdateStatus(processed, total))
                {
                    AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateCounts(processed, errorCount, duplicates, total);
                    if (!AsyncProcessManager.Continue(ProcessorDetail.ID))
                        break;
                }
                if (processed == total)
                    break;
                // sleep for a second
                Thread.Sleep(1000);
            }
            if (!AsyncProcessManager.Continue(ProcessorDetail.ID))
                AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateStatusText("Processing cancelled");
            AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateStatusText("Processing is complete");
        }
        catch (Exception ex)
        {
            string error = ex.Message + ex.StackTrace;
        }
        AsyncProcessManager.FinalizeProcess(ProcessorDetail.ID);
    }
    private bool UpdateStatus(int processed, int total)
    {
        if (processed > 0)
            if (((processed % ProcessorDetail.RefreshStatusCount) == 0) || (processed == total))
                return true;
            else return false;
        else
            return false;
    }
}

ProcessorTemplate.cs

The base template for creating a worker process including examples of how to call the UpdateStatusText and UpdateCounts methods in the AsyncProcessManager class. Be aware that the AsyncProcessorDetail declared in the worker process classes you create is not the same object that is stored in the AsyncProcessManager, it is just a copy that was passed in when the worker class was instantiated.

ProcessorTemplate.cs

using System;
using System.Net;
using System.IO;
using System.Collections.Generic;
using System.Linq;
public class ProcessorTemplate
{
    private AsyncProcessorDetail ProcessorDetail;
    public ProcessorTemplate(AsyncProcessorDetail processor_detail)
    {
        ProcessorDetail = processor_detail;
        Process();
    }
    public void Process()
    {
        // use the following method to update the status on the AsyncProcessorDetail
        // in the AsyncProcessManager
        AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateStatusText("Processing has started");
        try
        {
            int rowcount = 0;
            int duplicates = 0;
            int errorCount = 0;
            int processed = 0;
            int total = 0;
            // in loops, call the UpdateStatus method to determine if you should update the counts
            // on the current iteration. This will save processing time so your not updating the
            // counts on every iteration
            if (UpdateStatus(processed, total))
            {
                // use the following method to update the counts on the AsyncProcessorDetail
                // in the AsyncProcessManager. This should be included inside any worker loops
                // you may have or between code blocks to update the user
                AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateCounts(processed, errorCount, duplicates, total);
            }
            // check to see if the process has been cancelled by calling AsyncProcessManager.Continue
            // this method should be called within an UpdateStatus condition within any loops you have
            // and should be followed by a break;
            if (!AsyncProcessManager.Continue(ProcessorDetail.ID))
                AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateStatusText("Processing cancelled");
            AsyncProcessManager.GetProcessorDetail(ProcessorDetail.ID).UpdateStatusText("Processing is complete");
        }
        catch (Exception ex)
        {
            string error = ex.Message + ex.StackTrace;
        }
        AsyncProcessManager.FinalizeProcess(ProcessorDetail.ID);
    }
    private bool UpdateStatus(int processed, int total)
    {
        // determins if the status should be updated based on the RefreshStatusCount and the current
        // value of the processed counter  
        if (processed > 0)
            if (((processed % ProcessorDetail.RefreshStatusCount) == 0) || (processed == total))
                return true;
            else return false;
        else
            return false;
    }
}

asyncProcessingMonitor.ascx.cs

Asynchronous Process Monitor Control

A screen grab of the monitoring control whilst monitoring a process

This is the code behind the monitor control. The ascx file contains an UpdatePanel and a Timer that is used to trigger the UpdatePanel to refresh and display the latest info provided in the AsyncProcessorDetail for the process being monitored.
The Start method below initiates the monitoring of the process and enables the UpdateStatusTimer. It also displays the Cancel button to allow the user to cancel the running process. It displays the animated pleasewait.gif. Note: this is just a simple animated gif, not a 0 to 100% progress bar.

Default.aspx and the monitoring control when processing is complete

Default.aspx and the monitoring control when processing is complete

The TimerStatusUpdate_Tick event handler is run each time the Timer Tick event occurs and it grabs a copy of the AsyncProcessorDetail from the AsyncProcessManager to update the labels on the control. If the AsyncProcessorDetail.Complete property is true, the monitor knows that the process is complete or has been canceled. So it then calls the Stop method discussed below.

asyncProcessingMonitor.cs

        public void Start(int process_id, bool redirectWhenComplete, string redirectURL)
        {
            // start monitoring the process
            ProcessID = process_id;
            ButtonRedirect.Visible = false;
            Redirect = redirectWhenComplete;
            RedirectURL = redirectURL;
            ImageProgressGif.Visible = true;
            ButtonCancel.Visible = true;
            // start the refresh timer
            TimerStatusUpdate.Enabled = true;
        }
        protected void TimerStatusUpdate_Tick(object sender, EventArgs e)
        {
            // grab a copy of the AsyncProcessorDetail to update the control
            AsyncProcessorDetail ifd = AsyncProcessManager.GetProcessorDetail(ProcessID);
            if (ifd != null)
            {
                LabelStartTime.Text = ifd.StartTime.ToLongTimeString();
                LabelFilename.Text = ifd.FileName;
                LabelTotal.Text = ifd.Total.ToString();
                LabelCurrent.Text = ifd.Processed.ToString();
                LabelDuplicates.Text = ifd.Duplicates.ToString();
                LabelErrorCount.Text = ifd.ErrorCount.ToString();
                LabelStatus.Text = ifd.StatusText;
                // if the process is complete stop monitoring
                if (ifd.Complete)
                {
                    Stop();
                    if (ProcessingComplete != null)
                        ProcessingComplete(sender, e);
                }
            }
            else
            {
                LabelStatus.Text += "<br />" + DateTime.Now.ToLongTimeString() + ": Error reading status";
                Stop();
                if (ProcessingError != null)
                    ProcessingError(sender, e);
            }
        }

The Stop function is called if the AsyncProcessorDetail.Complete property is true. It disables the UpdateStatusTimer to stop the UpdatePanel refreshing and finalizes the state of the panels and buttons on the control. If the Redirect bool is true, the redirect button is displayed in instances when you want to provide a Continue button to redirect the user to another page or onto another process monitor in a sequence of processes. The user will be redirected to the redirectURL supplied when the Start method was called.
The Cancel function updates the status text on the AsyncProcessorDetail and then calls the AsyncProcessManager.StopProcessor method. This will trigger the running process to stop executing as it sets the AsyncProcessorDetail.Stop property to true.

        public void Stop()
        {
            // stop monitoring the process
            TimerStatusUpdate.Enabled = false;
            ImageProgressGif.Visible = false;
            ButtonCancel.Visible = false;
            // show the redirect button if its required
            if (Redirect)
                ButtonRedirect.Visible = true;
        }
        private void Cancel()
        {
            // update the status on the AsyncProcessorDetail and stop it from running
            AsyncProcessManager.GetProcessorDetail(ProcessID).UpdateStatusText("Cancelling process...");
            AsyncProcessManager.StopProcessor(ProcessID);
        }

Conclusion

I hope that you find the code I’ve provided useful and that it saves time implemeting a system that requires asyncronous tasks to be kicked off and monitored from a webpage. There are of course enhancements and functional improvements that can be made to what I’ve provided. My aim is to provide a bare bones implementation and working example of the concept so that it may be built on.
Just writting up this post I thought that it is probably a good idea to remove the AsyncProcessorDetail from the worker classes altogther and simply store the ID of the process and therefore use only the detail stored in the manager class. The UpdatePanel also needs some refinement and possibly a postback trigger that executes when processing is complete. In addition, the animated gif refreshes each time the UpdatePanel refreshes, this needs to be changed.
Use the comments section to post any questions or suggestions and I’ll do my best to respond.
Source code: AsyncProcessor.zip

Posted in .NET, c#, Discussion, Internet, Technology | Tagged , , , , , , , , , , , , | 6 Comments

Dictionary.com installs over 200 tracking cookies on visitors computers

In the past I have been known to use dictionary.com and thesaurus.com. Not anymore. I distinctly remember visiting dictionary.com a few weeks ago. It was the first visit since upgrading my OS and browser. I was shocked by how sluggish it was to load. I remember opening another tab and doing a search for other dictionary sites because I got tired of waiting. I now know why.

A friend passed me a link to an article today at The Wall Street Journal titled “The Web’s New Gold Mine: Your Secrets” which is a really interesting read and the first in a series they are running on how businesses on the internet are spying on their customers. I’ve written a few apps that use cookies, and to be honest I held the opinion that a few cookies stored by your browser is not a problem. However, in the article linked above the writers explain how they set up a test computer and visit a list of top sites frequented by US web users. I assume they clean out the browser’s history and cookies before each site and check what’s been installed after the visit. After their testing, in regards to cookies and small pieces of software installed, here’s what they say:

“The top venue for such technology, the Journal found, was IAC/InterActive Corp.’s Dictionary.com. A visit to the online dictionary site resulted in 234 files or programs being downloaded onto the Journal’s test computer, 223 of which were from companies that track Web users.”

No wonder dictionary.com takes so long to load, it’s installing a hidden payload, an army of files on your computer for third party tracking companies.

“Whether it’s one or 10 cookies, it doesn’t have any impact on the customer experience, and we disclose we do it,” says Dictionary.com spokesman Nicholas Graham. “So what’s the beef?”

One or ten? What about over 200?
This is a worrying sign. I can understand that websites like dictionary.com need to generate revenue, but when groups of salesmen get together and come up with schemes like auctioning off your information in bundles on the open market labeled as “audience data” I find it a little disturbing. Bluekai.com is one of these companies and claims to be:

“the center of the digital data economy and the largest auction marketplace for all audience data.”

The term audience data makes me feel uneasy, but there is something I find more worrying. This is an unregulated industry, and there are profits involved. Companies like this claim to collect information on you anonymously, meaning that they don’t store your name, DOB etc.. but what if the company also has say… an application integrated with facebook, or data scrapers on other websites. Cross referencing its tracking codes would not be difficult. I guess it depends how much you care about marketing sites and audience data sites profiling you and your web habits.

parasites!

parasites! (Photo/USDA-Agricultural Research Service)

I am obviously not the only person concearned about this. Disturbingly, I recently learned via slashdot that a privacy activist has filed a lawsuit against MTV, ESPN, MySpace, Hulu, ABC, Scribd, Quantcast and others aledging that the sites use a form of zombie “flash cookie” that recreates itself even if users have gone out of their way to delete it. In other words, these sites are basically installing viruses with the specific aim of tracking what you do on line. Whether it is the companies and corporations listed directly or third parties using their sites as launch vehicles to get access to you, they all benefit.
One of the problems with flash is, if someone wants to, they can code it to do pretty much whatever they want using its ActionScript language. Somehow I doubt the guys collecting information on you have any dignity or respect for your privacy. Especially when $23 billion was spent on this form of marketing last year. I can’t help but think of leaches waiting on low hanging branches waiting for you to brush past so they can jump on and suck your blood!
One of the great things about the web is its anonymity. I don’t like the idea of a website knowing my demographic when I show up and how much extra they can charge me for an airline ticket. The volume of drive by trackers being installed on peoples computers is alarming.
It is going to be an ongoing battle to remain anonymous online, and if you don’t want companies trying to sell you the latest weight loss system because you once looked up obesity, or governments flagging you as a terrorist because you read the wrong article, you should be concerned about privacy online too.

Update: Here’s an alternative to Dictionary.com: thefreedictionary.com. It also has the nifty feature of allowing you to enter the word at the end of your URL. Like this: http://www.thefreedictionary.com/word

Posted in Discussion, Internet, Privacy, Technology | Tagged , , , , | 23 Comments

Glass in foot works its way to the surface 4 and a half months later

A small piece of glass that was stuck in my foot has finally worked its way to the surface and I was able to remove it. I’m blogging this so that anyone who finds them self in a similar position will hopefully feel a little more confident that given some time, the glass should work its way out. Of course you should seek the help of a medical professional or try and remove the glass or splinter yourself as soon as possible, but in my case even that was not enough to get the small shard out. What follows is the details of my experience.

Glass shard

The small shard of glass that was stuck in my foot for 4 and a half months.

Four and a half months ago I stepped on some glass from a broken fruit juice bottle. It was in an awkward spot for me to get at so I asked a couple of my family members to see if they could get the glass out using a pin and some tweezers. They were able to remove one piece, but I could tell there was a small piece still inside the wound. So in the evening on the day it occurred, I went to the emergency room at a local hospital to get the remaining piece removed. The doctor on duty dug around in the wound for a while and after some time decided that the piece had come out whilst she was wiping the blood away from the area. I wasn’t convinced but the doctor seemed pretty sure there was no more glass in the wound.

Over the following months I experienced intermittent pain and varying degrees of discomfort coming from the area where the glass was embedded in my foot. The small hole never healed completely. I kept the wound covered with medical strips/plasters and regularly applied a disinfecting ointment and kept the area clean.

Today when I removed the medical strip covering the wound and brushed my finger across the hole, I felt something hard at the surface. I was able to grab the object between my fingernails and a small shard of glass slid out.

I am extremely relieved! Some days it was painful when I was walking around. There were times when I would feel accute pain coming from the wound as the glass cut me. This was usually when I shifted my weight in an unusual way. I have been in a tropical climate for a while now, so I was starting to get worried about the wound not healing. But hopefully it will heal up fine now that the remaing glass shard is gone. Result!

Posted in Discussion | Tagged , , | 79 Comments

Julia Gillard – Don’t insult our intelligence.

Julia Gillard is standing behind Conroy’s Internet Filter.

Extremely rare photo of Julia Gillard at a computer. photo: Simon Schluter

I am outraged by the Australian government and its decisions on issues relating to the internet and personal freedom. It’s like Australian government representatives have sections of their brains removed that deal with logic as soon as they take office. I was shocked to read that our new prime minister Julia Gillard is going to back the Australian Communications Minister Stephen Conroy’s proposed Internet filter. This is exactly the kind of issue that the inept Australian government should not be allowed to make on behalf of Australian citizens. They clearly do not have the mental or intellectual capacity to do so. Australia is becoming a country I am ashamed to be associated with. It is the butt of many a joke by tech savvy thinkers the world over because its administration continues to make bad decisions like this. It is quite frankly, embarrassing.

Here’s another bad idea the Australian Government has come up with: Searching travelers mobile phones and laptops for porn at airports. Excuse me? Is that some kind of bad joke? Does that mean I’ll have to wait at the airport while another half educated idiot with his logic sector removed actually goes through my laptop’s hard disk searching for kiddie porn?

Why can’t people see this “kiddie porn” lie for what it is? It is simply a way for the logic lobotomized government to get the TV watching Australian public to agree to another one of their personal freedoms being removed. According to people like Stephen Conroy, Australians need to be protected from the free flow of information provided by the internet. Exactly why is that? Don’t insult our intelligence. In fact, the U.S. Ambassador to Australia Jeff Bleich recently stated:

“We have been able to accomplish the goals that Australia has described, which is to capture and prosecute child pornographers and others who use the Internet for terrible purposes, without having to use Internet filters. We have other means and we are willing to share our efforts with them in order to allow them to at least look at a range of choices, as opposed to moving in one particular direction. It’s an ongoing conversation.”

You might want to look into that Conroy. Sounds like a good piece of advice to me.

Is Australia to become another China, Iran or Vietnam? Vietnam bans facebook. I’m not a fan of facebook, but millions of people use it every day. The Vietnamese however, are no longer allowed to talk to their friends on facebook.

Tank Man

Tank Man

A large sector of China’s population don’t even know that some of its brightest student minds were crushed by tanks in Tienanmen square because China’s government also likes to filter information. Imagine the Chinese pride if they could have seen images of tank man like the rest of the world did? What does the Australian government really want to filter? What truth is to be hidden from us?

Maybe Australia can join the list of countries like Iran and Turkmenistan who ban youtube. What sites are next?

When Julia Gillard compares filtering the Internet to “going to the Cinema”, it truly shatters any credibility she has in dealing with issues such as freedom of information or technology. The cinema? That is a comment I would expect from a child, not a Prime Minister of Australia. If Gillard deals with issues of this magnitude as flippantly as that, maybe she should stand down, get some popcorn and head off to the cinema where she can have her information filtered for her if that’s the way she likes it. Gillard should leave making this type of decision to someone who can actually think.

I thought Australia was supposed to be a free country and a democracy? This is not only a threat to the personal rights of Australians, it is a waste of tax payers money. It’s a simple task for anyone with even the most rudimentary computer skills to bypass any filter the Australian government puts in place. So it’s not only a bad idea and an insult, it’s futile.

Julia Gillard, here is your chance to make a smart decision. Not just to prove that you are capable of representing the intelligent citizens of Australia, but to prove that you have respect for personal freedom.

Posted in Australian Internet Filter, Discussion, Internet, Julia Gillard, Politics, Privacy, Technology | Tagged , , , , , , | 1 Comment

John A. Vucetich’s best advice: “Don’t fear the truth”

John A. Vucetich, of Michigan Technological University and coauthor of “On Advocacy by Environmental Scinetists: What, Whether, Why, and How” published in the journal Conservation Biology, was recently interviewed by Live Science. Vucetich, who’s primary research is a wolf-moose predator-prey study at Isle Royale National Park (an island in Lake Superior Michigan), the longest running predator-prey study in the world, responded admirably to the questions. Of note are these two questions and answers:

What is the best piece of advice you ever received?
Don’t be afraid of the truth.

If you could only rescue one thing from your burning office or lab, what would it be?
My laptop computer.

I hear you! haha!

I was also suprised to read that John grew up in suburbia but was always trying to be outside in natural environments. This rings true for me as well. I can’t help but identify with him. It’s a similar desire which lead to my recent experiment of getting away from cities and living on a tropical island. Good luck to John and his research! Recent press releases about Vucetich and his work can be found here and here.

Posted in Discussion, Science, Truth | Tagged | 1 Comment