Planet maemo

Thomas Perl
The logical step after the "Volume+ as Camera Button" app (Nokia Store link) for the N9 is another app that allows you to take photos while not touching your N9 at all. While time-triggered photos are fun, remote-triggered photos are.. erm.. "funner"? So what kind of remote "buttons" can we easily get on the N9? The remote control button on the headset is both "remote" and a "button". Also, as seen in Panucci and gPodder versions since the N900, Bluetooth headset buttons can also be queried by applications. So what do we get by combining remote control and photo taking? The Headset Camera app (Nokia Store link) for the N9! Or - for the visual reader - this:



If you want to integrate such features into your own app, the code for querying the headset buttons is readily available in the gPodder source tree (src/gpodder/qmlui/helper.py):
import dbus

class MediaButtonsHandler(QtCore.QObject):
def __init__(self):
QtCore.QObject.__init__(self)
headset_path = '/org/freedesktop/Hal/devices/computer_logicaldev_input_0'
headset_path2 = '/org/freedesktop/Hal/devices/computer_logicaldev_input'

system_bus = dbus.SystemBus()
system_bus.add_signal_receiver(self.handle_button, 'Condition',
'org.freedesktop.Hal.Device', None, headset_path)
system_bus.add_signal_receiver(self.handle_button, 'Condition',
'org.freedesktop.Hal.Device', None, headset_path2)

def handle_button(self, signal, button):
if signal == 'ButtonPressed':
if button in ('play-cd', 'phone'):
self.playPressed.emit()
elif button == 'pause-cd':
self.pausePressed.emit()
elif button == 'previous-song':
self.previousPressed.emit()
elif button == 'next-song':
self.nextPressed.emit()

playPressed = QtCore.Signal()
pausePressed = QtCore.Signal()
previousPressed = QtCore.Signal()
nextPressed = QtCore.Signal()
MediaButtonsHandler is already a QObject subclass, so you can easily expose an instance of this class to your QDeclarativeView rootContext() and connect to the signals in QML (such a "headset button handler" might actually be a good candidate for inclusion into nemo-qml-plugins in Sailfish OS and Nemo Mobile?). As it's really just using the Python D-Bus bindings to get property changes from Hal devices, the code above should be easy (read: trivial) to port from Python to Qt/C++. Be aware that you need to connect to both .../computer_logicaldev_input_0 and .../computer_logicaldev_input, which can both exist if you have a cable headset and a Bluetooth headset connected at the same time.

You can get the Headset Camera App for the N9 in Nokia Store now, there is also a video on YouTube showing the app. Or start integrating headset button features into your own app or scripts by adapting the code above. One use case that comes to mind is using the previous/next buttons on a Bluetooth headset to control a photo slideshow on the N9 connected to TV-Out. Enjoy :)
Categories: n950
Thomas Perl

HTML5 Web Apps on Mobile Devices

2013-05-14 20:28 UTC  by  Thomas Perl
0
0
Get out your Buzzword Bingo cards, we're talking HTML5. And Canvas2D. And WebGL. See? Check them off and then continue reading. So, while writing "native" apps using JavaScript is definitely possible and works great with QML, some games are just simple enough (or want to have a broad enough audience) to warrant writing everything in HTML5.
Click to read 1166 more words
Categories: n950
pellet

Tizen Developer Conference coming up...

