Category: English
If you want to redirect all non-www requests to your site to the www version, all you need to do is add the following code to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
This will redirect any requests to http://my-domain.com to http://www.my-domain.com. There are several benefits from doing that: Read the full text...
Posted 080227, in: English, Web, .htaccess
Tags: mod_rewrite, seo
Since in this blog I'll be writing about JavaScript, XHTML, CSS and other languages, I was wondering which would be the best way to display code fragments in a web page. Obviously each fragment will go inside a CODE element, but there's other things I'd like to implement:
- When the page is displayed without CSS, I'd like the code fragment to have a decent formatting.
- I'd like to add a sort of caption to each code block, to add things like "add this to your .css file" (see the code fragments below as an example).
And of course, I'd like to do it with the cleanest possible XHTML. Let's go! Read the full text...
Posted 080219, in: English, Web, JavaScript
Tags: programming
This is a bug fix release that solves the problems when there were empty instances of the elements used as containers for the addFirstChild method. Head over to the FixIE page to donwload the new version.
Posted 080218, in: English, Web, JavaScript
Tags: ie6, programming
I've been a bit slack lately with Whole-Play, but that's going to be an exception, W-P can't wait!
Today I've closed drumGenerator2, and left it as a test program. Now I'm moving on to something much more exciting and challenging: teaching Chuck some harmony! The new test program I'm working on is called harmonyDetector, and I'm not sure how good it will be, but I'm hoping VERY good. This is forcing me to do two things: find ways to process note/chord data to infer harmony properties, but also think about what harmony is. It's easy to collect the data, but what's a key? What's a root? What's a scale? Believe me, when you put that into a programming language, it's quite tricky!
I'm also going to be working on the first milestone, wich is scheduled for Feb 27th, and will be a more interesting version of drumGenerator2. Did I talk about milestones? Well, because the development of Whole-Play is a long term project, I've set up a few milestones along the way, so I can both keep track of the progress made and enjoy the project. This means that whatever the state of the project, at certain points I'll write a commited program trying to make the most of the current possibilities. I ask myself something in the lines of "If I stopped the Whole-Play development now, what would be the best I coud do with it?". I'll post the results of these milestones here, so it's not all words.
Posted 080217, in: English, Whole-Play
Tags: chuck, milestones, music, programming
FixIE is a little script that I've created to overcome a few of the CSS selector limitations in IE6. What it does is adding a few helper classes to certain elements/states, which then can be used in your .css files to reference those elements/states. In particular:
- It adds the"first-child" class to the first child of certain containers (by default UL and OL).
- It adds/removes the class "hover" to LI elements inside certain containers (by default an element with id="nav"), to provide support for CSS drop-down menus.
- It adds a class to all INPUT elements, matching their type. That is, all inputs of type "text" will also have the class "text", and so on.
It is possible to configure the first two features, choosing any number of containers. For example, you could add first-child functionality to all divs, or apply the hover functionality to several navigation menus (see the JS source). Read the full text...
Posted 080215, in: English, Web, JavaScript
Tags: ie6, programming
Not a very good week this time. I got stuck on some stupid configuration issues (I won't detail them because they are stupid). So not much progress in the end. The drumGenerator2 has improved a bit anyway, that's what counts.
Posted 080203, in: English, Whole-Play
Tags: chuck, music, programming
This week I've started working on a new program, simpleDrumGenerator2, which is a more refined and powerful version of simpleDrumGenerator. It's quite exciting, since now the computer analyses the impro every X seconds, and can respond on a per-beat basis, which makes it much more responsive. Still some work to go on simpleDrumGenerator2, but it's looking very promising.
Also I've been working on a way to record the impros at the same time they are being played. I've managed to record all midi data to Sonar LE, which then can be listened to through Reason via Rewire, and mixed down to .wav if desired. I still would like to learn a bit about how to route audio signals virtually, since it might be very usefull/necessary in the future.
Can't wait to continue...
Posted 080128, in: English, Whole-Play
Tags: chuck, music, programming
And why is there a whole category in the blog for it? Whole-Play was born on 18 Nov 07, but the seed were planted way before, probably around 1990. But WHAT is it?
It's a project, an experiment and an adventure. It's a journey to create a music project that combines programming, composing and improvising. Read the full text...
Posted 080116, in: English, Whole-Play
Tags: chuck, music, programming