Apr 23 2010

Haystacks by Monet

Published by admin under Art

042310 1802 Haystacksby1 Haystacks by Monet

The picture here does not quite do the real thing justice. I believe that I saw a large collection of Haystacks at the Chicago Art Institute. If you have a chance, go there to check these large pictures out.

No responses yet

Apr 21 2010

Blogsite malware removed

Published by brunzefb under Computers - General

Just to let everyone know that I finally removed the malware (an obfuscated javascript that would cause redirections to a bad site), and worked with the google tools to get the site's name cleared.

600 malware 1 300x219 Blogsite malware removed

malware

.

Unfortunately some of the older posts's pictures are gone as I upgraded to a newer version of WordPress - I will fix that later.

No responses yet

Dec 13 2008

Configuring Hostpapa POP3 email with SSL using Outlook – Fixing SSL “self-signed certificate” errors

Published by brunzefb under Computers - General

So you have decided to use SSL with POP3 to get your email from your Hostpapa- hosted site. The cPanel control panel gives you instructions on how to tell Outlook how to do this, and it is left as an exercise for the reader.

Once everything is configured and you actually connect to the POP3 box, Windows/Outlook gives you an error message telling you:

"The server you are connected to is using a security certificate that could not be verified. A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. Do you want to continue using this server?"

121308 2349 configuring14 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

