The Admin Diaries
RSS
  • Links
  • About Me

Solaris 10: Boot failure after live upgrade

By admin On May 10, 2012 · Add Comment · In Solaris
Had to upgrade Solaris 10 on an old machine at work today (Enterprise 6800 – damn that machine was sexy when we got it … lol). The live upgrade itself went well. As we mostly use SVM to mirror the root filesystem on our older servers (ZFS on the newer) I had broken the root [...]
[Continue Reading...]

WPF: Setting the focus on a textbox

By admin On May 10, 2012 · Add Comment · In C#, Programming, WPF
Setting the focus on a textbox as the window is displayed is actually pretty straight forward, just call the Focus() method. So setting a focus on a textbox named txtName could be done like this txtName.Focus() – but where should that be done ? Simplest method would be to do that in the Loaded event [...]
[Continue Reading...]

SELinux: changing the Apache documentroot

By admin On May 8, 2012 · Add Comment · In Linux
I recently had to change the documentroot on a freshly installed Centos/Apache machine. Seemed like Apache didn’t like the new folder (/webroot) and after a bit of speculations SELinux seemed like a likely culprit. chcon -R -t httpd_sys_content_t /webroot did the trick ! Decided it was time to learn a bit about debugging SELinux problems, [...]
[Continue Reading...]

C#: Using Linq to query a list of objects

By admin On May 8, 2012 · Add Comment · In ADO.NET, C#, Linq, Programming
This is an example of to use linq to query a list of objects much like a database. Let’s start with a simple example, for this example to work we need a Employee class: class Employee {   public string Name;   public int Id;   public Employee(string Name, int Id)   {     this.Name = Name;     this.Id = Id; [...]
[Continue Reading...]

WPF: Working with a Datagrid

By admin On May 8, 2012 · Add Comment · In ADO.NET, C#, Programming, WPF
This is an example of how to publish the results from a select query in a WPF datagrid. For this example to work we need to have a SQL Connection string defined in a string variable named sqlConnectionString. We also need to have a DataGrid named datagrid1: Code SqlConnection conn = new SqlConnection(sqlConnectionString); conn.Open(); string strSQL [...]
[Continue Reading...]

WinForms – C#: Making a Window appear without grabbing the focus

By admin On April 29, 2012 · Add Comment · In C#, Programming, WinForms
Like so many others I need to keep track of what I’ve been doing. I’ve used various methods such as handwritten notes, text documents, adding calendar entries – I even created a small database application once. None of the methods actually solved the problem as the problem is not so much storing the information but [...]
[Continue Reading...]

Windows 7: Disabled Microphone on my Latitude E6420

By admin On April 27, 2012 · Add Comment · In Microsoft, Windows 7
Somehow I had manged to disable my laptops internal microphone and I was unable to get it working. Right-clicking the speaker icon in the Windows 7 notification area and selecting “Recording Devices” did not show my internal mic, but only the line in (where I had no mic connected). Took me some time to figure [...]
[Continue Reading...]

Solaris 10: Changing the IP address

By admin On April 25, 2012 · Add Comment · In Solaris
Changing the IP on Solaris 10 is a bit different from for example Linux. First you need to know the drivername and instance number of the network interface you can do that by running the following commands (depends on hardware): prtconf -D prtconf -D | grep network prtdiag modinfo dmesg if there is allready an [...]
[Continue Reading...]

SELinux: Allowing Apache to connect to a remote MySQL Server

By admin On April 25, 2012 · Add Comment · In Linux
Just finished installing a new CentOS Apache server, as always SELinux enabled The server is supposed to, amongst other things, host a wordpress site. I downloaded the wordpress package and uncompressed it only to find out that I was unable to get it to connect to a MySQL server running on another host. Thought it [...]
[Continue Reading...]
  • Old Rantings

    May 2012
    M T W T F S S
    « Apr    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • What’s the Buzz … word

    .NET Apache bootadm boot archive boot loader C# DocumentRoot Focus installboot Linq Linux Live Upgrade Liveupgrade luactivate Programming SELinux Solaris SVM Textbox Windows 7 WinForms WPF
  • Links
  • About Me
Build a website with PageLines