<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://www.themacaque.com/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://www.themacaque.com/wiki/feed.php">
        <title>Macaque Wiki</title>
        <description></description>
        <link>http://www.themacaque.com/wiki/</link>
        <image rdf:resource="http://www.themacaque.com/wiki/lib/images/favicon.ico" />
       <dc:date>2010-09-08T10:50:34+01:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=clutter:rounded_rectangle&amp;rev=1270751824&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=clutter:texture_from_pixbuf&amp;rev=1270668515&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:careful_mergeable_lists&amp;rev=1270376021&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:listen_to_changes&amp;rev=1270375792&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:put_record&amp;rev=1270375541&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:create_attachments&amp;rev=1270375183&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:create_record&amp;rev=1270374958&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:object_recipes&amp;rev=1270374651&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.themacaque.com/wiki/doku.php?id=start&amp;rev=1270373747&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://www.themacaque.com/wiki/lib/images/favicon.ico">
        <title>Macaque Wiki</title>
        <link>http://www.themacaque.com/wiki/</link>
        <url>http://www.themacaque.com/wiki/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=clutter:rounded_rectangle&amp;rev=1270751824&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-08T19:37:04+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>clutter:rounded_rectangle</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=clutter:rounded_rectangle&amp;rev=1270751824&amp;do=diff</link>
        <description>Rounded Rectangles in Clutter


The following example shows how to create first a custom Actor in pyclutter, second, how to create a rounded corners rectangle that has the exact same properties that the rectangle actor has in clutter with the difference of a number of extra parameters in the constructor.</description>
    </item>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=clutter:texture_from_pixbuf&amp;rev=1270668515&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-07T20:28:35+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>clutter:texture_from_pixbuf</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=clutter:texture_from_pixbuf&amp;rev=1270668515&amp;do=diff</link>
        <description>Create a Clutter texture from a  Gdk pixbuf


there are a number of occasions when you are working with a Gtk application that embeds clutter that you want to be able to create a clutter texture from a pixbuf that is in memory that has been passed by an other widget. Although clutter has a number of functions in the ogl space that can load texture from files, there are no functions to load data from pixbuf and create a temporary file for the pixbuf is an overkill. The following code allows to cr…</description>
    </item>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:careful_mergeable_lists&amp;rev=1270376021&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-04T11:13:41+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>desktopcouch:careful_mergeable_lists - created</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=desktopcouch:careful_mergeable_lists&amp;rev=1270376021&amp;do=diff</link>
        <description>Careful with MergeableLists

All lists that are added to a record will be converted to a MergeableList. That is, if we have a list:



list = [2,3,4,5]
we will have instead:

list = {
    &quot;_order&quot;: [&quot;id1&quot;, &quot;id2&quot;, &quot;id3&quot;, &quot;id4&quot;],
    &quot;id2&quot;:3,
    &quot;id4&quot;:5,
    &quot;id1&quot;:2,
    &quot;id3&quot;:4
}</description>
    </item>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:listen_to_changes&amp;rev=1270375792&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-04T11:09:52+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>desktopcouch:listen_to_changes - created</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=desktopcouch:listen_to_changes&amp;rev=1270375792&amp;do=diff</link>
        <description>Listening to changes


Because the database will be accessed by more than one app you will want to listen to the changes that other applications perform. There is a very nice API that works in the following way:



# we are going to be listening to the changes
def changes_cb(seq=None, id=None, changes=None):
    print seq
    print id
    print changes
 
db = CouchDatabase(&quot;fosdem&quot;)
# better, use glib main loop or twisted task!
while True:
    db.report_changes(changes_cb)
    time.sleep(30)</description>
    </item>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:put_record&amp;rev=1270375541&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-04T11:05:41+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>desktopcouch:put_record - created</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=desktopcouch:put_record&amp;rev=1270375541&amp;do=diff</link>
        <description>Put records in Desktopcouch

Storing records in the a CouchDatabase with Desktopcouch is very simple but there are two dirty corners you have to be careful with:


	*  Always check that the db exists: This might sound like a stupid advice but bugs happen because of this.
	*  put_record method has the side effect of modifying the parameter you passed to the method by updating its rev. 
	*  There is a batch_update method that performs an update of a number of records with a single request. The bat…</description>
    </item>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:create_attachments&amp;rev=1270375183&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-04T10:59:43+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>desktopcouch:create_attachments - created</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=desktopcouch:create_attachments&amp;rev=1270375183&amp;do=diff</link>
        <description>Add an attachment in Desktopcouch


CouchDb documents can have attachments and although it is not recommended to use CouchDb to sync BLOBS there are some exceptions where that is the correct way to do it (I do in macaco to sync the avatars of the contact  ). An example of how to attach a file would be:</description>
    </item>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:create_record&amp;rev=1270374958&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-04T10:55:58+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>desktopcouch:create_record - created</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=desktopcouch:create_record&amp;rev=1270374958&amp;do=diff</link>
        <description>Create records

There are three different ways to create records and it is useful to know them all:

Basic way


In this way you are simply creating a Record with a record_type. Remember that a record must always have a type therefore this is then the basic way to create one:</description>
    </item>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=desktopcouch:object_recipes&amp;rev=1270374651&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-04T10:50:51+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>desktopcouch:object_recipes - created</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=desktopcouch:object_recipes&amp;rev=1270374651&amp;do=diff</link>
        <description>Object recipes


while working with desktopcouch python library I have found a number of recipes that are useful to implement to leverage the amount of code and work to be performed when doing a map from a python object to a desktopcouch Record object.</description>
    </item>
    <item rdf:about="http://www.themacaque.com/wiki/doku.php?id=start&amp;rev=1270373747&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-04-04T10:35:47+01:00</dc:date>
        <dc:creator>Manuel de la Pena</dc:creator>
        <title>start - created</title>
        <link>http://www.themacaque.com/wiki/doku.php?id=start&amp;rev=1270373747&amp;do=diff</link>
        <description>Welcome to the macaque wiki. In this wiki you either will find information about the different project I have done or, more importantly, documentation about frameworks I have used and hows documentation I have found limited or lacking in some way. Indeed, is this documentation is of any used, it should go to the documentation of such frameworks but unfortunately getting the permissions etc.. takes too much time and effort to do right now. If you find the documentation useful and want to move it …</description>
    </item>
</rdf:RDF>
