- 30분안에, haskell "코딩환경 구축".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref: | |
# http://yihui.name/formatR/ | |
# https://github.com/yihui/formatR/wiki | |
> install.packages('formatR') | |
> tidy.source(text = c("fib <- function (n) {if (`<`(n,2)) {n} else {`+`(`fib`(`-`(n,1)),`fib`(`-`(n,2)))}}; fact <- function (n) {if (`==`(n,1)) {1} else {`*`(n,`fact`(`-`(n,1)))}}; `print`(`fib`(20)); `print`(`fact`(10))")) | |
fib <- function(n) { | |
if (n < 2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ref: http://docs.unity3d.com/Documentation/ScriptReference/Resources.Load.html | |
// Resources.Load는 Resources/ 하위 폴더에 있어야함. | |
// 생성하고자 하는 prfeb을 block.prefab이라 할때, 위치를 Resources/block.prefab 로했다 가정하고, | |
// block.prefab에 Test22.cs라는 스크립트가 붙어있고, 해당 스크립트에 접근테스트. | |
// Test22.cs는 다음과 같음. | |
/* | |
using UnityEngine; | |
using System.Collections; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// answer: http://cafe.naver.com/xgdn/4246 | |
using UnityEngine; | |
using System.IO; | |
using System.Collections; | |
// test.txt의 내용이 다음과 같다고 가정. | |
/* | |
aaaaaa<CR><RF> | |
bbbb<CR><RF> | |
cc<CR><RF> |
NewerOlder