dimitris kalamaras

math, social network analysis, web dev, free software…

Category: C++ Page 3 of 4

SocNetV 0.49 & Ubuntu packaging

Found some time today to finish another SocNetV release — after three months of development, SocNetV 0.49 sports a redesigned dock with tabs (statistics, edit, layout), new supported social network formats, weight numbers on edges and, as usual A LOT of bug fixes :P… But, the funkier feature of this release is that I finally managed to build decent SocNetV packages for Ubuntu Intrepid Ibex. Thanks to Canonical’s Launchpad, my very own PPA (Personal Package Archive) can be used as a third-party repository in your Ubuntu installation. All you have to do is to add these two lines in your /etc/apt/sources.list file:

deb http://ppa.launchpad.net/dimitris-kalamaras/ubuntu intrepid main
deb-src http://ppa.launchpad.net/dimitris-kalamaras/ubuntu intrepid main

Then, update your package list and install SocNetV with this single-line:

sudo apt-get update && sudo apt-get install socnetv

To run it, just go to Applications > Education > SocNetV,  et voila!

SocNetV 0.49 in Ubuntu 8.10

SocNetV 0.49 in Ubuntu 8.10

Unfortunately, it seems I can’t figure out what is going on with my older RPM .spec file, although I did try some mods, which is why the openSUSE Build Service refuses to build even plain openSUSE 11.1 packages. The funny thing is that the same .spec file builds the RPM ok in my local openSUSE install… And, unfortunately I have no more time to spend on it. 🙁

Qt (Μέρος IIΙ): Αρχειοθέτης άρθρων

Στο προηγούμενο tutorial φτιάξαμε μια γραφική εφαρμογή, το BookAdmin, για να διαχειρίζεστε τη συλλογή των βιβλίων σας χρησιμοποιώντας μια βάση δεδομένων MySQL. Δεν ήταν κάτι ιδιαίτερο, βέβαια, και η αλήθεια είναι ότι θα έπρεπε ίσως να συνεχίζαμε την ανάπτυξή της (βάζοντας π.χ. φίλτρα για τις εγγραφές). Ωστόσο, πολλοί αναγνώστες του “LF” μας ζήτησαν με ευγενικό τρόπο (μας δωροδόκησαν καλά!) να τους δώσουμε έναν τρόπο αρχειοθέτησης των άρθρων του περιοδικού για όλα τα μέχρι σήμερα τεύχη. Οπότε σκεφτήκαμε: “τι καλύτερο από το να γράψουμε ένα μικρό tutorial γι’ αυτό βασιζόμενοι σε ότι κάναμε στο BookAdmin;” Έτσι, αυτή τη φορά, θα φτιάξουμε μια τέτοια εφαρμογούλα για να τηρείτε το “αρχείο” σας, αλλά και για να δείτε πως φτιάχνεται κάτι τέτοιο στην πράξη. Τέτοιο …making of ούτε στο Holywood δεν θα βρείτε! 😛 Σημείωση: μπορείτε να κατεβάσετε όλον τον κώδικα του άρθρου από εδώ.

Το σχέδιο έχει ως εξής. Η εφαρμογή, ας την βαφτίσουμε ArtAdmin, θα πρέπει να έχει ένα γραφικό περιβάλλον αντίστοιχο του BookAdmin, δηλαδή με πεδία για προβολή και αναζήτηση κάποιων εγγραφών (δηλαδή άρθρων) και ένα TableView σε ξεχωριστή καρτέλα για να βλέπετε όλα τα άρθρα μαζί. Συνεχίζοντας με αυταπάρνηση την παράδοση που θέλει κάθε προγραμματιστή …τεμπέλη, θα βασιστούμε στη φόρμα του BookAdmin αλλάζοντας ελαφρώς την πρώτη καρτέλα της για να φτιάξουμε το ολοκαίνουριο ArticlesAdmin – φασόν δηλαδή 🙂 Αυτή τη φορά, όμως θα προσθέσουμε και μερικά νέα κόλπα…

Read More

Qt (Μέρος IΙ): Βάσεις δεδομένων

Σε αυτό το tutorial, στόχος μας είναι να φτιάξουμε μια εφαρμογή που να αλληλεπιδρά με τη MySQL. Η Qt υποστηρίζει αρκετές βάσεις δεδομένων (MySQL, PostgreSQL, SQLite), αλλά εδώ θα περιοριστούμε στην MySQL.

Στο παράδειγμα που θα δούμε παρακάτω, θα φτιάξουμε2008/08/02/qt-μέρος-ι-convertor/#content μια εφαρμογή διαχείρισης βιβλίων, το bookAdmin. Η υλοποίηση του όμως θα είναι αρκετά γενική ώστε να μπορείτε να το προσαρμόσετε εύκολα στις δικές σας ανάγκες. Με μερικές αλλαγές στο περιβάλλον της εφαρμογής θα μπορείτε, αντί για βιβλία, να διαχειρίζεστε CDs, ταινίες, γραμματόσημα, οτιδήποτε. Θυμίζω ότι βασιζόμαστε στην Qt 4.2+ οπότε, ανάλογα με τη διανομή σας, θα πρέπει να έχετε ήδη εγκαταστήσει τα πακέτα ανάπτυξης της Qt4 (δείτε το πρώτο tutorial). Επιπλέον, επειδή θα δουλέψουμε με βάσεις δεδομένων, θα πρέπει να εγκαταστήσετε και το πακέτο libqt4-sql στο Debian/Ubuntu (ή το qt4-database-plugin-mysql-lib στο PCLinuxOS). Κατά τ’ άλλα, θα αρκεστούμε και πάλι στo Qt Designer και σε ένα κειμενογράφο.