So what is really happening? SSL certificates are weird things – the way I understand them is that when you buy a certificate from a Certification Authority like Verisign, the certificate that you get points to a root certificate from Verisign. That Verisign root certificate (and other root certificates from other certification authorities is installed by default by Microsoft. When your computer makes a connection via SSL to the server, it can and does check the server's certificate. Following the chain of certificates to the root, it finds the Verisign Root certificate. Since this certificate matches the root certificate already installed, everything is good.

Why are we getting that self-signed certificate error, then? What happened is that it is possible for people to generate a certificate that is self-signed, meaning it does not link to a trusted Certification Authority. In this case, the root certificate does not match anything on the system, and a warning message is displayed. Hostpapa must have just used self-signed certificates, making things harder for the users.

I have found two different methods to get the certificate, either using OpenSSL or using Firefox 3. I'm sure there are others, but both of these methods work.

Method#1 to get the Certificate: Using OpenSSL

Download OpenSSL for Windows and install it:

Open a command line prompt (start->run->cmd)

At the command prompt (c:\>) type:


cd \program files\gnuwin32\bin

Then type in the following commands:

openssl s_client -connect hp12.hostpapa.com:995 > file.txt

[replace hp12.hostpapa.com with the server name showing in cPanel]

Ctrl+C (to exit the program)

openssl x509 -in file.txt -outform DER -out hostpapa.der

start hostpapa.der

This starts the certificate import wizard.

121308 2349 configuring24 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Click Install Certificate

121308 2349 configuring34 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Click Next

121308 2349 configuring44 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Click Next

121308 2349 configuring54 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

121308 2349 configuring64 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Method #2 for getting the SSL Certificate, using only Firefox

You will need the Firefox 3 web browser installed for this to work. Note the number of dialogs and clicks required to get you where you want. You will feel like a criminal doing this but it is perfectly legitimate and safe.

  1. Open your Firefox browser, in url box type about:config and press enter.
  2. In next screen you will get a warning message click on "I will be careful, I promise!" button.
  3. In next screen search for "network.security.ports.banned.override".
  4. If this string is not there write click anywhere in the firefox text window and click on new and then select string.
  5. You will get a box says " Enter the preference name" in its text box give the name "network.security.ports.banned.override" and press ok.
  6. In next screen you have to give the string value. This string value is port number of your port.
  7. If you want to allow all port then please give 0-65535. It will allow all the port. If you want to give some specific port then you can give those specific port using comma separated value example 101, 102, 103 etc. Choose only 995 for HostPapa, because POP3 SSL runs on this port
  8. Start Firefox and enter the following URL: https://hp12.hostpapa.com:995

121308 2349 configuring71 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Click "Or you can add an exception"

121308 2349 configuring81 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Click Add an exception

121308 2349 configuring91 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Click Get Certificate

121308 2349 configuring101 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Click View, select the Details tab

121308 2349 configuring111 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Click Export

121308 2349 configuring121 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Choose x.509 Certificate, click save, and close all the Firefox dialogs

Double Click the hp12.hostpapa.der certificate, and choose to install the certificate. Method #1 shows the dialogs on Windows Vista that show up when importing the certificate.

Note that you are importing the certificate only for the current user. If you want to import for all users on the machine, you must use the MMC

Start->Run->MMC.exe

File->Add /Remove SnapIn -> Locate Certmgr.msc in c:\windows\system32

121308 2349 configuring131 Configuring Hostpapa POP3 email with SSL using Outlook   Fixing SSL self signed certificate errors

Indicate Local machine

Open ConsoleRoot->Certificates(LocalComputer)->Trusted Root Certification Authorities->Certificates

Right-click on Certificates->All Tasks->Import

Follow the wizard to import the saved certificate

One response so far

May 08 2008

Pablo Picasso

Published by brunzefb under Art

pic1 Pablo PicassoPablo Diego José Francisco de Paula Juan Nepomuceno María de los Remedios Cipriano de la Santísima Trinidad Martyr Patricio Clito Ruiz y Picasso (October 25, 1881 – April 8, 1973) was a Spanish painter, draughtsman, and sculptor.

Yes, he seems to have had a long set of names… The painting (Dance of youth) conveys movement and energy, but has the dove of peace as the symbol in the centre, flying while at the same time still. Look at the figure at 12 o clock in the circle - it is drawn in such a simple, yet incredibly expressive way.

Shalom!

One response so far

May 07 2008

Playing with WPF Commands

Published by brunzefb under Computers - General, Music

download Playing with WPF Commands Download Sample source code (26KB), for Visual Studio 2008


mvc Playing with WPF Commands


Here is a small WPF application I wrote, which I wanted to share. It is kind of dumb, but does show some interesting concepts, including data binding, localization, commands, a view model, menus and icons in menus. How does it work? Press the ShowMessage button, and it will show you the text in the edit box inside a message box. Press reset, and the text inside the edit box gets reset. The two commands button commands are also propagated to the menu.

The UI was designed in Expression Blend, although I admit that I often went back to editing the XML manually. Maybe this is how you are supposed to use Blend, or I just don't know yet how to do this in Blend. One thing to note is that even though the application is localized, the UI still shows up both in Blend and in the Visual Studio 2008 editor. For the curious, I am using Approach #1 from my CodeProject Article on localization. (You will need to download and install the ResXFileCodeGeneratorEx addin to compile the sample.)

I must admit that I borrowed some ideas from Josh Smith's article on Model View Controller Unit Testing WPF. Let us focus on the commands for now:

public static class Commands
{
    public static readonly RoutedUICommand Button1Command;
    public static readonly RoutedUICommand Button2Command;
 
    static Commands()
    {
        Button1Command = new RoutedUICommand(Strings.Button1, "Button1Command",
            typeof (Commands));
        Button2Command = new RoutedUICommand(Strings.Button2, "Button2Command",
            typeof (Commands));
    }
}


So this is just a static class containing static commands that are initialized as soon as the class is referenced for the first time. Note that the names come from a string resource, and this helps in the localization. Now how do we use the commands?

This code is part of the MainWindow.xaml, right under the Window tag. What it does is tell WPF that we wish to intercept the commands we list under the <Window.CommandBindings> tag. Now the command itself comes from the static class I just showed. Note the use of the 'DemoApplication' namespace identifier; for this to work we have to define/import the namespace which is done as an attribute of the Window tag like so:

xmlns:DemoApplication="clr-namespace:DemoApplication;assembly="

The command also has two attributes, the CanExecute and Executed, which point to code-behind found in the MainWindow.cs. The CanExecute determines if the command is available, and the Executed delegate is fired when the command is invoked. Here is what the implementation looks like:

private void Button1_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
    e.CanExecute = true;
}
 
