In the past few weeks I’ve been curious as to whether it is possible to run an Asp.Net Web Application under Linux or not. Although the feature was available in Mono, there was never a well rounded IDE to work with. With MonoDevelop that has changed, the latest version (downloaded from svn) allows you to edit pages in design view as well. It also allows you to open existing Web Application Projects created in Visual Studio 2005.
Installing it on a fresh install of Ubuntu Gutsy Gibbon however isn’t as straightforward. I’ve put together a tutorial that describes the steps necessary to do so (the biggest problem being installing packages that are necessary to compile MonoDevelop, but are not installed on a fresh install of Ubuntu).
As per the MonoDevelop website, in order to install MonoDevelop from source you need to install the following packages:
Gtk# 2.8.4
Gtksourceview#-2.0 0.10
Monodoc 1.0
Gecko#-2.0 0.10
MonoDevelop Source
Unfortunately a fresh install of Ubuntu doesn’t allow you to compile any of these packages and/or install them. When I first tried it out I came across a lot of errors. I finally figured out which packages once installed would aid in an easy installation of MonoDevelop from source.
First go to MonoDevelop’s website and download the following packages from there to a local folder on your disk:
Gtk# 2.8.4
Gtksourceview#-2.0 0.10
Monodoc 1.0
Gecko#-2.0 0.10
You can extract them by right clicking on the package and choosing extract.
Next we have to get the latest version of the source from mono’s svn. Open up a terminal (Applications->Accessories->Terminal) and navigate to your directory where you have these packages installed.
Type in:
$ svn co svn://anonsvn.mono-project.com/source/trunk/monodevelop
If this is a fresh install of Ubuntu you will end up with the error message:
The program ’svn’ is currently not installed. You can install it by typing:
sudo apt-get install subversion
So go ahead and install it with “sudo apt-get install subversion”. It will request to install additional packages so go ahead and accept it. Once that is done, go ahead and get the latest version of mono from svn.
Going by the list, we would have to first install Gtk#. So we bring up a terminal and in that directory type:
Unfortunately we are stopped short and get the following output:
checking build system type… i686-pc-linuxlibc1
checking host system type… i686-pc-linuxlibc1
checking target system type… i686-pc-linuxlibc1
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… no
checking for mawk… mawk
checking whether make sets $(MAKE)… yes
checking whether to enable maintainer-specific portions of Makefiles… no
checking for gcc… gcc
checking for gcc… (cached) gcc
checking for C compiler default output file name… configure: error: C compiler cannot create executables
See `config.log’ for more details.
This basically tells us that our C compiler cannot create executables and the reason is because a fresh install of Ubuntu doesn’t come with build essentials.
Now in order to get most of the packages installed without problems we need to add a few repositories. Start ‘System->Administration->Synaptic Package Manager’ and then ‘Settings->Repositories’. Select all the repositories for now.
Search for a package called ‘build-essential’, select it and install it by clicking ‘Apply’.
This will allow the C compiler to create executables.
Attempting to configure again will result in another error
checking for al… no
configure: error: No al tool found. You need to install either the mono or .Net SDK.
After digging around and some trial and error (and figuring out missing packages) these are the list of packages I’ve found are required for a comfortable install of monodevelop. (Note: Some of these came up as dependencies of other packages. Some of these may not even be necessary, however since they had the mono name in them I have included them.)
The next step is to install a set of packages from the repositories, so fire up Synaptic Package Manager (System->Administration->Synaptic) and install the following packages:
Now that we have our packages installed, we need to install Gecko # and gtksourceview#
So go to the Gecko# folder and type in:
sudo ./configure
sudo make
sudo make install
Now go to the gtksourceview# folder and type in:
sudo ./configure
sudo make
sudo make install
Now go to the monodevelop folder and type in:
sudo ./autogen.sh
This will generate the default config file and run the default configuration. However to enable Asp.Net Web Application projects and editing Asp.Net files using the GUI, we need to reconfigure using the option:
I am now addicted to the Wii Commercial music, it has extremely catchy music and the ad has been done extremely well (in my opinion). I went in hunt of the music which is used in the ad and found out that it is a remix of Kodo by the Yoshida Brothers. So I went in hunt for the non-remixed version.
It sounds pretty good as it is, but its not something people would have caught on to. However after it goes through the commercialization process of adding beats and putting it into perspective of the ad it turns into this…
A little hunting around gave me information about the Yoshida Brothers on Wikipedia. Its quite amazing how they have turned around a traditional musical instrument to deliver this kind of fusion music. I am impressed with this and I can’t imagine what all different varieties of music exist in this world that we miss listening to.
To me, good music needs to be heard, there is no need to understand lyrics or lyrics themselves need not exist. The music itself conveys the message and the mood.
All in all I would give this ad a perfect rating in all aspects. Kudos to Nintendo
I am amazed at the fact that Google can crunch billions of pages and return your results in fractions of a second. This seems almost impossible, but it does seem to turn up your results. The results are good, by far the best results returned by any other search engine (in terms of relevance). Have you ever wondered what those number shown on the screen are?
Out of curiosity I ran a search query for the term “facebook” which returned 164,000,000 results (0.06 seconds). If you keep running it a couple of times, those figures change. Here’s what I got on a couple of runs:
None of them seem to take too long and the number of results is consistent (rounded off I’m guessing)
What’s surprising though is if you go through all the results you end up with 54 pages of 10 results each which amounts to 540 results. Well it does give you an option to “repeat the search with the omitted results included”. So I did and I got 100 pages with 10 results per page which makes it 1000 results. Also by including omitted results I get 150,000,000 results (0.22 seconds).
Am I missing something here or should the number of results after including the omissions be more than if I did exclude them? It also seems to take longer to search, which is understandable since people wouldn’t normally venture out after 58 pages of results. In fact, if its not within the first 10 pages (if you are patient), you tend to re-phrase you search query in hopes for more targetted results.
What I’m unable to figure out though are what do those enormous numbers mean if it isn’t returning that much information? My only guess is that it represents the number of times the keyword occurs in all the pages they have indexed (or some union/intersection if multiple keywords exist). To me it sounds misleading to say that there are that many “results” when I can’t actually see them.
For the longest time I wondered why Asp.net would not provide a mechanism to access elements I had created dynamically using javascript in my code behind. It turns out they do, its just that since we hardly ever use that feature any more (and are more used to accessing elements by their ID’s after dragging and dropping them) it has vanished.
What I was attempting to do was create an input box using javascript, fill it with details and post it back to the server.
Code to create the input box and place it in a div:
On the code behind though, rather than accessing it using the id/name directly (you cannot do something like [input-box-id].Text = ’some text’) you have to get its value from the Request variable and use the data.
string c = Request.Form["tbs"].ToString();
Also if you wanted it to get displayed on the page the next time around you would have to recreate the elements manually in c#
To be honest, it does not work on iGoogle either, but I blame that on the widget developers rather than on Google themselves. But for Yahoo! Pipes not to work on Yahoo’s own services is quite bad.
I recently read a post on Lifehacker about using Yahoo pipes for more efficient searches on Craigslist. Hoping to put my new found knowledge to use, I decided to help a friend search for a car on Craigslist. All went well with being able to build the pipe and get information out of it. I was very impressed with what Yahoo! Pipes was able to do. In fact I went ahead and put the RSS feed into my reader to test whether I would get timely updates and it worked (hurray!). For the record I use Google Reader and it all worked seamlessly.
After I sent the link though, my friend tried adding it to her my Yahoo! account and then things went wrong. Apparently, my Yahoo! does not support RSS Feeds from Yahoo! Pipes.
Does that seem wrong or is it just me? When different services from the same company don’t play well together, it just sends out a wrong message. My opinion of Yahoo! is currently that they have a bevy of great services, but they are all so cluttered and unreachable that its just not worth it. Google is heading in that direction, but they have managed to keep it somewhat clean so far.
Internet Explorer apparently has a bug in it that prevents you from using getElementsByName on document elements that have been created using document.createElement. This is a known issue with Internet Explorer and for some reason no one seems to have done anything to fix it (or is this the way it is meant to function?). The following (although perfectly legal code) does not seem to work on IE, although it works just fine on Firefox (and possibly other browsers although I haven’t tested):
<html>
<head>
<script type="text/javascript">
function addTextBox()
{
var div = document.getElementById(’addToDiv’);
var tb = document.createElement(’input’);
tb.type = ‘text’;
tb.name = ‘textbox’;
tb.value = ‘data’;
div.appendChild(tb);
}
A work around to this problem is using innerHTML as opposed to createElement in order to add a new element. This code seems to fix the problem and works fine on all browsers (I imagine):
<html>
<head>
<script type="text/javascript">
function addTextBox()
{
var div = document.getElementById(’addToDiv’);
var tb ="<span><input type=’text’ name=’textbox’ value=’data’ /></span>";
This is more of a generic setting than a setting for Gmail, however, since I started using IMAP only after Gmail offered it I’ve realized it only now. If you use the Archive+Label combo in Gmail to replicate the feeling of folders then you might have noticed after you’ve set up IMAP in Thunderbird that all the mails that come to your inbox show up with a nice count (n) in brackets. On the other hand, none of the mails which get automatically archived and assigned to labels get displayed.
Its only when you click on a particular label does it tell you if any new mail has arrived. This gets annoying when you have quite a few labels. So as an update to my previous post, I found this setting and thought I would mention it here if anyone else wanted to know.
In order to get the unread message counts on all your labels go to “Tools->Options->Advanced->Config Editor” and type in “imap” into the filter box.
The first setting you see is “mail.check_all_imap_folders_for_new” and it is set to false. Double click it to set it to true. Restart Thunderbird and do a “Get Mail->Get All New Messages”. Now if there are any unread mails in any of the labels, it will display them as well (since it has now checked all the IMAP folders you are subscribed to.
I’ve been trying to get my hands on a good ruby editor for a while and somehow every time I take a look at the one’s that exist, I am not at all impressed. These are a few of the editors that I have taken a look at and my impressions of them. As a beginner to Ruby, my only requirements initially are that I have syntax highlighting, code completion and it should just work without me having to do a whole lot. I am yet to test it them out with Rails (although I’m assuming that if they work good with ruby, they will work good with Rails)
1. SciTE - This comes installed by default if you are a windows user using the Ruby ‘One click installer’ available here. Of the 3 editors I looked at, this has the fewest features. One thing that is good about this though is that it is extremely quick to load. Unfortunately it lacks code completion which is a major requirement of mine. The reason why I believe code completion is useful while learning a language is you can actually look through all the methods for the various built-in objects rather than having to go back to the documentation each time. Consider this your bare bones editor with syntax highlighting. I wasn’t very happy with the indentation support as well, for example, it indents it when you start a function, but typing in ‘end’ does not reset the indentation. Its a small annoyance but an annoyance no less.
2. Aptana - I thought that this would be the most promising editor now that they have taken up the RadRails project as well and are integrating it into their existing system. Aptana is based off of Eclipse and provides a well rounded development environment. As of this writing however, Aptana’s code completion for ruby is broken (and has been for quite a while). All the other features seem to work well, syntax highlighting, debug support, etc. but it throws a Null Pointer Exception when you try to do a ctrl-space for code completion.
3. Netbeans - Of all the editors, I found this the simplest to install and start using right out of the box (with the exception of changing one setting, that is if you want to use the native ruby compiler). Other than that I had no hiccups in getting up to speed with the Netbeans editor and I would recommend it to anyone starting out with Ruby. Netbeans themselves have a nice site to show you how to get going with it.
A more in dept review of some editors is available here, and it very nicely outlines the advantages of Netbeans