April 12, 2012
I wanted to add AJAX to Spring MVC application. So, I did what most us do, go through the documentation or blog of the Spring Source. But, after playing around I didn't get it to work properly so here are some details that might save you some time.
After I follow the instructions in AJAX in Spring 3.0 I got some error "406 Not Accepted", so let's explain how to make it work:
First you need to setup the actions/methods that the ajax client will call and provide that data in a request. In the ... Read more
February 11, 2012
When you are coding in a team enviroment it's good to have the subversion properties in your files, that way any other developer can see quickly who made the last changes and when.
You can add the following lines at the bottom of your code:
// REVISION HISTORY
// $LastChangedDate: $
// $Revision: $
// $LastChangedBy: $
// $Id: $
//-----------------------------------------------------------... Read more
February 09, 2012
I'm using textMate to develop ruby code. It's very handy because I can run it just pressing (cmd-R). But by default it's running ruby 1.8.7 and I want 1.9.2 version.
This is the steps to change it:
Find the right path with
~$ which rvm-auto-ruby
~$ which python3.2
Then copy it to TextMate preferences in a new variable called "TM_RUBY", and "TM_PYTHON" as shown bellow:
February 04, 2012
Apache Nutch is an open source scalable Web crawler written in Java and based on Lucene/Solr for the indexing and search part. It has a highly modular architecture, allowing developers to create plug-ins for media-type parsing, data retrieval, querying and clustering. [*]
By using Nutch, we can find web page hyperlinks in an automated manner, reduce lots of maintenance work, for example checking broken links, and create a copy of all the visited pages for searching over. That’s where A... Read more
November 04, 2011
The better way to learn is by a concrete example. I update a site called "heyshuga" from Drupal 7.8 to 7.9. Here are the steps
1. Download the latest version of drupal
$ wget http://drupal.org/files/projects/drupal-x.y.tar.gz
$ tar -zxvf drupal-x.y.tar.gz
-or using drush-
$ drush dl drupal
2. Copy the new files to the old directory
$ cp -R drupal-x.y/* drupal-x.y/.htaccess /path/to/your/installation
3. Run the drupal update
January 19, 2012
If you want to login to a remote server using SSH and don't have to type the password again and again, here is a little trick
$ cat ~/.ssh/id_rsa.pub | ssh <user>@<server.domain> 'cat >> .ssh/authorized_keys'
After you run this and enter your password (for the last time), you can login to your server just typing:
$ ssh <user>@<server.domain>
You are all set.
January 04, 2012
Procastination and concentration problems are big deals from a lot of people, specially for students. There are too many distractions that are more fun than our homework.
I read an interesting article about concentration that I'd like to share a summary with my own notes:
There is no substitute for paying attention... here are Five tips to improve your attention/concentration/focus/productivity:
F = Five More Rule
There are two kinds of people -- those who have learned ho... Read more
December 22, 2011
When you are programming you face challenges all the way. Getting the problems solved is just the tip of the iceberg, getting it done efficiently is the rest.
Why should you care for efficiency?
Solutions to the same problem might take years with certain algorithm, and just minutes using efficient algorithms. For instance, if you have applications that are used for thousands of people over internet, every fraction of second counts. Therefore, efficient algorithms is a must.
How I do my algorithms more eff... Read more
November 10, 2011
Regular expressions are used to find matches in texts. The following is a real application of Regex in C# and Java.
CSV are files that all the data is separated by a comma. E.g:
You cand easily use String.Split() in C# to get all the values. But, there are cases when the data can contain comma. E.g:
"Mr. John Doe, Jr.",7926 Glenbrook Dr., 14623
In this case a regular expression (regex) could be use to determine if the comma is inside a quote or... Read more
November 18, 2011
Well... I have done this so many times in Windows (it's just executing "msconfig" you can edit the startup items). Today, I had the need to do the same in the Mac OS X Lion.
Here is how to do it
System Preferences > Users & Groups
Tab "Login Items"
You can remove the programs (-) from the list and they won't show up in the next startup.
November 10, 2011
I have been working with websites for a while and also with different web hosts. The default way to upload content is through FTP but it takes a lot of time because upload the entire site each time. Some web hosts have ssh and git, which is great for deployement because you can keep track of the versions and also upload only the files that changes.
In order to use git for local development and ftp (for hosting that doesn't support git/ssh) there are some options:
https://github.com/resmo/g... Read more
November 09, 2011
It have been a pain for me to upload images and deal with tons of WYSIWYG editors... After many trials in this post I recompiled my experiences and the best method that I have found so far. If you have any suggestion I'm willing to hear it, too.
1. Install and enable the following modules:
http://drupal.org/project/ckeditor (disable the WYSIWYG module if you have it install it)
http://drupal.org/project/imce -or- http://drupal.org/project/elfinder
- optional -
http://drupal.org/pr... Read more
November 09, 2011
Sometimes is quicker to use SQL statements than create tables using the MS Access Visual Designer. For instance, if you already have the SQL code from other databases this could be useful.
Here are the steps of how to create a new table programmatically in Access (2007):
1. Open/create your database on MS Access
2. Menu: 'Databases Tools' > 'Visual Basic' (this will open the visual basic editor
3. in the Visual Basic Editor, Menu: Run
4. Insert the name of your macro and click 'create' button
5. Insert a code simila... Read more
October 26, 2011
V. Mihál and M. Bieliková presents “An Approach to Annotation of Learning Texts on Programming within a Web-Based Educational System”. This work leverage the usage of annotation to enhance programming learning experience. Annotations provide to learners supplementary information that they otherwise will have to find by themselves somewhere else. They describe different types of annotation: manual and automatic. For the manual annotations the user the ... Read more
October 26, 2011
The advantages of different presentation media are explored in the work of N. Hashim and S. Salam in “Integration of Visualization Techniques and Completion Strategy to Improve Learning in Computer Programming” . They compare the advantages of Mobile-based training (MBT) over Web-based training (WBT) for learning computer programming. Additionally, they explain some features that aid the learning process, such as visualization techniques and completio... Read more
September 27, 2011
S. Lawless, V. Wade et al. (2008)  introduces the Open Corpus Content Service (OCCS), which is a system to discover, harvest, classify and index educational content from the Internet. It aims to provide a dynamic learning object generation based on the background of the learner. The OCCS employs Heritrix (open source, web-scale, archival web crawler) for discovery educational content available in the WWW. Heritrix uses languages guessers ... Read more
September 27, 2011
S. R. Kruk et al. (2007)  implemented a social bookmarking system called Social Semantic Collaborative Filtering (SSCF). The goal of the SSCF is to enhance individual bookmarks with shared knowledge of the community. It also presents how digital libraries can be combined with social semantic information sources and it exemplifies how these techniques can improve e-Learning. Digital Libraries and other open courses can leverage their potential with the colla... Read more
October 04, 2011
H. Dong et al. (2011)  introduce an approach to enhance disperse and heterogeneous industrial digital ecosystem for e-Learning. Its target is to discover and classify the industrial information automatically using focused crawlers. The focused crawler perform 5 operations: webpage fetcher (multithreading web crawling given a URL list), policy center (fetching boundaries, max. depth, multithreading priority), webpage pool (store data ... Read more
September 22, 2011
B. Steichen, S. Lawless, V. Wade et al. (2009)  proposed an Adaptive Hypermedia (AH) for dynamic hypertext generation of learning content. This system provides personalized learning services, which aims to enrich the learning process and the satisfaction of the learners. In order to accomplish these tasks: the system perform open courses harvesting and identification, generate dynamically hyperlinks based on the learner experience and appropriated learning strategies, and present the ... Read more
September 17, 2011
This paper  proposed a specialized search engine, called Fusion, which index meta-information about available courses. Google can be used to perform this search, but the result will be too broad. Fusion provides specialized results only. In order to accomplish this task, Fusion used the web crawler Nutch, which is used to extract the content of courses. The crawler does real-time decisions to parse and store only the necessary data instead of the whole content. The extraction of the metadata is done using the followi... Read more
September 07, 2011
The extraction of Java-Swing GUI information using AspectJ seems like an way to do Reverse Engineering. The extracted information could be use later to migrate applications Java-Swing applications to the web, enhance program understating, generate UML diagrams and a myriad of other uses. This article will be summary of the paper about this topic .
The authors of the paper  are using aspect oriented programming (AOP) to intercept the application while is running and extract desired information. Th... Read more
September 14, 2011
In this work  the authors explain the process of reengineering a legacy system in COBOL for object-oriented. Reengineering is a multi-step process to convert sequential and procedural-driven system into object-oriented and event-driven system. The proposed method  to accomplish this task is to transform the legacy system source code into an intermediary language: Wide Spectrum Language (WSL). The WSL code is used to apply an algorithm to identify... Read more
September 21, 2011
The paper  is proposing a social bookmarking system called Social Semantic Collaborative Filtering (SSCF). It presents how digital libraries can be combined with social semantic information sources and it exemplifies how these techniques can improve e-Learning. The goal of the SSCF is to enhance individual bookmarks with shared knowledge of the community. The Fig. 1 shows the dificulty (or time-consumptions) of bookmarking all the interested links and then share all of them in a blog for oth... Read more
July 18, 2011
In the .NET framework, the method Assembly -> Get Manifest Resource Stream has a gotcha that could take some time to figure out why is not working as intented. I was working in a piece of code (show below), and the GetManifestResourceStream always returned NULL exception error. Even though the file was there...
public XmlTextReader GetSyntaxModeFile(SyntaxMode syntaxMode)
Assembly assembly = typeof(SyntaxMode).Assembly;
var stream = assembly.GetManifestResourceStream(... Read more
July 21, 2011
Installing Git in Windows is not as straight forward as in a *nix machine like Linux and Mac. This guide help you to get started quickly.
You will need the following tools:
Putty: download latest version here.
TortoiseGit: download the latest version here. (e.g. Tortoisegit-188.8.131.52-32bit.msi)
msysgit: As today the latest version (e.g. Git-1.7.6-preview20110708.exe)
Setting up Putty
Unzip the folder.
Generate the ssh key using the PUTTYGEN.EXE from the putty folder. After genete it, cli... Read more
August 15, 2011
You might want to commit from a git repository from time to time for several purposes (backup, control version, continuous integration, etc). One way to accomplish that is using the CronTab (Cron is used to run periodic task in Unix-like systems).
Here is an example.
1.- Create an script. e.g. baskitup.sh with:
# MySQL-dump: save a copy of the actual content in the database. (this is for a Drupal site, the backup is done using drupal's drush)
php -c ~/www/php.ini ~/drush/drush.php -r /home/adrimej0/www -u 1 sql-dump --result-f... Read more
July 15, 2011
At work, I use an Windows XP machine and it some times get really slowly. I noticed from the task manager (ctrl+shift+esc) that the process MsMpEng.exe is consuming most of my CPU time!
MsMpEng.exe is a process associated to Windows Defender that help you to "protected" the computer, but sometimes it requires too much resources. So, if eating up your available CPU it is better to disable it.
start menu -> run (windows key + r)
write services.msc and enter
Stop the follo... Read more
August 06, 2011
This is guide to get started with PHP DOM or a quick reminder to those who have a little while since the last time they used it. The extended documentation is in PHP.net, but it is quite long. Here you might found a quick reference to get started in no time.
Purpose of the DOM (Docuement Object Model): It is a convention used to represent and manipulate objects in XML, XHTML and HTML documents. Parsing XML and HTML files is very useful. It allows to manipulate RSS Feeds, interact with APIs and web services through XM... Read more
August 11, 2011
Ruby on Rails (RoR) is open source web framework written in the Ruby programming language, and all the applications in Rails are written in Ruby. Ruby on Rails is focused on productivity and enforces agile web development.
Rails framework leverages the features of the Ruby language. Yukishiro Matzumoto designed this language in 1995 influence by Perl, Eiffel, Python, Smalltalk and others. It’s a dynamically typed, fully object-oriented, general-purpose scripting l... Read more
August 08, 2011
All the Zune 30 froze, precisely at 12:01 A.M. on December 31, 2008. These devices got stuck with an irresponsive Zune logo. This bug that didn’t allow users to use the device was cause by a bug in the internal clock driver that handled improperly the last day of a year leap. The Zune 30 model 2006 was the only one affected by this bug; all the other models keep working ok, such as the Zune: 80 and 120 GB with hard drive, and 4, 8, 16 GB with flash drive, because they did not have the component with the error.
At the core of th... Read more
July 13, 2011
Samba allows to share files and printers with other computers remotely, regardless their operating system (linux, windows, Mac, ...). This guide show how to intall and configure the Samba service in a Ubuntu machine and access it through windows and mac.
Setting up the Samba File Server on Ubuntu/Linux:
Open the terminal
Install samba with the following command: sudo apt-get install samba smbfs
Configure samba typing: vi /etc/samba/smb.conf
Set your workgroup (if necesary)... Read more
July 13, 2011
Google, Facebook, YouTube, Yahoo, Wikipedia, Hotmail (Windows Live), Twitter, LinkedIn, Amazon.com, WordPress.com, eBay, Bing... You may know probably all these companies; we use some on our daily basis. They bring services to around 2 billion people! And influence our lives everyday. The most influential Internet companies are in the search engine and social media category, so I will focus the analysis in these two.
Google -> 1,000,000,000 = 1 billion... Read more
July 13, 2011
Search Engine Optimizations (SEO) could be quite challenging for beginners. It's overwhelming the amount of information that a webmaster need to understand in order to make his websites visible, in search engines like Google, Bing, Yahoo, ... Moreover most of this information is quite disperse. The idea here is to provided all the needed information in one place. Starting from steps for all websites and then focusing on Drupal SEO modules. General Steps:
Sign upin the webmaster tools for the main search engines:
... Read more