private void Button1_Executed(object sender, ExecutedRoutedEventArgs e)
{
    MessageBox.Show(Strings.TextIs + mViewModel.EditBoxContents, Strings.ButtonPressed);
}
 
private void Button2_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
    e.CanExecute = true;
}
 
private void Button2_Executed(object sender, ExecutedRoutedEventArgs e)
{
    mViewModel.EditBoxContents = Strings.ResetText;
}


Now we have the commands defined and created and hooked up the delegates that actually handle the commands (and if the command is available), it is time to hook up the command to both to the buttons and to the menus.

 
<Menu DockPanel.Dock="Top">
  <MenuItem Header="{x:Static Properties:Strings.TopLevelMenu}" >
    <MenuItem Header="{x:Static Properties:Strings.Button1}"
              Command="{x:Static DemoApplication:Commands.Button1Command}" >
      <MenuItem.Icon>
        <Image Source="Icons/control_play.png"/>
      </MenuItem.Icon>
    </MenuItem>
    <MenuItem Header="{x:Static Properties:Strings.Button2}"
              Command="{x:Static DemoApplication:Commands.Button2Command}" >
      <MenuItem.Icon>
        <Image Source="Icons/control_stop.png"/>
      </MenuItem.Icon>
    </MenuItem>
  </MenuItem>
</Menu>
 
<Button Content="{x:Static Properties:Strings.Button1}"
        Command="{x:Static DemoApplication:Commands.Button1Command}"
        Grid.Row="1"
        VerticalAlignment="Top" />
<Button Content="{x:Static Properties:Strings.Button2}"
        Command="{x:Static DemoApplication:Commands.Button2Command}"
        Grid.Column="1"
        Grid.Row="1"
        VerticalAlignment="Top" />
 


The localized app in French looks as follows:
demo fr Playing with WPF Commands

The English version is here:
demo Playing with WPF Commands

Enough for now - good night!

No responses yet

May 06 2008

A way to show computer source code in the blog…

Published by brunzefb under Computers - General, Health

OK, this one took a bit of time to figure out, but I think I have it working to my satisfaction now. I want to be able to post source code, both C# code as well as XAML code (Windows Presentation Foundation) on the site. I found a plugin called Code Highlighter, that helps. I just found the default formatting for my theme's website lacking, so I borrowed from the CodeProject a little .CSS fragment relating to the <pre> tag.

 
pre
{
	border: 1px solid #ccc; padding: 0em 0.5em;
	background-color: #FBEDBB;
	padding: 5pt;
	font: 9pt "Courier New", Courier, mono;
	white-space: pre;
	overflow:auto;
}
 

The following is an example of what C# code looks like:

 
public partial class Window1
{
    private readonly ApplicationViewModel mViewModel;
 
    public Window1()
    {
        InitializeComponent();
        mViewModel = new ApplicationViewModel();
        DataContext = mViewModel;
    }
 
    private void Button1_CanExecute(object sender, CanExecuteRoutedEventArgs e)
    {
        e.CanExecute = true;
    }
 
    private void Button1_Executed(object sender, ExecutedRoutedEventArgs e)
    {
        MessageBox.Show("Text is: " + mViewModel.EditBoxContents, "Button Pressed");
    }
 
    private void Button2_CanExecute(object sender, CanExecuteRoutedEventArgs e)
    {
        e.CanExecute = true;
    }
 
    private void Button2_Executed(object sender, ExecutedRoutedEventArgs e)
    {
        mViewModel.EditBoxContents = "Reset";
    }
}
 

This is what XAML code looks like:

 
<application x:Class="DemoApplication.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="Window1.xaml">
    </application><application .Resources>
    </application>
 

