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
| r.db('mydb').table('blah') | |
| .filter(function(doc) { | |
| return doc('foo').filter({ id: 'thingYouWant' }).count().ne(0); | |
| }) |
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 doThing(key) { | |
| var updateData = {}; | |
| updateData[key] = r.row(key).add(1); | |
| return r.db('test').table('blah').get("350226c0-5572-42a9-9d31-e5658d1392e7") | |
| .update(updateData); | |
| } |
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 blessed = require('blessed'); | |
| var form = blessed.form({ width: 200, height: 200 }); | |
| var formLayout = blessed.boxlayout({ direction: 'vertical' }); | |
| formLayout.append(blessed.label({ content: 'Name:' })); | |
| formLayout.append(blessed.textbox({ name: 'name' })); | |
| formLayout.append(blessed.label({ content: 'Birthday:' })); | |
| formLayout.append(blessed.textbox({ name: 'birthday' })); | |
| formLayout.append(blessed.line({ direction: 'horizontal' })); |
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
| 'use strict'; | |
| function createType() { | |
| function Thing() {}; | |
| Thing.prototype = Object.create(Object.prototype, { | |
| first: { value: 1, enumerable: true, writable: true, configurable: false }, | |
| second: { value: 2, enumerable: true, writable: true, configurable: false } | |
| }); | |
| return Thing; | |
| }; |
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 defined properties | |
| function accessors(index) { | |
| return { | |
| enumerable: true, configurable: false, | |
| get: function() { return this._value[index]; }, | |
| set: function(value) { this._value[index] = value; } | |
| }; | |
| } | |
| function defineTypeWithDefinedProperties(fields) { |
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
| <template> | |
| <require from="./grid/grid"></require> | |
| <require from="./grid/column"></require> | |
| <grid rows.bind="people"> | |
| <column>${$index}</column> | |
| <column>${firstName}</column> | |
| <column>${lastName}</column> | |
| </grid> | |
| </template> |
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
| <template> | |
| <require from="./grid/grid"></require> | |
| <require from="./grid/column"></require> | |
| <grid view-model.ref="grid" rows.bind="people" class="table table-condensed table-bordered"> | |
| <column header="index">${$index}</column> | |
| <column header="first name">${firstName}</column> | |
| <column header="last name">${lastName}</column> | |
| </grid> | |
| </template> |
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
| <template> | |
| <require from="my-element"></require> | |
| <my-element></my-element> | |
| </template> |
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
| 'use strict'; | |
| const fs = require('fs'), | |
| path = require('path'); | |
| let modules = [], modulePath = path.join(__dirname, 'modules'); | |
| fs.readdir(modulePath, (err, files) => { | |
| files | |
| .filter(fileName => (fileName.indexOf('.') !== 0) && (fileName !== 'index.js')) | |
| .map(fileName => require(path.join(modulePath, fileName))()); | |
| }); |
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
| #include <qpid/messaging/Connection.h> | |
| #include <qpid/messaging/Message.h> | |
| #include <qpid/messaging/Receiver.h> | |
| #include <qpid/messaging/Session.h> | |
| #include <jsoncpp/json/reader.h> | |
| #include <vector> | |
| #include <string> | |
| #include <iostream> |