##Javascript
###1 嗯,关于执行 JS 的问题预习已经提到过了,确实是要打开 debug 窗口吧
这里 console.log(...) 可以理解成在打印 ... 的内容
其中 ... 可以是文字 "Hello" 也可以是整数 9
###2
drwxr-xr-x 173 root root 28672 4月 10 10:02 ./ | |
drwxr-xr-x 12 root root 4096 3月 30 11:13 ../ | |
drwxr-xr-x 2 root root 4096 10月 17 03:00 accountsservice/ | |
drwxr-xr-x 3 root root 4096 10月 17 03:01 aisleriot/ | |
drwxr-xr-x 3 root root 4096 3月 30 10:37 apache2/ | |
drwxr-xr-x 2 root root 4096 10月 17 03:01 apg/ | |
drwxr-xr-x 2 root root 4096 3月 30 10:37 apr-util-1/ | |
drwxr-xr-x 4 root root 4096 10月 17 02:59 apt/ | |
drwxr-xr-x 2 root root 12288 10月 17 03:00 aspell/ | |
drwxr-xr-x 2 root root 4096 3月 30 10:49 at-spi2-core/ |
/* | |
* robotMaze.js | |
* | |
* The blue key is inside a labyrinth, and extracting | |
* it will not be easy. | |
* | |
* It's a good thing that you're a AI expert, or | |
* we would have to leave empty-handed. | |
*/ |
/*************** | |
* pointers.js * | |
*************** | |
* | |
* You! How are you still alive? | |
* | |
* Well, no matter. Good luck getting through this | |
* maze of rooms - you'll never see me or the Algorithm again! | |
*/ |
/********************** | |
* superDrEvalBros.js * | |
********************** | |
* | |
* You're still here?! Well, Dr. Eval, let's see | |
* how well you can operate with one less dimension. | |
* | |
* Give up now. Unless you have a magic mushroom | |
* up your sleeve, it's all over. | |
*/ |
/***************** | |
* bossFight.js * | |
***************** | |
* | |
* NO FARTHER, DR. EVAL!!!! | |
* YOU WILL NOT GET OUT OF HERE ALIVE!!!! | |
* IT'S TIME YOU SEE MY TRUE FORM!!!! | |
* FACE MY ROBOT WRATH!!!!! | |
*/ |
-- http://www.4clojure.com/problem/148 | |
sumone n a = div (a * (1 + c) * c) 2 | |
where c = div (n - 1) a | |
sumtwo n a b = sumone n a + sumone n b - sumone n (a * b) |
function spdiagm{T<:Integer}(B, d::Array{T, 1}, m::Integer, n::Integer) | |
ndiags = length(d) | |
ncoeffs = 0 | |
for vec in B | |
ncoeffs += length(vec) | |
end | |
I = Array(T, ncoeffs) | |
J = Array(T, ncoeffs) | |
V = Array(Float64, ncoeffs) | |
id = 0 |
##Javascript
###1 嗯,关于执行 JS 的问题预习已经提到过了,确实是要打开 debug 窗口吧
这里 console.log(...) 可以理解成在打印 ... 的内容
其中 ... 可以是文字 "Hello" 也可以是整数 9
###2
##Javascript
###预习
关于 JS 环境的配置请参考 https://plus.google.com/117239089659078825668/posts/jDkwn5mWdWJ
需要一个可以执行JS的环境(REPL)才能继续下面的学习。
###Hello, world
##Javascript
###记录
首先,之前有人提到JS语言适合不适合入门?
其实……这个问题并不是太关键,毕竟这里已经接触过编程的人还是很多的
那么,大家的意见如何呢?