Normally I use Word 2007 to write the blog entries, it is very convenient. However, you can't use it to post code, as it does not make the round trip (loading, editing, saving) without royally screwing up. :-(

Continue Reading »

No responses yet

May 05 2008

Auguste Rodin

Published by brunzefb under Art

Auguste Rodin (born François-Auguste-René Rodin; November 12, 1840 – November 17, 1917) was a French artist, most famous as a sculptor. He was the preeminent French sculptor of his time, and remains one of the few sculptors widely recognized outside the visual arts community.

I really like this work of art, called "The Kiss" – look at the gentle, almost hesitant way the man's hand is placed on the woman's thigh, and the way the woman holds her arm to embrace and approach her lover with a mixture of submission and desire. The sculpture radiates erotic energy; look at the way the man's muscular arms, the woman's back and legs and how the feet of both figures are sculpted. This shows how much of a genius Rodin really was.

050508 1203 augusterodi1 Auguste Rodin

No responses yet

May 04 2008

416 Community Drop-In for Women

Published by brunzefb under Christian

050508 0155 416communit14 416 Community Drop In for Women

050508 0155 416communit24 416 Community Drop In for Women

As part of the outreach committee of our Church, we are trying to find new ways of interacting with the community around us. One of the criticisms of our community is that it is a too inward-focused ministry, and we are trying to change this. The last time, the outreach committee met at the "416 Community Drop-in for women" at 416 Dundas Street East, close to Dundas and Parliament. The executive director, Rosie Smythe greeted us, and Pastor Schweter, Ed, Karin, Stephanie and myself asked her some questions regarding the operation of the drop-in – what they do and what their needs are. She also showed us the facility, housed in an old three storey Victorian-style house. This organization is not faith-based like the "Gateway" Salvation Army men's shelter that we had visited on an earlier occasion.

The drop-in is a facility targeting women 30 years of age and older (and transgendered persons) and is open from 8:00am to about 4:00pm seven days a week. They serve breakfast and lunch to more than 60 women on a daily basis. The clientele that frequents the drop-in are "difficult to serve" kind, because many of them have moderate to not so moderate mental illness, alcohol and/or drug dependencies and other problems. The facility offers medical services; a nurse and doctor are available two days a week. They also have a food bank program, every Thursday the drop in gets food from the daily bread food bank. This food then gets redistributed to the women in need. In addition, they have laundry facilities, and a possibility for the women to bathe and/or shower, with or without assistance. For staff, they have a couple of workers working, a cook, a driver & general caretaker, the nurse and the director. The salaries of the staff are paid for by the Ontario Government, but the operating costs are financed through donations. The drop-in also has an art therapy program, and the women like to do a weekly karaoke. In addition to this, the facility gives out clothes to women both for emergency clothing as well as for normal needs. The drop-in is always looking for women's clothing, also in larger sizes, but it should be either new or clean and in excellent shape – just giving these women worn hand-me downs does not help their self-esteem.

When we asked how we could help, Rosie said they're looking for a number of things. Since the facility has to pay the running costs such as electricity, general repairs etc, they do appreciate cash donations – since they are a registered charity it is tax deductible for the donor. They are also looking for volunteers to help out with kitchen clean-up work, contact the drop in 416-964-6936 if you wish to help out. She also told us they need bath towels, since sometimes towels have a tendency to 'walk' after the clients have bathed. This is an area where our Church can help in a small way, and we are planning to have a "towel" drive later this year. Another area where we think we will be able to help is to buy the drop-in four large turkeys for their Christmas dinner.

As the director of the "Gateway" shelter for men put it – "If the Church was doing its job, I'd be out of a job, and that would be a good thing". But let us try baby steps first.

No responses yet

May 03 2008

Is there still room for orthodox Christians in the ELCIC?

Published by brunzefb under Christian

