[Assorted-commits] SF.net SVN: assorted:[907] sandbox/trunk/src
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-07-25 02:04:17
|
Revision: 907 http://assorted.svn.sourceforge.net/assorted/?rev=907&view=rev Author: yangzhang Date: 2008-07-25 02:04:25 +0000 (Fri, 25 Jul 2008) Log Message: ----------- got longlongint test to work; added gdata demo Modified Paths: -------------- sandbox/trunk/src/cc/longlongint.cc Added Paths: ----------- sandbox/trunk/src/py/gdata_hello.py Modified: sandbox/trunk/src/cc/longlongint.cc =================================================================== --- sandbox/trunk/src/cc/longlongint.cc 2008-07-25 02:03:44 UTC (rev 906) +++ sandbox/trunk/src/cc/longlongint.cc 2008-07-25 02:04:25 UTC (rev 907) @@ -1,10 +1,10 @@ +#define __STDC_CONSTANT_MACROS + #include <iostream> #include <string> #include <typeinfo> +#include <stdint.h> -// doesn't work: doesn't give us INT64_C() -// #include <stdint.h> - using namespace std; void f(int64_t x) { cout << x << endl; } @@ -39,8 +39,7 @@ // cout << typeid(long long).name() << endl; // cout << typeid(string).name() << endl; - // doesn't work - // cout << INT64_C(0) << endl; + cout << INT64_C(0) << endl; return 0; } Added: sandbox/trunk/src/py/gdata_hello.py =================================================================== --- sandbox/trunk/src/py/gdata_hello.py (rev 0) +++ sandbox/trunk/src/py/gdata_hello.py 2008-07-25 02:04:25 UTC (rev 907) @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +import gdata.docs.service +from getpass import getpass + +# Create a client class which will make HTTP requests with Google Docs server. +client = gdata.docs.service.DocsService() +# Authenticate using your Google Docs email address and password. +print 'username:', +username = raw_input() +password = getpass() +client.ClientLogin(username, password) + +# Query the server for an Atom feed containing a list of your documents. +documents_feed = client.GetDocumentListFeed() +# Loop through the feed and extract each document entry. +for document_entry in documents_feed.entry: + # Display the title of the document on the command line. + print document_entry.title.text Property changes on: sandbox/trunk/src/py/gdata_hello.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |