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

2018年3月2日

rails 杂记 - render and layout

摘要: 官方文档:http://guides.rubyonrails.org/layouts_and_rendering.html 渲染 view 渲染 html.rb 与相应的 action controller 或者渲染 aciton 渲染另一个不同的 controller 或者更明确地写作 渲染一个特 阅读全文

posted @ 2018-03-02 15:12 Lemo_wd 阅读(436) 评论(0) 推荐(0)

rails 杂记 - erb 中的 form_helper

摘要: 原文 1. form_tag 1) 基础 Form 生成 html 2) 指定 url与 method 生成 html 3) 指定 controller 与 action 4)几个 tag check_box_tag radio_button_tag 2. form_for 1)如果设置了 reso 阅读全文

posted @ 2018-03-02 12:43 Lemo_wd 阅读(290) 评论(0) 推荐(0)

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 阅读(148) 评论(0) 推荐(0)

2018年2月28日

ruby 基础知识2 - 区块 block

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

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

ruby 基础知识 - Class 与 Module

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

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

2018年2月20日

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

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

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

2018年2月19日

common lisp里的几个操作符

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

posted @ 2018-02-19 15:19 Lemo_wd 阅读(393) 评论(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 阅读(149) 评论(0) 推荐(0)

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

导航