You'll need it. Read This
Monthly Archives: January 2009
Making public_html Work in Ubuntu 8.04 with Apache2
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?
- Edit /etc/apache2/apache2.conf
- Find the section that looks like this:
- 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>
- Sit back and relish in your own glory knowing that you have just accomplished something done today!
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> |
How did I figure this out? Click here.
A Quick Way to Copy a DataRow in C#
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
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:
- The excercises sometimes seem a little excessive. In other words, they are not necessarily easy for a beginner to figure out.
- 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:
- Examples are short, concise, and generally easy to follow
- The layout is progressive and logical
- The exercises are challenging - often more challenging than I would expect. Yet, they make you learn the language!
- Online means easy and cheap access
- 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
- Mathiness. ' is actually a valid character for variable naming. This means that the variables x, x', and x'' can be used inside programs.
- Recursion. Well, it's just easier and a little bit mathier, isn't it?
- Iteration is replaced with Tail Recursion.
- 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.