Δημιουργία GUI

Αρχικά θα φτιάξουμε το GUI του bookAdmin. Τρέξτε λοιπόν το QtDesigner. Στην ερώτηση για το είδος της φόρμας, επιλέξτε “Main Window” μια και αυτή τη φορά θέλουμε να φτιάξουμε μια κανονική εφαρμογή. Στο προηγούμενο τεύχος είχαμε προτιμήσει το Widget, μια και τότε θέλαμε μόνο ένα λιτό διάλογο με μερικά μόνο πεδία για την εισαγωγή και προβολή των μονάδων. Το bookAdmin όμως θα είναι πολύ πιο περίπλοκη εφαρμογή, γι’ αυτό προτιμάμε το MainWindow.

Read More

SocNetV gets a review (not bad one :))

I started this SocNetV thing as a learning exercise: to deepen my knowledge of Qt/C++, to familiarize myself with tools like svn, mercurial, etc, and, above all, to build something that I needed back then in my Linux box (was it Mandriva 2005?): a simple application to help me draw social graphs and compute some statistics (centralities) about them. After three years of development, Social Networks Visualiser is nowhere near complete, but it is quite usable and it’s getting better (I think).

Today, a friend called me to comment on the “review”… I was, “what review?”…Well, it seems that somehow, Mihai Mircea, the Softpedia Linux Editor was convinced that SocNetV deserves a review on Softpedia. So, there it is: we got 3 stars out of 5. Not bad — actually it was more positive than I would expect. Anyway, thanks for the review and the thoughtful comments, Mihai.

RPM .specs, for a Qt4 application

Been busy the last few days; mostly reading math but occasionally I would steal some time (preferably late at night or in the afternoons) to hack on SocNetV — btw, I released a bugfix 0.47 a couple of days ago.

Today, I decided to check on SUSE Build Service. This is a complete distribution development platform that provides the means to build packages for openSUSE distributions as well as most other Linux distributions. The whole idea seemed to be “upload your source tarball and a spec, and we’ll make binary packages for you for every distro you name”. This is just awesome, if you think about it, cause it takes all the trouble from the developer. Well, I was reading their manual, trying to understand which-is-which and what-to-do-to-build-my-great-package, when I realized that I could easily make an RPM for SocNetV with no hassles, and no Build Service at all. You see, we had a very nice tutorial on building RPM packages in the Greek edition of Linux Format magazine. At the time, I hadn’t test the instructions in real world examples, but hey ..it couldn’t be that hard! And it wasn’t. Actually, it was far easier than I thought in the first place…

Read More

SocNetV 0.46 is here!

I just uploaded the new SocNetV version to the Sourceforge File Release System (FRS). Nothing special this time. SocNetV 0.46 is just a bug fix release – Pajek format loading is improved and zooming widgets work as they should (at last!).

The only new features is that nodes can be automatically resized according to their outDegrees. This is no novelty, but helps a lot. Imagine you have a network of 100 nodes where you have applied a betweeness centrality layout. Nodes which happen to be on many shortest paths between other pairs of nodes will be positioned towards the center of the screen, and can be thought of as ‘mediators’ of information. This is nice, but for instance do they also happen to have many links to other nodes? In other words, do they know a lot of actors as well? With one click, SocNetV can give now an answer, depicting nodes with different sizes according to their outLinks: nodes with more links are bigger than those with less links. Wow 😛

New day – new SocNetV release…

Four months after 0.44, a new release of Social Networks Visualiser is ready. Version 0.45 fixes a thousand (short of…) bugs, and adds new features, such as initial support for GraphML, four new node shapes and new widgets for network rotation and zooming. My plan is to have GraphML as the default format. At the moment, only loading is supported, though 🙁

Version 0.45 brings a more polished GUI with new icons and a new layout for the left dock.

SocNetV 0.45 screenshot

Also, I finally managed to update the documentation and make it look nice. You can take yourself a look at
http://socnetv.sourceforge.net/docs/manual.html

The same documentation is available both online and locally, when running SocNetV. HtmlViewer class renders the manual with the help of QtWebKit, so the latter is a new dependancy. In openSUSE you need libQtWebKit-devel whereas in Debian the package is libqt4-webkit.

Finally, Serafeim Zanikolas made a package of SocNetV 0.44 for Debian Experimental and made a couple of bug reports/fixes. Most of them have been fixed in version 0.45.

I plan to stick with version 0.45 for a while, waiting for Qt 4.5. If the developers are right (they talk about speed-ups of up to 40 times faster), QGraphicsView will be much impoved in Qt 4.5.
SocNetV needs that.

Page 3 of 4

Powered by WordPress & Theme by Anders Norén