050408 0243 istherestil1 Is there still room for orthodox Christians in the ELCIC?Yesterday, I got to read a letter of resignation – not the usual quitting your job or political appointment, but a letter of a woman resigning from her Lutheran Church Parish, and the ELCIC (Evangelical Lutheran Church In Canada). The letter touched and worried me at the same time, and it addresses a topic that I have touched upon in an earlier post entitled Beware of false teachings. Here is a little excerpt from the letter:

"If I were to lay out all the reasons for my resignation it would take many pages to write out. My reasons will come as absolutely no surprise to most of you. I have openly and publicly expressed my concerns about the direction that the ELCIC has been heading these past few years. Three and a half years ago I could never have imagined what has transpired since then. This has been the most horrific experience of my life, bar none. Some of you who read the BC synod's forum called Grace Words (GW) are more than aware of my position as I have been a frequent contributor since I joined in June 07. This site has been the final straw. I can't fathom that there are debates about whether or not Mary was a virgin when she conceived Jesus, if Jesus is or isn't the only way to the Father, that hell may or may not exist, that everyone will go to heaven regardless of their beliefs or unbelief, etc., and many other debates about what I mistakenly thought were core beliefs. Everything has become iffy. We are left with the end result that the Bible can't be trusted, there is no Truth, and everything is relative. We've been given piles of reasons on Grace Words why much of the Bible is incorrect, or misinterpreted, or is not saying what it so very clearly states. And all of this is coming from pastors / theologians on GW! The material I have read on Grace Words makes the old debate about same sex blessings seem like the good old days in comparison."

The letter illustrates the increasing difficulty that orthodox Lutheran Christians face within the larger Church, and that many Pastors and Theologians are starting to re-evaluate some of the core tenants of our faith. Personally, I believe that God gave us the Bible, a book written by men, but inspired by the Spirit of God. This book's purpose is to teach us how we can get right with God, and I believe it has been written in such a way so that even people without a degree in theology can understand it. I think it is wrong when biblical passages get reinterpreted by the 'experts' in an exactly opposite way as what the text says literally. The letter of resignation concludes with the following:

"At [congregation name], we have not "taken a stand against the devil's schemes" (Ephesians 6:11). We have sat by and have accepted all that is going on around us without taking a formal stand. What kind of faith/religion are we in the ELCIC leaving for those who follow? Did not others who went before us defend the faith so that we could all have something precious and true? What are we doing with this precious faith while on our watch? We are not defending the faith and people's salvation is at stake."

Watch out for false prophets. They come to you in sheep's clothing, but inwardly they are ferocious wolves. By their fruit you will recognize them. Do people pick grapes from thorn bushes, or figs from thistles? Likewise every good tree bears good fruit, but a bad tree bears bad fruit. A good tree cannot bear bad fruit, and a bad tree cannot bear good fruit. Every tree that does not bear good fruit is cut down and thrown into the fire. Thus, by their fruit you will recognize them. Matthew 7, 15-20

No responses yet

May 03 2008

Windows Presentation Foundation and Model View Controller

Published by brunzefb under Computers - General

A while back, Josh Smith wrote an article on Unit Testing and Model View Controller. The article features a small application that lets the user view some sample images. The WPF application uses and discusses the Model View Controller. While my kids were at swimming today, I analyzed the source code, to try to understand what's going on. There is not really that much source code there, but understanding what's going on requires that you understand WPF fairly well [try to figure out how the text items get into the list box, for instance]. I have tried to diagram my understanding of what's happening.

050308 1328 wpfandmvc12 Windows Presentation Foundation and Model View Controller

 

All this leads me to think about Unit Testing and WPF, and the question: Is unit testing worthwhile for UI? And at what point in time (or complexity) does it make sense to use the MVC or Model View-View-Model-Model pattern?

What do you think? – leave a comment.

No responses yet

Older Entries »

Bad Behavior has blocked 22 access attempts in the last 7 days.