Education and creativity

These days im studying a course about innovation and creativity at UOC (Open University of Catalonia). During this course, we have seen this video about education and creativity. I found it very interesting and I want to share it with all of you.

Bookmark and Share

Solving fake checkouts using ClearCase and Eclipse

I’ve been using ClearCase and Eclipse in a Unix environment for the last eight months. One of the most commons problems I had while working with static views is the following: sometimes, Eclipse marked one or more files as checked out, when it was not true. So the situation was:

  • I couldnt edit the file because it wasnt checked out
  • I couldnt check out the file, because for Eclipse, it was checked out
  • I couldnt undo checkout due to there was no checkedout file

This problem is caused by a conflict between Eclipse and the ClearCase plugin. The solution was the following:

  • Close Eclipse
  • Open a terminal window and enter in the directory in where the file is located.
  • Modify the file “.copyarea.db“. This file is used by Eclipse to store some information about the files contained in each directory. It looks like:

    ClearCase CopyAreaDB
    <current directory>
    10:file01.txt|<some metadata (time stamp, checksum..)>
    14:file02.txt|<some metadata (time stamp, checksum..)>
    11:file03.txt|<some metadata (time stamp, checksum..)>

  • Modify the file permissions:

    $> chmod +x .copyarea.db

  • Locate the line containing the information related to our file
  • The most important part: Last digit in that line indicates if the file is checked out or not. It will be “1″ if it is checked out, or “0″ if it isnt. So, if we see the last digit is “1″, we found the problem. Change it to “0″, and save the file. This is how the line looks like before:

    10:file01.txt|<some metadata>|1

    And this is how it will look after:

    10:file01.txt|<some metadata>|0

  • Restore the file permissions:

    $> chmod -x .copyarea.db

  • Now, if you restart Eclipse, the problem should be solved.

    Bookmark and Share

    Adding repositories on Ubuntu

    There are three ways to add new software repositories on Ubuntu:

    1. Using the graphical interface

    Depending on the version of Ubuntu you are using, you will have to look for the “Software Sources” option in a different place. For example:

    • System -> Administration -> Software Sources
    • System -> Administration -> Synaptic Package Manager -> Settings -> Repositories
    • Ubuntu Software Center -> Edit, Software Sources


    2. Editing sources.list file

    Ubuntu uses apt for package management. The list of repositories is stored in the file

    /etc/apt/sources.list

    This file contains lines similar to:

    deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted

    Each repositoy is defined by four elements:

    • Type of packages stored. deb in case of binaries or precompiled packages, or deb-src in case of the source code of the packages.
    • The URL of the repository
    • The name of your Ubuntu version (intrepid, hardy, lucid…)
    • The section name (main, restricted, universe, multiverse, partner…). There can be one or several names.


    3. Using apt-add-repository command

    In Ubuntu 9.10 (Karmic Koala) or later, it is possible to add repositories using Launchpad PPA (Personal Package Archive) addresses using the command apt-add-repository.

    sudo add-apt-repository ppa:<repository-name>

    If you dont have it installed in your computer, you have to install the packet python-software-properties

    sudo apt-get install python-software-properties

    Bookmark and Share

    Google AI Challenge

    Registration is open for Google AI Challenge 2010. Last year, the selected game was Tron. This edition will use a game called “Planet Wars”, inspired in Galcon.

    Bookmark and Share

    Listening to sorting algorithms

    If you have studied sorting algorithms, Im pretty sure you agree on how helpful is the visualization of how different algorithms work (and Im also sure you know it, but just in case, here is a very interesting link: sorting-algorithms.com). But today I heard about something new for me: audibilization of algorithms. Here you have an example:

    The author of this video says:

    This particular audibilization is just one of many ways to generate sound from running sorting algorithms. Here on every comparison of two numbers (elements) I play (mixing) sin waves with frequencies modulated by values of these numbers. There are quite a few parameters that may drastically change resulting sound – I just chose parameteres that imo felt best.

    Funny!

    Bookmark and Share

    Automatic recognition of sarcasm

    sarcasmWhen I read about an automatic sarcasm recognition algorithm, I wanted to know more about it. Sarcasm is not always easy to identify by human beings so… what about a computer? “Semi-supervised recognition of sarcastic sentences in Twitter and Amazon” describes the work done in The Hebrew University testing their SASI algorithm with data extracted from Twitter and Amazon. Although they obtained good results, there is still a lot of work to do in this field (as I expected before reading this article). I found interesting the way they model the problem, and the fact that they obtained better results classifying tweets instead of classifying Amazon data (more structured).

    Bookmark and Share

    Machine Learning in Stanford University

    stanford-logoMachine Learning is a branch of Artificial Intelligence, that aims to develop systems with the ability of learning from the experience. Machine learning techniques can be used in different fields. For example, recommendation systems (as Amazon), biology, games…

    If you are looking for a introduction to Machine Learning, you must visit the Stanford University Youtube channel. You will find a complete course about this topic, taught by Professor Andrew Ng. This is the info of the course:

    This course (CS229) provides a broad introduction to machine learning and statistical pattern recognition. Topics include supervised learning, unsupervised learning, learning theory, reinforcement learning and adaptive control. Recent applications of machine learning, such as to robotic control, data mining, autonomous navigation, bioinformatics, speech recognition, and text and web data processing are also discussed.

    Bookmark and Share

    JScrollPane, JTable and horizontal scroll

    I was coding a graphical interface using Java, and what I wanted was to insert a JTable object inside a JScrollPane. The table was bigger than the JScrollPane, but I didnt know why, only the vertical scroll bar was shown. I spent hours reading Swing tutorials, checking my code… everything seemed to be ok, so.. why it wasnt working?
    Finally, I found the answer: there is a bug in Java when you are using JScrollPane and JTable. And the solution was to create a new class extending JTable, in order to override JTable.getScrollableTracksViewportWidth() method with this one:

    public boolean getScrollableTracksViewportWidth() {

    if (autoResizeMode != AUTO_RESIZE_OFF) {

    if (getParent() instanceof JViewport) {

    return (((JViewport)getParent()).getWidth() > getPreferredSize().width);

    }

    }

    return false;

    }

    Source: DaniWeb Forum

    Bookmark and Share

    Fixing WordPress Error 500

    After this, I’ve learned that its convenient to deactivate all your plugins before updating to the last version of WordPress. Im not sure when I did the last update, but it seems this blog have been offline since then.

    This morning I tried to read an article of the blog, and I got an “Error 500″ message. First of all, I checked that my WordPress was working, because I could access to my dashboard. Next step: deactivate all the plugins. But it didnt work. So lets take a look into the Apache log. What I found was:

    SoftException in Application.cpp:252: File “/home/xxxxx/public_html/blog/index.php” is writeable by group

    Thats it: a permissions problem. So I used Cyberduck (but you can use any other FTP application) to fix it. Delete the “write” permissions of Group and Others:

    Permissions-Cyberduck

    Note: be sure to apply this to all your files and directories. In my case, as you can see in the image, I used the option “Apply changes recursively”. Your FTP application should have the option to do something like this.

    Bookmark and Share

    Solving problems with Subversion

    While I was updating my local copy of a SVN repository, I got this error:

    Can’t copy / move ‘.svn-base’ to ‘.tmp’: The system cannot find the file specified.

    The problem was that there were two files in the repository whose names differed only in case (e.g., File.txt and file.txt). This is possible in Unix-based systems, but not in Windows. So due to I was using a Windows computer, I couldnt update my local copy. I you have this problem, just delete or rename one of the files in the repository.

    Bookmark and Share

Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.