【发布时间】:2011-08-03 03:06:34
【问题描述】:
JSC seems like the simpler-and-easier,更便携,准通用安装 - 世界上 node.js 的明显替代品......我已经能够弄清楚基础知识,但几乎有 nada 漂浮在那里它(为什么?),所以这是一个简单的问题,我希望有人能澄清..
我在一个 .js 文件中有一个不错的 littlejavascript“类”,它的开头是这样的...BTW, it takes a Hex Color code and spits out a "named" color. Neat. 示例用法:
<script type="text/javascript" src="ntc.js"></script>
<script type="text/javascript">
var n_match = ntc.name("#6195ED");
n_rgb = n_match[0]; // This is the RGB value of the closest matching color
n_name = n_match[1]; // This is the text string for the name of the match
n_exactmatch = n_match[2]; // True if exact color match, False if close-match
alert(n_match);
</script>
代码以这样的方式开始,以这样的方式结束......
var ntc = {
init: function() {
var color, rgb, hsl;
⤹
}
ntc.init();
我可以毫不费力地在本文档的 BOTTOM 处硬编码一些值,就像这样...
var n_match = ntc.name("#000000");
print(n_match);
并从终端简单轻松地运行代码...
/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc -d ntc.js ↩
#000000,Black,true
但是,对于我的生活,我无法弄清楚如何通过这个傻瓜一些变量..
就像,我只想收到来自204080
8080a0
404060
a0a0a0
606080
c0c0c0
a0a0a0
606060
808080
404040
c0e080
a0e060
80c020
e0f0a0
a0e040
202020
60a0e0
60c0f0
a0a0a0
a0e0f0
202020
606060
a0a0a0
404020
604020
f0c040
202020 的回电
但似乎无法扭动它的手臂。-e 选项看起来很有希望,但无济于事。
这些年来,javascript 已经变异了许多奇怪的小众任务来处理,将它们交给这个家伙会很棒。比喻特洛伊木马可能已经安装了,甚至可以在潜在的客户端机器上运行。尽管这件事无处不在,但文档与史蒂夫鲍尔默粉丝俱乐部会议的出席人数一样稀少......
也就是说,大声笑,关于这个 JSC 的唯一半有用的 sn-ps 信息之一来自 7 年前一位 MS 员工的帖子,这表明......标题“Commandline.js”
import System;
// This function reads the commandline arguments and prints them
function PrintCommandLineArguments() {
var args:String[] = System.Environment.GetCommandLineArgs();
var iValue:int;
// Print the command-line arguments
for (iValue in args)
Console.WriteLine(args[iValue]);
}
PrintCommandLineArguments();
我无法让它工作,但必须有办法,聪明的裤子......哦,坦率地说,这只会让我更加困惑,因为嘴里的泡沫已经占据了所有服务器- 最近的 JS 人,因为这件事绝对是老新闻了……为什么这个运行时环境会被当前的热门话题解决方案所取代呢? JSC很烂吗?提示我,姐妹女朋友。 ∀Ⓛ∃✖
【问题讨论】:
-
哦,顺便说一句,
#462425,Crater Brown,true #465945,Gray Asparagus,true #4682B4,Steel Blue,true #480404,Rustic Red,true #480607,Bulgarian Rose,true #480656,Clairvoyant,true。灰色的芦笋听起来很恶心……但对于热门答案来说,这是一件大事。
标签: php javascript bash command-line webkit