This file contains hidden or 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
var express = require('express'); | |
// express setup | |
var app = express.createServer(); | |
app.use(express.bodyParser()); | |
app.get('/', function(req, res){ | |
res.writeHead(200, {'content-type': 'text/html'}); | |
res.end( | |
'<form action="/upload" enctype="multipart/form-data" method="post">'+ |
This file contains hidden or 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
ListView { | |
id: contentView | |
anchors.fill: parent | |
highlightRangeMode: ListView.StrictlyEnforceRange | |
orientation: ListView.Horizontal | |
snapMode: ListView.SnapOneItem | |
clip: true | |
model: internalContentModel |
This file contains hidden or 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
BaseWidget::BaseWidget(QWidget *parent) : | |
QWidget(parent) | |
{ | |
QVBoxLayout * l = new QVBoxLayout(this); | |
l->setContentsMargins(0, 0, 0, 0); | |
qmlRegisterType<SPageStatus>("AegisLabs", 1, 0, "PageStatus"); | |
QmlApplicationViewer * viewer = new QmlApplicationViewer(this); |
This file contains hidden or 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
function format(str){ | |
var args = arguments; | |
return str.replace(/{(\d+)}/g, function(match, number){ | |
return args[parseInt(number) + 1]; | |
}); | |
} |
This file contains hidden or 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
db.saveBucket('textr', {search: true}) | |
db.save('textr', 'text-00001', 'Riak Search is a distributed, full-text search engine that is built on Riak Core and included as part of Riak open source. Search provides the most advanced query capability next to MapReduce, but is far more concise; easier to use, and in most cases puts far less load on the cluster.') | |
db.save('textr', 'text-00002', 'Search indexes Riak KV objects as theyre written using a precommit hook. Based on the object’s mime type and the Search schema you’ve set for its bucket, the hook will automatically extract and analyze your data and build indexes from it. The Riak Client API is used to invoke Search queries that return a list of bucket/key pairs matching the query. Currently the PHP, Python, Ruby, and Erlang client libraries support integration with Riak Search.') | |
db.save('textr', 'text-00003', 'When collecting, parsing, and storing data like user bios, blog posts, journal articles, etc. to facilitate fast and accurate information retrieval i |
This file contains hidden or 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
// search 'indexes' | |
{ "docs" : [ { "fields" : { "value" : "Search indexes Riak KV objects as theyre written using a precommit hook. Based on the object?s mime type and the Search schema you?ve set for its bucket, the hook will automatically extract and analyze your data and build indexes from it. The Riak Client API is used to invoke Search queries that return a list of bucket/key pairs matching the query. Currently the PHP, Python, Ruby, and Erlang client libraries support integration with Riak Search." }, | |
"id" : "text-00002", | |
"index" : "textr", | |
"props" : { } | |
}, | |
{ "fields" : { "value" : "When Search is enabled on your Riak cluster, another set of vnodes, equal to the number of KV vnodes, will be started which will be used to handle Search requests. Search is enabled on a per-bucket basis by setting the search property to true. If search is enabled for a bucket, indexes are generated on all objects as they are written to it using the pre-commit hook. Index data stored on S |
This file contains hidden or 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
{ currentFolderId: 'root', | |
documentName: 'somename', | |
tags: 'a,b', | |
document: '�PNG\r\n\u001a\n\u0000\u0000\u0000\rIHDR\u0000\u0000\u0004�\u0000\u0000\u0006r\b\u0002\u0000\u0000\u0000ɦvY\u0000\u0000\u0000\tpHYs\u0000\u0000\u0017\u0011\u0000\u0000\u0017\u0011\u0001�&�?\u0000\u0000\u0000\u001dtEXtSoftware\u0000GPL Ghostscript 8.61\u001a$Yu\u0000\u0000 \u0000IDATx���wX\u0014�\u001b\u0007�w��E@@E\u0004���ޱ�\u001a��آF1��\u0016��w��\u0014\u00135���؍���Ŏ4Q\u0014\u0015���v����y�\u001dǁh�|?ϓ\'������!����0!\u0004\u0001\u0000\u0000\u0000\u0000\u0000\u0000�;ҿ�\u0000\u0000\u0000\u0000\u0000\... | |
} |
This file contains hidden or 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
QHttpMultiPart *multiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType); | |
QHttpPart textPart; | |
textPart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"text\"")); | |
textPart.setBody("my text"); | |
QHttpPart imagePart; | |
imagePart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/png")); | |
imagePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"image\"; filename=\"image.png\"")); | |
QFile *file = new QFile("image.png"); |
This file contains hidden or 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
app.post('/upload', function(req, res) { | |
console.log(req.body); | |
console.log(req.files); | |
res.send('something'); | |
}) |
This file contains hidden or 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
// with filename | |
{ currentFolderId: 'root', | |
documentName: 'somename', | |
tags: 'a,b' } | |
{ document: | |
{ domain: null, | |
_events: {}, | |
_maxListeners: 10, | |
size: 179769, | |
path: '/Users/arifsetiawan/Projects/Cymbidium/upload/temp/62a2d0f9b5ce9174ebe8e278d36bda3e.png', |
OlderNewer