Tuesday, April 2, 2013

Direct deploying ext fails on server

Today's Liferay bug: building ext in a clean container works perfectly from the Liferay IDE but on a Linux box (in our test environment) it fails with an error message:

[java] java.lang.StringIndexOutOfBoundsException: String index out of range: -321
[java]  at java.lang.String.substring(String.java:1911)
[java]  at com.liferay.portal.tools.WebXMLBuilder.getCustomContent(WebXMLBuilder.java:139)
[java]  at com.liferay.portal.tools.WebXMLBuilder.(WebXMLBuilder.java:91)
[java]  at com.liferay.portal.tools.WebXMLBuilder.main(WebXMLBuilder.java:46)
BUILD FAILED

After heavy googling I found (an otherwise closed, heh) issue in the Liferay Jira:

http://issues.liferay.com/browse/LPS-16233

The issue boiled down to the fact that my ext-web/docroot/WEB-INF/web.xml file had an empty definition, and it wasn't closed by an explicit </web-app> tag. Gosh, matching XML by regexp patterns...

Many thanks to Christophe Cariou who spent his time on debugging the LR codebase and posted a workaround for his own problem.

Thursday, March 28, 2013

Liferay JSF PrimeFaces Portlet: Paginator not working

I recently had such an issue with a JSF PrimeFaces Portlet within Liferay, thougth others may benefit from it.

Issue: A simple <p:datatable> (demo here) appears correctly with the first N results, even the paginator is rendered correctly. However, clicking any of the next/previous buttons modifies only the paginator itself, not the data rendered in the cells.

Solution: Simply embed the data table definition into a <h:form>, that solved the issue for me.

Thursday, March 7, 2013

2012 in retrospect, looking forward 2013

What happened in 2012?

Man, it was quite a busy year! My PhD school is officially over, the sole remaining task is to write my thesis now :-)

From the point of travelling, it was an awesome year! I was able to visit most of the historical European capitals. I was at the WEHIA conference in Paris and the ECPAM conference in Bucharest. Also, I participated at several EU project meetings (mostly for CRISIS) like Berlin, London, Oxford, Rome, Palermo, and Milan for a few days.

Unfortunately I had few projects for which I wasn't able to concentrate that much, but they are still on my list. One of them is the work of the Specs2 plugin for the ScalaIDE based on the ScalaTest plugin... I was able to create a working PoC demo, and really would like to push forward that project, but with all those pressure on me from the research side it's not that trivial to find time for it. Counting in that how little would it take to polish the code and make it available makes the situation even worse. Anyway, hopefully my workload will decrease and I'll be able to update the code until this year's september. Keep your fingers crossed!

About 2013?

And the show didn't stop yet :-) At the moment what is fix is that I've been invited to the NSF MASON Workshop held at the GMU campus in Washington, DC in June and to the Lorentz Center next month located at Leiden (see a previous post about that). I feel really lucky for getting such opportunities.

A number of conferences are on the list too until the summer, but first I've to write up a few papers for that -- and of course, get accepted :-) Probably I will be able to submit a paper to:
  • WEHIA 2013 conference in Reykjavik. It must be a great place, I have a friend there and never saw the Aurora Borealis before!
  • ESSA 2013 about my PhD thesis. Academics I really respect like Rob Axtell and Dirk Helbing (I had the luck to met him during ECCS 2011 in Vienna) will be the keynotes, which makes it really interesting. Also it'll be free for me (I'm one of the ESSA Newsletter Editors), moreover they have a Springer proceedings from now on!
  • Going to Barcelona for ECCS 2013 would be great, but unfortunately it is in the exact same time as the ESSA conference... Shame.
  • EPIA 2013 is also on the list, although the deadline is a bit close, we'll see. My first conference was EPIA back in 2009 with one of my friends in Portugal, it was a great experience. Closing my PhD with another EPIA conference would be awesome.
Ah yes, and I still have to wrap up my PhD... I'm at ~50 pages but haven't included anything yet :-) The cool thing is that I got a few very constructive feedback (and citations!) from researchers, so it seems I'm getting into the club slowly ;-) Still, I have to prepare another basic language exam to start the whole PhD process. Gosh.

Finally, a few longer papers of mine will be released soon. One of them is a book chapter on programming languages (concretely a chapter about parallel language constructs in the book of J. Nyékyné Gaizler), a milestone journal paper about my research on dynamic networks in a special issue of the European Physical Journal. The next target will be to get published in JASSS -- well, optimism never hurts! We'll see.

Anyway, I'm absolutely sure I won't get bored this year... :-)

Update Wohoo! An IEEE conference proceedings (BWSS 2012) for which I was a reviewing an article is published in the meantime! Look who's name is on the end of the list here ;]

