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
multiSave : function(json, type){ | |
console.info("multiSave", type); | |
json.map(function(obj,i){ | |
console.debug(obj, i); | |
obj._id = factory.db.rel.makeDocID({ "type": type, "id": i+1 }); | |
}); | |
factory.db.bulkDocs(json).then(function (result) { | |
console.debug("load ok", result); | |
// handle result | |
}).catch(function (err) { |
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
<ion-view title="Relation" cache-view="true" > | |
<div class="tabs tabs-top tabs-balanced has-subheader"> | |
<a class= "tab-item" ng-class="{'tab-item-active':slideIndex==0}" ng-click="changeSlide(0)"> | |
Echanges | |
</a> | |
<a class= "tab-item" ng-class="{'tab-item-active':slideIndex==1}" ng-click="changeSlide(1)"> | |
Infos | |
</a> | |
<!-- <a class= "tab-item" ng-class="{'tab-item-active':slideIndex==2}" ng-click="changeSlide(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
localDB.sync(remoteDB, options) | |
==> | |
options = { | |
batch_size : 1000, | |
live: live, | |
filter: 'app/appfilter', | |
retry : true, |
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
var stream = window.memorystream; | |
PouchDB.plugin(replicationStream.plugin); //error here. | |
console.debug("stream",stream); | |
$q.all([ | |
pouch.localDB.load(stream), //error here | |
pouch.remoteDB.dump(stream) // error here | |
]).then(function (res) { | |
console.log('stream Hooray the stream replication is complete!', res); | |
}); |
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
{ | |
"_id": "org.couchdb.user:charlotte2", | |
"_rev": "1-26c282b6db1e1ad8af301b2589dedd28", | |
"password_scheme": "pbkdf2", | |
"iterations": 10, | |
"name": "charlotte2", | |
"type": "user", | |
"roles": [ | |
"charlotte2", | |
"whenagainer" |
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
http://i.snag.gy/eW5dW.jpg |
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
[Error] Failed to load resource: Request header field Authorization is not allowed by Access-Control-Allow-Headers. (email_2_5DD0964D-E433-4D57-8F57-4578039F4C70, line 0) | |
[Error] XMLHttpRequest cannot load https://myapp.cloudant.com/db(2e)eee(2e)pro(40)aze(2e)com/email_2_5DD0964D-E433-4D57-8F57-4578039F4C70?revs=true&open_revs=[%222-e4d38e9072e9c717b393b19979b80a02%22]. Request header field Authorization is not allowed by Access-Control-Allow-Headers. | |
[Error] Failed to load resource: The network connection was lost. (_revs_diff, line 0) | |
[Log] Sync onPause (console-via-logger.js, line 173) | |
PouchError | |
[Error] Failed to load resource: Request header field Authorization is not allowed by Access-Control-Allow-Headers. (_changes, line 0) | |
[Error] XMLHttpRequest cannot load https://myapp.cloudant.com/db(2e)eee(2e)pro(40)aze(2e)com/_changes?timeout=25000&style=all_docs&feed=longpoll&heartbeat=10000&filter=filters%2Fwafilter1&since=4719-g1AAAAEneJzLYWBgYMlgTmGQT0lKzi9KdUhJstTLSs1LLUst0kvOyS9NScwr0ctLLckBKmRKZEiy____ |
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
var db = new PouchDB(cloudantURL); | |
db.createIndex({ | |
index: { | |
fields: ['_id'], | |
name: 'addressesIndex', | |
ddoc: 'addressesddoc', | |
type: 'json' | |
} | |
}) |
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
{"$or":[{"name":"james"},{"name":"doe"}]} |
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
root@user:/srv/nodejs/testLevelDown# rm -rf node_modules/ | |
root@user:/srv/nodejs/testLevelDown# npm install leveldown --verbose | |
npm info it worked if it ends with ok | |
npm verb cli [ '/usr/local/bin/node', | |
npm verb cli '/usr/local/bin/npm', | |
npm verb cli 'install', | |
npm verb cli 'leveldown', | |
npm verb cli '--verbose' ] | |
npm info using npm@3.6.0 | |
npm info using node@v5.6.0 |
OlderNewer