上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 40 下一页
  2015年12月9日
摘要: 今天看c++ primer plus才看到这个知识点,以前没注意,一定要在指针初始化的时候为他赋一个确定的值c++ primer plus 101页 4.7.2 阅读全文
posted @ 2015-12-09 22:44 c3tc3tc3t 阅读(436) 评论(0) 推荐(0) 编辑
  2015年12月4日
摘要: a = [1, 2, 3]for i in a b = 123 p iendp "b:#{b}"p i《ruby语言编程》 129页 倒数 第8行 阅读全文
posted @ 2015-12-04 13:34 c3tc3tc3t 阅读(138) 评论(0) 推荐(0) 编辑
  2015年12月3日
摘要: 1 代码行末要加分好。原因>2 初始化变量应该加上默认值因为使用typeof时 未声明和声明为初始化的值都返回undefined,如果规定都要初始化,得到undefined,就知道没有声明var message;alert(typeof message) //undefinedalert(typeo... 阅读全文
posted @ 2015-12-03 21:56 c3tc3tc3t 阅读(185) 评论(0) 推荐(0) 编辑
摘要: ubuntu 上 今天安idea 社区版,报这个错,解决办法。1 首先删除掉配置目录,例如安装的是idea最新的15.1版本,就删除 .ideaIC这个文件夹,重启解决了2 而后,不大一会。又开始报无法保存配置的错。所以从命令行启动看看报什么错,启动后报我安的一个插件的错,就是这个插件 identi... 阅读全文
posted @ 2015-12-03 00:38 c3tc3tc3t 阅读(6056) 评论(0) 推荐(0) 编辑
  2015年12月2日
摘要: http://www.ipreferjim.com/2015/03/your-ides-font-matters-fantasque-sans-mono/ 阅读全文
posted @ 2015-12-02 20:24 c3tc3tc3t 阅读(360) 评论(0) 推荐(0) 编辑
  2015年12月1日
摘要: text = 'The rain in Spain falls mainly in the plain.'first = Hash.new []second = Hash.new {|hash,key| hash[key] = []}text.split(/\W+/).each do |word|... 阅读全文
posted @ 2015-12-01 21:44 c3tc3tc3t 阅读(397) 评论(0) 推荐(0) 编辑
  2015年11月30日
摘要: 1获取字符串某部分s = "My kingdom for a string!"s.slice(3,7) # kingdoms[3,7] # kingdoms[/.ing/] # kings[/str.*/] # strings.slice(3).ord # 107 阅读全文
posted @ 2015-11-30 23:07 c3tc3tc3t 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1 单独处理字符串的字符如果处理的是ASCII码的文档使用string#each_byte注意 没有 string#each方法,String#each_byte 速度比 String#scan快 ,String#scan用于配合正则表达式时使用'foobar'.each_byte { |x| pu... 阅读全文
posted @ 2015-11-30 20:08 c3tc3tc3t 阅读(154) 评论(0) 推荐(0) 编辑
摘要: ascii转字符或者字符串转ascii"a".ord # => 97"!".ord # => 33"\n".ord # => 10'a'[0] # => "a"'bad sound'[1] # => "a"'a'[0].ord # => 97'bad sound'[1].ord # => 9... 阅读全文
posted @ 2015-11-30 20:00 c3tc3tc3t 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 在一个ruby字符串中包含表但是或者变量。想使用不同的值替换表达式或者变量1 类似java 或者python的printf-style方式template = 'Oceania has always been at war with %s.'template % 'Eurasia' # => "Oc... 阅读全文
posted @ 2015-11-30 14:00 c3tc3tc3t 阅读(165) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 40 下一页