Clone the repo
$ git clone https://[email protected]/someuser/great-website.git greatwebsite
<?php | |
error_reporting(E_ALL | E_STRICT); | |
// | |
// Require modules | |
require 'Slim/Slim.php'; | |
\Slim\Slim::registerAutoloader(); | |
require 'Slim/Log.php'; | |
// Get Slim Extras from here https://github.com/codeguy/Slim-Extras |
Clone the repo
$ git clone https://[email protected]/someuser/great-website.git greatwebsite
A nodejs based server will archive user online-offline state and store all chat data. This will make client more light.
NOTE always set ts to current time when you push or set the data.
##Chat Apps with Firebase :
To create a chat, necessary firebase components :
// 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', |
app.post('/upload', function(req, res) { | |
console.log(req.body); | |
console.log(req.files); | |
res.send('something'); | |
}) |
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"); |
{ 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\... | |
} |
// 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 |
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 |