Tuesday, February 19, 2013

LinkedIn fun

Wow, just a short status update, I've recently got a letter from LinkedIn stating:

You have one of the top 10% most viewed LinkedIn profiles for 2012 in Hungary.
LinkedIn now has 200 million members. Thanks for
playing a unique part in our community!


Cool, isn't it? :-) Here's a direct link to my profile just for a bit more traffic :-)

Wednesday, February 13, 2013

igraph degree distribution: count elements

Unfortunately, the degree.distribution() function of the igraph library returns the intensities of the distribution:

> g <- graph.ring(5)
> plot(g) 
> summary(g)
IGRAPH U--- 10 10 -- Ring graph
attr: name (g/c), mutual (g/x), circular (g/x)

So instead of having the number of elements, the density/intensities value is returned:

> degree.distribution(g)
[1] 0 0 1

You can easily verify this in the source code of the function:

> degree.distribution
function (graph, cumulative = FALSE, ...) 
{
    if (!is.igraph(graph)) {
        stop("Not a graph object")
    }
    cs <- degree(graph, ...)
    hi <- hist(cs, -1:max(cs), plot = FALSE)$intensities
    if (!cumulative) {
        res <- hi
    }
    else {
        res <- rev(cumsum(rev(hi)))
    }
    res
}


This caused me some minor issues, but the solution was easy. I simply created a new version of the function that is using $count instead of $intensities (BTW $intensities will be deprecated in R 3.0).

count.degree.distribution <- function (graph, cumulative = FALSE, ...) 
{
    if (!is.igraph(graph)) {
        stop("Not a graph object")
    }
    cs <- degree(graph, ...)
    hi <- hist(cs, -1:max(cs), plot = FALSE)$count
    if (!cumulative) {
        res <- hi
    }
    else {
        res <- rev(cumsum(rev(hi)))
    }
    res
}
Using it is identical to the original version:
> count.degree.distribution(g)
[1] 0 0 10

Tuesday, February 12, 2013

GSoC 2013 Announced!

It's official now, Google Summer of Code for 2013 has been announced!

Here's Carol's letter from the Google Summer of Code Meetups list:

"Hello meetups folks,

We've announced Google Summer of Code for 2013 [1]. Yay!

We have presentations [2], logos [3], and flyers [4] for you all to use for promotion this year. Please host meetups, tell your friends and colleagues about the program, go to conferences, and talk to people about the program, and just generally do all the awesome word-of-mouth stuff you do every year to promote the program. We rely on you for your help, so thank you in advance for all the work you do!

The GSoC calendar, FAQ, and events timeline have all been updated with this year's important dates, so please refer to those for the milestones for this year's program. NB: the normal timeline for the program has been modified for this year. You'll probably want to examine the dates closely to make sure you know when important things are happening.

If you decide to host a meetup, please email me to let me know the date, time, and location so I can put it on the GSoC calendar. Also, remember to take pictures at your meetup and write up a blog post for our blog using our provided template for formatting [5]. If you need promotional items for your attendees, please fill out our form [6] to request some; we're happy to send some along. We can provide up to about 25 pens, notebooks, or stickers and/or a few t-shirts. Please keep in mind, though, that shipping restrictions and timeline vary country-to-country; request items early to make sure they get there on time! If you have questions about hosting meetups, please see the section in our FAQ [7].

Please also consider translating the presentations and/or flyers into your native language and submitting them directly to me to post on the wiki. Localization for our material is integral to reaching the widest possible audience around the world. If you decide to submit a translation, please also fill out our form [8] for requesting a thank you gift for your work.

Thanks again, and here's to another awesome year!

[1] - http://google-opensource.blogspot.com/2013/02/flip-bits-not-burgers-google-summer-of.html
[2] - http://code.google.com/p/google-summer-of-code/wiki/ProgramPresentations
[3] - http://code.google.com/p/google-summer-of-code/wiki/GsocLogos
[4] - http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers
[5] - http://goo.gl/wbZrt
[6] - http://goo.gl/0BsR8
[7] - http://goo.gl/2NGfp
[8] - http://goo.gl/gEHDO

Thanks,

Carol"

Unfortunately I finished the PhD school so I cannot attend in the program again, but hope you all will have as much fun as I had in my previous enrollments! :-) Thanks, Google!

Monday, January 21, 2013

Invitation to the Lorentz Center

I've just got an invitation to the Lorentz Center for the workshop Complexity Models for Systemic Instabilities and Crises. It's going to be a one-week-full-of-science-fun :-)

I saw that the registration is open for everybody, so if you're interested come and join the discussion!