John's little part of the web

John's home page

123Last ›

2012-10-19 06:38:51

I read the following from this link.  I agree that the employer should take some responsiblity for their employees education.

"The most important aspect of being a professional employer of software developers is that you should treat them with respect. If you’re a software company, these people are pretty much the alpha and the omega. At the end of the day, if they suck, you suck. Yes, you need sales and marketing and accounts and everything else, but all that exists around the development of the software; that’s the product, the thing that gives your company its value.

If you’re an enterprise with internal development resource, then you’re entrusting the smooth running of your organisation to your developers. If they suck, your organisation won’t function properly and it will lose money.

So respect them; nurture them; give them the time and support they need to stay, if not at the top of their game, at least no further from the top on a year-by-year reckoning. Here are some things you can do to keep your half of a learning bargain with your developers:"

2012-10-11 06:23:54

http://www.fourhourworkweek.com/blog/2010/05/18/tim-ferriss-scam-practical-tactics-for-dealing-with-haters/

2012-08-17 06:43:05

Recently I added the option to signon to one of my wife's website with Facebook.  I used the PHP SDK from Facebook, basically I took the two PHP files merged them in one, place them in to the helper section of code ignitor project, and added it to the auto load section.  This was going fine until I moved to my wife's compute and tried it under FireFox and failed.  Hum, now I know this should not be a FireFox problem and since it worked in the other three major browser was having trouble coming up with a reason why it was not a FireFox problem.

Oh well after a hour of fighting with this I noticed that whenever I enter the website URL FireFox would remove the WWW.  A light turned on at that point, I then switch to the other browser and removed the WWW and yes they all failed.  I moved to the FaceBook app section for the app and added a second URL, one WWW and one with the WWW, another failure.

So not wanting to fight with it any longer and having been told for SEO it was better to only have one version of your website either with or without the WWW and since the WWW version worked I added a section to the .htaccess file which forced all request to the WWW version.  Guess what the site now has FaceBook login working correctly in all the browser.

You have got too love technolgy, grr!

2012-08-17 06:29:51

I installed the Visual Stdio 2012 RC version the other day and was not very happy with it but there was nothing major, well at least nothing I could not overcome, mostly just a matter of getting use to it I guess.

Well then I attempted to import one of my older and bigger projects and received the list of errors.  Ok this is sort of normal but I was suprised to find that the error all revolved around the project's deployment projects.  Hum, so I did a wee bit if check and it seems VS 2012 no longer has a basic deployment option, yes Click Once is still that but not really acceptable for my application.  Yes we use it in house so I am aware of its use and have used it, don't like it but it has it place.

So I installed the InstallShield LE version, what a mess that was but ok they do have an import feature so I figured I could deal with it.  Most of my installations are simple copy files to computer, setup a couple links, and be done with it.  I do have more than a few customer that have switch to 0x64 so I normally create two version, one x86 and one x64.  This is more important for projects that I can't compile under any CPU.

Well that was a failure, it seems that InstallShield LE does not support x64 installs, I will have to upgrade to either the pro version or the premier version which are $2,400 & $4,500 respectively.

I my opinion this is a mistake on Microsoft's part.  I see no reason why I should have to invest that kind of money to do a simple install.  I will be looking into other deployment option since obviouly InstallShield is not acceptable.

I did find a link on the Visual Studio user voice website, if you care to vote on returning the basic setup and depoyment project, please do it here.

2012-06-13 10:40:59

I have added a form on an RIA project that I am working on with three combo boxes that are filled using the domain data source.  The problem is the form data already exists at the client when I open the child window.  This means the combo box selected value is set prior to the item source being set and as such the combo box always uses the first item in the selection and also shows the record as being changed.  Both are a problem... I ran across this post which suggested moving the domain data source into the resource section of the XAML but that did not seem to solve the problem.  What I ended up doing is waiting for the domain data source to load and then setting the form data context as below.

XAML Code:

<controls:ChildWindow.Resources>
    <riaControls:DomainDataSource x:Key="dds_countries"
                                  QueryName="GetCountries"
                                  AutoLoad="True">
        <riaControls:DomainDataSource.DomainContext>
            <l:rtDomainContext />
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>
    <riaControls:DomainDataSource x:Key="dds_states"
                                  QueryName="GetStates"
                                  AutoLoad="True">
        <riaControls:DomainDataSource.DomainContext>
            <l:rtDomainContext />
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>
    <riaControls:DomainDataSource x:Key="dds_residencetypes"
                                  QueryName="GetResidenceType"
                                  AutoLoad="True">
        <riaControls:DomainDataSource.DomainContext>
            <l:rtDomainContext />
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>
</controls:ChildWindow.Resources>

<ComboBox Grid.Row="3"
          Margin="3"
          Grid.Column="1"
          DisplayMemberPath="Name"
          SelectedValuePath="Type"
          ItemsSource="{Binding Path=Data, Source={StaticResource dds_residencetypes}}"
          SelectedValue="{Binding Path=ResidenceType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<ComboBox Grid.Row="7"
          Margin="3"
          Grid.Column="3"
          DisplayMemberPath="Name"
          SelectedValuePath="Abbreviation"
          ItemsSource="{Binding Path=Data, Source={StaticResource dds_states}}"
          SelectedValue="{Binding Path=State, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<ComboBox Grid.Row="8"
          Margin="3"
          Grid.Column="3"
          DisplayMemberPath="Name"
          SelectedValuePath="Name"
          ItemsSource="{Binding Path=Data, Source={StaticResource dds_countries}}"
          SelectedValue="{Binding Path=Country, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />


