上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 31 下一页

2018年3月1日

rails 杂记 - erb 中的 link_to 的 ActiveRecord 与 render 中的 partial

摘要: 路由及路由参数 在 {} 里的内容被当作query参数,在{}外面的被当作 html属性。 将 ActiveRecord 作为 link_to 或 redirect_to 对象 (参考:http://guides.rubyonrails.org/routing.html#creating-paths 阅读全文

posted @ 2018-03-01 19:22 Lemo_wd 阅读(144) 评论(0) 推荐(0)

2018年2月28日

ruby 基础知识2 - 区块 block

摘要: 原文 1. block中的 yield 与遍历 或者 2. block 物件化 由于 block不能单独存在。可以借助 Proc.new 比如 或者 调用 结束 阅读全文

posted @ 2018-02-28 16:27 Lemo_wd 阅读(161) 评论(0) 推荐(0)

ruby 基础知识 - Class 与 Module

摘要: 原文 1. 因為 Ruby 並沒有「屬性」(property/attribute)這樣的設計,要取用實體變數,需要另外定義的方法才行: 改写 => 使用 attr_reader、attr_writer 以及 attr_accessor 定义「讀取」、「設定」以及「讀取 + 設定」的方法,所以原來的有 阅读全文

posted @ 2018-02-28 15:20 Lemo_wd 阅读(203) 评论(0) 推荐(0)

2018年2月20日

common lisp 里的几个操作符(2)

摘要: 集合 (Set) member 函数 默认使用 eql比较对象,可传入关键字参数 :test,作为比较的函数。关键字参数 :key,指定在每个元素上应用这个函数。 直接找出满足条件的元素 函数 adjoin 像是条件式的 cons 。它接受一个对象及一个列表,如果对象还不是列表的成员,才构造对象至列 阅读全文

posted @ 2018-02-20 16:31 Lemo_wd 阅读(239) 评论(0) 推荐(0)

2018年2月19日

common lisp里的几个操作符

摘要: setf 赋值操作符,定义一个全局变量。返回值是最后一个赋值的结果。 let 局部变量操作符。let表达式有两部分组成。第一部分是任意多的变量赋值,他们被包裹在一个()中,第二部分是任意数量的表示式作为 let 的函数体。let 表达式的返回值为 最后一个表达式的求值结果。 cons 对象。 con 阅读全文

posted @ 2018-02-19 15:19 Lemo_wd 阅读(391) 评论(0) 推荐(0)

common lisp的几个基本概念

摘要: S-表达式 quote nil 与 () cons car cdr 真假 predicate 谓词与 t 与 nil null 函数 与 not 函数 if then else and 与 or defun recursion 递归 谓词 eql 与 equal format 与 read:form 阅读全文

posted @ 2018-02-19 14:38 Lemo_wd 阅读(139) 评论(0) 推荐(0)

2018年2月12日

上士闻道,勤而行之

摘要: 上士闻道,勤而行之 阅读全文

posted @ 2018-02-12 01:08 Lemo_wd 阅读(155) 评论(0) 推荐(0)

2018年2月7日

如何在 vuejs中使用第三方库

摘要: 原文:https://github.com/dwqs/blog/issues/51 阅读全文

posted @ 2018-02-07 16:24 Lemo_wd 阅读(146) 评论(0) 推荐(0)

2018年1月25日

python3 操作 mongodb

摘要: 原文 end 阅读全文

posted @ 2018-01-25 14:36 Lemo_wd 阅读(267) 评论(0) 推荐(0)

2018年1月21日

archlinux 下使用 aria2+uget 作为下载工具

摘要: 1.创建配置文件 sudo vim /etc/aria2/aria2.conf 创建 aria2.session 文件 配置 uget 注意 勾上 Lanch aria2 on startup end 阅读全文

posted @ 2018-01-21 17:11 Lemo_wd 阅读(3929) 评论(0) 推荐(0)

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 31 下一页

导航