V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  keakon  ›  全部回复第 53 页 / 共 59 页
回复总数  1162
1 ... 45  46  47  48  49  50  51  52  53  54 ... 59  
2011-01-07 15:21:54 +08:00
回复了 apoclast 创建的主题 问与答 怎么样才能保持每天早睡早起
想早睡早起?往东移民就行了。习惯2点睡就移民到东10区,以此类推。或者每天移几个时区,天天住宾馆。
2011-01-07 00:56:43 +08:00
回复了 keakon 创建的主题 iPhone 上海哪买联通版的iPhone4最快捷?
@yelusiku 谢谢,不过用不到了。前天已经和一个联通的经理联系了,今天去拿货~
2011-01-06 10:03:32 +08:00
回复了 Livid 创建的主题 ACG 推荐一款 H-Game 吧
AIR、智代After、Fate/Stay Night、真月谭月姬、恋狱~月狂病~、加奈…欢迎回来!!
"临汾" -"临汾路"
2011-01-03 15:36:49 +08:00
回复了 ayanamist 创建的主题 Twitter 求个Twitter产品名
叫“我呸”
2011-01-03 12:18:45 +08:00
回复了 julia 创建的主题 Google App Engine Entity key有没办法缩短?
转换的开销少于1ms,你愿意写很长的key为了这不到1ms的开销么…
2011-01-03 11:18:25 +08:00
回复了 julia 创建的主题 Google App Engine Entity key有没办法缩短?
是的,前面2个最终都是转换成get()
2011-01-03 10:55:46 +08:00
回复了 julia 创建的主题 Google App Engine Entity key有没办法缩短?
用id啊,然后自己构造key
2011-01-03 10:43:15 +08:00
回复了 CupTools 创建的主题 Python "Python/PHP is the same shit"
Actually, for most web apps, language is not the bottleneck.
Rendering an page normally costs less than 10ms, while the database accessing and network latency are much more expansive than it (maybe hundreds or thousand ms).

I don't think Java could do it better since it took more time for rendering a same dynamic JSP page and connecting to MySQL in my previous testing.
Don't think dynamic languages are always slow than static languages, you'll find the answer when you need dynamic features.

In my opinion, Java is almost the worst choice which makes everything much much more complex (normally 10x code lines), uses much much more memories (normally 3x memory usage), and also takes much much more money to buy suitable servers.

I've been a Java coder for years, I couldn't find any interesting of it.
The only superiority of Java coders I found was coming from the performance of toy programs. Otherwise, I can't explain why your friend likes complaining by using "shit" while Pythoners don't.
2011-01-02 18:39:21 +08:00
回复了 deepice 创建的主题 Google App Engine 有GAE上运行用来URL缩短的开源应用么?
2011-01-02 18:05:06 +08:00
回复了 Livid 创建的主题 Google App Engine 如果你在部署 GAE 应用时发现 SSL 通讯被干扰
其实上传时写上set HTTPS_PROXY=http://localhost:7777就行了…
2011-01-02 18:01:55 +08:00
回复了 deepice 创建的主题 Google App Engine 有GAE上运行用来URL缩短的开源应用么?
前几天还看到有人做短网址应用而被Google暂停服务了。Google指出提供这种服务必须要有能力和精力确保不被用于spam和恶意网站。
因为方正xx不是系统默认带的字体
2011-01-01 13:29:21 +08:00
回复了 zztczcx 创建的主题 问与答 v2ex的搜索是按照什么索引的?
至少搜索“索引”找不到这篇文章
2011-01-01 11:53:27 +08:00
回复了 Livid 创建的主题 分享发现 关于冬天的静电
去年摸铁门、水管什么的都被电N次,我太容易被电了…
2011-01-01 11:50:07 +08:00
回复了 darasion 创建的主题 Google App Engine 实体的 id、 key_name 以及 path 都有什么用?
@ayanamist
源码摆在SDK里,你自己看看就知道了:
@classmethod
def get_by_id(cls, ids, parent=None, **kwargs):
"""Get instance of Model class by id.

Args:
key_names: A single id or a list of ids.
parent: Parent of instances to get. Can be a model or key.
config: datastore_rpc.Configuration to use for this request.
"""
config = datastore._GetConfigFromKwargs(kwargs)
if isinstance(parent, Model):
parent = parent.key()
ids, multiple = datastore.NormalizeAndTypeCheck(ids, (int, long))
keys = [datastore.Key.from_path(cls.kind(), id, parent=parent)
for id in ids]
if multiple:
return get(keys, config=config)
else:
return get(keys[0], config=config)

一个实体在存储到datastore的时候,最多需要保存到3种类型的表,但没有任何一种表的任何一个字段是其id或key name,所有的表都只存储编码后的key。这就是为什么不可能不用key来获取实体的原因。

顺带一提,即使是query,也是查询索引表或自定义索引表,获得key,然后再到实体表获取key对应的实体。
1 ... 45  46  47  48  49  50  51  52  53  54 ... 59  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1411 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 34ms · UTC 16:46 · PVG 00:46 · LAX 08:46 · JFK 11:46
♥ Do have faith in what you're doing.