网上正则表达式的教程够多了,但由于javascript的历史比较悠久,也比较古老,因此有许多特性是不支持的。我们先从最简单地说起,文章所演示的正则基本都是perl方式。 元字符 ( [ { \ ^ $ | ) ? * + . 预定义的特殊字符 字符类 简单类 原则上正则的一个字符对应一个字符,我们可 ...
分类:
编程语言 时间:
2017-01-14 10:20:26
阅读次数:
327
while是一个非常强大的语句,很大程度上可以替换其他判断和循环。1、while代替ifwhile5>3
puts"ok"
end2、while代替for循环sum=0
i=1
whilei<=5
sum+=i
i+=1
end
putssum3、while代替untilsum=0
i=1
while!(sum>=50)
sum+=i
i+=1
end
putssum
分类:
其他好文 时间:
2017-01-13 01:24:49
阅读次数:
122
时间限制:10000ms单点时限:1000ms内存限制:256MB 描述 We say a string is beautiful if it has the equal amount of 3 or more continuous letters (in increasing order.)Her ...
分类:
其他好文 时间:
2017-01-12 19:56:49
阅读次数:
227
使用ruby自带的webrick可以非常方便地实现一个web服务器。webrick.rb基本代码如下:#!/usr/bin/envruby
require‘webrick‘
root=File.expand_path‘html‘
server=WEBrick::HTTPServer.new:Port=>8000,:DocumentRoot=>root
trap‘INT‘doserver.shutdownend
server.start使..
分类:
Web程序 时间:
2017-01-12 16:09:22
阅读次数:
136
top-100-of-the-best-useful-opensource-applications/ http://www.ubuntulinuxhelp.com/top-100-of-the-best-useful-opensource-applications/ The following i ...
分类:
移动开发 时间:
2017-01-12 11:51:38
阅读次数:
395
JetBrains旗下的产品: IntelliJ IDEA偏重于Java开发,旗舰产品,它可以通过(捆绑的或可下载的)插件的方式提供WebStorm和PhpStorm所有的功能。支持Scala和Groovy开发,也可以通过插件支持Ruby和Python语言。 PhpStorm侧重于PHP开发 Web ...
分类:
Web程序 时间:
2017-01-10 14:33:58
阅读次数:
289
由于工作任务重,时间紧,没有太多学习的时间,大致找了些在线学习资料,这里做个整理,希望对同样准备学习的朋友有帮助 在线文档类: Ruby on Rails 实战圣经 使用 Rails 4.2 及 Ruby 2.3(简体中文版) Rails Guides(英文版) Rails Guides(简体中文版 ...
分类:
其他好文 时间:
2017-01-10 09:34:33
阅读次数:
189
阅读第3章时,按照教程第一次运行rspec失败了: E:\05 Create\Code\temp\railstutorial\sample_app>rspec spec/requests/static_pages_spec.rbE:/05 Create/Code/temp/railstutorial... ...
分类:
移动开发 时间:
2017-01-08 23:57:24
阅读次数:
390
掌握redmine plugin开发的目标在2016年未实现,2017年继续。 选择《Ruby on Rails Tutorial》教程,windows安装railsinstaller,该版本ruby为V2.1.8,和bitnami redmine-3.3.0版本一致。但rails版本为4.2.5.... ...
分类:
其他好文 时间:
2017-01-08 03:49:13
阅读次数:
304
在Start CommandPrompt with Ruby中: ...
分类:
其他好文 时间:
2017-01-07 12:12:23
阅读次数:
165