pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Go + App Engine = Johan Euphrosine 2012315 pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Johan Euphrosine Google App Engine profiles.google.com/proppy · · · · · pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API App Engine App Engine Google web pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Go Runtime · · · pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Hello Gopher! package gopher import ( "fmt" "net/http" ) // init func init() { // /hello URL http.HandleFunc("/hello", hello) } // hello HTTP “Hello Gopher!” func hello(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "Hello, Gopher!") } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Hello App Engine! application: gopher version: 1 runtime: go api_version: go1beta handlers: - url: /images static_dir: images - url: /doc static_dir: doc - url: /.* script: _go_app $ dev_appserver.py myapp/ $ appcfg.py update myapp/ pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Hello Gopher! pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Hello hackernews! XML package gopher import ( "appengine" "appengine/urlfetch" "encoding/xml" "fmt" "net/http" "time" ) func init() { // /hackernews URL http.HandleFunc("/hackernews", hackernews) } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API XML Go <link /> ... type HNFeed struct { Data HNFeedData `xml:"channel"` } type HNFeedData struct { Items []Item `xml:"item"` } type Item struct { Title string `xml:"title"` Url string `xml:"link"` } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API func hackernewsItems(c appengine.Context) []Item { client := urlfetch.Client(c) resp, err := client.Get(HNFeedUrl) if err != nil { c.Errorf(" %s : %s", HNFeedUrl, err.Error()) return []Item{} } defer resp.Body.Close() decoder := xml.NewDecoder(resp.Body) var feed *HNFeed if err = decoder.Decode(&feed); err != nil { c.Errorf(" HNFeed : %s", err.Error()) return []Item{} } return feed.Data.Items } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API func hackernews(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) w.Header().Add("Content-Type", "text/plain") for _, item := range hackernewsItems(c) { fmt.Fprintf(w, "%s: %s\n", item.Title, item.Url) } } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Hello Hacker News! pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Hello proggit! JSON package gopher import ( "appengine" "appengine/urlfetch" "encoding/json" "fmt" "net/http" "time" ) func init() { // /proggit URL http.HandleFunc("/proggit", proggit) } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Json Go {"data": { "children": [ {"data": { "title": ... , "url": ...}}, ... type RedditFeed struct { Data RedditFeedData } type RedditFeedData struct { Items []RedditFeedItem `json:"children"` } type RedditFeedItem struct { Data Item } type Item struct { Title string `xml:"title"` Url string `xml:"link"` } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API func proggitItems(c appengine.Context) []Item { client := urlfetch.Client(c) resp, err := client.Get(ProggitFeedUrl) if err != nil { c.Errorf(" %s : %s", ProggitFeedUrl, err.Error()) return []Item{} } defer resp.Body.Close() decoder := json.NewDecoder(resp.Body) var feed *RedditFeed if err = decoder.Decode(&feed); err != nil { c.Errorf(" RedditFeed : %s", err.Error()) return []Item{} } items := make([]Item, len(feed.Data.Items)) for i, item := range feed.Data.Items { items[i] = item.Data } return items } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API func proggit(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) w.Header().Add("Content-Type", "text/plain") for _, item := range proggitItems(c) { fmt.Fprintf(w, "%s: %s\n", item.Title, item.Url) } } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Hello Proggit! pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Progginator! func progginator(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) hnItems := hackernewsItems(c) pgItems := proggitItems(c) w.Header().Add("Content-Type", "text/plain") for _, item := range hnItems { fmt.Fprintf(w, "%s: %s\n", item.Title, item.Url) } for _, item := range pgItems { fmt.Fprintf(w, "%s: %s\n", item.Title, item.Url) } } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Progginator! 2012-03-15 04:17:59.148 hackernews: 261.695ms 2012-03-15 04:17:59.246 proggit: 97.961ms 2012-03-15 04:17:59.246 progginator: 359.822ms pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API func progginator_(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) results := make(chan []Item) go func() { results <- hackernewsItems(c) }() go func() { results <- proggitItems(c) }() w.Header().Add("Content-Type", "text/plain") for i := 0; i < 2; i++ { items := <-results for _, item := range items { fmt.Fprintf(w, "%s: %s\n", item.Title, item.Url) } } } pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API Progginator! 2012-03-15 04:18:03.804 proggit: 110.451ms 2012-03-15 04:18:03.887 hackernews: 193.751ms 2012-03-15 04:18:03.887 progginator_: 193.824ms pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API encoding/* ! Go runtime goroutine channel API · · · pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API css Task Queue ! fork : code.google.com/p/progginator · · · · · pdfcrowd.comopen in browser PRO version Are you a developer? Try out the HTML to PDF API ! := "code.google.com/appengine/docs/go/" := "golang.org" := "profiles.google.com/proppy" xslidian@guao.hk </article> <div class="alert alert-warning" role="alert">...</div> <div class="thumbnail text-center"> <div class="more"> <span>还剩23页未读</span> <p class="go mt10"> <span class="btn btn-default" id="showMore" data-page="1"><i class="fa fa-chevron-down"></i> 继续阅读</span> </p> </div> </div> <div class="thumbnail box-line"> <div class="l1 line"></div> <div class="l2 line"></div> <div class="l3 line"></div> <div class="l4 line"></div> <div class="l5 line"></div> <div class="l6 line"></div> <div id="reader-more"> <p class="title">下载pdf到电脑,查找使用更方便</p> <p class="gray"> pdf的实际排版效果,会与网站的显示效果略有不同!!</p> <p class="download-info"> <span style="font-size: 14px;color: #888888">需要</span> <span style="font-size: 24px;">5</span> <span style="font-size: 14px;padding-right: 20px;color: #888888">金币</span> <a href="javascript:void(null);" onclick="JC.redirect('/pdf/create')" style="color: #cf6a07"> [ 分享pdf获得金币 ] </a> <span class="fcff">0 人已下载</span> </p> <p> <a class="btn btn-danger download buy circle80 fs30" href="javascript:void(null);" data-type="3" data-num="5" data-download="true"><i aria-hidden="true" class="fa fa-yen"> </i> 下载pdf</a> </p> </div> </div> </div> <!--right--> <div class="col-md-3"> <div class="thumbnail"> <h4>pdf贡献者</h4> <div class="ui items"> <div class="item"> <a class="ui tiny image" style="width: 50px;"> <img src="https://simg.open-open.com/show/e939aa0969c6575691f09fb3ae156885.jpg" width="50"> </a> <div class="content"> <a class="header" href="https://user.open-open.com/u/4097"> 灬猜想灬 </a> <div class="description"> <p>贡献于2013-05-26</p> </div> </div> </div> </div> <div> 下载需要 <span style="font-size: 24px;">5</span> <span style="font-size: 14px;padding-right: 20px;color: #888888">金币</span> <a href="javascript:void(null);" onclick="JC.redirect('https://user.open-open.com/pay')" style="color: #cf6a07"> [金币充值 ] </a> <div class="kind-tip">亲,您也可以通过 <a href="javascript:void(0) " onclick="JC.redirect('/pdf/create')">分享原创pdf</a> 来获得金币奖励!</div> </div> </div> <div> <a class="btn btn-block buy btn-danger download" href="javascript:void(null);" data-type="3" data-num="5" data-download="true"><i aria-hidden="true" class="fa fa-yen"></i> 下载pdf</a> </div> <div class="box side-box mt20"> <div class="title"> <h3><i class="fa fa-tags" aria-hidden="true"></i> 关键词</h3> </div> <p class="tags mt10"> <a class="" href="/pdf/tag/go-yuyan-biancheng.html">Go语言编程</a> <a class="" href="/pdf/tag/go.html">Go</a> </p> </div> <div class="ad"> <script>(function() {var s = "_" + Math.random().toString(36).slice(2);document.write('<div id="' + s + '"></div>');(window.slotbydup=window.slotbydup || []).push({id: '4133327', container: s, size: '0,0', display: 'inlay-fix'});})();</script><script src="https://dup.baidustatic.com/js/os.js"></script> </div> <div class="box side-box mt20"> <div class="title"> <h3>相关pdf</h3> </div> <ul> <li class="ellipsis"> <a href="/pdf/1df45fca91f7439d890866ec977cd5e5.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Go + App Engine</a> </li> <li class="ellipsis"> <a href="/pdf/dcd4ff763d114f84bfd874a9d605eeae.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Google App Engine for Java</a> </li> <li class="ellipsis"> <a href="/pdf/f370dccba7814482830c3d8214134c54.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Google App Engine入门</a> </li> <li class="ellipsis"> <a href="/pdf/d15b4bb9874d46b787547b20210b69d1.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Google App Engine 入门教程</a> </li> <li class="ellipsis"> <a href="/pdf/7beb2196c97a48cbbf10caf3409c631c.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Programming Google App Engine 编程手册</a> </li> <li class="ellipsis"> <a href="/pdf/6fa570150a6a4fa09d2db8f62e6b8238.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Google App Engine 开发人员指南</a> </li> <li class="ellipsis"> <a href="/pdf/da25a13519ea4aa4b38f9e6aaa79f8b4.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Google App Engine搭建个人代理服务器</a> </li> <li class="ellipsis"> <a href="/pdf/095d98d583184d7590307f0f9bbe7c65.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  爱奇艺基于Docker的App Engine实践</a> </li> <li class="ellipsis"> <a href="/pdf/2b0e7729dcd04e5fa5e661c7664a70df.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Kylin OLAP Engine</a> </li> <li class="ellipsis"> <a href="/pdf/8169fd3ca62f4f99b24e40e3d9cc13be.html"><i class="fa fa-file-word-o" aria-hidden="true"></i>  Game Engine Architecture</a> </li> </ul> </div> </div> </div> </div> </div> <footer > <div class="container py-5"> <div class="row"> <div class="col-md-3"> <h5>社区</h5> <div class="row"><div class="col-md-6"><a class="text-muted" href="/project/">项目</a></div><div class="col-md-6"><a class="text-muted" href="/solution/">问答</a></div><div class="col-md-6"><a class="text-muted" href="/wenku/">文库</a></div><div class="col-md-6"><a class="text-muted" href="/code/">代码</a></div><div class="col-md-6"><a class="text-muted" href="/lib/">经验</a></div><div class="col-md-6"><a class="text-muted" href="/news/">资讯</a></div></div> <ul class="list-unstyled text-small ut-mt20"><li><a class="text-muted" title=" 安卓开发专栏" target="_blank" href="http://www.open-open.com/lib/list/177">安卓开发专栏</a></li><li><a class="text-muted" href="http://www.open-open.com/lib/tag/开发者周刊" target="_blank" rel="tag">开发者周刊</a></li><li><a class="text-muted" href="http://www.open-open.com/lib/view/open1475497562965.html" target="_blank" rel="tag">Android Studio 使用推荐</a></li><li><a class="text-muted" href="http://www.open-open.com/lib/view/open1475497355674.html" target="_blank" rel="tag">Android开发推荐</a></li></ul> </div> <div class="col-md-3"> <h5>帮助中心</h5> <ul class="list-unstyled text-small"><li><a class="text-muted" href="/upload.html">文档上传须知</a></li></ul> <h5>关于我们</h5> <ul class="list-unstyled text-small"><li><a class="text-muted" href="/about.html">关于深度开源</a></li><li><a class="text-muted" href="/duty.html">免责声明</a></li><li><a class="text-muted" href="/contact.html">联系我们</a></li></ul> </div> <div class="col-md-6 text-center"><img class=center-block src="https://static.open-open.com/img/logo01.svg" width=190px alt="深度开源"><small class="d-block mb-3 text-muted ut-mt40">© 2006-2019 深度开源 —— 开源项目,开源代码,开源文档,开源新闻,开源社区  杭州精创信息技术有限公司  <br/><br/><img src="https://static.open-open.com/img/beian.png"/><a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=33010602002439">  浙公网安备 33010602002439号</a>  <a target="_blank" href="https://www.miibeian.gov.cn/">浙ICP备09019653号-31</a></small></div> </div> </div> </footer> <div id="fTools"><span id="gotop"> <i class="fa fa-arrow-up" aria-hidden="true"></i> </span><span id="feedback" title="建议反馈"> <i class="fa fa-inbox" aria-hidden="true"></i></span></div> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script type="text/javascript" src="https://static.open-open.com/js/lib.js"></script> <script type="text/javascript" src="https://static.open-open.com/assets/jquery-confirm/jquery-confirm.js?v=4.7.0"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://static.open-open.com/js/bootstrap.min.js"></script> <script type="text/javascript" src="https://static.open-open.com/js/base.js?v=2.002"></script> <script type="text/javascript" src="https://static.open-open.com/js/jq-plug.js?v=2.002"></script> <script> $(function () { JC.reminderPop();//弹出用户信息 $(".link-login").click(function(){ JC.lORr('login'); }); $("#topSearch").searchInit(); //用户登录状态 JC.setLogin(false); }); </script> <!-- JavaScript at the bottom for fast page loading --> <!-- end scripts --> </body> </html>