2013-05-14 07:50 UTC  by  pellet
0
0
The Tizen Developer Conference is coming up from the 22nd of May until the 24th of may 2013 - It is in Downtown San Francisco (https://www.tizen.org/)I will be there the whole 3 days but I might be hard to grab as I will be running around. If you want to touch base - just contact me through linked in, email or twitter (https://twitter.com/yapellet).
If you are going there, go and check out the following talks from my lab (SRA's Advanced Software Platform). One is "Accelerated HTML5 Rendering for the Tizen Platform" by Henry Song. The other is "WebKit for Tizen" by Laszlo Gombos. Both of those talks are on the WebKit track. Though they are litteraly the top of the iceberg when it comes to our activity, it gives you an idea of what some our interests are.

There is also a presentation around a service prototyping for social appointment entitled Rendez-vous  under the Tizen Collaboration Projects. This is presented by Stanford students. It is a small project that we kick-started and sponsored last February as part of the CS210 Stanford Class.
On side note:  Art Dahm is giving a talk about building Tizen apps using Enyo & Phonegap. Art - now working for LG - used to be part of my team working  when I was working on webOS at HP. I will be sure to check this one out to see if I can meet some of the old team :)

See you there.
Kaj Grönholm

Qt5 Battery Component

2013-05-13 08:34 UTC  by  Kaj Grönholm
0
0
After the QUItIndicator trilogy which introduced idea, design and performance of a specific Qt5 QML component there's room for more, right?! Something like this:


This time we have a dynamic QML component for showing the remaining power of your mobile device battery. As a recap, with "Dynamic QML component" I mean someting which utilizes not only basic QML animation properties (position, opacity, scale etc.) but also new Qt5 features (shaders, particles, scenegraph powa!) to appear "more dynamic". Maybe it's just me, but I would love to see UIs really utilizing modern GPUs... and accelerating this progress is one of the reasons why I code these examples and blog about them. Another reason being to rule-the-world, obviously ;-P

Instead of explaining design & features of QUItBattery component I'll let this video to do that:





If you want to use this liquid battery component in your UI: Download the sources from here, copy QUItBatteryComponent directory, import it in your QML and off you go. Happy hacking!

Categories: MeeGo
Andrew Flegg

MWKN Weekly News for Monday, 13 May 2013

2013-05-13 00:00 UTC  by  Andrew Flegg
0
0
Front Page

New Maemo Community Council and Hildon Foundation Council elected

Last week, the new Maemo Community Council and the inaugural Hildon Foundation Council were elected. On behalf ofthe MWKN staff, your editor would like to congratulate the new council members: "Q2 2013 Maemo Community Council: Rüdiger Schiller (chemist), Joerg Reisenweber (DocScrutinizer/joerg_rw), Christian Ratzenhofer (merlin1991), Michael Demetriou (qwazix), and Akash Sadh (Kash)"

"Inaugural Hildon Foundation Council: Rüdiger Schiller (chemist), Joerg Reisenweber (DocScrutinizer/joerg_rw), Christian Ratzenhofer (merlin1991), Michael Demetriou (qwazix), and Paul Healy (sixwheeledbeast)"

Sadly the plan to have both votes result in identical councils to allow the merging of the Maemo Community Council and the Hildon Foundation Council into a single body did not work out, resulting in a situation with separate Maemo Community and Hildon Foundation councils that cannot be easily merged. In practice, it seems likely they will end up operating mostly like a single 6-person body.

Read more (thread.gmane.org)

Logs from the Maemo Community Council handover meeting available

The Maemo Community Council handover meeting was held last week. The minutes have not yet been posted, but the logs are available. The meeting mostly dealt with formalities of the handover, but there was some interesting discussion about the banking details of the Hildon Foundation. Rather than coloring the discussion with his own interpretation, your editor suggests reading from about 22:30 onward in the logs. It deals primarily with Hildon Foundation funds, donations, bank account access for new board members and the resigned treasurer, and future board meeting scheduling (or lack thereof).

Read more (mg.pov.lt)

In this edition (Download)...

  1. Front Page
    • New Maemo Community Council and Hildon Foundation Council elected
    • Logs from the Maemo Community Council handover meeting available
  2. Community
    • Hildon Foundation Board meeting minutes from April 19, 2013 posted
mblondel

Large-scale sparse multiclass classification

2013-05-12 12:52 UTC  by  mblondel
0
0

I’m thrilled to announce that my paper “Block Coordinate Descent Algorithms for Large-scale Sparse Multiclass Classification” (published in the Machine Learning journal) is now online: PDF, BibTeX [*].

Abstract

Over the past decade, l1 regularization has emerged as a powerful way to learn classifiers with implicit feature selection. More recently, mixed-norm (e.g., l1/l2) regularization has been utilized as a way to select entire groups of features. In this paper, we propose a novel direct multiclass formulation specifically designed for large-scale and high-dimensional problems such as document classification. Based on a multiclass extension of the squared hinge loss, our formulation employs l1/l2 regularization so as to force weights corresponding to the same features to be zero across all classes, resulting in compact and fast-to-evaluate multiclass models. For optimization, we employ two globally-convergent variants of block coordinate descent, one with line search (Tseng and Yun, 2009) and the other without (Richtárik and Takáč, 2012). We present the two variants in a unified manner and develop the core components needed to efficiently solve our formulation. The end result is a couple of block coordinate descent algorithms specifically tailored to our multiclass formulation. Experimentally, we show that block coordinate descent performs favorably to other solvers such as FOBOS, FISTA and SpaRSA. Furthermore, we show that our formulation obtains very compact multiclass models and outperforms l1/l2- regularized multiclass logistic regression in terms of training speed, while achieving comparable test accuracy.

Code

The code of the proposed multiclass method is available in my Python/Cython machine learning library, lightning. Below is an example of how to use it on the News20 dataset.

from sklearn.datasets import fetch_20newsgroups_vectorized
from lightning.primal_cd import CDClassifier
 
bunch = fetch_20newsgroups_vectorized(subset="all")
X = bunch.data
y = bunch.target
 
clf = CDClassifier(penalty="l1/l2",
                   loss="squared_hinge",
                   multiclass=True,
                   max_iter=20,
                   alpha=1e-4,
                   C=1.0 / X.shape[0],
                   tol=1e-3)
clf.fit(X, y)
# accuracy
print clf.score(X, y) 
# percentage of selected features
print clf.n_nonzero(percentage=True)

To use the variant without line search (as presented in the paper), add the max_steps=0 option to CDClassifier.

Data

I also released the Amazon7 dataset used in the paper. It contains 1,362,109 reviews of Amazon products. Each review may belong to one of 7 categories (apparel, book, dvd, electronics, kitchen & housewares, music, video) and is represented as a 262,144-dimensional vector. It is, to my knowledge, one of the largest publically available multiclass classification dataset.

[*] The final publication is available here.

Categories: General
Thomas Perl
Next up in my list of things I did in the last weeks/months and never blogged about is Petals (Nokia Store link), a "beautiful, brain-teasing puzzle game for 1-4 players" if the game's website is to be believed (I would like to think it is...). As always, there's some technical details about the porting and creation of this game. While another recent game (Tetrepetete) has been done on a low level (C++ using no frameworks, and interfacing with multiple front-ends directly, including an OpenGL ES frontend, a console-based ncurses frontend(!) as well as a server-sent events/XHR/Canvas2D-based HTML5 frontend(!!)), this one is approaching things from a very high level: JavaScript.

Petals: A puzzle game written in pure JavaScript and QMLThe gameplay logic of the game is implemented in pure JavaScript (without any QML dependencies), so it could easily be ported to, say, HTML5, but for integration reasons, QML seemed like the better choice for a release on the N9/Harmattan. Also, writing things in JavaScript wouldn't preclude a console-based frontend using nodejs and node-ncurses from happening should the need arise (making the flowers look good in ASCII art would be the challenge there - or cheating by using libcaca). Ok, ok - stop cursing, I'll stop talking about curses (cue laugh track).

Writing pure QML applications has the advantage of easing porting to Qt 5. While QtQuick 1.1 still exists on Qt 5 (and is the only QML option at the moment if you are also targetting iOS), QtQuick 2.0 is usually the better choice for performance reasons.

In my case, the changes necessary to port from QtQuick 1.1 to QtQuick 2.0 were:
  • Change "import QtQuick 1.1" to "import QtQuick 2.0" (sed(1) helps here)
  • Instead of assigning a JavaScript function to a property to create a dynamic property binding (item.someprop = function() { return otheritem.otherprop * 3.0; }), this function has to be wrapped in a call to Qt.binding() in Qt 5 (see "Creating Property Bindings from JavaScript" in the Qt 5 docs)
  • Instead of using SQL Local Storage directly as in QtQuick 1.1, use QtQuick.LocalStorage 2.0, which you can still do in your .js files - use ".import" as described in this blog post
  • In your C++ launcher (in case you need one), QApplication becomes QGuiApplication, and QDeclarativeView becomes QQuickView
  • Use "QT += quick qml" instead of "QT += declarative" in your qmake project file
And that's basically it. Of course, as this is a full-screen game with custom UI, no platform-specific components (such as Harmattan Components or Sailfish Silica) are used, so porting is a bit easier there (no need to "wait" for specific components to be compatible with QtQuick 2.0, which might realistically not happen at all for Harmattan Components). More screenshots of Petals and download links for multiple platforms can be found on the Petals Website.
Categories: qt4
hildonfound

Board Meeting Minutes of April 19, 2013

2013-05-11 21:10 UTC  by  hildonfound
0
0

Board Members Attending:

  • Craig Woodard / Woody14619 (audio only)
  • Rob Bauer / SD69 (audio only)
  • Jim Jagielski / Jimjag (audio only)

Personnel and Organization

  • Motion by Craig Woodard to appoint Xes as co-sysop for maemo.org, with physical access to server if needed. Passed unanimously.
  • Motion by Robert Bauer to appoint Jacekowski as co-sysop for maemo.org, with physical access to server if needed, under supervision of other co-sysops and subject to their continuing consent. Passed unanimously.
  • Resignation of Cosimo Kroll as Treasurer was noted and circumstances of bank account discussed. Volunteers to be requested for Treasurer and appointed at next Board meeting.
  • Discussion of Secretary and Chair positions. Robert Bauer will continue as Secretary and Craig Woodard will be Chair.
  • Discussion of Board Meeting Schedule. Board members will communicate via email to determine schedule.
  • Discussion of roles of Hildon Foundation Council and Maemo Community Council. Colloquoy between Craig Woodard and Robert Bauer on background of the councils. Jim Jagielski recommends to continue the process of initiating a Hildon Foundation Council election process. Further colloquoy on the councils during which Jim Jagielski leaves meeting. Joint motion by Craig Woodard and Robert Bauer to continue with elections for Hildon Foundation Council at the same time as election for Maemo Community Council. Jim Jagielski not present and does not vote on motion.
  • Discussion of suggestion of special election for Board of Directors. Robert Bauer noted that special election of the current Board can be prompted by resignation of a Director and one of the remaining two Directors refusing to appoint a replacement for the resigning Director within 7 days.
  • Infrastructure Issues

  • Motion by Jim Jagielski to purchase SSL certificates for maemo.org immediately upon transfer of domain from Nokia. Passed unanimously.
  • Motion by Craig Woodard to reimburse Joerg Reisenweber up to $300 for purchase of hard drives subject to documentation. Passed unanimously.
  • Discussion of IPHH annual contract for server hosting and payment by Treasurer. Motion by Craig Woodard to sign contract. Passed unanimously.
  • Discussion of offering Hildon Foundation server to act as mirror for Qt project. Suggested by Craig Woodard to request Falk to discuss the matter with IPHH.
Categories: Uncategorized
stskeeps

In this blog series, I am presenting a solution that I've developed that enables the use of Wayland on top of Android hardware adaptations, specifically the GPU drivers, but without actually requiring the OS to be Bionic based.
Click to read 3632 more words
Thomas Perl

Upcoming: Billboard 1.0.9 for Nokia N9

2013-05-08 19:20 UTC  by  Thomas Perl
0
0
Turns out I haven't posted here for two months, so here we go again: Billboard, your favorite low-power mode standby screen will soon receive a new update - version 1.0.9 has been uploaded to Nokia Store QA two days ago, and should hopefully pass QA and be available as an update in the next few days. This release brings a few major under-the-hood improvements and small bugfixes:
  • Fixed MeeCast icon (in 1.0.8, you can already use <<{meecast-icon-src}>>)
  • New formatter that allows you to nest {} expressions used for adding dynamic content
  • Optional image dithering (using # after the filename) for better colors in low power mode
With the new formatter, you can now output {} expressions in your scripts so that they get replaced, and similarly pass {} expressions as parameters to your scripts (for example to modify them in some way before displaying). This should allow for even more customization, some examples of what users have been doing on their N9 standby screen can be seen in the Billboard Standby Screen support thread on talk.maemo.org.

If you are looking for additional ways to tweak and enhance your Billboard-on-N9 experience, have a look at billboard-scripts, a growing collection of Shell and Python scripts that provide even more ways of customizing your standby screen.

If you haven't purchased Billboard from Nokia Store yet, you can get the current version now for your N9, and get the upgrade to 1.0.9 as soon as it's available. If you are already a happy user, watch your application updates in the next few days, and get the new version.
Categories: meego
monkeyiq

Save Ferris: Show some love for libferris...

2013-05-08 01:57 UTC  by  monkeyiq
0
0
Libferris has been gaining some KDE love in recent times. There is now a KIO slave to allow you to see libferris from KDE, also the ability to get at libferris from plasma.

I've been meaning to update the mounting of some Web services like vimeo for quite some time. I'd also like to expand to allow mounting google+ as a filesystem and add other new Web services.

In order to manage time so that this can happen quicker, I thought I'd try the waters with a pledgie. I've left this open ended rather than sticking an exact "bounty" on things. I had the idea of trying a pledgie with my recent investigation into the libferris indexing plugins on a small form factor ARM machine. I'd like to be able to spend more time on libferris, and also pay the rent while doing that, so I thought I'd throw the idea out into the public.

If you've enjoyed the old tricks of mounting XML, Berkeley DB, SQLite, PostgreSQL and other relational databases, flickr, google docs, identica, and others and want to see more then please support the pledgie to speed up continued development. Enjoy libferris!

Click here to lend your support to: Save Ferris: Show some love for libferris and help kick it

Categories: pledgie
Andrew Flegg

MWKN Weekly News for Monday, 6 May 2013

2013-05-06 04:00 UTC  by  Andrew Flegg
0
0
Front Page

Nominations over for Maemo Community Council and Hildon Foundation Council

Last week, Michael Demetriou announced the closure of the nominations for Maemo Community Council and Hildon Foundation Council: "The nomination period for candidates for the upcoming Maemo Community Council and Hildon Foundation Council has ended on the 23rd of the current month of April. The voting begins on Tuesday the 30th of April. We are happy to see more than enough candidates to hold an election this time. The candidates are as follows: Rüdiger Schiller (chemist), Joerg Reisenweber (joerg_rw/DocScrutinizer), Edoardo Spadolini (kerio), Christian Ratzenhofer (merlin1991), Aakash Sadh (Kash), Michael Demetriou (qwazix), and sixwheeledbeast (sixwheeledbeast)."

Read more (talk.maemo.org)

Voting for Maemo Community Council and Hildon Foundation Council begins on 2013-04-30 at 23:59 UTC

The election for Maemo Community Council and the Hildon Foundation Council will be opening this week on 2013-04-30 at 23:59 UTC. The election should run through Tuesday 2013-05-07 at 23:59 UTC.

The election will be for both the Maemo Community Council and a Hildon Foundation Council. Unfortunately, this situation arose by happenings that seem primarily rooted in political motivations. These motivations prevented the current Maemo Community Council from taking on the mantle and responsibilities of the Hildon Foundation Council to provide for a smooth transition.

The compromise reached has left the electorate voting on one set of candidates for two bodies, with the idea being that voters can voice their opinion about whether the Maemo Community Council and Hildon Foundation Council should be two separate bodies or a single one by the composition of their ballots for each body (identical ballots indicating desire for a single body).

Editorially speaking, this publication is in favor of a single body. This being the only sensible interpretation of the intentions of the by-laws in providing for a Hildon Foundation Council, as a Maemo Community Council without Nokia and with a nearly-duplicate body in the Hildon Foundation Council would serve very little purpose. If you prefer to see a single council body, cast both ballots identically.

Read more (talk.maemo.org)

In this edition (Download)...

  1. Front Page
    • Nominations over for Maemo Community Council and Hildon Foundation Council
    • Voting for Maemo Community Council and Hildon Foundation Council begins on 2013-04-30 at 23:59 UTC
  2. Community
    • Voting on the Maemo Community Council election rules refendum closes