Talk:Sugar Code Snippets: Difference between revisions
(Added unique ID snippet) |
|||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
I'm going to add links/snippets here (mostly from the mailing list); the article has been tagged as "maintained by the OLPC team", so I guess I shouldn't be editing it directly. —[[User:Leejc|Leejc]] 22:43, 28 February 2007 (EST) |
I'm going to add links/snippets here (mostly from the mailing list); the article has been tagged as "maintained by the OLPC team", so I guess I shouldn't be editing it directly. —[[User:Leejc|Leejc]] 22:43, 28 February 2007 (EST) |
||
:I've moved the snippets into the article. My understanding is "maintained by the OLPC team" means they keep an eye on it, aiding readers, rather than it being a restriction on contribution. [[User:MitchellNCharity|MitchellNCharity]] 06:52, 10 May 2007 (EDT) |
|||
I have updated the the toolbar section as it was obsolete. [[User:Stas_z|Stas Zytkiewicz]] |
|||
* [http://mailman.laptop.org/pipermail/sugar/2007-February/001528.html Loading an SVG file onto a surface with a transparent background]: |
|||
== Reference to real activities == |
|||
target = ctx.get_target() |
|||
buf = target.create_similar(cairo.CONTENT_COLOR_ALPHA, w, h) |
|||
Since all of this code is subject to bitrot, I suggest we give line numbers where you can find the living versions of it. That way if something breaks, people can easily find the fix and update it here. [[User:Homunq|Homunq]] 20:48, 23 February 2008 (EST) |
|||
* [http://mailman.laptop.org/pipermail/sugar/2007-February/001547.html Measuring an SVG file's original dimensions] |
|||
== References to overdocumented code? == |
|||
dimensions = handle.get_dimension_data() |
|||
width = dimensions[0] |
|||
height = dimensions[1] |
|||
This page is showing that developers are having trouble navigating among snippets. Has anyone found the various cookbooks just tracking XO as a category? |
|||
* [http://mailman.laptop.org/pipermail/sugar/2007-March/002028.html Getting a unique ID for the XO user]: |
|||
SORRY by this, but here: |
|||
from sugar import profile |
|||
http://wiki.laptop.org/go/Sugar_Code_Snippets/lang-es |
|||
key = profile.get_pubkey() |
|||
===> No Spanish language at all, please TRACK THE BUG. |
|||
# If you want a shorter key, you can hash that like: |
|||
from sugar import util |
|||
key_hash = util._sha_data(key) |
|||
hashed_key = util.printable_hash(key_hash) |
Latest revision as of 16:54, 26 June 2009
I'm going to add links/snippets here (mostly from the mailing list); the article has been tagged as "maintained by the OLPC team", so I guess I shouldn't be editing it directly. —Leejc 22:43, 28 February 2007 (EST)
- I've moved the snippets into the article. My understanding is "maintained by the OLPC team" means they keep an eye on it, aiding readers, rather than it being a restriction on contribution. MitchellNCharity 06:52, 10 May 2007 (EDT)
I have updated the the toolbar section as it was obsolete. Stas Zytkiewicz
Reference to real activities
Since all of this code is subject to bitrot, I suggest we give line numbers where you can find the living versions of it. That way if something breaks, people can easily find the fix and update it here. Homunq 20:48, 23 February 2008 (EST)
References to overdocumented code?
This page is showing that developers are having trouble navigating among snippets. Has anyone found the various cookbooks just tracking XO as a category?
SORRY by this, but here:
http://wiki.laptop.org/go/Sugar_Code_Snippets/lang-es
===> No Spanish language at all, please TRACK THE BUG.