, , ,

I have been looking at a good website to create feeds. I tried a few like page2rss, feedyes etc. However, feed43 gives the maximum flexibility and best out put for your efforts.

How this works is very interesting. It tells me that I can setup one such utility site using wget, grep and a bit of php coding. This is how it works.

  1. Enter the url of the page that you want to convert to rss
  2. The site will retrieve the content and show you the html code
  3. Recognize the part of the page that you want to use. This is very useful as most pages will have some static and some dynamic content. This is done by identifying the start and end text and entering start_text{%}end_text
  4. Then, in a similar way, identify the start text and end text patterns for each news item within the above segment.
  5. Thats it, you are ready to go. However, the site creates a preview of items recognized using your inputs and allows you to optionally choose title, link and body of the rss feed.

The site has good help documents and you can get them by clicking on the ? next to each section. I created feed for MEA (Ministry of External Affairs, India) using this site. The details are below for those who want to try it

Global Search pattern: <div class=”newsListing”>{%}<div class=”footer”>
Item Search pattern: <span>{%}</span>{%}<a href=”{%}” class=”more”>{%}</a>

QT keyboard events

I am here to make a quick post. I searched for this at many places but could not get the exact solutions. Every message I could read sounded cryptic.

I want to generate fake keyboard events and send to QWebView class.

Extend this class to have slots for signals. Connect it to a signal that can pass an ascii character.

Keyboard does not have ‘a’ and ‘A’. It only has an ‘A’. That means, I cannot directly send any lower case characters using the event (Which is not correct)

The solution is simple. The constructor of QKeyEvent can take QString as one of its argument. The signature is as follows:

QKeyEvent ( Type type, int key, Qt::KeyboardModifiers modifiers, const QString & text = QString(), bool autorep = false, ushort count = 1 )

Even if we don’t pass the QString, it will work. However, by passing the QString, we can control exactly what will be displayed.
This is how I create my QKeyEvent:

void MyWebView::rcvKeys(int k)

char str[2];

QKeyEvent *k=new QKeyEvent(QEvent::KeyPress,k,Qt::NoModifier,QtString(str),false,0)

//———–Pass it to postevent etc

Google fined USD 5 million for using patented code in Linux kernel

Very interesting news. I am still not really sure if this is part of mainline. However, considering the fact that the holder was able to analyse the code and ascertain that it was there in the Google’s server’s kernel indicates it was surely there on the public domain whether it was a custom piece of code written by Google engineers or not. This is surely something very interesting thing to happen and it would be very interesting to see if Google takes it beyond district court and what exactly happens to this case at the end

/. link:

Build error on Android rowboat

I was building the code for TI omap3evm and I found that on FC14, I was getting the error from the make file of kernel. It told “Mixed implicit and normal rules”. On a bit of googling, I found

The file “hardware/ti/sgx/GFX_Linux_KM/eurasiacon/build/linux/omap3630_android/kbuild/../../kbuild/Makefile.kbuild” need to be modified as follows:

Change “all %:” to
    (Build command)
    (Build command)

Fips opessl

I was cross compiling this. The strangest thing about this is that it cannot be cross compiled. Because, they generate programs, run them, get signature from the programs and use that signature to compile them again!

I did that by little bit effort. What I am now looking at is the possibility of having it compiled inside qemu. Anyway, this is what I did
1. Configure for linux-ppc with compiler, prefix and ranlib specified during this step
2. Find and replace ar using powerpc ar in all makefiles
3. Make and when it breaks during sha1 calculation, replace the binary that does sha1 caculation with an x86 equivalent and complete this step
4. Make again and when it tries to execute openssl/tests, replace the necessary statements in fipsld with read function and supply the signatures for each program after taking them to target and running them there once
Well, another issue that I noticed with this package is that it does not behave well with parallel builds. I will post here again if I can compile this in Qemu. I am planning to use FC12 ARM/PPC for this.

Middle men

