为什么这不喜欢编译器,而铸造应该像在c中一样工作,我可以在这里阅读如何在Objective-C中转换对象
[p setAge:(NSNumber*)10];
Run Code Online (Sandbox Code Playgroud)
哪里
- (NSNumber*) age {
return _age;
}
- (void) setAge: (NSNumber*)input {
[_age autorelease];
_age = [input retain];
}
Run Code Online (Sandbox Code Playgroud) 我想知道ENDOFTEXT
这个Perl脚本中的含义:
print <<ENDOFTEXT;
HTTP/1.0 200 OK
Content-Type: text/html
<HTML>
<HEAD><TITLE>Hello World!</TITLE></HEAD>
<BODY>
<H4>Hello World!</H4>
<P>You have reached <a href="$url">$url</a></P>
<P>Your IP Address is $ip</P>
<H5>Have a nice day!</H5>
</BODY>
</HTML>
ENDOFTEXT
exit(0);
Run Code Online (Sandbox Code Playgroud) 我已经在我的博客上放了验证码,我仍然得到垃圾邮件发送者,是否有一个允许他们这样做的脚本或者他们是手工完成的?
如果你当然使用其中一个?
我找到了这个:http: //tiny-cobol.sourceforge.net/download.php
不确定如何在Windows上安装它.任何其他 ?
看HTML的源代码
我看到谷歌永远不会关闭td
和tr
标记.源头上没有</tr>
没有</td>
.
为什么?
<tr class=bb>
<th class="bb lm">Date
<th class="rgt bb">Open
<th class="rgt bb">High
<th class="rgt bb">Low
<th class="rgt bb">Close
<th class="rgt bb rm">Volume
<tr>
<td class="lm">Nov 26, 2010
<td class="rgt">11,183.50
<td class="rgt">11,183.50
<td class="rgt">11,067.17
<td class="rgt">11,092.00
<td class="rgt rm">68,396,121
<tr>
Run Code Online (Sandbox Code Playgroud)
难道解析它是因为XML解析器无法读取它吗?我已经注意到&output = csv不适用于索引(这个网址不起作用:http://www.google.com/finance? q = INDEXDJX:.DJI&output = ccsv ),但它可用于库存(http: //www.google.com/finance/historical?q=NASDAQ:GOOG&output=csv将正常工作)以便在csv中获取索引的历史数据,您必须执行解析工作!
我喜欢http://yuml.me UML图表的邋paper纸张效果,是否有一个算法,最好不在Ruby中,但在PHP,java或C#中,我想看看在Rebol中是否很容易做同样的事情:
http://reboltutorial.com/blog/easy-yuml-dialect-for-mere-mortals2/
Gregogy在这里发了一篇关于rebol和javascript的帖子http://blog.revolucent.net/2009/05/javascript-rebol.html
但是当我更深入地比较javascript和rebol时,我无法看到javascript原型的rebol相当于什么.因为使用make in rebol从另一个扩展对象实例并不完全像javascript原型属性,因为js prototype允许一次扩展所有实例.
所以我错了,或者是否有相当于以下代码的rebol:
<html>
<head>
</head>
<body>
<script>
function Person(firstName, lastName, sex) {
this.firstName = firstName;
this.lastName = lastName;
this.whoAreYou = function() {
alert( "I've been built with Constructor and my name is " + this.firstName + " " + this.lastName);
}
this.WhatIsYourSex = function() {
alert(this.sex);
}
};
Person.prototype.sex = "Man";
</script>
<script>
JaneDoe = new Person("Jane", "Doe");
JaneDoe.whoAreYou();
JaneDoe.WhatIsYourSex();
alert("Are you sure?");
JaneDoe.sex = "Woman";
JaneDoe.WhatIsYourSex();
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
更新:我当然不关心语法糖.只需重新定义一个对象,就无法阻止R2中的扩展.我的问题不是关于对象INSTANCE的扩展,而是关于所有INSTANCES的扩展:这就是js prototype属性所允许的.
所以重新提出我的问题:Rebol是否允许通过扩展像javascript这样的父类来自动扩展子类的所有实例,无论我不关心什么语法?
为了性能肯定我看到一个实例的R2和R3之间的区别,但至于语言功能我没有自动扩展所有子对象,这是一个很大的负担,因为我将不得不自己管理它们将是非常慢因为它不是由系统本身完成的.如果我想创建一个像jquery这样严重依赖这种功能的框架怎么办?这将是一个很大的麻烦.
我这样做了
http://reboltutorial.com/images/rebol-iis.png
正如这里所解释的那样,它适用于IIS 6 http://rebolforum.com/index.cgi?f=printtopic&topicnumber=39&archiveflag=new
我还为应用程序池激活了32位,如此处所述 http://blogs.iis.net/wadeh/archive/2009/04/13/running-perl-on-iis-7.aspx
但是当浏览到测试脚本它不起作用时,似乎永远不会显示任何内容,那么最后会显示此消息错误:
502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
Run Code Online (Sandbox Code Playgroud)
我在Windows 2008上使用了专用服务器
测试脚本的源代码:
REBOL [Title: "Cgi Test in Rebol"]
print "HTTP/1.0 200 OK^/Content-type:text/html^/^/";
print [] …
Run Code Online (Sandbox Code Playgroud)