Code Behind:

private int LoadCount = 3;

private void ChildWindow_Loaded(object sender, RoutedEventArgs e)
{
 ((DomainDataSource)this.Resources["dds_countries"]).LoadedData += (s, a) => { this.LoadAddress(); };    
 ((DomainDataSource)this.Resources["dds_states"]).LoadedData += (s, a) => { this.LoadAddress(); };     
((DomainDataSource)this.Resources["dds_residencetypes"]).LoadedData += (s, a) => { this.LoadAddress(); }; }

private void LoadAddress()
{
   if (--this.LoadCount == 0)     
   {
        this.LayoutRoot.DataContext = this.Address;
        ((System.ComponentModel.INotifyPropertyChanged)this.Address).PropertyChanged += (s, a) =>
        {                
            this.OKButton.Visibility = System.Windows.Visibility.Visible;          
        };
    }
}

 

2012-06-12 06:47:50

I am working on a silverlight RIA application and don't want the option to register or remember the user.  Removing the register was stright forward, just collapse the links in the LoginForm.xaml form.  The remember me option was not as stright forward, after some searching I found this, not sure it is the best way but it works.

In the LoginInfor.cs file remove the remember me property which generates an error in the ToLoginParameters function.  In that function just change the function call so it is always true or false depending on need.  Since I don't want it to remember I set it to false.

2012-06-08 09:04:21

Added the MX Toolbox link to the links page, very useful tool set, use it all the time...

http://www.mxtoolbox.com/

2012-05-26 04:34:47

I updated an application recently that use the .NET 3.5 version of the send mail.  This has been working find with gmail for sending mail.

The problem is when I upgraded to .NET 4.0 it gave an obsolete message on the old send mail so I upgrade to the new SmtpClient.

Note the new SmtpClient is in many ways easier to use and gives better error message but needless to say it did not work with gmail, hum!

So after some fighting with the most obvious problem and seaching the net and gmail help I finally changed the port from 465 to 587 and majically it all started to work.  I am not sure why the old send mail worked fine with 465 and the new one only works with 587 but that seems to be the case.

Below is the test code I was using.

class Program
{
    static string UserId = "gmail user id";
    static string UserPw = "gmail password";
    static void Main(string[] args)
    {
        SendMail("<to email>""<from email""Test message""testing testing testing");
    }

    static bool SendMail(string to, string from, string subject, string body)
    {
        var msg = new System.Net.Mail.MailMessage();
        msg.To.Add(new System.Net.Mail.MailAddress(to));
        msg.Subject = to;
        msg.Body = from;
        msg.From = new System.Net.Mail.MailAddress(from);

        try
        {
            // 465 does not work
            var client = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
            client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
            client.EnableSsl = true;
            client.UseDefaultCredentials = false;
            client.Credentials = new System.Net.NetworkCredential(UserId, UserPw);
            client.Send(msg);
            return true;
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex);
        }

        return false;
    }
}

 

2012-04-24 04:48:32

http://social.technet.microsoft.com/wiki/contents/articles/ipv6-survival-guide.aspx

2012-04-13 09:32:22

The below allows you to get a list of the special folders using powerscript...

Found: here

### Start of Script
### Get the list of special folders
$folders = [system.Enum]::GetValues([System.Environment+SpecialFolder])
# Display these folders
"Folder Name            Path"
"-----------            -----------------------------------------------"
foreach ($folder in $folders)
{ "{0,-22} {1,-15}"  -f $folder,[System.Environment]::GetFolderPath($folder)
}
#End of Script

Desktop                C:\Users\user_name\Desktop
Programs               C:\Users\user_name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
Personal               C:\Users\user_name\Documents
Personal               C:\Users\user_name\Documents
Favorites              C:\Users\user_name\Favorites
Startup                C:\Users\user_name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Recent                 C:\Users\user_name\AppData\Roaming\Microsoft\Windows\Recent
SendTo                 C:\Users\user_name\AppData\Roaming\Microsoft\Windows\SendTo
StartMenu              C:\Users\user_name\AppData\Roaming\Microsoft\Windows\Start Menu
MyMusic                C:\Users\user_name\Music
DesktopDirectory       C:\Users\user_name\Desktop
MyComputer
Templates              C:\Users\user_name\AppData\Roaming\Microsoft\Windows\Templates
ApplicationData        C:\Users\user_name\AppData\Roaming
LocalApplicationData   C:\Users\user_name\AppData\Local
InternetCache          C:\Users\user_name\AppData\Local\Microsoft\Windows\Temporary Internet Files
Cookies                C:\Users\user_name\AppData\Roaming\Microsoft\Windows\Cookies
History                C:\Users\user_name\AppData\Local\Microsoft\Windows\History
CommonApplicationData  C:\ProgramData
System                 C:\Windows\system32
ProgramFiles           C:\Program Files
MyPictures             C:\Users\user_name\Pictures
CommonProgramFiles     C:\Program Files\Common Files

 

123>Last ›

Search using bing

this is a test