Learn Math

Filed Under (Development) by on 30-01-2009

You’ll need it. Read This

Making public_html Work in Ubuntu 8.04 with Apache2

Filed Under (Web Development) by manatarms on 20-01-2009

Tagged Under : , ,

Ever wanted each user on your server to have their own web directory? I wanted users on my server to have access to the public_html directory in their home directory so that they could display content at http://www.mydomain.com/~USERNAME. How do you do this?

  1. Edit /etc/apache2/apache2.conf
  2. Find the section that looks like this:
  3. 1
    2
    3
    4
    5
    6
    7
    8
    
    #UserDir is now a module
    #UserDir public_html
    #UserDir disabled root
     
    #<Directory /home/*/public_html>
    #	AllowOverride FileInfo AuthConfig Limit
    #   Options Indexes SymLinksIfOwnerMatch IncludesNoExec
    #</Directory>
  4. Make it look like this:

    1
    2
    3
    4
    5
    6
    7
    8
    
    #UserDir is now a module
    UserDir public_html
    #UserDir disabled root
     
    <Directory /home/*/public_html>
    	AllowOverride FileInfo AuthConfig Limit
    	Options Indexes SymLinksIfOwnerMatch IncludesNoExec
    </Directory>

  5. Sit back and relish in your own glory knowing that you have just accomplished something done today!

How did I figure this out? Click here.

A Quick Way to Copy a DataRow in C#

Filed Under (Development) by manatarms on 09-01-2009

This is fairly trivial. I just needed to remind myself of it. This can be found here.

1
2
3
4
5
6
7
8
DataTable dtDest = new DataTable();
dtDest = dsActivity.Tables[0].Clone();
 
foreach(DataRow dr in dsSrc.Tables[0].Rows){
    DataRow newRow = dtDest .NewRow();
    newRow.ItemArray = dr.ItemArray;
    dtDest.Rows.Add(newRow);
}

4 Chapters in Real World Haskell

Filed Under (Development) by on 08-01-2009

Tagged Under :

I’ve been slowly going through the book “Real World Haskell” by Bryan O’Sullivan, Don Stewart, and John Goerzen. Of course, I have been going through the online version.

I have gone through the first four chapters of the book. These chapters  lay the basic framework for using and understanding the Haskell language. I have only 2 complaints at this point:

  1. The excercises sometimes seem a little excessive. In other words, they are not necessarily easy for a beginner to figure out.
  2. This isn’t really a complaint about the book, but rather a personal difficulty. Functional programming is a slightly demanding paradigm switch. I like it a lot and I already have a deep appreciation for it but it is not always easy to wrap my head around a new way of programming.

What I like about the book:

  1. Examples are short, concise, and generally easy to follow
  2. The layout is progressive and logical
  3. The exercises are challenging – often more challenging than I would expect. Yet, they make you learn the language!
  4. Online means easy and cheap access
  5. The user comments throughout the pages are useful to understanding Haskell. They often give a slightly deeper insight into what the book is showing.

Overall I really like this book and am excited to continue on to what seems to be more real world examples and applications.

A Couple of Things that I Like About Haskell

Filed Under (Development) by on 07-01-2009

Tagged Under :

  1. Mathiness. ‘ is actually a valid character for variable naming. This means that the variables x, x’, and x” can be used inside programs.
  2. Recursion. Well, it’s just easier and a little bit mathier, isn’t it?
  3. Iteration is replaced with Tail Recursion.
  4. It’s different. This is not C#. This is not Java. This is not even F#. This is real functional programming. It really makes you think in a new way.