レビューはレポジトリに足していくことにしました。他のレビューは、そちらを参照ください。
このリストを上から見ていって、興味深いものに対するメモを残す。
CGContextRef ctx = TUIGraphicsGetCurrentContext(); | |
NSImage *image = [NSImage imageNamed:@"Logo"]; | |
CGRect imageRect = ABIntegralRectWithSizeCenteredInRect([image size], self.bounds); | |
CGImageRef cgImage = [image CGImageForProposedRect:&imageRect context:nil hints:nil]; | |
CGContextDrawImage(ctx, imageRect, cgImage); |
> require('fs').statSync('/usr') | |
{ dev: 234881026, | |
ino: 19201463, | |
mode: 16877, | |
nlink: 14, | |
uid: 0, | |
gid: 0, | |
rdev: 0, | |
size: 476, | |
blksize: 4096, |
> require('fs').statSync('/usr') | |
{ dev: 234881026, | |
ino: 19201463, | |
mode: 16877, | |
nlink: 14, | |
uid: 0, | |
gid: 0, | |
rdev: 0, | |
size: 476, | |
blksize: 4096, |
body { color: white; } |
req.body.images.forEach(function(image){ | |
var kb = image.size / 1024 | 0; | |
res.write('<li>uploaded ' + image.name + ' ' + kb + 'kb</li>'); | |
}); |
<form action="/" method="post" enctype="multipart/form-data"> | |
<input type="text" name="name" placeholder="Name:" /> | |
<input type="file" name="images" multiple="multiple" /> | |
<input type="submit" value="Upload" /> | |
</form> |
app.use(express.bodyParser({ | |
uploadDir: '/tmp/uploads' | |
})); |
io.sockets.on('connection', function (socket) { | |
socket.on('message', function(data) { | |
console.log(Buffer.isBuffer(data)); | |
console.log(data); | |
var buf = new Buffer(5); | |
buf.writeUInt8(0x3, 0); | |
buf.writeUInt8(0x4, 1); | |
buf.writeUInt8(0x23, 2); | |
buf.writeUInt8(0x42, 3); |
var socket = null; | |
$(function() { | |
socket = new WebSocket('ws://localhost:3000'); | |
socket.binaryType = 'arraybuffer'; | |
socket.onmessage = function(message) { | |
receiveBinary(message); | |
}; | |
setTimeout(sendBinary, 1000); |