Monday, July 25, 2005

I saw this on Reuters and several other outlets. I think that the teachers must have “deferred success” on their drug test.

LONDON (Reuters) - The word "fail" should be banned from use in British classrooms and replaced with the phrase "deferred success" to avoid demoralizing pupils, a group of teachers has proposed.
[Via Reuters: Oddly Enough]
posted on 7/25/2005 10:34:30 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
  • Blog reactions
  • I was answering a Google group post about removing duplicates from tables and wrote some sample scripts of ways to remove duplicates… IMHO the second example is the best, but I think it makes for an extremely large transaction on large tables… the first method (using a cursor) would keep the transaction small – I think.

    Both samples assume the following table with the following data:

    CREATE TABLE tblTest
    (
       [ID]  smallint
          IDENTITY(1,1)
          PRIMARY KEY CLUSTERED,
       FirstName    varchar(50)     NOT NULL,
       LastName varchar(50) NOT NULL,
       Email varchar(50) NOT NULL
    )

    DATA:

    insert into tblTest VALUES ('Hal','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal1','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal1','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal1','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal2','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal2','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal2','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal3','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('Hal3','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('NonDup','Lesesne','testemail@yahoo.com')
    insert into tblTest VALUES ('AnotherNon', 'Dup', ‘whatever@yahoo.com’)

    The first method uses a cursor to build the MIN(ID) of the duplicates then iterates through each of those, deleting rows that match the dup fields but don’t have that id.

    DECLARE @id int, @FirstName varchar(50), @LastName varchar(50), @Email varchar(50)
    DECLARE GOODCUR CURSOR FOR
         select MIN(ID),FirstName,LastName,Email as GoodID from tblTest group by FirstName,LastName,Email having count(1) > 1
    OPEN GOODCUR
    FETCH NEXT FROM GOODCUR INTO @id, @FirstName,@LastName,@Email
    WHILE @@FETCH_STATUS=0
         BEGIN
              DELETE tblTest from tblTest where
                   (FirstName = @FirstName AND LastName = @LastName AND Email = @Email) AND NOT (ID = @ID)
              FETCH NEXT FROM GOODCUR INTO @id, @FirstName,@LastName,@Email
         END
    CLOSE GOODCUR
    DEALLOCATE GOODCUR

    The next method using a single delete statement and no cursor, but I think I remember it making for a huge transaction and lots of locking. This joins the table to itself based on the fields that you want to check for duplicates and deletes all but the lowest ID value for each.

    DELETE A
     FROM tblTest A
     INNER JOIN tblTest B
      ON A.Email = B.Email
       AND A.FirstName = B.FirstName
       AND A.LastName = B.LastName
       AND A.ID <> B.ID
     WHERE A.ID > B.ID

    I would appreciate any thoughts or comments on these statements. 

    posted on 7/25/2005 4:05:55 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
  • Blog reactions
  • :-)

    Vista definition: A distant view or prospect, especially one seen through an opening, as between rows of buildings or trees.

    I guess that they have seen the distant view. It's the view right behind them that gives them so much grief.
    Microsoft may be in trouble for naming its forthcoming operating system Vista after it transpired that the name has been registered by an American company for nearly six years.

    [Via Microsoft may have to alter Vista - vnunet.com]
    posted on 7/25/2005 11:42:36 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
  • Blog reactions
  •  Sunday, July 24, 2005

    Phone company blocks access to telecoms union's website:

    Cory Doctorow: The Telecommunications Workers' Union of Canada is striking against has been locked out by Telus, a large phone company and ISP. Two of TWU's sites (including Voices for Change, a message board where union members can discuss issues such as being without a contract for 1666 days and last having received a general wage increase 2031 days ago).

    Telus is playing very dirty -- they're blocking access to the union's website so that their workers and the general public are cut off from legitimate debate about this action. This is inexcusable: imagine if this phone company chose to block all calls into union headquarters. From an email forwarded by Damien Fox:

    Telus Communications Inc, Canada's second largest telephone company, whose 13,500 unionized employees setup picket lines only sixteen hours before Telus implemented their non-negotiated contract offer Friday is now playing media censor.

    In an attempt to convince employees to cross picket lines and win public support during what may be a long labour dispute, Telus has blocked access to several pro-union websites from any Telus customer internet connections. This comes only one day after the Canadian Industrial Regulations Board (CIRB) found Telus guilty of bargaining in bad faith for the third time during the negotiation process that has left the Telecommunications Workers Union (TWU) without a contract for nearly five years.

    TWU members who rely on these websites and internet discussion forums for communications are now looking for alternative methods for retrieving information related to what is happening on picket lines across Alberta and BC. Union members who are able to get to the website are angered but not surprised by Telus' latest move.

    "What else should we expect from a company who has tried to implement a contract deemed a violation of Canadian Labour Code? Telus' disrespect for customers, employees, and Canadian labour law has all unions in Canada on the edge of their seat. If Telus successfully imposes their non-negotiated contracts, it sets precedence for all unionized companies across Canada when they sit down to bargain." one post reads. The CIRB has been reluctant to impose any penalties for Telus' violations of labour code as they are unsure what the direct impact has been on the bargaining process, and if the two parties would be any further along if Telus had followed labour law. Telus has been found guilty of several counts of bargaining in bad faith and interfering with the operations of a trade union by the CIRB.

    Known pro-union websites currently blocked to Telus customers are www.voices-for-change.com and www.telusscabs.ca . Visitors posting on the website are asking fellow union members, Telus customers, and the public to file a complaint with the CRTC and their MP for Telus violating their personal right to freedom of speech and freedom of the press under the Canadian Charter of Rights and Freedoms.

    For further union information and media inquiries, please contact Bruce Bell, TWU President at 604-341-2925 or Sid Shniad at the TWU Burnaby Office at 604-437-8601. Visit the TWU web site: www.twu-canada.ca

    For furher Telus information and media inquiries, please contact Nick Culo, National Communications, Telus Corporation at 780-493-7236, nick.culo@telus.com or visit www.Telus.com

    Link (Thanks, Damien!)

    Update: Abram sez, "This is the website through which you can make complaints to the CRTC about the business practices of Telus."

    [Via Boing Boing]

    posted on 7/24/2005 11:18:46 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
  • Blog reactions
  • Here is a handy little piece of code from one of the Geeks with Blogs .

    RunAs utility - this time with Code:

    Check this code out -

    System.Diagnostics.ProcessStartInfo myProcess =
       new System.Diagnostics.ProcessStartInfo("Notepad.exe");

    myProcess.UserName = "someusername"; //windows username
    System.Security.SecureString password = new System.Security.SecureString();
    // set value for password here.
    myProcess.Password = password;
    myProcess.UseShellExecute = false;
    System.Diagnostics.Process.Start(myProcess);

    What the above code does is, it runs the application notepad as the user "someusername".

    Now that's just like RunAs - except it's programmatic !! :-) (.NET 2.0 only)

    [Via Geekswithblogs.net]
    posted on 7/24/2005 11:03:45 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
  • Blog reactions
  •  Thursday, July 21, 2005

    Explosions reported on London tube, bus -police:

    LONDON (Reuters) - Up to four explosions hit London's transport system on Thursday, exactly two weeks after more than 50 people were killed in blasts on underground railway trains and a bus.
    [Via Reuters: Top News]
    posted on 7/21/2005 10:31:02 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
  • Blog reactions
  •  Wednesday, July 20, 2005

    Be sure to visit all the options undfer "Configuration" in the Admin Menu Bar above. There are 16 themes to choose from, and you can also create your own.

     

    posted on 7/20/2005 3:00:00 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
  • Blog reactions