November 21, 2008

Daniel M. German

ICSE 2009: License Integration Patterns: Dealing with Licenses Mismatches in Component-Based Development

I have been interested in intellectual property--particularly as it applies to software-- for a long time. I believe that intellectual property issues (such as licensing) are a major concern in software development; yet, there is almost no research that looks at IP from an engineering point of view.

IP is an area overlooked by researchers, but not by practitioners. They have to deal with these problems, and have found fascinating ways to address licensing constraints.
Continue reading "ICSE 2009: License Integration Patterns: Dealing with Licenses Mismatches in Component-Based Development"

November 20, 2008

Juan Luis Prieto

Showing data contained into a XML Element


The other day I had an small issue trying to show the data contained into a DOM element, due that I was targeting a null value, because of the way that Node and Element are managed.

Let’s go to the beginning. What I had was a hole Document store in a variable, from that document I got a NodeList of Elements (in this case as it is a NodeList they are Node) that have this aspect, a normal element with data inside:

<c:customer xmlns:c=”http://engage.bt.com/customer”>
<c:id>1</c:id>
<c:name>John</c:name>
<c:lastname>Smith</c:lastname>
<c:department>Finance</c:department>
</c:customer>

I wanted to take the values that the child within this Node have, but they way that the type Node is manages doesn’t allow you to get the children of this element and get the node value that is inside a child such as <c:id>, for instance, because you end up getting the null point that I commented as my problem.

So here it comes the trick, what you have to do is cast the Node (the one shown above) into an Element.

Element customerElement = (Element)customersList.item(i);

Once you have this done, you have to get the Elements within the father by using the function getElementsByTagName(String tagName) , where you will get again a NodeList of elements with the tag name that you say. So now we only have this: <c:id>1</c:id>. So now as a list that it is we should point in the first item, so item(0). Once in this item the value is treated as a child so we need to get that child out by using the function getFirstChild(). Now we reach the point where the value is within our node, so we only need to getNodeValue(), which return a String, so we have to be careful and parse the real Type that we need.

Ok this is been specify step by step, but to make it clear what I used in the end is a function in which you give an Element (<c:customer> in this case) and a tagName (any tag of the children) and gives you the value back. The function is not other than this:

private String getData(Element customer, String tagName){
return customer.getElementsByTagName(tagName).item(0).getFirstChild().getNodeValue();
}

Therefore using this call you get the value for free

String customerData = getData(customer,”c:name”);

      

November 18, 2008

Juan Luis Prieto

Finally updating the iPhone


Yesterday, after a long time since the firmware 2.1 for the iPhone I have updated it yesterday.

First of all I made a security copy to recover everything after the update, otherwise it is a mess to have to put all the contacts, notes and stuff again from the beginning. You loose data yes,  but the important one is there ready for you, that in the end it is what it counts, isn’t it? ;)

So, it took me a while since I got it. I was using my new macbook (the white one), PwnageTool and QuickPwn for 2.1 Firmware to create the new hack firmware and iTunes 8 to install the software in the iPhone once the customize one is done. At the beginning I didn’t know  well how to use Pwnage so I choose the “easy mode” on it and I created a new customize version. Following the instructions that this tool told me I put my phone into DFU mode, I did it and I plugged it to the laptop. Then the way was suppose to be easy, just let iTunes restore the phone and that’s all, but NO. Murphy’s law appeared and I got an error 21, that I still don’t know what is it about, but many people has the same problem whet they update the firmware. So I tried again doing the same process up to the point that it happened to me a few times and I became to be a bit nervous. Once reached this point I decided to use QuickPwn a tool of the same team that does everything directly for you, so I followed the instructions I saw on the screen and continue with the procedure. Well this worked!! But something was wrong again because my phone didn’t catch network :s (I have to say that it was more than 2:00 am) so finally I decided to have it done unless it would cost me the hole night. I tried again with Pwnage and one of the customize software that I had already build from my other attempts and this time, once passed 2:30 am my phone was finally unlocked, jailbreak, up and running with the new 2.1 software. Software which I think is much better than the 1.1.4 because it is faster, you have app store, and a terminal “for free”, so you can play more with the phone when you are on a network :)

Once I did it I recover the info I backed up at the beginning and I started playing with it. Yesterday I didn’t do much because I was tired , but soon I’ll say how is this new software from my point of view ;)

      

November 17, 2008


Pablo Barrera

How to extract links from a HTML page using XSL

A small XSL template to extract all the links from a HTML page:

<?xml version=”1.0″ encoding=”UTF-8″?>
<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”>
<xsl:output indent=”yes”/>

<xsl:template match=”/”>
<html>
<head>
<title>Link List</title>
</head>
<body>
<p>
<ul>
<xsl:for-each select=”//li”>
<xsl:copy-of select=”.”/>
</xsl:for-each>
</ul>
</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

To use it, install libxslt-bin in fink or xsltproc in debian, and execute the following line:

xsltproc filter.xsl index.html

November 16, 2008


Luis Cañas Díaz