会社が販売する品目が商品であるのに対し、

Enter your credentials:
Found 1 accounts:
Blog-Editor [View Info]
Name: Blog-Editor
ID: 0018000000MwqAqAAJ
Phone: 123456789
Web Site:
Enter your credentials:
(2008年12月09日)
Overview
This toolkit enables developers of Google AppEngine to make calls to the Force.com web services API. The form of the toolkit is a python module code-named "BeatBox". Within this module is the main PythonClient class that has methods that coorespond to each web service api call.
Below are links to the samples that come with this toolkit. For more information, visit the Force.com Toolkit for Google AppEngine page at the Developer Force website.
Samples:
Enter your Force.com credentials:
Login Failed
Your login failed. Please check your username and password as well as your IP range restrictions. Error details:
Error Code: LOGIN_MUST_USE_SECURITY_TOKEN
Error Text: LOGIN_MUST_USE_SECURITY_TOKEN: ユーザ名、パスワード、セキュリティトークンが無効か、ユーザがロックされています。新しい場所からログインしていますか? 貴社の信頼済みネットワーク外からデスクトップクライアントまたは API 経由で Salesforce へアクセスする場合、パスワードにセキュリティトークンを追加してログインする必要があります。新しいセキュリティトークンは、Salesforce (http://www.salesforce.com/jp/) にログインし、[設定] | [私の個人情報] | [セキュリティトークンのリセット] をクリックして入手します。
Login Succeeded
Your login was successful. Below are your session details:
UserId: 005800xxxxxxxx
Server URL: https://na6-api.salesforce.com/services/Soap/u/14.0/511700D800000xxxx
Session Id: 511700D80000000M5IC!ARoAQAnStyOYcjTGD70Ct3cWG2UFx3NdKvA
http://urlencode.net/result.cgi
Our memcache maintenance was completed at 10:52 PST (GMT-8). During
this period, although calls to the API did in fact return False and
None as expected, memcache API response latency increased
significantly, causing requests with heavy memcache dependence to time
out after 10 seconds due to the request timer, covered in our
documentation here: http://code.google.com/appengine/docs/python/requestsandcgi.html
We're now implementing a fix for this issue, and in the future the
memcache API will return immediately in the event of an outage. We
apologize for any inconvenince this may have caused.
Pete Koomen, App Engine Team
On Nov 12, 6:05 pm, App Engine Team
col = ""
bid = ""
cid = ""
content_id = ""
session_id = ""
menuid = ""
client_id = ""
time = ""
for r in rr:
if r.column_name == 'id' or r.column_name == 'cid':
key_name = 'id' + self.request.get(r.column_name)
j = clazz(key_name = key_name)
if r.column_name == 'cid' : cid = self.request.get(r.column_name)
if r.column_name == 'content_id': content_id = self.request.get(r.column_name)
if r.column_name == 'bid' : bid = self.request.get(r.column_name)
if r.column_name == 'time' : time = self.request.get(r.column_name)
if r.column_name == 'session_id': session_id = self.request.get(r.column_name)
if r.column_name == 'menuid' : menuid = self.request.get(r.column_name)
if r.column_name == 'client_id' : client_id = self.request.get(r.column_name)
if menuid and client_id:
key_name = 'id' + menuid + client_id
j = clazz(key_name = key_name)
if session_id and time:
key_name = 'id' + time + session_id
j = clazz(key_name = key_name)
if content_id:
key_name = 'id' + content_id
j = clazz(key_name = key_name)
if cid and bid:
key_name = 'id' + bid + cid
j = clazz(key_name = key_name)
if self.request.get('cmd') == "columns":
rr = db.GqlQuery("select * from Information_schema_columns")
for r in rr:
self.response.out.write( r.key().name()+"<br>")
self.response.out.write( "count(*) = " + str(rr.count() ))
$req =& new HTTP_Request("http://xxxx/sign?cmd=columns");
if (!PEAR::isError($req->sendRequest())) {
$imgList = $req->getResponseBody();
}
$dd = explode("<br>", $imgList) ;
$sql = "insert into `gae_columns` ( `column` ) values " ;
foreach ($dd as $d) {
$sql_values .= "( '".$d."' )," ;
}
![]() |
SELECT concat(table_name,'.',column_name) FROM
information_schema.columns i ,
joomlaj.gae_columns g
where i.table_schema ='joomlaj'
and concat('joomlaj_',table_name,'.',column_name) = g.column
SELECT concat(table_name,'.',column_name)
FROM information_schema.columns i
where i.table_schema ='joomlaj'
and concat('joomlaj_',table_name,'.',column_name) not in
(select g.column from joomlaj.gae_columns g)
require_once "HTTP/Request.php";
$req =& new HTTP_Request($post_url);
$req->setMethod(HTTP_REQUEST_METHOD_POST);
・・・
$database->setQuery( $sql2 );
$rows = @$database->loadAssocList();
foreach($fields[$table] as $field=>$type) { ?>
eval($get_fld_value);
$req->addPostData(strtolower($field), $value);
$request .= '&table='.$table ;
$request .= '&table_name='.$table_name ;
$req->addPostData('table', $table);
$req->addPostData('table_name', $table_name);
if (!PEAR::isError($req->sendRequest())) {
$response1 = $req->getResponseBody();
} else {
$response1 = "";
}
![]() |
key = information_schema_columns.table_schema + "_"
key += information_schema_columns.table_name+ "."
key += information_schema_columns.column_name
Information_schema_columns.get_or_insert(key,
table_catalog = self.request.get('table_catalog'),
table_schema = self.request.get('table_schema'),
table_name = self.request.get('table_name'),
column_name = self.request.get('column_name'),
ordinal_position = ordinal_position,
column_default = column_default,
is_nullable = self.request.get('is_nullable'),
data_type = self.request.get('data_type'),
character_maximum_length = character_maximum_length,
character_octet_length = character_octet_length,
numeric_precision = numeric_precision,
numeric_scale = numeric_scale,
character_set_name = self.request.get('character_set_name'),
collation_name = self.request.get('collation_name'),
column_type = self.request.get('column_type'),
column_key = self.request.get('column_key') ,
extra = self.request.get('extra'),
privileges = self.request.get('privileges'),
column_comment = self.request.get('column_comment'))
clazz = globals()[cls.capitalize()]
obj = clazz()
setattr
def post_mysql_data(self,cls):
clazz = globals()[cls.capitalize()]
obj = clazz()
table = cls
rr = db.GqlQuery("select * from Information_schema_columns where table_name = :1", table )
col = ""
for r in rr:
if r.column_name == 'id' or r.column_name == 'cid':
column_value = self.request.get(r.column_name)
key_name = 'id' + column_value
j = clazz(key_name = key_name)
if j:
for r in rr:
column_value = self.request.get(r.column_name)
if r.data_type == 'varchar' or r.data_type == 'text' or r.data_type == 'longtext' :
if column_value : setattr(j,r.column_name,column_value)
if r.data_type == 'bigint' or r.data_type == 'tinyint' or r.data_type == 'int' :
if column_value : setattr(j,r.column_name,int(column_value))
if r.data_type == 'datetime':
if column_value :
if column_value == '0000-00-00 00:00:00':column_value = '1901-01-01 00:00:00'
column_value = datetime.datetime.strptime(column_value,'%Y-%m-%d %H:%M:%S')
setattr(j,r.column_name,column_value)
col = j.put()
![]() |
if ($data_type == "bigint" ) { $datastore_type = " = db.IntegerProperty()" ;}
if ($data_type == "tinyint") { $datastore_type = " = db.IntegerProperty()" ;}
if ($data_type == "int" ) { $datastore_type = " = db.IntegerProperty()" ;}
if ($data_type == "varchar") { $datastore_type = " = db.StringProperty()" ; }
if ($data_type == "text") { $datastore_type = " = db.TextProperty()" ; }
if ($data_type == "longtext"){ $datastore_type = " = db.TextProperty()" ; }
if ($data_type == "datetime"){ $datastore_type = " = db.DateTimeProperty()" ; }
![]() |
DATE_FORMAT_LC2=%Y年 %B %d日(%A) %H:%M
#DATE_FORMAT_LC2=%Y年%B%d日(%A) %H:%M
Issue 287: | Explosion with >100 indexes |
To vacuum your indexes:
1. Create a backup of your index.yaml specification
2. Remove the definitions of the indexes in Error from your index.yaml file
3. Run appcfg.py vacuum_indexes your_app_dir/
4. Replace the modified version of your index.yaml file with the original
5. Run appcfg.py update your_app_dir/
appcfg.py vacuum_indexes your_app_dir/
File "/base/python_lib/versions/1/google/appengine/api/datastore.py", line 1627, in _ToDatastoreError同様の現象の報告もあり、様子をみることに。
raise errors[err.application_error](err.error_detail)
Timeout
File "C:\Program Files\Google\google_appengine\google\appengine\api\datastore.py",
line 1386, in RunInTransaction'Nested transactions are not supported.')
BadRequestError: Nested transactions are not supported.
First up is batch writes. You can now include entities in different entity groups in a single db.put() or db.delete() call. Entity modifications are only atomic within each entity group, but a single call that spans entity groups will be more efficient than a call for each group, which was required before.
class Dummy2(db.Model):
d1 = db.StringProperty()
class Dummy(db.Model):
d1 = db.StringProperty()
def tran():
d2 = Dummy2(d1 = "aaab")
d1 = Dummy(d1 = "aaab")
d1.put()
d2.put()
tran()
Can't query inside a transaction
self.developer_key = 'ADD YOUR DEVELOPER KEY HERE'この部分は不要だった。
if entry.rating:

import sys
print >>sys.stderr, "xxxxxxx"
import logging
logging.debug("xxxxxxx")
def main():
# Set the logging level in the main function
# See the section on Requests and App Caching for information on how
# App Engine reuses your request handlers when you specify a main function
logging.getLogger().setLevel(logging.DEBUG)
application = webapp.WSGIApplication([('/', MainPage),
('/sign', Guestbook)],
debug=True)
webapp.util.run_wsgi_app(application)
if __name__ = '__main__':
main()
File "/base/python_lib/versions/1/google/appengine/runtime/apiproxy.py", line 161, in Waitだけでなく CancelleError というものもある。
rpc_completed = _apphosting_runtime___python__apiproxy.Wait(self)
DeadlineExceededError
File "/base/python_lib/versions/1/google/appengine/runtime/apiproxy.py", line 189, in CheckSuccess
raise self.exception
CancelledError: The API call datastore_v3.Count() was explicitly cancelled.
b = db.GqlQuery("select * from Blog where ancestor is :1 ", granpa.key())
from google.appengine.ext import db
class BlogIndex(db.Model):
max_index = db.IntegerProperty(required=True,default=0)
class BlogEntry(db.Model):
index = db.IntegerProperty(required=True)
title = db.StringProperty(required=True)
body = db.TextProperty(required=True)
def post_entry(blogname, title, body):
def txn():
blog_index = BlogIndex.get_by_key_name(blogname)
if blog_index is None:
blog_index = BlogIndex(key_name=blogname)
new_index = blog_index.max_index
blog_index.max_index += 1
blog_index.put()
new_entry = BlogEntry(key_name=blogname + str(new_index),parent=blog_index, index=new_index,title=title, body=body)
new_entry.put()
db.run_in_transaction(txn)
def get_entry(blogname, index):
entry = BlogEntry.get_by_key_name(blogname + str(index),parent=Key.from_path('BlogIndex',blogname))
return entry
def get_entries(start_index):
extra = None
if start_index is None:
entries = BlogEntry.gql(
'ORDER BY index DESC').fetch(POSTS_PER_PAGE + 1)
else:
start_index = int(start_index)
entries = BlogEntry.gql(
'WHERE index <= :1 ORDER BY index DESC', start_index).fetch(POSTS_PER_PAGE + 1) if len(entries) > POSTS_PER_PAGE:
extra = entries[-1]
entries = entries[:POSTS_PER_PAGE]
return entries, extra
increment("xxxx")
するようにしたほうがよいのか。 Hierarchical
Datastore scales wide
class CounterConfig(db.Model):
name = db.StringProperty(required=True)
num_shards = db.IntegerProperty(required=True,default=1)
class Counter(db.Model):
name = db.StringProperty(required=True)
count = db.IntegerProperty(required=True,default=0)
def get_count(name):
total = 0
for counter in Counter.gql('WHERE name = :1', name):
total += counter.count
return total
def increment(name):
config = CounterConfig.get_or_insert(name,name=name)
def txn():
index = random.randint(0, config.num_shards - 1)
shard_name = name + str(index)
counter = Counter.get_by_key_name(shard_name)
if counter is None:
counter = Counter(key_name=shard_name, name=name)
counter.count += 1
counter.put()
db.run_in_transaction(txn)
increment("test")
print get_count("test")
def get_count(name):
total = memcache.get(name)
if total is None:
total = 0
for counter in Counter.gql('WHERE name = :1', name):
total += counter.count
memcache.add(name, str(total), 60)
return total
def increment(name):
config = CounterConfig.get_or_insert(name,name=name)
def txn():
index = random.randint(0, config.num_shards - 1)
shard_name = name + str(index)
counter = Counter.get_by_key_name(shard_name)
if counter is None:
counter = Counter(key_name=shard_name,name=name)
counter.count += 1
counter.put()
db.run_in_transaction(txn)
memcache.incr(name)
Loading watchOS が終わらない? ディスク容量の残量が少ないので不要なシュミレーターを削除したとこころ watchOSのものが全部なくなってしまっていた。 WatchOS を削除して再度インストールしても復活せず。 Create a new simulator で ...