OK, losers consortium has taken shape. But, what are they driving at? The whole discussion is centered around how to enable the service provider to be the middle man and extort money from poor end user. With what face is Nokia and RIM going to face end customers now? A smart phone today costs 20-30k (INR). After taking such huge amounts from end customer, they want to create means for the letting the service provider loot the customer! Shame on them.

May be your service provider is subsidizing your phone. However, that reminds me about the phones (LG-LSI110) that Reliance used to sell for 3K! I am pretty much sure that it didn’t have electronics and plastics worth even Rs. 1000. However, the phone came with the note that its cost is 10K and it is owned by Reliance. This was about 7 years back. I doubt there will be any change today. Anyway, would you prefer to get a smart phone at a subsidized cost when you pretty well know that this amount will be recovered from you through monopolistic practices of the service provider?

Well, I recently used a Galaxy tab to download and test an application (ZXing). The ability to customize your smart phone by pushing an apk to it after enabling USB debugging was probably the only reason needed for paying 30K for that device. Well, Nokia, go back and make some good Android phones and I will buy them (Yes, I would prefer to buy android from Nokia over any other vendor) when they become available.

Mozilla Dash

I am on FF 4 beta 10 and I installed this addon. It was highly hyped at many sites. However, it was a bit of disappointment.

  • It is not intuitive enough
    • Even after being a heavy internet user, I had to struggle to get back my tabs
  • It does not show the url
    • This might be a good thing that you can search and find links. But, how do I make sure that the search result is correct and I am on the expected link? This is a problem especially when I am on sites that do financial transactions. 
  • The UI was not up to the mark. I could see that the fonts of menu items were cut at bottom half
Well, so, whats good about it? Its still experimental. We can hope that it will get improved🙂


For a long time, I used to look at .PHONY targets in makefiles and wonder how useful those targets were. Today, I found the usefulness while playing with prelink (more on prelink later).

I created the following files and folders while doing this:

[root@sarin prelink]#ls -l
total 20
drwxr-xr-x 2 root root 4096 2011-01-24 11:14 bin
drwxr-xr-x 2 root root 4096 2011-01-24 11:14 lib
-rw-r–r– 1 root root   57 2011-01-24 10:41 libutil.c
-rw-r–r– 1 root root  273 2011-01-24 11:14 Makefile
-rw-r–r– 1 root root  343 2011-01-24 10:56 prelink.c
[root@sarin prelink]#cat Makefile
all: bin

lib: libutil.c
        gcc -shared -Wl,-soname, -o lib/ libutil.c

bin: lib prelink.c
         gcc -L/root/c/prelink/lib prelink.c -Wl,-rpath,lib -lpthread -lutil -o bin/prog

        rm -f lib/ bin/prog

Now, I did a make clean and did a make. Nothing happened. I got the message that “make: Nothing to be done for `all’.”. If you notice, in the make file, target all had a dependency on ‘bin’. Target ‘bin’ was dependent on target ‘lib’. So, I was expecting that lib will be built first and then bin. But, It did not even try to build bin (I verified this by putting an echo in bin). After a long struggle, I found the reason.

As you can see, ‘bin’ and ‘lib’ were the names of two folders inside the current directory. So, make assumed that targets ‘bin’ and ‘lib’ where those folders. As these sub-folders were already present in the current folder,  it assumed that there is nothing to be done for target all.

This is the issue that .PHONY target fixes. It clearly tells make to avoid looking at files and folders for these names. I added the following line to the top of the makefile.

.PHONY: all bin lib

Thats it,  I was able to compile the program using my makefile!

Kernel oops

I had to look into a kernel oops recently. This was produced on a ARM machine. It was relatively easy to understand this message. These messages have become much more simple to analyse these days. I am making this quick post to remember one register: LR

LR: This register holds the address to which PC will be set to once you hit return. This simply means, this is the caller of the function where the trouble occurred.

The point where failure happened can be seen by looking at PC. Also, SP points at the current stack location. When I scrolled down, I could see some good back tracing information too.