März 2011 Archives

All tutorials I found online deal with using either GenericSetup for portlets assignment, or explain only how to delete a portlet from Python. Below, I want to explain how to assign a portlet from Python, as is required when you want to have portlets that depend on dynamic structures.

Get the assignment_manager:

>>> manager = getUtility(IPortletManager, name=u"plone.leftcolumn", context=site)
>>> assignment_mapping = getMultiAdapter((context, manager), IPortletAssignmentMapping)

Get a portlet’s assignment class, eg. that one from Events, and instantiate it:

>>> from plone.app.portlets.portlets import events
>>> myevents = events.Assignment()

Then assign the new portlet:

>>> assignment_mapping[u"my_events"] = myevents

If you’re doing it manually, like me, then you also need to commit the change:

>>> assignment_mapping._p_changed = True
>>> transaction.commit()

Heute stand in unserem lokalen Käseblatt, daß viele Leute anläßlich der Ereignisse in Japan daran überlegen, Ökostrom zu beziehen, aber nicht wissen, wie man einen seriösen Anbieter findet. Diese Frage möchte ich, so gut ich kann, beantworten:

Ein seriöser Ökostromanbieter ist aus meiner Sicht ein Anbieter, der zu 100% Strom aus erneuerbaren Energien verkauft und kein "konventionelles" Angebot (Kohle, Kernkraft etc.) hat. Dazu kommt, daß die ANbieter zu bevorzugen sind, die selbst Geld in den Kraftwerks- und möglichst auch noch den Netzausbau stecken, um so die Energiewende voranzutreiben und von den großen Stromanbietern unabhängig zu werden. Soweit ich weiß, kann man mit diesen Anbietern Vereinbarungen treffen, um etwa den Strom aus der eigenen Solaranlage an diese Anbieter zu verkaufen. Damit ergibt sich aus meiner Sicht folgendes Angebotsspektrum:

Aufgrund eigenen Kraftwerksbaus oder direkter Investitionstätigkeit empfehlenswert sind:

Mit Einschränkungen, weil sie meines Wissens nur Händler sind, sind noch folgende Anbieter empfehlenswert:

Die in dem Artikel genannte Erfahrung, mit dem Wechsel zu einem Ökostromanbieter gegenüber einem lokalen konventionellen Anbieter Geld sparen zu können, hat sich für mich persönlich bestätigt.

Natürlich kann ich keinen Anspruch auf einen vollständigen Marktüberblick erheben. Falls sich also jemand benachteiligt fühlt, sollte er oder sie mir dies mitteilen.

Wer sich nur allgemein mit dem Thema befassen möchte, dem sei diese Webseite ans Herz gelegt: Energie in Bürgerhand.

For quite some time, I’ve had the idea to learn how to type WuBi. Fortunately, I’ve recently run into a very nice Chinese guy who got me started on it, uncovering a configuration error on my behalf. Since I find the online documentation mostly very hard to grasp, as they have eg. glaring omissions, I’d like to just complement them with what this guy told me, and my experience, so Westerners will hopefully have an easier job mastering this method. As to why one wants to learn it, I often find it very tedious to write a character using PinYin, and to the list of oft-cited advantages of using WuBi over (smart-) PinYin, I can also add these:

  • deductive writing - improves both the understanding and memorizing of a character’s structure, and eliminates guesswork,
  • yields an easy-to-transfer method of transmitting Chinese characters using only ASCII (eg. writing “你” can, with very little ambiguity (if any), be represented as “WQ”,
  • allows for writing down characters that you don’t know how to speak, eg. to subsequently feed them to your electronic (online?) dictionary

The downsite is that it does require quite some practice to master, so if you’re only a casual writer of Chinese, you’ll probably not attain the proficiency necessary to benefit from it. While I’m also far from fluent using it, I do benefit from having the keyboard layout shown in the article referenced above, at my side.

About this Archive

This page is an archive of entries from März 2011 listed from newest to oldest.

August 2010 is the previous archive.

April 2011 is the next archive.

Find recent content on the main index or look in the archives to find all content.