node.js 스터디에서 Buffer 클래스에 대해 발표할 때 사용한 코드입니다.
발표 내용은 YouTube 에 올렸습니다. (YouTube 동영상 링크)
public abstract class VthreeModule : NancyModule | |
{ | |
static ILog LOGGER; | |
static VthreeModule() | |
{ | |
LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | |
} |
node.js 스터디에서 Buffer 클래스에 대해 발표할 때 사용한 코드입니다.
발표 내용은 YouTube 에 올렸습니다. (YouTube 동영상 링크)
static FileInfo[] ShuffleArray (FileInfo[] src) | |
{ | |
FileInfo[] result = new FileInfo[src.Length]; | |
Random ran = new Random (); | |
List<KeyValuePair<int, FileInfo>> list = new List<KeyValuePair<int, FileInfo>> (src.Length); | |
foreach (var fi in src) | |
{ | |
list.Add (new KeyValuePair<int, FileInfo> (ran.Next (), fi)); | |
} |
var winston = require('winston'); // https://github.com/flatiron/winston | |
var logger = new (winston.Logger)({ | |
transports: [ | |
new (winston.transports.Console)(), | |
new (winston.transports.File)({ filename : 'winston.log', timestamp: true, /*maxsize: 2000, maxFiles: 5*/ }) | |
] | |
}); | |
process.on('uncaughtException', function (err) { |