归档 2015年10月

SAE Django配置共享型MySQL数据库路由

托管在SAE上的Django应用,如果使用共享型MySQL数据库服务,可以通过配置数据库路由,实现读写分离。利用SAE从库的价格优势,减少云豆开销。

SAE Django MySQL数据库路由

SAE共享型MySQL数据库的计费策略:

新浪云SAE共享型数据库支持读写分离(Read/Write Splitting),即主数据库(Master)处理事务性增、改、删操作(INSERT、UPDATE、DELETE),而从数据库(Slave)处理SELECT查询操作。

并且从SAE共享型MySQL的使用价格上来看:

共享型MySQL(主库)
请求次数10000次    400云豆/百万次    4元/百万次
磁盘容量20MB    5云豆/GB/天    0.05元/GB/天

共享型MySQL(从库 ...

继续阅读

[LeetCode]Serialize and Deserialize Binary Tree

题目描述:

Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later ...

继续阅读

[TopCoder]SRM 672 Div2 SubstitutionCipher

题目描述:

Recently you learned about substitution ciphers. This problem is about such a cipher. All strings in this problem (both encrypted and decrypted ones) will consist of only uppercase English letters ('A'-'Z').

When encrypting text using a substitution cipher ...

继续阅读

每日归档

上个月

下个月

归档