2015-03-01から1ヶ月間の記事一覧
まずはSleepメソッドを自作する。 function Sleep(msec) { var d = $.Deferred(); setTimeout(function() { d.resolve(); }, msec); return d.promise(); }繰り返したい処理の本体の実装。こちらも、Deferredを返すようにしておく。 function MyFunc(cnt) { …
サーバのデータをローカル開発サーバ上にリストアする方法。 自身のアプリケーションIDを APP_ID とします。 appcfg.py download_data --application=`APP_ID` --url=http://APP_ID.appspot.com/_ah/remote_api --filename=hoge.dump --email=Googleアカウン…
自分の中でごっちゃになっていたので整理する。 Queryのcount()のリファレンスには、こうある。 This returns the same result as len(q.fetch(limit)) but more efficiently. query = MyModel.query(条件) cnt = query.count() #OK cnt = len(query) #NG cn…