当我尝试在Windows中使用gem时,我收到以下错误,我也提到了 这个stackoverflow帖子和更新的rubygems和rails.但没有什么能解决这个问题.
以下是完整的错误,
D:\>gem env
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00
.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/execjs-1.2.4.gemspec]: invalid date format in specification: "2011-08-03 00:00:
00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/temple-0.3.3.gemspec]: invalid date format in specification: "2011-08-26 00:00:
00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/guard-0.6.3.gemspec]: invalid date format in specification: "2011-09-01 00:00:0
0.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/guard-livereload-0.3.1.gemspec]: invalid date format in specification: "2011-09
-01 00:00:00.000000000Z"
Invalid gemspec in [D:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/specifications
/rack-cache-1.0.3.gemspec]: invalid date format … 我制定一个正则表达式来检查,如果一个单词开头http://或https://或者ftp://,我的代码如下,
public static void main(String[] args) {
try{
String test = "http://yahoo.com";
System.out.println(test.matches("^(http|https|ftp)://"));
} finally{
}
}
Run Code Online (Sandbox Code Playgroud)
它打印false.我还检查了在Regex上发布的stackoverflow,以测试字符串是否以http://或https://开头
正则表达式似乎是正确的,但为什么它不匹配?我甚至尝试^(http|https|ftp)\://和^(http|https|ftp)\\://
我正在编写一个通过有效的GMail用户ID和密码发送邮件的应用程序.
我只是想在我的Windows XP命令行上模拟SMTP连接,当我smtp.gmail.com在465端口telnet 时 - 我没有看到任何东西.带有标题的空白命令窗口Telnet smtp.gmail.com随光标打开.当我输入EHLO或通常的SMTP握手命令时,提示只是关闭.
我无法弄清楚什么是错的,在哪里.我尝试连接到587,它根本没有连接到telnet.任何人都可以澄清我是否做错了什么?
我想知道为什么cd在shell脚本中不起作用.如下,
#!/bin/sh
cd test
mkdir $(date +%d-%mm-%Y)
Run Code Online (Sandbox Code Playgroud)
当我运行这个时,我得不到cd来测试
cd: 2: can't cd to /test
Run Code Online (Sandbox Code Playgroud)
为什么会这样?
我试图在我的java独立代码中使用ClassPathXmlApplicationContext来加载applicationContext.xml,它位于我的类路径中的jar文件中.
ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:**/applicationContext*.xml");
Run Code Online (Sandbox Code Playgroud)
applicationContext.xml条目如下,
<bean id="myAdder" class="com.foo.bar.MyAdder">
<property name="floatAdder" ref="floatAdder"/>
</bean>
Run Code Online (Sandbox Code Playgroud)
而且,当我尝试以这种方式加载bean时,我得到NoSuchBeanException.不能用这种方式加载bean吗?
jar文件作为maven依赖项添加到我的类路径中.当我在Eclipse中看到这个项目的Java Build Path时,我看到这个jar链接为M2_REPO /.../ ..
我假设我可以在jar文件中加载bean,因为jar就是这样的.我错过了什么吗?
谢谢,阿比
我想用java正则表达式否定一组单词.
再说了,我想否定cvs,svn,nvs,mvc.我写了一个正则表达式^[(svn|cvs|nvs|mvc)].
有些看起来似乎没有起作用.
我想从perl调用一个java类.我通常从命令行使用java类来做一些处理,如:
java com.something.some
Run Code Online (Sandbox Code Playgroud)
现在,我需要从perl脚本中调用它.
你能告诉我怎么做吗?
我正在寻找一个可用于检测项目中未使用的方法或类的eclipse插件.有没有人知道使用这种插件的有效好处?
我希望通过API调用获得朋友的朋友,当我尝试这样做时,我得到以下异常,
{
"error": {
"type": "OAuthException",
"message": "(#604) Can't lookup all friends of .... Can only lookup for the logged in user (...), or friends of the logged in user with the appropriate permission"
}
}
Run Code Online (Sandbox Code Playgroud)
我尝试访问的网址是,
https://graph.facebook.com/friend_id/friends?access_token=access_token
我获得扩展权限,如下所示,
<fb:login-button perms="user_likes,friends_likes"></fb:login-button>
Run Code Online (Sandbox Code Playgroud)
请问任何人请告诉我这里出了什么问题?或者这是否意味着我永远无法访问朋友的朋友?