there is one note about the element order in hashes:
Ruby 1.9 actually guarantees that hashes keep their elements in the same order entered, but it would be unwise ever to count on a particular ordering.
==================================================
let's see this method:
stylesheet_link_tag 'blueprint/screen', :media => 'screen'
you will find the last param is a hash, but why there is no {} around this hash?
the reason is this:
when the hash is the last argument in a function call, the {} is optional, the following two lines are equivalent:
stylesheet_link_tag 'blueprint/screen', { :media => 'screen' } stylesheet_link_tag 'blueprint/screen', :media => 'screen'
note this only apply to a function call, not a function definition.
by the way, the html generated by the above code is:
<link href="/stylesheets/blueprint/screen.css" media="screen" rel="stylesheet"
type="text/css" />
<link href="/stylesheets/blueprint/print.css" media="print" rel="stylesheet"
type="text/css" />
type="text/css" />
<link href="/stylesheets/blueprint/print.css" media="print" rel="stylesheet"
type="text/css" />
发表评论
-
12.3.3 scaling issue of the status feed
2011-10-30 17:54 729the problem of the implementati ... -
12.3 the status feed
2011-10-30 15:34 7991. we need to get all the micro ... -
12.2 a working follow button with Ajax
2011-10-29 18:10 8741. in the last chapter, in the ... -
12.2 a web interface for following and followers.
2011-10-28 22:14 8321.before we do the UI, we need ... -
12. following user, 12.1 relationship model
2011-10-18 14:29 6981. we need to use a relationshi ... -
11.3 manipulating microposts.
2011-10-17 15:31 8531. since all micropost actions ... -
11.2 show microposts.
2011-10-17 12:01 6451. add test to test the new use ... -
11.1 user micropost -- a micropost model.
2011-10-17 10:43 10581. we will first generate a mic ... -
10.4 destroying users.
2011-10-16 15:47 683in this chapter, we will add de ... -
10.3 showing users list
2011-10-15 20:41 727in this chapter, we will do use ... -
10.2 protect pages.
2011-10-15 15:11 599again, we will start from TD ... -
10.1 updating users.
2011-10-14 18:30 6551. git checkout -b updating-use ... -
9.4 sign out
2011-10-13 15:21 675whew!!!, last chapter is a long ... -
9.3 sign in success.
2011-10-12 15:39 6791. we will first finish the cre ... -
9.1 about flash.now[:error] vs flash[:error]
2011-10-12 15:37 664There’s a subtle difference ... -
9.2 sign in failure
2011-10-12 12:19 599start from TDD!!! 1. requir ... -
9.1 sessions
2011-10-12 10:00 609a session is a semi-permanent c ... -
what test framework should you use?
2011-10-11 16:56 0for integration test, i have no ... -
what test framework should you use?
2011-10-11 16:56 0<p>for integration test, ... -
8.4 rspec integration tests
2011-10-11 16:53 669in integration test, you can te ...
相关推荐
256, 384 and 512 is presented, obtaining a high clock rate through a re- duction of the critical path length, both in the Expander and in the Compressor of the hash scheme. The critical path is shown ...
3维hashin失效准则~复合材料层合板
基于ABAQUS的hashin和Tong-Norrius准则的umat子程序
abaqus用户子程序,Hashin失效准则,abaqus显示分析,使用三维实体单元
abaqus vumat用户子程序,Hashin准则,使用3D实体单元
hashin撞击损伤用户子程序,用于abaqus仿真模拟调用
适用于Hashin失效准则,计算材料断裂。
hashin失效准则vumat,可以计算复合材料土木工程等科学领域的数学问题
三维hashin失效准则,用于复合材料失效模拟
用于复合材料损伤分析,三维损伤umat子程序
hashin失效准则vumat,可以计算复合材料土木工程等科学领域的数学问题
UMAT子程序用来定义复合材料的材料属性,该程序采用hashin失效准则
基于应变和应力的Vumat子程序_hashin失效准则_动态应变_拉伸失效_hashin_vumat.zip
据三维Hashin失效准则和Chang-Chang退化准则According to the three-dimensional Hashin failure criterion and the Chang-Chang degradation criterion
the constitutive model for fiber including Hashin damage
(* Free use of the General Purpose Hash Function Algorithms Library is *) (* permitted under the guidelines and in accordance with the MIT License. *) (* ...
ABAQUS用户子程序-hashin渐进损伤准则模型
hashin失效vumat,hashin失效准则介绍,Fortran源码.zip
Search function: This function searches the key specified as the parameter in the hash table. If exist, return true, else return false. Note to use the eq which is a member of HashSet to compare ...
vumat_hashin损伤实体_VUMAT-failure-model_hashin_vumat_abaqus子模型.zip