上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 41 下一页
摘要: 修改后 阅读全文
posted @ 2016-09-20 18:37 冰凌花花~ 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 原代码 存储的数据格式为 categories: "[\"tv\", \"entertainment\"]", 修改为 存储的数据格式为 categories: " \n- tv\n- comic\n", YAML 序列化后的样子,YAML 的数组相关文档,可看 YAML 的文档:http://ya 阅读全文
posted @ 2016-09-20 11:27 冰凌花花~ 阅读(176) 评论(0) 推荐(0) 编辑
摘要: https://gist.github.com/stream7/1069589 关于sequence 字段limit: 2 是两个字节,16 位,2 的 15 次方是 32767 对于多态关联的表 t.integer :subjectable_id 不需要设置limit,因为这个是用来做外键的,存储 阅读全文
posted @ 2016-09-18 11:47 冰凌花花~ 阅读(202) 评论(0) 推荐(0) 编辑
摘要: rails enum 阅读全文
posted @ 2016-09-13 14:14 冰凌花花~ 阅读(592) 评论(0) 推荐(0) 编辑
摘要: Defines the name of the table column which will store the class name on single-table inheritance situations. The default inheritance column name is ty 阅读全文
posted @ 2016-09-12 16:44 冰凌花花~ 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 使用 callback 确保创建,更新和删除 Picture 时,touch 关联的 imageable,使得其缓存能正确过期 这个update的方法用来把update时间强制更新成当前时间 http://guides.rubyonrails.org/association_basics.html 阅读全文
posted @ 2016-09-12 14:19 冰凌花花~ 阅读(131) 评论(0) 推荐(0) 编辑
摘要: https://github.com/rails/jbuilder 的set!方法重构接口, 因为grape没法使用 jBuilder 的缓存,所以直接用 Rails 写 API (1)多个图片 原来的方法为 精简后为 (2)hints 是一个 hash,遍历 Hash 的文档 http://rub 阅读全文
posted @ 2016-09-12 14:02 冰凌花花~ 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Write a method anagram(s,t) to decide if two strings are anagrams or not. 判断两个字符串里的字符是否相同,也就是是否能够通过改变字母顺序而变成相同的字符串。 如果是返回true,如果不是返回false。 Clarificati 阅读全文
posted @ 2016-09-09 18:05 冰凌花花~ 阅读(162) 评论(0) 推荐(0) 编辑
摘要: java项目导入IntelliJ IDEA 阅读全文
posted @ 2016-09-08 23:06 冰凌花花~ 阅读(1623) 评论(0) 推荐(0) 编辑
摘要: (1)Download IntelliJ IDEA https://www.jetbrains.com/idea/download/ (2)找了个激活码 http://www.oschina.net/code/snippet_2303434_57174 (3)select project SDK, 阅读全文
posted @ 2016-09-08 18:22 冰凌花花~ 阅读(277) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 41 下一页