conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
export function TicketService($http,$filter,userService) {
=======
export default function TickerService($http,$filter,userService) {
>>>>>>>
export default function TicketService($http,$filter,userService) {
<<<<<<<
}
export function TripService($http) {
var trip;
return {
Trip: function(id){
return $http.get("http://staging.beeline.sg/trips/"+id, {
headers: {
"Authorization": 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoidXNlciIsInVzZXJJZCI6MSwiaWF0IjoxNDU2Mzk2MTU4fQ.eCgMcdrhZAWfWcQ3hhcYts9oyQetZ4prGGf4t5xEAwU'
}
}).then(function(response){
trip = response.data;
});
},
gettrip: function(){
return trip;
},
};
}
export function CompanyService($http) {
var company;
return {
Company: function(id){
return $http.get("http://staging.beeline.sg/companies/"+id, {
headers: {
"Authorization": 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoidXNlciIsInVzZXJJZCI6MSwiaWF0IjoxNDU2Mzk2MTU4fQ.eCgMcdrhZAWfWcQ3hhcYts9oyQetZ4prGGf4t5xEAwU'
}
}).then(function(response){
company = response.data;
});
},
getcompany: function(){
return company;
},
};
=======
>>>>>>> |
<<<<<<<
'app.sync.goTo': 'first',
'feed.pull.public': 'first'
=======
'app.html.nav': 'first'
>>>>>>>
'feed.pull.public': 'first',
'app.html.nav': 'first'
<<<<<<<
var div = h('div', [])
function subject (msg) {
return firstLine(msg.content.subject || msg.content.text)
}
function item (name, thread) {
var reply = thread.replies && thread.replies[thread.replies.length-1]
if(!thread.value) {
}
if(!thread.value) return
return h('div', [
h('h2', name),
h('div.subject', [subject(thread.value)]),
reply ? h('div.reply', [subject(reply.value)]) : null
]
)
}
pull(
api.feed.pull.public({reverse: true, limit: 1000}),
pull.through(console.log),
pull.collect(function (err, messages) {
var threads = messages.reduce(threadReduce, null)
for(var k in threads.channels) {
var id = threads.channels[k]
if(!threads.roots[id]) throw new Error('missing thread:'+id+' for channel:'+k)
var el = item(k, threads.roots[id])
if(el)
div.appendChild(el)
}
})
)
return div
return h('div', [
=======
return h('Page -home', [
>>>>>>>
var div = h('div', [])
function subject (msg) {
return firstLine(msg.content.subject || msg.content.text)
}
function item (name, thread) {
var reply = thread.replies && thread.replies[thread.replies.length-1]
if(!thread.value) {
}
if(!thread.value) return
return h('div', [
h('h2', name),
h('div.subject', [subject(thread.value)]),
reply ? h('div.reply', [subject(reply.value)]) : null
]
)
}
pull(
api.feed.pull.public({reverse: true, limit: 1000}),
pull.through(console.log),
pull.collect(function (err, messages) {
var threads = messages.reduce(threadReduce, null)
for(var k in threads.channels) {
var id = threads.channels[k]
if(!threads.roots[id]) throw new Error('missing thread:'+id+' for channel:'+k)
var el = item(k, threads.roots[id])
if(el)
div.appendChild(el)
}
})
)
return h('Page -home', [ |
<<<<<<<
'contact.html.follow': 'first',
'feed.pull.private': 'first',
'feed.pull.rollup': 'first',
=======
'contact.async.follow': 'first',
'contact.async.unfollow': 'first',
'contact.obs.followers': 'first',
'sbot.pull.userFeed': 'first',
>>>>>>>
'contact.html.follow': 'first',
'feed.pull.private': 'first',
'sbot.pull.userFeed': 'first', |
<<<<<<<
=======
threadNew: require('./page/threadNew'),
threadShow: require('./page/threadShow'),
>>>>>>>
threadNew: require('./page/threadNew'),
threadShow: require('./page/threadShow'), |
<<<<<<<
},
obs: {
relationships: require('./obs/relationships'),
},
=======
block: require('./html/block')
}
>>>>>>>
block: require('./html/block')
},
obs: {
relationships: require('./obs/relationships'),
}, |
<<<<<<<
=======
// Service Imports
import UserService from './services/UserService.js'; // OK
import RoutesService from './services/RoutesService.js'; // OK
import BookingService from './services/BookingService.js';
import TripService from './services/TripService.js'; // OK
import SuggestionService from './services/SuggestionService.js';
import CompanyService from './services/CompanyService.js'; // OK
import TicketService from './services/TicketService.js'; // OK
import OneMapService from './services/OneMapService.js';
import DateService from './services/DateService.js';
import StripeService from './services/StripeService.js';
import MapOptionsService from './services/MapOptions';
// Controller Imports
import IntroSlidesController from './controllers/IntroSlidesController.js'; // OK
import RoutesController from './controllers/RoutesController.js'; // OK
import RoutesMapController from './controllers/RoutesMapController.js'; // OK
import RoutesListController from './controllers/RoutesListController.js'; // OK
import RoutesResultsController from './controllers/RoutesResultsController.js'; // OK
import BookingStopsController from './controllers/BookingStopsController.js';
import BookingDatesController from './controllers/BookingDatesController.js';
import BookingConfirmationController from './controllers/BookingConfirmationController.js';
import BookingSummaryController from './controllers/BookingSummaryController.js';
import BookingHistoryController from './controllers/BookingHistoryController.js';
import SuggestController from './controllers/SuggestController.js';
import TicketsController from './controllers/TicketsController.js';
import TicketDetailController from './controllers/TicketDetailController.js';
import SettingsController from './controllers/SettingsController.js'; // OK
>>>>>>>
<<<<<<<
.factory('TicketService', require('./services/TicketService.js').default)
.factory('UserService', require('./services/UserService.js').default)
.factory('TripService', require('./services/TripService.js').default)
.factory('CompanyService', require('./services/CompanyService.js').default)
.factory('SuggestionService', require('./services/SuggestionService.js').default)
.factory('RoutesService', require('./services/RoutesService.js').default)
.factory('BookingService', require('./services/BookingService.js').default)
.factory('OneMapService', require('./services/OneMapService.js').default)
.factory('DateService', require('./services/DateService.js').default)
.factory('StripeService', require('./services/StripeService.js').default)
.service('MapOptions', require('./services/MapOptions').default)
.controller('IntroSlidesController', require('./controllers/IntroSlidesController.js').default)
.controller('RoutesController', require('./controllers/RoutesController.js').default)
.controller('RoutesMapController', require('./controllers/RoutesMapController.js').default)
.controller('RoutesListController', require('./controllers/RoutesListController.js').default)
.controller('RoutesResultsController', require('./controllers/RoutesResultsController.js').default)
.controller('BookingStopsController', require('./controllers/BookingStopsController.js').default)
.controller('BookingDatesController', require('./controllers/BookingDatesController.js').default)
.controller('BookingSummaryController', require('./controllers/BookingSummaryController.js').default)
.controller('BookingConfirmationController', require('./controllers/BookingConfirmationController.js').default)
.controller('SuggestController', require('./controllers/SuggestController.js').default)
.controller('SettingsController', require('./controllers/SettingsController.js').default)
.controller('TicketsController', require('./controllers/TicketsController.js').default)
.controller('TicketDetailController', require('./controllers/TicketDetailController.js').default)
=======
.factory('TicketService', TicketService)
.factory('UserService', UserService)
.factory('TripService', TripService)
.factory('CompanyService', CompanyService)
.factory('SuggestionService', SuggestionService)
.factory('RoutesService', RoutesService)
.factory('BookingService', BookingService)
.factory('OneMapService', OneMapService)
.factory('DateService', DateService)
.factory('StripeService', StripeService)
.service('MapOptions', MapOptionsService)
.controller('IntroSlidesController', IntroSlidesController)
.controller('RoutesController', RoutesController)
.controller('RoutesMapController', RoutesMapController)
.controller('RoutesListController', RoutesListController)
.controller('RoutesResultsController', RoutesResultsController)
.controller('BookingStopsController', BookingStopsController)
.controller('BookingDatesController', BookingDatesController)
.controller('BookingSummaryController', BookingSummaryController)
.controller('BookingConfirmationController', BookingConfirmationController)
.controller('SuggestController', SuggestController)
.controller('SettingsController', SettingsController)
.controller('TicketsController', TicketsController)
.controller('TicketDetailController', TicketDetailController)
.controller('BookingHistoryController', BookingHistoryController)
>>>>>>>
.factory('TicketService', require('./services/TicketService.js').default)
.factory('UserService', require('./services/UserService.js').default)
.factory('TripService', require('./services/TripService.js').default)
.factory('CompanyService', require('./services/CompanyService.js').default)
.factory('SuggestionService', require('./services/SuggestionService.js').default)
.factory('RoutesService', require('./services/RoutesService.js').default)
.factory('BookingService', require('./services/BookingService.js').default)
.factory('OneMapService', require('./services/OneMapService.js').default)
.factory('DateService', require('./services/DateService.js').default)
.factory('StripeService', require('./services/StripeService.js').default)
.service('MapOptions', require('./services/MapOptions').default)
.controller('IntroSlidesController', require('./controllers/IntroSlidesController.js').default)
.controller('RoutesController', require('./controllers/RoutesController.js').default)
.controller('RoutesMapController', require('./controllers/RoutesMapController.js').default)
.controller('RoutesListController', require('./controllers/RoutesListController.js').default)
.controller('RoutesResultsController', require('./controllers/RoutesResultsController.js').default)
.controller('BookingStopsController', require('./controllers/BookingStopsController.js').default)
.controller('BookingDatesController', require('./controllers/BookingDatesController.js').default)
.controller('BookingSummaryController', require('./controllers/BookingSummaryController.js').default)
.controller('BookingConfirmationController', require('./controllers/BookingConfirmationController.js').default)
.controller('SuggestController', require('./controllers/SuggestController.js').default)
.controller('SettingsController', require('./controllers/SettingsController.js').default)
.controller('TicketsController', require('./controllers/TicketsController.js').default)
.controller('TicketDetailController', require('./controllers/TicketDetailController.js').default)
.controller('BookingHistoryController', require('./controllers/BookingHistoryController.js').default) |
<<<<<<<
}, 1250);
},
=======
}, 6250);
},
'test start/stop': function(assert) {
assert.expect(1);
var c = new cron.CronJob('* * * * * *', function() {
assert.ok(true);
this.stop();
});
c.stop();
setTimeout(function() {
c.start();
}, 1000);
setTimeout(function() {
assert.done();
}, 3250);
}
>>>>>>>
}, 1250);
},
'test start/stop': function(assert) {
assert.expect(1);
var c = new cron.CronJob('* * * * * *', function() {
assert.ok(true);
this.stop();
});
setTimeout(function() {
c.start();
}, 1000);
setTimeout(function() {
assert.done();
}, 3250);
} |
<<<<<<<
this.connector = new ConnectorClass(connectorConfig, this.apiHandler);
// Get the ApiKeys variables from the Config through Connector.
this.config = this.connector.getConfig();
=======
>>>>>>>
<<<<<<<
this.connector = new ConnectorClass(connectorConfig, this.apiHandler);
// Get the ApiKeys variables from the Config through Connector.
this.config = this.connector.getConfig();
=======
>>>>>>> |
<<<<<<<
"$window",
=======
"OneMapPlaceService",
>>>>>>>
"$window",
"OneMapPlaceService",
<<<<<<<
$ionicPopup,
$window
=======
$ionicPopup,
OneMapPlaceService
>>>>>>>
$ionicPopup,
$window,
OneMapPlaceService |
<<<<<<<
swal("Nice!", "You just superliked " + user.name + ", increasing your chance of a match by 3x!" , "success");
ga_storage._trackEvent('Keyboard', 'up');
window._rg.record('keyboard', 'up', { origin: 'tinderplusplus' });
=======
swal("Good job!", "You just superliked!", "success")
>>>>>>>
swal("Nice!", "You just superliked " + user.name + ", increasing your chance of a match by 3x!" , "success"); |
<<<<<<<
var chai = require('chai')
chai.use(require('chai-as-promised'))
var assert = chai.assert
var sinon = require('sinon')
=======
var chai = require('chai');
var assert = chai.assert;
var sinon = require('sinon');
>>>>>>>
var chai = require('chai')
var assert = chai.assert
var sinon = require('sinon')
<<<<<<<
assert.instanceOf(err, TimeoutError)
})
done()
}, 50)
})
=======
assert.instanceOf(err, TimeoutError);
});
done();
});
});
>>>>>>>
assert.instanceOf(err, TimeoutError)
})
done()
})
}) |
<<<<<<<
const TaskError = require('../../src/errors/task-error')
const TaskFatalError = require('../../src/errors/task-fatal-error')
const Worker = require('../../src/worker')
=======
const Worker = require('../../lib/worker')
>>>>>>>
const Worker = require('../../src/worker') |
<<<<<<<
element || (element = this.element);
if (element.nodeType !== 1) {
return;
}
=======
if (element == null) {
element = this.element;
}
>>>>>>>
if (element == null) {
element = this.element;
}
if (element.nodeType !== 1) {
return;
} |
<<<<<<<
_pdfInfo: {
fingerprint: 'a62067476e69734bb8eb60122615dfbf',
numPages: 4,
},
=======
fingerprint: 'a62067476e69734bb8eb60122615dfbf',
>>>>>>>
_pdfInfo: {
fingerprint: 'a62067476e69734bb8eb60122615dfbf',
numPages: 4,
},
fingerprint: 'a62067476e69734bb8eb60122615dfbf', |
<<<<<<<
.directive('progressBar', require('./directives/progressBar/progressBar.js').default)
=======
.directive('dailyTripsBroker', require('./directives/dailyTripsBroker.js').default)
>>>>>>>
.directive('progressBar', require('./directives/progressBar/progressBar.js').default)
.directive('dailyTripsBroker', require('./directives/dailyTripsBroker.js').default) |
<<<<<<<
* @param menuRenderer - the function that can be used to override the default drop-down list of options
* @param groupByKey - the field name to group by
* @param optionGroupRenderer - the function that gets used to render the content of an option group
=======
* @param menuPosition - whether the menu should be rendered on top or bottom when it's open
>>>>>>>
* @param menuRenderer - the function that can be used to override the default drop-down list of options
* @param groupByKey - the field name to group by
* @param optionGroupRenderer - the function that gets used to render the content of an option group
* @param menuPosition - whether the menu should be rendered on top or bottom when it's open
<<<<<<<
simpleValue: true,
groupByKey: 'optionGroup',
optionGroupRenderer: defaultOptionGroupRenderer
=======
simpleValue: true,
menuPosition: 'bottom'
>>>>>>>
simpleValue: true,
groupByKey: 'optionGroup',
optionGroupRenderer: defaultOptionGroupRenderer
menuPosition: 'bottom' |
<<<<<<<
socket.on('message', spark.emits('data'));
socket.on('error', spark.emits('error'));
socket.on('close', spark.emits('end', function parser(next) {
=======
socket.on('message', spark.emits('incoming::data'));
socket.on('error', spark.emits('incoming::error'));
socket.on('close', spark.emits('incoming::end', function parser() {
>>>>>>>
socket.on('message', spark.emits('incoming::data'));
socket.on('error', spark.emits('incoming::error'));
socket.on('close', spark.emits('incoming::end', function parser(next) { |
<<<<<<<
socket.on('error', spark.emits('error'));
socket.on('data', spark.emits('data'));
socket.on('close', spark.emits('end', function parser(next) {
=======
socket.on('error', spark.emits('incoming::error'));
socket.on('data', spark.emits('incoming::data'));
socket.on('close', spark.emits('incoming::end', function parser() {
>>>>>>>
socket.on('error', spark.emits('incoming::error'));
socket.on('data', spark.emits('incoming::data'));
socket.on('close', spark.emits('incoming::end', function parser(next) { |
<<<<<<<
socket.on('message', spark.emits('data'));
socket.on('error', spark.emits('error'));
socket.on('close', spark.emits('end', function parser(next) {
=======
socket.on('message', spark.emits('incoming::data'));
socket.on('error', spark.emits('incoming::error'));
socket.on('close', spark.emits('incoming::end', function parser() {
>>>>>>>
socket.on('message', spark.emits('incoming::data'));
socket.on('error', spark.emits('incoming::error'));
socket.on('close', spark.emits('incoming::end', function parser(next) { |
<<<<<<<
borderWidth: 2,
spanGaps: true
=======
pointHoverBackgroundColor: color,
borderWidth: 2
>>>>>>>
borderWidth: 2,
pointHoverBackgroundColor: color,
spanGaps: true |
<<<<<<<
/**
* Draw the entire surface with a translation transform.
* @param {number} x Where the surface is to be drawn horizontally.
* @param {number} y Where the surface is to be drawn vertically.
* @returns {undefined}
*/
this.draw = (x, y) => {
bindTextureSurface(texture);
prepareDraw(RENDER_MODE_SURFACES, 12);
setAttributesUv(0, 0, 1, 1);
setAttributesDraw(x, y, width, height);
setAttributesOrigin(0, 0);
};
/**
* Draw the entire surface with a scale transform.
* @param {number} x Where the surface is to be drawn horizontally.
* @param {number} y Where the surface is to be drawn vertically.
* @param {number} xScale Horizontal scale.
* @param {number} yScale Vertical scale.
* @returns {undefined}
*/
this.drawScaled = (x, y, xScale, yScale) => {
bindTextureSurface(texture);
prepareDraw(RENDER_MODE_SURFACES, 12);
setAttributesUv(0, 0, 1, 1);
setAttributesDraw(x, y, width * xScale, height * yScale);
setAttributesOrigin(0, 0);
};
/**
* Draw the entire surface with a shear transform.
* @param {number} x Where the surface is to be drawn horizontally.
* @param {number} y Where the surface is to be drawn vertically.
* @param {number} xShear Horizontal shear.
* @param {number} yShear Vertical shear.
* @returns {undefined}
*/
this.drawSheared = (x, y, xShear, yShear) => {
bindTextureSurface(texture);
prepareDraw(RENDER_MODE_SURFACES, 12);
setAttributesUv(0, 0, 1, 1);
setAttributesDrawSheared(x, y, width, height, xShear, yShear);
setAttributesOrigin(0, 0);
};
/**
* Draw the entire surface with a given transform.
* @param {Transform} transform The transformation to apply.
* @returns {undefined}
*/
this.drawTransformed = transform => {
bindTextureSurface(texture);
prepareDraw(RENDER_MODE_SURFACES, 12);
setAttributesUv(0, 0, 1, 1);
setAttributesDrawTransform(transform, width, height);
setAttributesOrigin(0, 0);
};
/**
* Draw a part of the surface at a given position.
* @param {number} x Where the part is to be drawn horizontally.
* @param {number} y Where the part is to be drawn vertically.
* @param {number} left The horizontal offset in the surface.
* @param {number} top The vertical offset in the surface.
* @param {number} w The width of the part.
* @param {number} h The height of the part.
* @returns {undefined}
*/
this.drawPart = (x, y, left, top, w, h) => {
bindTextureSurface(texture);
const wf = 1 / width;
const hf = 1 / height;
prepareDraw(RENDER_MODE_SURFACES, 12);
setAttributesUvPart(0, 0, 1, 1, left * wf, top * hf, w * wf, h * hf);
setAttributesDraw(x, y, w, h);
setAttributesOrigin(0, 0);
};
/**
* Draw a part of the surface with a given transform.
* @param {Transform} transform The transformation to apply.
* @param {number} left The horizontal offset in the surface.
* @param {number} top The vertical offset in the surface.
* @param {number} w The width of the part.
* @param {number} h The height of the part.
* @returns {undefined}
*/
this.drawPartTransformed = (transform, left, top, w, h) => {
bindTextureSurface(texture);
const wf = 1 / width;
const hf = 1 / height;
prepareDraw(RENDER_MODE_SURFACES, 12);
setAttributesUvPart(0, 0, 1, 1, left * wf, top * hf, w * wf, h * hf);
setAttributesDrawTransform(transform, w, h);
setAttributesOrigin(0, 0);
};
/**
* Free all allocated GL objects for this surface.
* @returns {undefined}
*/
=======
>>>>>>>
<<<<<<<
/**
* Retrieve the WebGL texture.
* @returns {WebGLTexture} The used texture.
* @private
*/
=======
this._prepareDraw = () => {
bindTextureSurface(texture);
prepareDraw(RENDER_MODE_SURFACES, 12);
instanceBuffer[++instanceBufferAt] = 0;
instanceBuffer[++instanceBufferAt] = 0;
};
this._addFrame = frame => {
if(ready) {
frame[5] /= width;
frame[6] /= height;
frame[7] /= width;
frame[8] /= height;
}
else
frames.push(frame);
};
>>>>>>>
this._prepareDraw = () => {
bindTextureSurface(texture);
prepareDraw(RENDER_MODE_SURFACES, 12);
instanceBuffer[++instanceBufferAt] = 0;
instanceBuffer[++instanceBufferAt] = 0;
};
this._addFrame = frame => {
if(ready) {
frame[5] /= width;
frame[6] /= height;
frame[7] /= width;
frame[8] /= height;
}
else
frames.push(frame);
};
<<<<<<<
/**
* Retrieve all Shader objects.
* @returns {Shader[]} A list of all Shader objects.
*/
=======
this._getUvLeft = () => 0;
this._getUvTop = () => 0;
this._getUvWidth = () => 1;
this._getUvHeight = () => 1;
>>>>>>>
this._getUvLeft = () => 0;
this._getUvTop = () => 0;
this._getUvWidth = () => 1;
this._getUvHeight = () => 1; |
<<<<<<<
scope: {
route: '=',
},
link: function (scope, element, attributes) {
scope.click = function(routeId){
BookingService.reset();
BookingService.routeId = routeId;
$state.go('tabs.booking-pickup');
};
},
=======
scope: {
route: '=',
},
link: function (scope, element, attributes) {
// scope.click = function(routeId){
// BookingService.reset();
// BookingService.routeId = routeId;
// $state.go('tabs.booking-pickup');
// };
},
>>>>>>>
scope: {
route: '=',
},
link: function (scope, element, attributes) {
}, |
<<<<<<<
<Link key={index} to={`/products/${product.id}`}>
<div key={index}>
=======
<Link key={index} to={`/products/${product.id}`}>
<div>
>>>>>>>
<Link key={index} to={`/products/${product.id}`}>
<Link key={index} to={`/products/${product.id}`}>
<div key={index}> |
<<<<<<<
'service.dispatcher': function addService(di) {
return require(ROOT_PATH + 'service/dispatcher')(
di.get('io.server')
);
},
=======
>>>>>>>
'service.dispatcher': function addService(di) {
return require(ROOT_PATH + 'service/dispatcher')(
di.get('io.server')
);
}, |
<<<<<<<
if(searchId){
id = searchId;
}
=======
initializeConversationViewFromFbid(id);
};
var initializeConversationViewFromFbid = function(id) {
>>>>>>>
if(searchId){
id = searchId;
}
initializeConversationViewFromFbid(id);
};
var initializeConversationViewFromFbid = function(id) { |
<<<<<<<
.filter('routeStartTime', () => (route) => (route && route.trips) ? route.trips[0].tripStops[0].time : '')
.filter('routeEndTime', () => (route) => (route && route.trips) ? route.trips[0].tripStops[route.trips[0].tripStops.length-1].time : '')
.filter('routeStartRoad', () => (route) => (route && route.trips) ? route.trips[0].tripStops[0].stop.road : '')
.filter('routeEndRoad', () => (route) => (route && route.trips) ? route.trips[0].tripStops[route.trips[0].tripStops.length-1].stop.road : '')
.filter('companyLogo', () => companyLogo)
=======
.filter('routeStartTime', () => (route) => (route && route.trips) ? route.trips[0].tripStops[0].time : '')
.filter('routeEndTime', () => (route) => (route && route.trips) ? route.trips[0].tripStops[route.trips[0].tripStops.length-1].time : '')
.filter('routeStartRoad', () => (route) => (route && route.trips) ? route.trips[0].tripStops[0].stop.road : '')
.filter('routeEndRoad', () => (route) => (route && route.trips) ? route.trips[0].tripStops[route.trips[0].tripStops.length-1].stop.road : '')
>>>>>>>
.filter('routeStartTime', () => (route) => (route && route.trips) ? route.trips[0].tripStops[0].time : '')
.filter('routeEndTime', () => (route) => (route && route.trips) ? route.trips[0].tripStops[route.trips[0].tripStops.length-1].time : '')
.filter('routeStartRoad', () => (route) => (route && route.trips) ? route.trips[0].tripStops[0].stop.road : '')
.filter('routeEndRoad', () => (route) => (route && route.trips) ? route.trips[0].tripStops[route.trips[0].tripStops.length-1].stop.road : '')
.filter('companyLogo', () => companyLogo)
<<<<<<<
.service('MapOptions', MapOptionsService)
=======
.controller('IntroSlidesController', IntroSlidesController)
.controller('RoutesController', RoutesController)
.controller('RoutesMapController', RoutesMapController)
.controller('RoutesListController', RoutesListController)
.controller('RoutesResultsController', RoutesResultsController)
>>>>>>>
.service('MapOptions', MapOptionsService)
.controller('IntroSlidesController', IntroSlidesController)
.controller('RoutesController', RoutesController)
.controller('RoutesMapController', RoutesMapController)
.controller('RoutesListController', RoutesListController)
.controller('RoutesResultsController', RoutesResultsController) |
<<<<<<<
startLat: search.startLat,
startLng: search.startLng,
endLat: search.endLat,
endLng: search.endLng,
arrivalTime: search.arrivalTime,
startTime: search.startTime,
endTime: search.endTime
}),
}).then(function(response) {
return transformRouteData(response.data);
});
=======
startLat: search.startLat,
startLng: search.startLng,
endLat: search.endLat,
endLng: search.endLng,
arrivalTime: search.arrivalTime,
startTime: search.startTime,
endTime: search.endTime
}),
}).then(function(response) {
return transformRouteData(response.data);
});
>>>>>>>
startLat: search.startLat,
startLng: search.startLng,
endLat: search.endLat,
endLng: search.endLng,
arrivalTime: search.arrivalTime,
startTime: search.startTime,
endTime: search.endTime
}),
}).then(function(response) {
return transformRouteData(response.data);
});
<<<<<<<
=======
>>>>>>> |
<<<<<<<
* Init view with info contained in configuration
* @method FORGE.RenderManager#_initView
* @param {FORGE.SceneParser} sceneConfig - scene configuration
* @private
*/
FORGE.RenderManager.prototype._initView = function(sceneConfig)
{
var sceneViewConfig = /** @type {ViewConfig} */ (sceneConfig.view);
var storyViewConfig = /** @type {ViewConfig} */ (this._viewer.config.view);
var extendedViewConfig = /** @type {ViewConfig} */ (FORGE.Utils.extendMultipleObjects(storyViewConfig, sceneViewConfig));
var type = (typeof extendedViewConfig.type === "string") ? extendedViewConfig.type.toLowerCase() : FORGE.ViewType.RECTILINEAR;
if (this._view !== null && this._view.type === type)
{
this.log("Render manager won't set view if it's already set");
return;
}
switch (type)
{
case FORGE.ViewType.GOPRO:
case FORGE.ViewType.RECTILINEAR:
case FORGE.ViewType.FLAT:
this.setView(type);
break;
default:
this.setView(FORGE.ViewType.RECTILINEAR);
break;
}
};
/**
=======
>>>>>>>
<<<<<<<
this._mediaSound = new FORGE.Sound(this._viewer, soundConfig.uid, soundConfig.source.url, (soundConfig.type === FORGE.SoundType.AMBISONIC ? true : false));
=======
this._mediaSound = new FORGE.Sound(this._viewer, sceneConfig.sound.uid, sceneConfig.sound.source.url, (sceneConfig.sound.type === FORGE.SoundType.AMBISONIC));
>>>>>>>
this._mediaSound = new FORGE.Sound(this._viewer, sceneConfig.sound.uid, sceneConfig.sound.source.url, (sceneConfig.sound.type === FORGE.SoundType.AMBISONIC));
<<<<<<<
this._setBackgroundRendererType(status);
this._setBackgroundRenderer(this._backgroundRendererType);
=======
this._setBackgroundRenderer(FORGE.BackgroundType.SHADER);
>>>>>>>
this._setBackgroundRendererType(status);
this._setBackgroundRenderer(this._backgroundRendererType);
<<<<<<<
return this._view;
},
/** @this {FORGE.RenderManager} */
set: function(value)
{
if (typeof value === "string" && value !== "")
{
switch (value)
{
case FORGE.ViewType.GOPRO:
case FORGE.ViewType.RECTILINEAR:
case FORGE.ViewType.FLAT:
this.setView(value);
break;
default:
throw "View type not supported: " + value;
}
}
=======
return this._viewManager;
>>>>>>>
return this._viewManager; |
<<<<<<<
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
=======
}, {
key: 'renderFooter',
value: function renderFooter() {
var leave = this.state.leave;
if (leave) {
return null;
}
return _react2.default.createElement(
'div',
{ className: 'content-footer' },
_react2.default.createElement(
'div',
{ className: 'flex-container', style: { height: 100, fontSize: '50px' } },
_react2.default.createElement('div', { className: (0, _classnames2.default)("flex-item"),
dangerouslySetInnerHTML: { __html: 'Wikimedia Commons Images' } }),
_react2.default.createElement(
'div',
{ className: (0, _classnames2.default)("flex-item") },
_react2.default.createElement(
'span',
null,
'Stack Overflow Questions'
)
),
_react2.default.createElement(
'div',
{ className: (0, _classnames2.default)("flex-item") },
_react2.default.createElement(
'span',
null,
'NYC City Bike Usage Forecast'
)
)
)
);
>>>>>>>
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
<<<<<<<
module.exports = invariant;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
=======
var THUMBNAIL_SIZE = exports.THUMBNAIL_SIZE = 60,
IMG_SIZE = exports.IMG_SIZE = 240,
CHANNEL_IMAGES = exports.CHANNEL_IMAGES = [{ id: "image", name: "Wikimedia Commons Images", src: './images/image.jpg', className: CONTENT_CLASSES[0] }, { id: "text", name: "Stack Overflow Questions", src: './images/text.jpg', className: CONTENT_CLASSES[1] }, { id: "map", name: "NYC City Bike Usage Forecast", src: './images/map.jpg', className: CONTENT_CLASSES[2] }],
PRESENT_IMAGES = exports.PRESENT_IMAGES = [{ id: "10000086", src: "./images/10000086.jpg", name: "JELLYFISH" }, { id: "00000359", src: "./images/00000359.jpg", name: "BEE" }, { id: "00000595", src: "./images/00000595.jpg", name: "F1" }, { id: "00000615", src: "./images/00000615.jpg", name: "FIREWORKS" }, { id: "00000895", src: "./images/00000895.jpg", name: "BIRD" }, { id: "00001410", src: "./images/00001410.jpg", name: "CHARACTOR" }, { id: "00001435", src: "./images/00001435.jpg", name: "ILLUSTRATION" }, { id: "00001628", src: "./images/00001628.jpg", name: "SUNSET" }, { id: "00002269", src: "./images/00002269.jpg", name: "SIGN" }, { id: "00004509", src: "./images/00004509.jpg", name: "TYPHOON" }, { id: "00005020", src: "./images/00005020.jpg", name: "FISH" }, { id: "00005318", src: "./images/00005318.jpg", name: "ISLAND" }, { id: "00005332", src: "./images/00005332.jpg", name: "SUN FLOWER" }, { id: "00005558", src: "./images/00005558.jpg", name: "LEGO BLOCK" }, { id: "00005572", src: "./images/00005572.jpg", name: "CAR" }, { id: "00005779", src: "./images/00005779.jpg", name: "ELEPHANT" }, { id: "00005867", src: "./images/00005867.jpg", name: "OWL" }, { id: "00005986", src: "./images/00005986.jpg", name: "SWAN" }, { id: "00006141", src: "./images/00006141.jpg", name: "PICTURE" }, { id: "00006205", src: "./images/00006205.jpg", name: "GRAPH" }, { id: "00006322", src: "./images/00006322.jpg", name: "BUTTERFLY" }, { id: "00006562", src: "./images/00006562.jpg", name: "BALLOON" }, { id: "00006604", src: "./images/00006604.jpg", name: "HORSE" }, { id: "00006646", src: "./images/00006646.jpg", name: "MOON" }, { id: "00006906", src: "./images/00006906.jpg", name: "DESERT" }, { id: "00006935", src: "./images/00006935.jpg", name: "CAT" }, { id: "00008742", src: "./images/00008742.jpg", name: "DRAGONFLY" }, { id: "00008782", src: "./images/00008782.jpg", name: "LUXURY LINER" }, { id: "00009400", src: "./images/00009400.jpg", name: "CLUCULATOR" }, { id: "10000086", src: "./images/10000086.jpg", name: "JELLYFISH" }];
>>>>>>>
module.exports = invariant;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
<<<<<<<
"title": "Image",
"subtitle": "Choose one of those to start finding similar images\nfrom 1 million images on Wikimedia with Google BigQuery."
=======
"title": "Wikimedia Commons Images",
"subtitle": "Choose one of those to start finding similar images\nfrom 1 million images on Wikimedia Commons with Google BigQuery."
>>>>>>>
"title": "Image",
"subtitle": "Choose one of those to start finding similar images\nfrom 1 million images on Wikimedia Commons with Google BigQuery." |
<<<<<<<
=======
// console.log('fibertree rootNode: ', rootNode);
>>>>>>>
// console.log('fibertree rootNode: ', rootNode);
<<<<<<<
console.log('arr before adding atom data: ', treeArr)
const recoilCurrentState = {}
getAtomValues(recoilCurrentState);
treeArr.push(recoilCurrentState);
=======
// console.log('arr before adding atom data: ', treeArr)
// const recoilCurrentState = {}
// getAtomValues(recoilCurrentState);
const atomState = {};
treeArr.push(getAtomValues(treeArr[0], 'atomValues'));
console.log('arr before sending to content script: ', treeArr);
>>>>>>>
// console.log('arr before adding atom data: ', treeArr)
// const recoilCurrentState = {}
// getAtomValues(recoilCurrentState);
const atomState = {};
treeArr.push(getAtomValues(treeArr[0], 'atomValues'));
console.log('arr before sending to content script: ', treeArr);
<<<<<<<
function getAtomValues(recoilCurrentState) {
// recoildebugstate has the atom data stored
const tempObj = {};
if (
window.$recoilDebugStates &&
Array.isArray(window.$recoilDebugStates) &&
window.$recoilDebugStates.length
) {
let atomData = window.$recoilDebugStates[window.$recoilDebugStates.length - 1];
atomData['atomValues'].forEach((value, key) => {
// console.log('Key:', key, 'value:', value.contents);
tempObj[key] = value.contents;
})
=======
// function getAtomValues(recoilCurrentState) {
// // recoildebugstate has the atom data stored
// const tempObj = {};
// if (
// window.$recoilDebugStates &&
// Array.isArray(window.$recoilDebugStates) &&
// window.$recoilDebugStates.length
// ) {
// let atomData = window.$recoilDebugStates[window.$recoilDebugStates.length - 1];
// atomData['atomValues'].forEach((value, key) => {
// // console.log('Key:', key, 'value:', value.contents);
// tempObj[key] = value.contents;
// })
// }
// recoilCurrentState.atomVal = tempObj;
// }
function getAtomValues(obj, key, out) {
proto = Object.prototype,
ts = proto.toString,
hasOwn = proto.hasOwnProperty.bind(obj);
if ('[object Array]' !== ts.call(out)) out = [];
for (let i in obj) {
if (hasOwn(i)) {
if (i === key) {
out.push(obj[i]);
} else if ('[object Array]' === ts.call(obj[i]) || '[object Object]' === ts.call(obj[i])) {
getAtomValues(obj[i], key, out);
}
}
}
const result = {}
for (let i = 0; i < out.length; i++) {
if (out[i]) {
for (let [key, value] of out[i]) {
result[key] = value.contents;
}
}
>>>>>>>
// function getAtomValues(recoilCurrentState) {
// // recoildebugstate has the atom data stored
// const tempObj = {};
// if (
// window.$recoilDebugStates &&
// Array.isArray(window.$recoilDebugStates) &&
// window.$recoilDebugStates.length
// ) {
// let atomData = window.$recoilDebugStates[window.$recoilDebugStates.length - 1];
// atomData['atomValues'].forEach((value, key) => {
// // console.log('Key:', key, 'value:', value.contents);
// tempObj[key] = value.contents;
// })
// }
// recoilCurrentState.atomVal = tempObj;
// }
function getAtomValues(obj, key, out) {
proto = Object.prototype,
ts = proto.toString,
hasOwn = proto.hasOwnProperty.bind(obj);
if ('[object Array]' !== ts.call(out)) out = [];
for (let i in obj) {
if (hasOwn(i)) {
if (i === key) {
out.push(obj[i]);
} else if ('[object Array]' === ts.call(obj[i]) || '[object Object]' === ts.call(obj[i])) {
getAtomValues(obj[i], key, out);
}
}
}
const result = {}
for (let i = 0; i < out.length; i++) {
if (out[i]) {
for (let [key, value] of out[i]) {
result[key] = value.contents;
}
} |
<<<<<<<
var execFile = require('child_process').execFile;
=======
const modulename = {};
>>>>>>>
const execFile = require('child_process').execFile;
<<<<<<<
if (!callback && typeof Promise === 'function') {
// eslint-disable-next-line no-undef
return new Promise(function(resolve, reject) {
gitBranchIs(branchNameOrTest, options, function(err, result) {
=======
if (!callback) {
return new Promise((resolve, reject) => {
func(options, (err, result) => {
>>>>>>>
if (!callback) {
return new Promise((resolve, reject) => {
gitBranchIs(branchNameOrTest, options, (err, result) => { |
<<<<<<<
/** Options for {@link gitBranchIs}.
*
* @typedef {{
* cwd: (?string|undefined),
* gitDir: (?string|undefined),
* gitPath: (string|undefined)
* }}
* @property {?string=} cwd Current working directory where the branch name is
* tested.
* @property {?string=} gitDir Path to the repository (i.e.
* <code>--git-dir=</code> option to <code>git</code>).
* @property {string=} git Git binary name or path to use (default:
* <code>'git'</code>).
*/
var GitBranchIsOptions = {
cwd: '',
gitDir: '',
gitPath: 'git'
};
/** Checks that the current branch of a git repository has a given name.
*
* @param {string} branchName Expected name of current branch.
* @param {?GitBranchIsOptions=} options Options.
* @param {?function(Error, boolean=)=} callback Callback function called
* with <code>true</code> if the current branch is <code>branchName</code>,
* <code>false</code> if not, <code>Error</code> if it could not be determined.
* @return {Promise|undefined} If <code>callback</code> is not given and
* <code>global.Promise</code> is defined, a <code>Promise</code> with
* <code>true</code> if the current branch is <code>branchName</code>,
* <code>false</code> if not, <code>Error</code> if it could not be determined.
*/
function gitBranchIs(branchName, options, callback) {
if (!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback && typeof Promise === 'function') {
return new Promise(function(resolve, reject) {
gitBranchIs(branchName, options, function(err, result) {
if (err) reject(err); else resolve(result);
});
});
}
if (typeof callback !== 'function') {
throw new TypeError('callback must be a function');
}
if (options && typeof options !== 'object') {
process.nextTick(function() {
callback(new TypeError('options must be an Object'));
});
return undefined;
}
gitBranchIs.getBranch(options, function(err, currentBranch) {
if (err) {
callback(err);
return;
}
callback(null, branchName === currentBranch);
});
}
/** Checks that the current branch of a git repository has a given name.
*
* @param {?GitBranchIsOptions=} options Options.
* @param {?function(Error, string=)=} callback Callback function called
* with the current branch name, or <code>Error</code> if it could not be
* determined.
* @return {Promise|undefined} If <code>callback</code> is not given and
* <code>global.Promise</code> is defined, a <code>Promise</code> with the
* current branch name, or <code>Error</code> if it could not be determined.
*/
gitBranchIs.getBranch = function getBranch(options, callback) {
if (!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback && typeof Promise === 'function') {
return new Promise(function(resolve, reject) {
getBranch(options, function(err, result) {
if (err) reject(err); else resolve(result);
});
});
}
if (typeof callback !== 'function') {
throw new TypeError('callback must be a function');
}
if (options && typeof options !== 'object') {
process.nextTick(function() {
callback(new TypeError('options must be an Object'));
});
return undefined;
}
var combinedOpts = {};
Object.keys(GitBranchIsOptions).forEach(function(prop) {
combinedOpts[prop] = GitBranchIsOptions[prop];
});
Object.keys(Object(options)).forEach(function(prop) {
combinedOpts[prop] = options[prop];
});
var gitArgs = ['symbolic-ref', '--short', 'HEAD'];
if (combinedOpts.gitDir) {
gitArgs.unshift('--git-dir=' + combinedOpts.gitDir);
}
try {
execFile(
combinedOpts.gitPath,
gitArgs,
{cwd: combinedOpts.cwd},
function(errExec, stdout, stderr) {
if (errExec) {
callback(errExec);
return;
}
// Note: ASCII space and control characters are forbidden in names
// https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
callback(null, stdout.trimRight());
}
);
} catch (errExec) {
process.nextTick(function() {
callback(errExec);
});
return undefined;
}
};
module.exports = gitBranchIs;
=======
modulename.func = function func(options, callback) {
if (!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback && typeof Promise === 'function') {
// eslint-disable-next-line no-undef
return new Promise(function(resolve, reject) {
func(options, function(err, result) {
if (err) { reject(err); } else { resolve(result); }
});
});
}
if (typeof callback !== 'function') {
throw new TypeError('callback must be a function');
}
if (options && typeof options !== 'object') {
process.nextTick(function() {
callback(new TypeError('options must be an object'));
});
return undefined;
}
// Do stuff
return undefined;
};
module.exports = modulename;
>>>>>>>
/** Options for {@link gitBranchIs}.
*
* @typedef {{
* cwd: (?string|undefined),
* gitDir: (?string|undefined),
* gitPath: (string|undefined)
* }}
* @property {?string=} cwd Current working directory where the branch name is
* tested.
* @property {?string=} gitDir Path to the repository (i.e.
* <code>--git-dir=</code> option to <code>git</code>).
* @property {string=} git Git binary name or path to use (default:
* <code>'git'</code>).
*/
var GitBranchIsOptions = {
cwd: '',
gitDir: '',
gitPath: 'git'
};
/** Checks that the current branch of a git repository has a given name.
*
* @param {string} branchName Expected name of current branch.
* @param {?GitBranchIsOptions=} options Options.
* @param {?function(Error, boolean=)=} callback Callback function called
* with <code>true</code> if the current branch is <code>branchName</code>,
* <code>false</code> if not, <code>Error</code> if it could not be determined.
* @return {Promise|undefined} If <code>callback</code> is not given and
* <code>global.Promise</code> is defined, a <code>Promise</code> with
* <code>true</code> if the current branch is <code>branchName</code>,
* <code>false</code> if not, <code>Error</code> if it could not be determined.
*/
function gitBranchIs(branchName, options, callback) {
if (!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback && typeof Promise === 'function') {
// eslint-disable-next-line no-undef
return new Promise(function(resolve, reject) {
gitBranchIs(branchName, options, function(err, result) {
if (err) { reject(err); } else { resolve(result); }
});
});
}
if (typeof callback !== 'function') {
throw new TypeError('callback must be a function');
}
if (options && typeof options !== 'object') {
process.nextTick(function() {
callback(new TypeError('options must be an object'));
});
return undefined;
}
gitBranchIs.getBranch(options, function(err, currentBranch) {
if (err) {
callback(err);
return;
}
callback(null, branchName === currentBranch);
});
return undefined;
}
/** Checks that the current branch of a git repository has a given name.
*
* @param {?GitBranchIsOptions=} options Options.
* @param {?function(Error, string=)=} callback Callback function called
* with the current branch name, or <code>Error</code> if it could not be
* determined.
* @return {Promise|undefined} If <code>callback</code> is not given and
* <code>global.Promise</code> is defined, a <code>Promise</code> with the
* current branch name, or <code>Error</code> if it could not be determined.
*/
gitBranchIs.getBranch = function getBranch(options, callback) {
if (!callback && typeof options === 'function') {
callback = options;
options = null;
}
if (!callback && typeof Promise === 'function') {
// eslint-disable-next-line no-undef
return new Promise(function(resolve, reject) {
getBranch(options, function(err, result) {
if (err) { reject(err); } else { resolve(result); }
});
});
}
if (typeof callback !== 'function') {
throw new TypeError('callback must be a function');
}
if (options && typeof options !== 'object') {
process.nextTick(function() {
callback(new TypeError('options must be an Object'));
});
return undefined;
}
var combinedOpts = {};
Object.keys(GitBranchIsOptions).forEach(function(prop) {
combinedOpts[prop] = GitBranchIsOptions[prop];
});
Object.keys(Object(options)).forEach(function(prop) {
combinedOpts[prop] = options[prop];
});
var gitArgs = ['symbolic-ref', '--short', 'HEAD'];
if (combinedOpts.gitDir) {
gitArgs.unshift('--git-dir=' + combinedOpts.gitDir);
}
try {
execFile(
combinedOpts.gitPath,
gitArgs,
{cwd: combinedOpts.cwd},
function(errExec, stdout, stderr) {
if (errExec) {
callback(errExec);
return;
}
// Note: ASCII space and control characters are forbidden in names
// https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
callback(null, stdout.trimRight());
}
);
} catch (errExec) {
process.nextTick(function() {
callback(errExec);
});
return undefined;
}
return undefined;
};
module.exports = gitBranchIs; |
<<<<<<<
initialScrollPosition: {x: 0, y: 0, animated: true},
initialScrollTimeOut: 300,
=======
showYAxisLabel: true,
showXAxisLabel: true,
>>>>>>>
initialScrollPosition: {x: 0, y: 0, animated: true},
initialScrollTimeOut: 300,
showYAxisLabel: true,
showXAxisLabel: true, |
<<<<<<<
var jest = require('gulp-jest').default;
=======
var eslint = require('gulp-eslint');
>>>>>>>
var eslint = require('gulp-eslint');
var jest = require('gulp-jest').default;
<<<<<<<
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(uglify('feature.min.js'))
=======
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError())
.pipe(uglify())
>>>>>>>
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError())
.pipe(uglify()) |
<<<<<<<
let schema = new Schema(schemaDefinition);
options = Object.assign({
applyOnSchema: void 0,
mongoTenant: void 0,
withPlugin: true
}, options);
=======
options = options || {};
let schema = new Schema(schemaDefinition, options.schemaOptions);
>>>>>>>
options = Object.assign({
applyOnSchema: void 0,
mongoTenant: void 0,
withPlugin: true
}, options);
let schema = new Schema(schemaDefinition, options.schemaOptions); |
<<<<<<<
it('should not be able to delete across tenants', (done) => {
const TestModel = utils.createTestModel({
test: {
type: String,
required: true,
trim: true
}});
const ModelClassT1 = TestModel.byTenant('tenant1');
const ModelClassT2 = TestModel.byTenant('tenant2');
const t1Instance = new ModelClassT1({ test: 't1Instance' });
const t2Instance = new ModelClassT2({ test: 't2Instance' });
t1Instance.save((err1) => {
assert(!err1, 'save t1 instance should work');
t2Instance.save((err2)=> {
assert(!err2, 'save t2 instance should work');
ModelClassT2.deleteOne({ _id: t1Instance._id}, (err) => {
assert(!err, 'error should occour'); // I guess it's fine that no error occours. that is just mongo behaviour
// however the document should not be deleted, since ModelClassT2 should have no access to elements of tenant1
ModelClassT1.findOne(t1Instance._id, (err, modelInst) => {
assert(modelInst, 'modelInstance should still be available, since it should not be able to delete across tenants');
done();
});
});
});
});
});
=======
it('should bind Model.deleteOne(conditions, cb) to correct tenant context.', function(done) {
let TestModel = utils.createTestModel({});
TestModel.create({tenantId: 'tenant1'}, {tenantId: 'tenant2'}, (err) => {
assert(!err, 'Expected creation of 2 test entities to work.');
TestModel.byTenant('tenant1').deleteOne({tenantId: 'tenant2'}, (deletionError) => {
assert(!deletionError, 'Expected Model.deleteMany() to work');
TestModel.find({}, (lookupErr, entities) => {
assert(!lookupErr, 'Expected Model.find() to work.');
assert.equal(entities.length, 1, 'Expected to find only one entity.');
assert.equal(entities[0].tenantId, 'tenant2', 'Expected tenant2 scope on entity.');
done();
});
});
});
});
it('should bind Model.deleteMany(conditions, options, cb) to correct tenant context.', function(done) {
let TestModel = utils.createTestModel({num: Number});
TestModel.create({tenantId: 'tenant1', num: 1}, {tenantId: 'tenant1', num: 1}, {tenantId: 'tenant2', num: 1}, (err) => {
assert(!err, 'Expected creation of 3 test entities to work.');
TestModel.byTenant('tenant1').deleteMany({num: 1}, (deletionError) => {
assert(!deletionError, 'Expected Model.deleteMany() to work');
TestModel.find({}, (lookupErr, entities) => {
assert(!lookupErr, 'Expected Model.find() to work.');
assert.equal(entities.length, 1, 'Expected to find only one entity.');
assert.equal(entities[0].tenantId, 'tenant2', 'Expected tenant2 scope on entity.');
done();
});
});
});
});
>>>>>>>
it('should not be able to delete across tenants', (done) => {
const TestModel = utils.createTestModel({
test: {
type: String,
required: true,
trim: true
}});
const ModelClassT1 = TestModel.byTenant('tenant1');
const ModelClassT2 = TestModel.byTenant('tenant2');
const t1Instance = new ModelClassT1({ test: 't1Instance' });
const t2Instance = new ModelClassT2({ test: 't2Instance' });
t1Instance.save((err1) => {
assert(!err1, 'save t1 instance should work');
t2Instance.save((err2)=> {
assert(!err2, 'save t2 instance should work');
ModelClassT2.deleteOne({ _id: t1Instance._id}, (err) => {
assert(!err, 'error should occour'); // I guess it's fine that no error occours. that is just mongo behaviour
// however the document should not be deleted, since ModelClassT2 should have no access to elements of tenant1
ModelClassT1.findOne(t1Instance._id, (err, modelInst) => {
assert(modelInst, 'modelInstance should still be available, since it should not be able to delete across tenants');
done();
});
});
});
});
});
it('should bind Model.deleteOne(conditions, cb) to correct tenant context.', function(done) {
let TestModel = utils.createTestModel({});
TestModel.create({tenantId: 'tenant1'}, {tenantId: 'tenant2'}, (err) => {
assert(!err, 'Expected creation of 2 test entities to work.');
TestModel.byTenant('tenant1').deleteOne({tenantId: 'tenant2'}, (deletionError) => {
assert(!deletionError, 'Expected Model.deleteMany() to work');
TestModel.find({}, (lookupErr, entities) => {
assert(!lookupErr, 'Expected Model.find() to work.');
assert.equal(entities.length, 1, 'Expected to find only one entity.');
assert.equal(entities[0].tenantId, 'tenant2', 'Expected tenant2 scope on entity.');
done();
});
});
});
});
it('should bind Model.deleteMany(conditions, options, cb) to correct tenant context.', function(done) {
let TestModel = utils.createTestModel({num: Number});
TestModel.create({tenantId: 'tenant1', num: 1}, {tenantId: 'tenant1', num: 1}, {tenantId: 'tenant2', num: 1}, (err) => {
assert(!err, 'Expected creation of 3 test entities to work.');
TestModel.byTenant('tenant1').deleteMany({num: 1}, (deletionError) => {
assert(!deletionError, 'Expected Model.deleteMany() to work');
TestModel.find({}, (lookupErr, entities) => {
assert(!lookupErr, 'Expected Model.find() to work.');
assert.equal(entities.length, 1, 'Expected to find only one entity.');
assert.equal(entities[0].tenantId, 'tenant2', 'Expected tenant2 scope on entity.');
done();
});
});
});
}); |
<<<<<<<
loadAll:function() {
// Setup logger
if (this._canlog) this.log=console.log;
=======
loadAll:function(cb) {
// Set the callback function, which is called after the resources are loaded.
if (!this._cb) this._cb = cb;
>>>>>>>
loadAll:function(cb) {
// Setup logger
if (this._canlog) this.log=console.log;
// Set the callback function, which is called after the resources are loaded.
if (!this._cb) this._cb = cb; |
<<<<<<<
function ColorScale() {
this.d3Scale = d3.scale.category20();
}
ColorScale.prototype = new CategoricalScale();
function makeLayer (spec, graphic) {
var geometry = new {
point: PointGeometry,
line: LineGeometry,
interval: IntervalGeometry,
box: BoxPlotGeometry,
}[spec.geometry || 'point'](spec);
var layer = new Layer(geometry, graphic);
geometry.layer = layer;
spec.mapping !== _undefined && (layer.mappings = spec.mapping);
layer.statistic = makeStatistic(spec.statistic || { kind: 'identity' });
return layer;
}
function makeScale (spec) {
var s = new {
linear: LinearScale,
log: LogScale,
categorical: CategoricalScale,
color: ColorScale
}[spec.type || 'linear'];
=======
////////////////////////////////////////////////////////////////////////
// Statistics
>>>>>>>
function ColorScale() {
this.d3Scale = d3.scale.category20();
}
ColorScale.prototype = new CategoricalScale();
////////////////////////////////////////////////////////////////////////
// Statistics |
<<<<<<<
isBooking : false,
navTitle: "Route Details",
=======
isBooking: false,
>>>>>>>
isBooking: false,
navTitle: "Route Details",
<<<<<<<
template: `<ion-spinner icon='crescent'></ion-spinner><br/><small>Loading route information</small>`,
hideOnStateChange: true
});
var promises = Promise.all([FastCheckoutService.verify(routeId), RoutesService.getRoute(routeId)])
promises.then((response) => {
$scope.data.nextTrip = response[0]
$scope.data.nextTripStopIds = $scope.data.nextTrip.tripStops.map(ts => ts.stop.id)
var route = response[1]
$scope.data.label = route.label
$ionicLoading.hide();
// Grab the price data
$scope.data.price = route.trips[0].price;
// routeSupportsRoutePass
$scope.data.routeSupportsRoutePass = FastCheckoutService.routeQualifiedForRoutePass(route)
// Grab the stop data
let [pickups, dropoffs] = BookingService.computeStops(route.trips);
pickups = new Map(pickups.map(stop => [stop.id, stop]));
dropoffs = new Map(dropoffs.map(stop => [stop.id, stop]));
// if pickupStop is updated from 'tabs.route-stops' state
if (!$scope.data.pickupStop && pickupStopId) $scope.data.pickupStop = pickups.get(pickupStopId);
if (!$scope.data.dropoffStop && dropoffStopId) $scope.data.dropoffStop = dropoffs.get(dropoffStopId);
}).catch(error => {
$ionicLoading.hide();
$ionicPopup.alert({
title: "Sorry there's been a problem loading the route information",
subTitle: error
});
});
});
=======
template: `<ion-spinner icon='crescent'>\
</ion-spinner><br/><small>Loading route information</small>`,
hideOnStateChange: true,
})
const promises = Promise.all([
FastCheckoutService.verify(routeId),
RoutesService.getRoute(routeId),
])
promises
.then(response => {
$scope.data.nextTrip = response[0]
$scope.data.nextTripStopIds = $scope.data.nextTrip.tripStops.map(
ts => ts.stop.id
)
const route = response[1]
$ionicLoading.hide()
// Grab the price data
$scope.data.price = route.trips[0].price
// routeSupportsRoutePass
$scope.data.routeSupportsRoutePass = FastCheckoutService.routeQualifiedForRoutePass(
route
)
// Grab the stop data
let [pickups, dropoffs] = BookingService.computeStops(route.trips)
pickups = new Map(pickups.map(stop => [stop.id, stop]))
dropoffs = new Map(dropoffs.map(stop => [stop.id, stop]))
// if pickupStop is updated from 'tabs.route-stops' state
if (!$scope.data.pickupStop && pickupStopId) {
$scope.data.pickupStop = pickups.get(pickupStopId)
}
if (!$scope.data.dropoffStop && dropoffStopId) {
$scope.data.dropoffStop = dropoffs.get(dropoffStopId)
}
})
.catch(error => {
$ionicLoading.hide()
$ionicPopup.alert({
title: "Sorry there's been a problem loading the route information",
subTitle: error,
})
})
})
>>>>>>>
template: `<ion-spinner icon='crescent'></ion-spinner><br/><small>Loading route information</small>`,
hideOnStateChange: true,
})
let promises = Promise.all([
FastCheckoutService.verify(routeId),
RoutesService.getRoute(routeId),
])
promises
.then(response => {
$scope.data.nextTrip = response[0]
$scope.data.nextTripStopIds = $scope.data.nextTrip.tripStops.map(
ts => ts.stop.id
)
let route = response[1]
$scope.data.label = route.label
$ionicLoading.hide()
// Grab the price data
$scope.data.price = route.trips[0].price
// routeSupportsRoutePass
$scope.data.routeSupportsRoutePass = FastCheckoutService.routeQualifiedForRoutePass(
route
)
// Grab the stop data
let [pickups, dropoffs] = BookingService.computeStops(route.trips)
pickups = new Map(pickups.map(stop => [stop.id, stop]))
dropoffs = new Map(dropoffs.map(stop => [stop.id, stop]))
// if pickupStop is updated from 'tabs.route-stops' state
if (!$scope.data.pickupStop && pickupStopId)
$scope.data.pickupStop = pickups.get(pickupStopId)
if (!$scope.data.dropoffStop && dropoffStopId)
$scope.data.dropoffStop = dropoffs.get(dropoffStopId)
})
.catch(error => {
$ionicLoading.hide()
$ionicPopup.alert({
title: "Sorry there's been a problem loading the route information",
subTitle: error,
})
})
})
<<<<<<<
$scope.$watch(() => UserService.getUser(), (user) => {
$scope.data.isLoggedIn = user ? true : false
if (user) {
$scope.data.user = user
}
})
=======
$scope.$watch(
() => UserService.getUser(),
user => {
$scope.data.isLoggedIn = Boolean(user)
}
)
>>>>>>>
$scope.$watch(
() => UserService.getUser(),
user => {
$scope.data.isLoggedIn = user ? true : false
if (user) {
$scope.data.user = user
}
}
)
<<<<<<<
$scope.toggle = function() {
$scope.activeTab = $scope.activeTab === 0 ? 1 : 0
if ($scope.activeTab === 0) {
$scope.disp.navTitle = "Route Details"
} else {
$scope.disp.navTitle = "Ticket for "+ moment($scope.ticket.boardStop.time).utcOffset('+08:00').format('D MMM Y')
}
}
$scope.$watch('data.nextTrip.hasNextTripTicket' , (hasNextTripTicket) =>{
$scope.activeTab = hasNextTripTicket ? 1 : 0
if (hasNextTripTicket) {
var ticketPromise = TicketService.getTicketById(+$scope.data.nextTrip.nextTripTicketId);
ticketPromise.then((ticket) => {
$scope.ticket = ticket;
ticketPromise.then((ticket) => {
return TripService.getTripData(+ticket.alightStop.tripId);
});
});
}
})
}
];
=======
},
]
>>>>>>>
$scope.toggle = function() {
$scope.activeTab = $scope.activeTab === 0 ? 1 : 0
if ($scope.activeTab === 0) {
$scope.disp.navTitle = "Route Details"
} else {
$scope.disp.navTitle =
"Ticket for " +
moment($scope.ticket.boardStop.time)
.utcOffset("+08:00")
.format("D MMM Y")
}
}
$scope.$watch("data.nextTrip.hasNextTripTicket", hasNextTripTicket => {
$scope.activeTab = hasNextTripTicket ? 1 : 0
if (hasNextTripTicket) {
let ticketPromise = TicketService.getTicketById(
+$scope.data.nextTrip.nextTripTicketId
)
ticketPromise.then(ticket => {
$scope.ticket = ticket
ticketPromise.then(ticket => {
return TripService.getTripData(+ticket.alightStop.tripId)
})
})
}
})
},
] |
<<<<<<<
if (width === undefined){
width = img.width;
}
if (height === undefined){
height = img.height;
}
=======
var frame = img.canvas || img.elt; // may use vid src
// set defaults
x = x || 0;
y = y || 0;
width = width || img.width;
height = height || img.height;
>>>>>>>
// set defaults
x = x || 0;
y = y || 0;
width = width || img.width;
height = height || img.height;
<<<<<<<
this._graphics.image(img, vals.x, vals.y, vals.w, vals.h);
return this;
=======
// tint the image if there is a tint
if (this._tint && img.canvas) {
this.drawingContext.drawImage(
this._getTintedImageCanvas(img),
vals.x,
vals.y,
vals.w,
vals.h);
} else {
this.drawingContext.drawImage(
frame,
vals.x,
vals.y,
vals.w,
vals.h);
}
>>>>>>>
// tint the image if there is a tint
this._graphics.image(img, vals.x, vals.y, vals.w, vals.h); |
<<<<<<<
p5.prototype.textAlign = function(a) {
if (a === constants.LEFT ||
a === constants.RIGHT ||
a === constants.CENTER) {
this._graphics.textAlign(a);
=======
p5.prototype.textAlign = function(h, v) {
if (h === constants.LEFT ||
h === constants.RIGHT ||
h === constants.CENTER) {
this.drawingContext.textAlign = h;
}
if (v === constants.TOP ||
v === constants.BOTTOM ||
v === constants.CENTER ||
v === constants.BASELINE) {
this.drawingContext.textBaseline = v;
>>>>>>>
p5.prototype.textAlign = function(a) {
if (a === constants.LEFT ||
a === constants.RIGHT ||
a === constants.CENTER) {
this._graphics.textAlign(a);
}
if (v === constants.TOP ||
v === constants.BOTTOM ||
v === constants.CENTER ||
v === constants.BASELINE) {
this.drawingContext.textBaseline = v; |
<<<<<<<
p5.prototype.resizeCanvas = function (w, h, noRedraw) {
p5._validateParameters('resizeCanvas', arguments);
=======
p5.prototype.resizeCanvas = function(w, h, noRedraw) {
>>>>>>>
p5.prototype.resizeCanvas = function(w, h, noRedraw) {
p5._validateParameters('resizeCanvas', arguments);
<<<<<<<
p5.prototype.createGraphics = function(w, h, renderer){
p5._validateParameters('createGraphics', arguments);
=======
p5.prototype.createGraphics = function(w, h, renderer) {
>>>>>>>
p5.prototype.createGraphics = function(w, h, renderer) {
p5._validateParameters('createGraphics', arguments);
<<<<<<<
p5._validateParameters('blendMode', arguments);
if (mode === constants.BLEND || mode === constants.DARKEST ||
mode === constants.LIGHTEST || mode === constants.DIFFERENCE ||
mode === constants.MULTIPLY || mode === constants.EXCLUSION ||
mode === constants.SCREEN || mode === constants.REPLACE ||
mode === constants.OVERLAY || mode === constants.HARD_LIGHT ||
mode === constants.SOFT_LIGHT || mode === constants.DODGE ||
mode === constants.BURN || mode === constants.ADD ||
mode === constants.NORMAL) {
=======
if (
mode === constants.BLEND ||
mode === constants.DARKEST ||
mode === constants.LIGHTEST ||
mode === constants.DIFFERENCE ||
mode === constants.MULTIPLY ||
mode === constants.EXCLUSION ||
mode === constants.SCREEN ||
mode === constants.REPLACE ||
mode === constants.OVERLAY ||
mode === constants.HARD_LIGHT ||
mode === constants.SOFT_LIGHT ||
mode === constants.DODGE ||
mode === constants.BURN ||
mode === constants.ADD ||
mode === constants.NORMAL
) {
>>>>>>>
p5._validateParameters('blendMode', arguments);
if (
mode === constants.BLEND ||
mode === constants.DARKEST ||
mode === constants.LIGHTEST ||
mode === constants.DIFFERENCE ||
mode === constants.MULTIPLY ||
mode === constants.EXCLUSION ||
mode === constants.SCREEN ||
mode === constants.REPLACE ||
mode === constants.OVERLAY ||
mode === constants.HARD_LIGHT ||
mode === constants.SOFT_LIGHT ||
mode === constants.DODGE ||
mode === constants.BURN ||
mode === constants.ADD ||
mode === constants.NORMAL
) { |
<<<<<<<
gl.depthMask(true);
=======
var renderer = this._renderer;
>>>>>>>
var renderer = this._renderer;
gl.depthMask(true); |
<<<<<<<
p5._validateParameters('beginShape', arguments);
if (kind === constants.POINTS ||
=======
if (
kind === constants.POINTS ||
>>>>>>>
p5._validateParameters('beginShape', arguments);
if (
kind === constants.POINTS ||
<<<<<<<
p5.prototype.curveVertex = function(x,y) {
p5._validateParameters('curveVertex', arguments);
=======
p5.prototype.curveVertex = function(x, y) {
>>>>>>>
p5.prototype.curveVertex = function(x, y) {
p5._validateParameters('curveVertex', arguments); |
<<<<<<<
if (h === constants.LEFT ||
h === constants.RIGHT ||
h === constants.CENTER) {
this.drawingContext.textAlign = h;
}
if (v === constants.TOP ||
v === constants.BOTTOM ||
v === constants.CENTER ||
v === constants.BASELINE) {
if( v === constants.CENTER ){
this.drawingContext.textBaseline = constants._CTX_MIDDLE;
}
else {
this.drawingContext.textBaseline = v;
}
}
return this;
=======
this._graphics.textAlign(h,v);
>>>>>>>
return this._graphics.textAlign(h,v);
<<<<<<<
if (this._isOpenType()) {
return this._textFont.textBounds(s, 0, 0).w;
}
return this.drawingContext.measureText(s).width;
=======
return this._graphics.textWidth(s);
>>>>>>>
return this._graphics.textWidth(s);
<<<<<<<
var fontName = this._textFont;
if (this._isOpenType()) {
fontName = this._textFont.font.familyName;
this._textStyle = this._textFont.font.styleName;
}
var str = this._textStyle + ' ' + this._textSize + 'px ' + fontName;
this.drawingContext.font = str;
return this;
=======
this._graphics._applyTextProperties(this._textStyle,
this._textSize,
this._textFont);
>>>>>>>
return this._graphics._applyTextProperties(this._textStyle,
this._textSize, this._textFont); |
<<<<<<<
p5.prototype.ortho = function() {
this._renderer.ortho.apply(this._renderer, arguments);
return this;
};
p5.RendererGL.prototype.ortho = function(left, right, bottom, top, near, far) {
if (left === undefined) left = -this.width / 2;
if (right === undefined) right = +this.width / 2;
if (bottom === undefined) bottom = -this.height / 2;
if (top === undefined) top = +this.height / 2;
if (near === undefined) near = 0;
if (far === undefined) far = Math.max(this.width, this.height);
=======
p5.prototype.ortho = function(left, right, bottom, top, near, far) {
left = left || -this.width / 2;
right = right || this.width / 2;
bottom = bottom || -this.height / 2;
top = top || this.height / 2;
near = near || 0;
far = far || Math.max(this.width, this.height);
this._renderer.uPMatrix = p5.Matrix.identity(this._pInst);
//this._renderer.uPMatrix.ortho(left,right,bottom,top,near,far);
>>>>>>>
p5.prototype.ortho = function() {
this._renderer.ortho.apply(this._renderer, arguments);
return this;
};
p5.RendererGL.prototype.ortho = function(left, right, bottom, top, near, far) {
if (left === undefined) left = -this.width / 2;
if (right === undefined) right = +this.width / 2;
if (bottom === undefined) bottom = -this.height / 2;
if (top === undefined) top = +this.height / 2;
if (near === undefined) near = 0;
if (far === undefined) far = Math.max(this.width, this.height);
this._renderer.uPMatrix = p5.Matrix.identity(this._pInst);
//this._renderer.uPMatrix.ortho(left,right,bottom,top,near,far); |
<<<<<<<
'resize': null,
'blur': null
=======
'resize': null,
'devicemotion': null
>>>>>>>
'resize': null,
'blur': null,
'devicemotion': null
<<<<<<<
this.redraw();
=======
if (typeof userDraw === 'function') {
this.push();
if (typeof userSetup === 'undefined') {
this.scale(this._pixelDensity, this._pixelDensity);
}
// call any registered pre functions
this._registeredMethods.pre.forEach(function(f) {
f.call(this);
});
userDraw();
// call any registered post functions
this._registeredMethods.post.forEach(function(f) {
f.call(this);
});
this.pop();
}
this._updatePAccelerations();
>>>>>>>
this.redraw();
this._updatePAccelerations(); |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
require('p5.File');
//require('p5.Shape');
>>>>>>>
require('p5.File');
//require('p5.Shape'); |
<<<<<<<
* @param {Number} [n00..n33] 16 numbers passed by value to avoid
* array copying.
=======
* @chainable
>>>>>>>
* @param {Number} [n00..n33] 16 numbers passed by value to avoid
* array copying.
* @chainable |
<<<<<<<
var pointLightCount = this.pointLightDiffuseColors.length / 3;
=======
const pointLightCount = this.pointLightColors.length / 3;
>>>>>>>
const pointLightCount = this.pointLightDiffuseColors.length / 3;
<<<<<<<
var directionalLightCount = this.directionalLightDiffuseColors.length / 3;
=======
const directionalLightCount = this.directionalLightColors.length / 3;
>>>>>>>
const directionalLightCount = this.directionalLightDiffuseColors.length / 3; |
<<<<<<<
p5.prototype.select = function (e, p) {
p5._validateParameters('select', arguments);
=======
p5.prototype.select = function(e, p) {
>>>>>>>
p5.prototype.select = function(e, p) {
p5._validateParameters('select', arguments);
<<<<<<<
p5.prototype.selectAll = function (e, p) {
p5._validateParameters('selectAll', arguments);
=======
p5.prototype.selectAll = function(e, p) {
>>>>>>>
p5.prototype.selectAll = function(e, p) {
p5._validateParameters('selectAll', arguments);
<<<<<<<
p5.prototype.removeElements = function (e) {
p5._validateParameters('removeElements', arguments);
for (var i=0; i<this._elements.length; i++) {
=======
p5.prototype.removeElements = function(e) {
for (var i = 0; i < this._elements.length; i++) {
>>>>>>>
p5.prototype.removeElements =function (e) {
p5._validateParameters('removeElements', arguments);
for (var i=0; i<this._elements.length; i++) {
<<<<<<<
p5._validateParameters('createRadio', arguments);
var radios = document.querySelectorAll("input[type=radio]");
=======
var radios = document.querySelectorAll('input[type=radio]');
>>>>>>>
p5._validateParameters('createRadio', arguments);
var radios = document.querySelectorAll('input[type=radio]');
<<<<<<<
p5._validateParameters('createFileInput', arguments);
=======
// Function to handle when a file is selected
// We're simplifying life and assuming that we always
// want to load every selected file
function handleFileSelect(evt) {
function makeLoader(theFile) {
// Making a p5.File object
var p5file = new p5.File(theFile);
return function(e) {
p5file.data = e.target.result;
callback(p5file);
};
}
// These are the files
var files = evt.target.files;
// Load each one and trigger a callback
for (var i = 0; i < files.length; i++) {
var f = files[i];
var reader = new FileReader();
reader.onload = makeLoader(f);
// Text or data?
// This should likely be improved
if (f.type.indexOf('text') > -1) {
reader.readAsText(f);
} else {
reader.readAsDataURL(f);
}
}
}
>>>>>>>
p5._validateParameters('createFileInput', arguments);
// Function to handle when a file is selected
// We're simplifying life and assuming that we always
// want to load every selected file
function handleFileSelect(evt) {
function makeLoader(theFile) {
// Making a p5.File object
var p5file = new p5.File(theFile);
return function(e) {
p5file.data = e.target.result;
callback(p5file);
};
}
// These are the files
var files = evt.target.files;
// Load each one and trigger a callback
for (var i = 0; i < files.length; i++) {
var f = files[i];
var reader = new FileReader();
reader.onload = makeLoader(f);
// Text or data?
// This should likely be improved
if (f.type.indexOf('text') > -1) {
reader.readAsText(f);
} else {
reader.readAsDataURL(f);
}
}
} |
<<<<<<<
if (this.curFillShader === this._getImmediateModeShader()) {
// there are different immediate mode and retain mode color shaders.
// if we're using the immediate mode one, we need to switch to
// one that works for retain mode.
this.setFillShader(this._getColorShader());
}
=======
this._useColorShader();
this._bindBuffer(
this.gHash[gId].lineVertexBuffer,
gl.ARRAY_BUFFER,
this._flatten(obj.lineVertices),
Float32Array,
gl.STATIC_DRAW
);
>>>>>>>
this._useColorShader();
<<<<<<<
=======
/**
* Draws buffers given a geometry key ID
* @private
* @param {String} gId ID in our geom hash
* @chainable
*/
p5.RendererGL.prototype.drawBuffers = function(gId) {
this._setDefaultCamera();
var gl = this.GL;
this._useColorShader();
if (
this.curStrokeShader.active !== false &&
this.gHash[gId].lineVertexCount > 0
) {
this.curStrokeShader.bindShader();
this._bindBuffer(this.gHash[gId].lineVertexBuffer, gl.ARRAY_BUFFER);
>>>>>>> |
<<<<<<<
* @param {Number|Number[]|String|p5.Color} v1 gray value,
=======
* @class p5.RendererGL
* @param {Number|Array|String|p5.Color} v1 gray value,
>>>>>>>
* @class p5.RendererGL
* @param {Number|Number[]|String|p5.Color} v1 gray value, |
<<<<<<<
=======
*
>>>>>>>
<<<<<<<
=======
*
>>>>>>>
<<<<<<<
=======
*
>>>>>>>
<<<<<<<
=======
* @example
*
* <div>
* <code>
* var img;
* function preload() {
* img = loadImage("assets/bricks.jpg");
* }
* function setup() {
* imageMode(CORNER);
* image(img, 10, 10, 50, 50);
* }
* </code>
* </div>
*
* <div>
* <code>
* var img;
* function preload() {
* img = loadImage("assets/bricks.jpg");
* }
* function setup() {
* imageMode(CORNERS);
* image(img, 10, 10, 90, 40);
* }
* </code>
* </div>
*
* <div>
* <code>
* var img;
* function preload() {
* img = loadImage("assets/bricks.jpg");
* }
* function setup() {
* imageMode(CENTER);
* image(img, 50, 50, 80, 80);
* }
* </code>
* </div>
>>>>>>> |
<<<<<<<
p5.Graphics = function(renderer, elt, pInst, attrs) {
=======
p5.Graphics = function(elt, pInst, isMainCanvas) {
>>>>>>>
p5.Graphics = function(renderer, elt, pInst, attrs, isMainCanvas) {
<<<<<<<
if (renderer === constants.P2D) {
this.drawingContext = this.canvas.getContext('2d');
} else if (renderer === constants.WEBGL) {
try {
this.drawingContext = this.canvas.getContext('webgl', attrs) ||
this.canvas.getContext('experimental-webgl', attrs);
if (this.drawingContext === null) {
throw 'Error creating webgl context';
} else {
console.log('p5.Graphics3d: enabled webgl context');
}
} catch (er){
console.error(er);
}
}
if (this._pInst) {
=======
this.drawingContext = this.canvas.getContext('2d');
this._pInst = pInst;
if (isMainCanvas) {
this._isMainCanvas = true;
>>>>>>>
if (renderer === constants.P2D) {
this.drawingContext = this.canvas.getContext('2d');
} else if (renderer === constants.WEBGL) {
try {
this.drawingContext = this.canvas.getContext('webgl', attrs) ||
this.canvas.getContext('experimental-webgl', attrs);
if (this.drawingContext === null) {
throw 'Error creating webgl context';
} else {
console.log('p5.Graphics3d: enabled webgl context');
}
} catch (er){
console.error(er);
}
}
this._pInst = pInst;
if (isMainCanvas) {
this._isMainCanvas = true; |
<<<<<<<
var geometry = this.gHash[gId];
if(this.curStrokeShader.active !== false &&
geometry.lineVertexCount > 0) {
=======
if (
this.curStrokeShader.active !== false &&
this.gHash[gId].lineVertexCount > 0
) {
>>>>>>>
var geometry = this.gHash[gId];
if (this.curStrokeShader.active !== false && geometry.lineVertexCount > 0) {
<<<<<<<
if (geometry.lineVertexBuffer) {
this._bindBuffer(geometry.lineVertexBuffer, gl.ARRAY_BUFFER);
this.curStrokeShader.enableAttrib(
this.curStrokeShader.attributes.aPosition.location,
3, gl.FLOAT, false, 0, 0);
}
if (geometry.lineNormalBuffer) {
this._bindBuffer(geometry.lineNormalBuffer, gl.ARRAY_BUFFER);
this.curStrokeShader.enableAttrib(
this.curStrokeShader.attributes.aDirection.location,
4, gl.FLOAT, false, 0, 0);
}
=======
this._bindBuffer(this.gHash[gId].lineVertexBuffer, gl.ARRAY_BUFFER);
this.curStrokeShader.enableAttrib(
this.curStrokeShader.attributes.aPosition.location,
3,
gl.FLOAT,
false,
0,
0
);
this._bindBuffer(this.gHash[gId].lineNormalBuffer, gl.ARRAY_BUFFER);
this.curStrokeShader.enableAttrib(
this.curStrokeShader.attributes.aDirection.location,
4,
gl.FLOAT,
false,
0,
0
);
>>>>>>>
if (geometry.lineVertexBuffer) {
this._bindBuffer(geometry.lineVertexBuffer, gl.ARRAY_BUFFER);
this.curStrokeShader.enableAttrib(
this.curStrokeShader.attributes.aPosition.location,
3,
gl.FLOAT,
false,
0,
0
);
}
if (geometry.lineNormalBuffer) {
this._bindBuffer(geometry.lineNormalBuffer, gl.ARRAY_BUFFER);
this.curStrokeShader.enableAttrib(
this.curStrokeShader.attributes.aDirection.location,
4,
gl.FLOAT,
false,
0,
0
);
} |
<<<<<<<
* @param {p5.Matrix|Float32Array|Number[]} [inMatrix] the input p5.Matrix or
=======
* @method set
* @param {p5.Matrix|Float32Array|Array} [inMatrix] the input p5.Matrix or
>>>>>>>
* @method set
* @param {p5.Matrix|Float32Array|Number[]} [inMatrix] the input p5.Matrix or
<<<<<<<
* @param {p5.Matrix|Float32Array|Number[]} a the matrix to be based
* on to transpose
=======
* @method transpose
* @param {p5.Matrix|Float32Array|Array} a the matrix to be based on to transpose
>>>>>>>
* @method transpose
* @param {p5.Matrix|Float32Array|Number[]} a the matrix to be
* based on to transpose
<<<<<<<
* @param {p5.Matrix|Float32Array|Number[]} a the matrix to be based on to
* invert
=======
* @method invert
* @param {p5.Matrix|Float32Array|Array} a the matrix to be based on to invert
>>>>>>>
* @method invert
* @param {p5.Matrix|Float32Array|Number[]} a the matrix to be
* based on to invert
<<<<<<<
* @param {p5.Matrix|Float32Array|Number[]} multMatrix The matrix
=======
* @method mult
* @param {p5.Matrix|Float32Array|Array} multMatrix The matrix
>>>>>>>
* @method mult
* @param {p5.Matrix|Float32Array|Number[]} multMatrix The matrix
<<<<<<<
* @param {p5.Vector|Float32Array|Number[]} s vector to scale by
=======
* @method scale
* @param {p5.Vector|Float32Array|Array} s vector to scale by
>>>>>>>
* @method scale
* @param {p5.Vector|Float32Array|Number[]} s vector to scale by |
<<<<<<<
// loadXML()
suite('loadXML() in Preload', function() {
test('should be a function', function() {
assert.ok(myp5.loadXML);
assert.typeOf(myp5.loadXML, 'function');
});
test('should return an Object', function() {
result = myp5.loadXML('unit/assets/books.xml');
assert.ok(result);
assert.isObject(result, 'result is an object');
});
});
=======
// loadStrings()
suite('loadStrings() in Preload', function() {
test('should be a function', function() {
assert.ok(myp5.loadStrings);
assert.typeOf(myp5.loadStrings, 'function');
});
test('should return an array', function() {
result = myp5.loadStrings('unit/assets/sentences.txt');
assert.ok(result);
assert.isArray(result, 'result is and array');
});
});
>>>>>>>
// loadXML()
suite('loadXML() in Preload', function() {
test('should be a function', function() {
assert.ok(myp5.loadXML);
assert.typeOf(myp5.loadXML, 'function');
});
test('should return an Object', function() {
result = myp5.loadXML('unit/assets/books.xml');
assert.ok(result);
assert.isObject(result, 'result is an object');
});
});
// loadStrings()
suite('loadStrings() in Preload', function() {
test('should be a function', function() {
assert.ok(myp5.loadStrings);
assert.typeOf(myp5.loadStrings, 'function');
});
test('should return an array', function() {
result = myp5.loadStrings('unit/assets/sentences.txt');
assert.ok(result);
assert.isArray(result, 'result is and array');
});
});
<<<<<<<
// loadXML()
suite('p5.prototype.loadXML', function() {
test('should be a function', function() {
assert.ok(myp5.loadXML);
assert.typeOf(myp5.loadXML, 'function');
});
//Missing reference to parseXML, might need some test suite rethink
// test('should call callback function if provided', function() {
// return new Promise(function(resolve, reject) {
// myp5.loadXML('unit/assets/books.xml', resolve, reject);
// });
// });
//
// test('should pass an Object to callback function', function(){
// return new Promise(function(resolve, reject) {
// myp5.loadXML('unit/assets/books.xml', resolve, reject);
// }).then(function(data) {
// assert.isObject(data);
// });
// });
});
=======
// loadStrings()
suite('p5.prototype.loadStrings', function() {
test('should be a function', function() {
assert.ok(myp5.loadStrings);
assert.typeOf(myp5.loadStrings, 'function');
});
test('should call callback function if provided', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings('unit/assets/sentences.txt', resolve, reject);
});
});
test('should pass an Array to callback function', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings('unit/assets/sentences.txt', resolve, reject);
}).then(function(data) {
assert.isArray(data, 'Array passed to callback function');
assert.lengthOf(data, 68, 'length of data is 68');
});
});
test('should include empty strings', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings('unit/assets/empty_lines.txt', resolve, reject);
}).then(function(data) {
assert.isArray(data, 'Array passed to callback function');
assert.lengthOf(data, 6, 'length of data is 6');
});
});
test('should call error callback function if provided', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings(
'unit/assets/sen.txt',
function(data) {
reject('Success callback executed');
},
resolve
);
});
});
test('should pass error object to error callback function', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings(
'unit/assets/sen.txt',
function(data) {
reject('Success callback executed');
},
resolve
);
}).then(function(err) {
assert.isFalse(err.ok, 'err.ok is false');
assert.equal(err.status, 404, 'Error status is 404');
});
});
});
>>>>>>>
// loadXML()
suite('p5.prototype.loadXML', function() {
test('should be a function', function() {
assert.ok(myp5.loadXML);
assert.typeOf(myp5.loadXML, 'function');
});
//Missing reference to parseXML, might need some test suite rethink
// test('should call callback function if provided', function() {
// return new Promise(function(resolve, reject) {
// myp5.loadXML('unit/assets/books.xml', resolve, reject);
// });
// });
//
// test('should pass an Object to callback function', function(){
// return new Promise(function(resolve, reject) {
// myp5.loadXML('unit/assets/books.xml', resolve, reject);
// }).then(function(data) {
// assert.isObject(data);
// });
// });
});
// loadStrings()
suite('p5.prototype.loadStrings', function() {
test('should be a function', function() {
assert.ok(myp5.loadStrings);
assert.typeOf(myp5.loadStrings, 'function');
});
test('should call callback function if provided', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings('unit/assets/sentences.txt', resolve, reject);
});
});
test('should pass an Array to callback function', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings('unit/assets/sentences.txt', resolve, reject);
}).then(function(data) {
assert.isArray(data, 'Array passed to callback function');
assert.lengthOf(data, 68, 'length of data is 68');
});
});
test('should include empty strings', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings('unit/assets/empty_lines.txt', resolve, reject);
}).then(function(data) {
assert.isArray(data, 'Array passed to callback function');
assert.lengthOf(data, 6, 'length of data is 6');
});
});
test('should call error callback function if provided', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings(
'unit/assets/sen.txt',
function(data) {
reject('Success callback executed');
},
resolve
);
});
});
test('should pass error object to error callback function', function() {
return new Promise(function(resolve, reject) {
myp5.loadStrings(
'unit/assets/sen.txt',
function(data) {
reject('Success callback executed');
},
resolve
);
}).then(function(err) {
assert.isFalse(err.ok, 'err.ok is false');
assert.equal(err.status, 404, 'Error status is 404');
});
});
}); |
<<<<<<<
});
it('should use default timeout if a task timeout with a negaitve integer is passed', function(done){
var task = background_task.connect({taskKey: "kid", timeout: normalTimeoutTime});
var start = moment();
task.addTask({kid: "should timeout", body: "test"}, {taskTimeout: negativeTimeoutTime}, function(id, reply){
var diff = moment().diff(start);
diff.should.be.approximately(normalTimeoutTime, timeoutMarginOfError);
reply.should.be.an.instanceOf(Error);
reply.message.should.equal('Task timed out');
task.end();
done();
});
});
=======
it('should use default timeout value if no task timeout value is passed', function(done){
var cb, task = background_task.connect({taskKey: "kid", timeout: normalTimeoutTime});
var start = moment();
cb = function(){
task.addTask({kid: "should timeout", body: "test"}, function(id, reply){
var diff = moment().diff(start);
diff.should.be.approximately(normalTimeoutTime, timeoutMarginOfError);
reply.should.be.an.instanceOf(Error);
reply.message.should.equal('Task timed out');
task.end();
done();
});
};
setTimeout(cb, delay);
});
it('should allow specific timeout to be passed as part of a task', function(done){
this.timeout(longMochaTimeoutTime);
var cb, task = background_task.connect({taskKey: "kid", timeout: 200});
var start = moment();
cb = function(){
task.addTask({kid: "should timeout", body: "test"}, {taskTimeout: longTaskTimeoutTime}, function(id, reply){
var diff = moment().diff(start);
diff.should.be.approximately(longTaskTimeoutTime, timeoutMarginOfError);
reply.should.be.an.instanceOf(Error);
reply.message.should.equal('Task timed out');
task.end();
done();
});
};
setTimeout(cb, delay);
});
it('should use default timeout if a task timeout of zero is passed', function(done){
var cb, task = background_task.connect({taskKey: "kid", timeout: normalTimeoutTime});
var start = moment();
cb = function(){
task.addTask({kid: "should timeout", body: "test"}, {taskTimeout: zeroTimeoutTime}, function(id, reply){
var diff = moment().diff(start);
diff.should.be.approximately(normalTimeoutTime, timeoutMarginOfError);
reply.should.be.an.instanceOf(Error);
reply.message.should.equal('Task timed out');
task.end();
done();
});
};
setTimeout(cb, delay);
});
it('should use default timeout if a task timeout with a negaitve integer is passed', function(done){
var cb, task = background_task.connect({taskKey: "kid", timeout: normalTimeoutTime});
var start = moment();
cb = function(){
task.addTask({kid: "should timeout", body: "test"}, {taskTimeout: negativeTimeoutTime}, function(id, reply){
var diff = moment().diff(start);
diff.should.be.approximately(normalTimeoutTime, timeoutMarginOfError);
reply.should.be.an.instanceOf(Error);
reply.message.should.equal('Task timed out');
task.end();
done();
});
};
setTimeout(cb, delay);
});
>>>>>>>
});
it('should allow specific timeout to be passed as part of a task', function(done){
this.timeout(longMochaTimeoutTime);
var task = background_task.connect({taskKey: "kid", timeout: 200});
var start = moment();
task.addTask({kid: "should timeout", body: "test"}, {taskTimeout: longTaskTimeoutTime}, function(id, reply){
var diff = moment().diff(start);
diff.should.be.approximately(longTaskTimeoutTime, timeoutMarginOfError);
reply.should.be.an.instanceOf(Error);
reply.message.should.equal('Task timed out');
task.end();
done();
});
});
it('should use default timeout if a task timeout of zero is passed', function(done){
var task = background_task.connect({taskKey: "kid", timeout: normalTimeoutTime});
var start = moment();
task.addTask({kid: "should timeout", body: "test"}, {taskTimeout: zeroTimeoutTime}, function(id, reply){
var diff = moment().diff(start);
diff.should.be.approximately(normalTimeoutTime, timeoutMarginOfError);
reply.should.be.an.instanceOf(Error);
reply.message.should.equal('Task timed out');
task.end();
done();
});
});
it('should use default timeout if a task timeout with a negaitve integer is passed', function(done){
var task = background_task.connect({taskKey: "kid", timeout: normalTimeoutTime});
var start = moment();
task.addTask({kid: "should timeout", body: "test"}, {taskTimeout: negativeTimeoutTime}, function(id, reply){
var diff = moment().diff(start);
diff.should.be.approximately(normalTimeoutTime, timeoutMarginOfError);
reply.should.be.an.instanceOf(Error);
reply.message.should.equal('Task timed out');
task.end();
done();
});
}); |
<<<<<<<
p5._validateParameters('ellipseMode', arguments);
if (m === constants.CORNER ||
=======
if (
m === constants.CORNER ||
>>>>>>>
p5._validateParameters('ellipseMode', arguments);
if (
m === constants.CORNER ||
<<<<<<<
p5._validateParameters('rectMode', arguments);
if (m === constants.CORNER ||
=======
if (
m === constants.CORNER ||
>>>>>>>
p5._validateParameters('rectMode', arguments);
if (
m === constants.CORNER ||
<<<<<<<
p5._validateParameters('strokeCap', arguments);
if (cap === constants.ROUND ||
=======
if (
cap === constants.ROUND ||
>>>>>>>
p5._validateParameters('strokeCap', arguments);
if (
cap === constants.ROUND ||
<<<<<<<
p5._validateParameters('strokeJoin', arguments);
if (join === constants.ROUND ||
=======
if (
join === constants.ROUND ||
>>>>>>>
p5._validateParameters('strokeJoin', arguments);
if (
join === constants.ROUND || |
<<<<<<<
require('./webgl/p5.Camera');
=======
require('./webgl/3d_primitives');
require('./webgl/camera');
>>>>>>>
require('./webgl/3d_primitives'); |
<<<<<<<
var constants = require('constants');
=======
require('helpers');
>>>>>>>
var constants = require('constants');
require('helpers');
<<<<<<<
return (!(this._doFill || this._doStroke)) ? this :
this._graphics.text.apply(this._graphics, arguments);
=======
this._validateParameters(
'text',
arguments,
[
['String', 'Number', 'Number'],
['String', 'Number', 'Number', 'Number', 'Number']
]
);
if (typeof str !== 'string') {
str=str.toString();
}
this._graphics.text.apply(this._graphics, arguments);
>>>>>>>
this._validateParameters(
'text',
arguments,
[
['String', 'Number', 'Number'],
['String', 'Number', 'Number', 'Number', 'Number']
]
);
return (!(this._doFill || this._doStroke)) ? this :
this._graphics.text.apply(this._graphics, arguments); |
<<<<<<<
* @return {Integer} Number of columns in this table
=======
* @method getColumnCount
* @return {Number} Number of columns in this table
>>>>>>>
* @method getColumnCount
* @return {Integer} Number of columns in this table
<<<<<<<
* @return {Integer} Number of rows in this table
=======
* @return {Number} Number of rows in this table
>>>>>>>
* @return {Integer} Number of rows in this table |
<<<<<<<
* @param {p5.Vector[]} arr an array of p5.Vector
* @return {Number[]} a one dimensional array of numbers
=======
* @private
* @param {Array} arr an array of p5.Vector
* @return {Array]} a one dimensional array of numbers
>>>>>>>
* @private
* @param {p5.Vector[]} arr an array of p5.Vector
* @return {Number[]} a one dimensional array of numbers |
<<<<<<<
const CIRCLE_ATTS = ['cx', 'cy', 'r', 'fill', 'stroke'];
const PATH_ATTS = ['d', 'fill', 'stroke'];
const RECT_ATTS = ['width', 'height', 'fill', 'stroke', 'x', 'y'];
const LINEARG_ATTS = ['id', 'x1', 'y1', 'x2', 'y2', 'gradientUnits'];
const RADIALG_ATTS = ['id', 'cx', 'cy', 'r', 'gradientUnits'];
const STOP_ATTS = ['offset', 'stopColor'];
const ELLIPSE_ATTS = ['fill', 'cx', 'cy', 'rx', 'ry'];
=======
const CIRCLE_ATTS = ['cx', 'cy', 'r'];
const PATH_ATTS = ['d'];
const RECT_ATTS = ['width', 'height'];
const LINEARG_ATTS = ['id', 'x1', 'y1', 'x2', 'y2'];
const RADIALG_ATTS = ['id', 'cx', 'cy', 'r'];
const STOP_ATTS = ['offset'];
const ELLIPSE_ATTS = ['cx', 'cy', 'rx', 'ry'];
>>>>>>>
const CIRCLE_ATTS = ['cx', 'cy', 'r'];
const PATH_ATTS = ['d'];
const RECT_ATTS = ['width', 'height'];
const LINEARG_ATTS = ['id', 'x1', 'y1', 'x2', 'y2', 'gradientUnits'];
const RADIALG_ATTS = ['id', 'cx', 'cy', 'r', 'gradientUnits'];
const STOP_ATTS = ['offset'];
const ELLIPSE_ATTS = ['cx', 'cy', 'rx', 'ry']; |
<<<<<<<
app.post("/fixedasset/import", fixedAsset.importFA);
=======
app.get("/fixedasset/batchCreate",fixedAsset.batchCreate);
>>>>>>>
app.post("/fixedasset/import", fixedAsset.importFA);
app.get("/fixedasset/batchCreate",fixedAsset.batchCreate); |
<<<<<<<
var parseXlsx = require("excel");
=======
var QRCode = require("qrcode");
var PDFDocument = require("pdfkit");
var ping = require("net-ping");
>>>>>>>
var parseXlsx = require("excel");
var QRCode = require("qrcode");
var PDFDocument = require("pdfkit");
var ping = require("net-ping");
<<<<<<<
};
/**
* import fixed asset excel records
* @param {object} req the instance of request
* @param {object} res the instance of response
* @param {Function} next the next handler
* @return {null}
*/
exports.importFA = function (req, res, next) {
console.log("######controllers/importFA");
var fileName = "fa.xlsx";
var xlsxPath = path.resolve(__dirname, "../uploads/", fileName);
console.log("xlsxPath:" + xlsxPath);
var ep = EventProxy.create();
parseXlsx(xlsxPath, function (err, data) {
if (err || !data) {
return ep.emitLater("error", new ServerError());
}
return ep.emitLater("after_parsedExcelData", data);
});
ep.once("after_parsedExcelData", function (excelData) {
//remove first title array
excelData.shift();
FixedAsset.importFixedAssets(excelData, function () {
//delete excel file
return res.send(resUtil.generateRes(null, config.statusCode.SATUS_OK));
});
});
ep.fail(function (err) {
return res.send(resUtil.generateRes(null, err.statusCode));
});
};
=======
};
/**
* [handleQrcode description]
* @param {object} req the instance of request
* @param {object} res the instance of response
* @param {Function} next the next handler
* @return {[type]} [description]
*/
exports.handleQrcode = function (req, res, next) {
console.log("######controllers/handleQrcode");
var ep = EventProxy.create();
FixedAsset.updateQrcode('123123',function (err,qUri) {
if (err) {
return ep.emitLater("error", err);
};
ep.emitLater("loadpdf",qUri);
})
ep.fail(function (err) {
res.send(resUtil.generateRes(null, err.statusCode));
});
ep.once("completed1", function (tem) {
res.send("<img src='"+tem+"'/>");
});
var doc = new PDFDocument();
ep.once("loadpdf", function (tem) {
//doc.addPage();
doc.text('Hello world!');
var base64Data,binaryData;
base64Data = tem.replace(/^data:image\/png;base64,/, "");
base64Data += base64Data.replace('+', ' ');
binaryData = new Buffer(base64Data, 'base64').toString('binary');
fs.writeFile("public/images/out/out.png", binaryData, "binary", function (err) {
if(!err){
doc.image('public/images/out/out.png', 100, 100);
}
ep.emitLater("completed");
});
});
ep.once("completed",function () {
doc.write('out.pdf');
doc.output(function(string) {
res.end(string);
});
})
}
exports.updateAllQrcode = function (req, res, next) {
console.log("#####controllers/updateAllQrcode");
var ep = EventProxy.create();
FixedAsset.updateAllQrcode(function (err,args) {
})
}
>>>>>>>
};
/**
* import fixed asset excel records
* @param {object} req the instance of request
* @param {object} res the instance of response
* @param {Function} next the next handler
* @return {null}
*/
exports.importFA = function (req, res, next) {
console.log("######controllers/importFA");
var fileName = "fa.xlsx";
var xlsxPath = path.resolve(__dirname, "../uploads/", fileName);
console.log("xlsxPath:" + xlsxPath);
var ep = EventProxy.create();
parseXlsx(xlsxPath, function (err, data) {
if (err || !data) {
return ep.emitLater("error", new ServerError());
}
return ep.emitLater("after_parsedExcelData", data);
});
ep.once("after_parsedExcelData", function (excelData) {
//remove first title array
excelData.shift();
FixedAsset.importFixedAssets(excelData, function () {
//delete excel file
return res.send(resUtil.generateRes(null, config.statusCode.SATUS_OK));
});
});
ep.fail(function (err) {
return res.send(resUtil.generateRes(null, err.statusCode));
});
};
/**
* [handleQrcode description]
* @param {object} req the instance of request
* @param {object} res the instance of response
* @param {Function} next the next handler
* @return {[type]} [description]
*/
exports.handleQrcode = function (req, res, next) {
console.log("######controllers/handleQrcode");
var ep = EventProxy.create();
FixedAsset.updateQrcode('123123',function (err,qUri) {
if (err) {
return ep.emitLater("error", err);
};
ep.emitLater("loadpdf",qUri);
})
ep.fail(function (err) {
res.send(resUtil.generateRes(null, err.statusCode));
});
ep.once("completed1", function (tem) {
res.send("<img src='"+tem+"'/>");
});
var doc = new PDFDocument();
ep.once("loadpdf", function (tem) {
//doc.addPage();
doc.text('Hello world!');
var base64Data,binaryData;
base64Data = tem.replace(/^data:image\/png;base64,/, "");
base64Data += base64Data.replace('+', ' ');
binaryData = new Buffer(base64Data, 'base64').toString('binary');
fs.writeFile("public/images/out/out.png", binaryData, "binary", function (err) {
if(!err){
doc.image('public/images/out/out.png', 100, 100);
}
ep.emitLater("completed");
});
});
ep.once("completed",function () {
doc.write('out.pdf');
doc.output(function(string) {
res.end(string);
});
})
};
exports.updateAllQrcode = function (req, res, next) {
console.log("#####controllers/updateAllQrcode");
var ep = EventProxy.create();
FixedAsset.updateAllQrcode(function (err,args) {
})
}; |
<<<<<<<
it("must write to client side from server side", function(done) {
=======
it("must write to client from server", function() {
>>>>>>>
it("must write to client from server", function(done) {
<<<<<<<
it("must write to server side from client side", function(done) {
=======
it("must write to server from client", function() {
>>>>>>>
it("must write to server from client", function(done) {
<<<<<<<
it("must write to server side from client side given binary",
function(done) {
=======
it("must write to server from client given binary", function() {
>>>>>>>
it("must write to server from client given binary", function(done) {
<<<<<<<
it("must write to server side from client side given a buffer",
function(done) {
=======
it("must write to server from client given a buffer", function() {
>>>>>>>
it("must write to server from client given a buffer", function(done) {
<<<<<<<
it("must write to server side from client side given a UTF-8 string",
function(done) {
=======
it("must write to server from client given a UTF-8 string", function() {
>>>>>>>
it("must write to server from client given a UTF-8 string",
function(done) {
<<<<<<<
it("must write to server side from client side given a ASCII string",
function(done) {
=======
it("must write to server from client given a ASCII string", function() {
>>>>>>>
it("must write to server from client given a ASCII string",
function(done) {
<<<<<<<
it("must write to server side from client side given a UCS-2 string",
function(done) {
=======
it("must write to server from client given a UCS-2 string",
function() {
>>>>>>>
it("must write to server from client given a UCS-2 string",
function(done) { |
<<<<<<<
* Returns a list of all contexts.
*
* @static
* @method getContexts
* @return {Array} contexts that are updated on each tick
*/
Engine.getContexts = function getContexts() {
return contexts;
};
/**
=======
* Removes a context from the run loop. Note: this does not do any
* cleanup.
*
* @static
* @method deregisterContext
*
* @param {Context} context Context to deregister
*/
Engine.deregisterContext = function deregisterContext(context) {
var i = contexts.indexOf(context);
if (i >= 0) contexts.splice(i, 1);
};
/**
>>>>>>>
* Returns a list of all contexts.
*
* @static
* @method getContexts
* @return {Array} contexts that are updated on each tick
*/
Engine.getContexts = function getContexts() {
return contexts;
};
/**
* Removes a context from the run loop. Note: this does not do any
* cleanup.
*
* @static
* @method deregisterContext
*
* @param {Context} context Context to deregister
*/
Engine.deregisterContext = function deregisterContext(context) {
var i = contexts.indexOf(context);
if (i >= 0) contexts.splice(i, 1);
};
/** |
<<<<<<<
"!<rootDir>/packages/swagger/lib/class",
"!<rootDir>/packages/swagger/lib/utils",
"!<rootDir>/packages/swagger/lib/decorators/{baseParameter,consumes,deprecated,description,example,name,produces,responses,returns,returnsArray,security,summary,operation,title}.ts",
"!**/node_modules"
=======
"!<rootDir>/packages/schema",
"!<rootDir>/packages/json-mapper",
"!<rootDir>/packages/platform-test-utils",
"!<rootDir>/packages/common/mvc/utils",
"!<rootDir>/packages/common/mvc/constants",
"!<rootDir>/packages/common/converters/constants",
"!<rootDir>/packages/common/jsonschema/utils/decoratorSchemaFactory",
"!node_modules"
>>>>>>>
"!<rootDir>/packages/platform-test-utils",
"!<rootDir>/packages/swagger/lib/class",
"!<rootDir>/packages/swagger/lib/utils",
"!<rootDir>/packages/swagger/lib/decorators/{baseParameter,consumes,deprecated,description,example,name,produces,responses,returns,returnsArray,security,summary,operation,title}.ts",
"!**/node_modules" |
<<<<<<<
relationshipsSpec();
// serializerSpec();
// databaseSpec();
=======
// serializerSpec();
databaseSpec();
>>>>>>>
relationshipsSpec();
// serializerSpec();
// databaseSpec();
// serializerSpec();
// databaseSpec(); |
<<<<<<<
=======
var posts = JSON.parse(post_list);
var thread = $("#thread-body");
var light = true;
for (var i = 0; i < posts.length; i++) {
current = JSON.parse(posts[i]);
var background;
if (current.previouslyRead == "true") {
background = light ? prefs.readBackgroundColor : prefs.readBackgroundColor2;
} else {
background = light ? prefs.backgroundColor : prefs.backgroundColor2;
}
if(prefs.alternateColors == "true"){
light = !light;
}
var post_data = {
postId: current.id,
username: current.username,
postdate: current.date,
avatar: current.avatar,
content: current.content,
background: background,
lastread: (current.previouslyRead == "true") ? "read" : "unread",
lastreadurl: current.lastReadUrl,
editable: (current.editable == "true") ? "editable" : "noneditable",
fontColor: prefs.fontColor,
fontSize: prefs.fontSize,
opColor: (current.isOp == "true") ? prefs.OPColor : "",
};
thread.append(ich.post(post_data));
}
>>>>>>> |
<<<<<<<
const rnInstall = await reactNative.install({ name })
=======
const rnInstall = await reactNative.install({ name, skipJest: true, version: REACT_NATIVE_VERSION })
>>>>>>>
const rnInstall = await reactNative.install({ name, version: REACT_NATIVE_VERSION }) |
<<<<<<<
=======
//import '@cybercongress/ui/lib/styles.css';
>>>>>>> |
<<<<<<<
const groupId = decodeURIComponent(e.detail.value.id)
.replace(/\+/g, ' ');
this.set(['permission', 'value', 'rules', groupId], {});
=======
const groupId = decodeURIComponent(e.detail.value.id).replace(/\+/g, ' ');
// We cannot use "this.set(...)" here, because groupId may contain dots,
// and dots in property path names are totally unsupported by Polymer.
// Apparently Polymer picks up this change anyway, otherwise we should
// have looked at using MutableData:
// https://polymer-library.polymer-project.org/2.0/docs/devguide/data-system#mutable-data
this.permission.value.rules[groupId] = {};
>>>>>>>
const groupId = decodeURIComponent(e.detail.value.id)
.replace(/\+/g, ' ');
// We cannot use "this.set(...)" here, because groupId may contain dots,
// and dots in property path names are totally unsupported by Polymer.
// Apparently Polymer picks up this change anyway, otherwise we should
// have looked at using MutableData:
// https://polymer-library.polymer-project.org/2.0/docs/devguide/data-system#mutable-data
this.permission.value.rules[groupId] = {}; |
<<<<<<<
name: 'Edge case with only rotation 3 and 0 enabled.',
bins: [
new Bin('Le grande box', 100, 100, 300, 1500),
],
items: [
new Item('Item 1', 150, 50, 50, 20, [0,3])
],
expectation: function (packer) {
return packer.bins[0].items.length === 1
&& packer.unfitItems.length === 0;
}
},
{
name: 'Test three items fit into smaller bin.',
=======
name: 'Test three items fit into smaller bin after being rotated.',
>>>>>>>
name: 'Edge case with only rotation 3 and 0 enabled.',
bins: [
new Bin('Le grande box', 100, 100, 300, 1500),
],
items: [
new Item('Item 1', 150, 50, 50, 20, [0,3])
],
expectation: function (packer) {
return packer.bins[0].items.length === 1
&& packer.unfitItems.length === 0;
}
},
{
name: 'Test three items fit into smaller bin after being rotated.', |
<<<<<<<
this.enabled = this.evaluateEnabled();
if (this.isEnabled) {
// Sets the credentials for AWS resources.
const awsCreds = this.serverless.providers.aws.getCredentials();
AWS.config.update(awsCreds);
this.apigateway = new AWS.APIGateway();
this.route53 = new AWS.Route53();
this.setGivenDomainName(this.serverless.service.custom.customDomain.domainName);
}
=======
// Sets the credentials for AWS resources.
const awsCreds = this.serverless.providers.aws.getCredentials();
AWS.config.update(awsCreds);
this.apigateway = new AWS.APIGateway();
this.route53 = new AWS.Route53();
this.setGivenDomainName(this.serverless.service.custom.customDomain.domainName);
this.setEndpointType(this.serverless.service.custom.customDomain.endpointType);
this.setAcmRegion();
>>>>>>>
this.enabled = this.evaluateEnabled();
if (this.isEnabled) {
// Sets the credentials for AWS resources.
const awsCreds = this.serverless.providers.aws.getCredentials();
AWS.config.update(awsCreds);
this.apigateway = new AWS.APIGateway();
this.route53 = new AWS.Route53();
this.setGivenDomainName(this.serverless.service.custom.customDomain.domainName);
this.setEndpointType(this.serverless.service.custom.customDomain.endpointType);
this.setAcmRegion();
}
<<<<<<<
if (! this.enabled)
return this.reportDisabled();
=======
let domain = null;
>>>>>>>
if (!this.enabled) {
return this.reportDisabled();
}
let domain = null;
<<<<<<<
if (! this.enabled)
return this.reportDisabled();
=======
let domain = null;
>>>>>>>
if (!this.enabled) {
return this.reportDisabled();
}
let domain = null;
<<<<<<<
if (! this.enabled)
return this.reportDisabled();
=======
let domain = null;
>>>>>>>
if (!this.enabled) {
return this.reportDisabled();
}
let domain = null; |
<<<<<<<
const plugin = constructPlugin('', null, true);
plugin.setGivenDomainName(plugin.serverless.service.custom.customDomain.domainName);
=======
const plugin = constructPlugin('', null, true, true);
plugin.givenDomainName = plugin.serverless.service.custom.customDomain.domainName;
>>>>>>>
const plugin = constructPlugin('', null, true, true);
plugin.setGivenDomainName(plugin.serverless.service.custom.customDomain.domainName); |
<<<<<<<
http = require('http'),
https = require('https'),
EventEmitter = require('events').EventEmitter;
=======
EventEmitter = require('events').EventEmitter,
Q = require('q');
>>>>>>>
http = require('http'),
https = require('https'),
EventEmitter = require('events').EventEmitter,
Q = require('q'); |
<<<<<<<
this.plugins = [
PluginDropImages({
applyTransform: (transform, file) => {
const mediaProxy = new MediaProxy(file.name, file);
props.onAddMedia(mediaProxy);
return transform
.insertBlock(mediaproxyBlock(mediaProxy));
}
})
];
this.handleChange = this.handleChange.bind(this);
this.handleDocumentChange = this.handleDocumentChange.bind(this);
this.handleMarkStyleClick = this.handleMarkStyleClick.bind(this);
this.handleBlockStyleClick = this.handleBlockStyleClick.bind(this);
this.handleInlineClick = this.handleInlineClick.bind(this);
this.handleBlockTypeClick = this.handleBlockTypeClick.bind(this);
this.handlePluginClick = this.handlePluginClick.bind(this);
this.handleImageClick = this.handleImageClick.bind(this);
this.focusAndAddParagraph = this.focusAndAddParagraph.bind(this);
this.handleKeyDown = this.handleKeyDown.bind(this);
this.renderBlockTypesMenu = this.renderBlockTypesMenu.bind(this);
=======
this.calculateHoverMenuPosition = _.throttle(this.calculateHoverMenuPosition.bind(this), 30);
this.calculateBlockMenuPosition = _.throttle(this.calculateBlockMenuPosition.bind(this), 100);
>>>>>>>
this.plugins = [
PluginDropImages({
applyTransform: (transform, file) => {
const mediaProxy = new MediaProxy(file.name, file);
props.onAddMedia(mediaProxy);
return transform
.insertBlock(mediaproxyBlock(mediaProxy));
}
})
];
<<<<<<<
}
handleBlockTypeClick(type) {
=======
};
handleBlockTypeClick = type => {
>>>>>>>
};
handleBlockTypeClick = type => { |
<<<<<<<
import styles from './CollectionPage.css';
=======
import EditorialWorkflow from './EditorialWorkflowHoC';
>>>>>>>
import styles from './CollectionPage.css';
import EditorialWorkflow from './EditorialWorkflowHoC';
<<<<<<<
return <div className={styles.alignable}>
{entries ? <EntryListing collection={collection} entries={entries}/> : 'Loading entries...'}
=======
return <div>
{entries ?
<EntryListing collection={collection} entries={entries}/>
:
<Loader active>{['Loading Entries', 'Caching Entries', 'This might take several minutes']}</Loader>
}
>>>>>>>
return <div className={styles.alignable}>
{entries ?
<EntryListing collection={collection} entries={entries}/>
:
<Loader active>{['Loading Entries', 'Caching Entries', 'This might take several minutes']}</Loader>
} |
<<<<<<<
exports.inherits = Util.inherits;
exports.transform = function (source, transform, options) {
exports.assert(source == null || typeof source === 'object', 'Invalid source object: must be null, undefined, or an object');
var result = {};
var keys = Object.keys(transform);
for (var k = 0, kl = keys.length; k < kl; ++k) {
var key = keys[k];
var path = key.split('.');
var sourcePath = transform[key];
exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
var segment;
var res = result;
while (path.length > 1) {
segment = path.shift();
if (!res[segment]) {
res[segment] = {};
}
res = res[segment];
}
segment = path.shift();
res[segment] = exports.reach(source, sourcePath, options);
}
return result;
};
exports.transform = function (source, transform, options) {
exports.assert(source == null || typeof source === 'object', 'Invalid source object: must be null, undefined, or an object');
var result = {};
var keys = Object.keys(transform);
for (var k = 0, kl = keys.length; k < kl; ++k) {
var key = keys[k];
var path = key.split('.');
var sourcePath = transform[key];
exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
var segment;
var res = result;
while (path.length > 1) {
segment = path.shift();
if (!res[segment]) {
res[segment] = {};
}
res = res[segment];
}
segment = path.shift();
res[segment] = exports.reach(source, sourcePath, options);
}
return result;
};
exports.random = function(join) {
join = join || '';
return [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join(join);
};
=======
exports.inherits = Util.inherits;
exports.transform = function (source, transform, options) {
exports.assert(source == null || typeof source === 'object', 'Invalid source object: must be null, undefined, or an object');
var result = {};
var keys = Object.keys(transform);
for (var k = 0, kl = keys.length; k < kl; ++k) {
var key = keys[k];
var path = key.split('.');
var sourcePath = transform[key];
exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
var segment;
var res = result;
while (path.length > 1) {
segment = path.shift();
if (!res[segment]) {
res[segment] = {};
}
res = res[segment];
}
segment = path.shift();
res[segment] = exports.reach(source, sourcePath, options);
}
return result;
};
>>>>>>>
exports.inherits = Util.inherits;
exports.transform = function (source, transform, options) {
exports.assert(source == null || typeof source === 'object', 'Invalid source object: must be null, undefined, or an object');
var result = {};
var keys = Object.keys(transform);
for (var k = 0, kl = keys.length; k < kl; ++k) {
var key = keys[k];
var path = key.split('.');
var sourcePath = transform[key];
exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
var segment;
var res = result;
while (path.length > 1) {
segment = path.shift();
if (!res[segment]) {
res[segment] = {};
}
res = res[segment];
}
segment = path.shift();
res[segment] = exports.reach(source, sourcePath, options);
}
return result;
};
exports.transform = function (source, transform, options) {
exports.assert(source == null || typeof source === 'object', 'Invalid source object: must be null, undefined, or an object');
var result = {};
var keys = Object.keys(transform);
for (var k = 0, kl = keys.length; k < kl; ++k) {
var key = keys[k];
var path = key.split('.');
var sourcePath = transform[key];
exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
var segment;
var res = result;
while (path.length > 1) {
segment = path.shift();
if (!res[segment]) {
res[segment] = {};
}
res = res[segment];
}
segment = path.shift();
res[segment] = exports.reach(source, sourcePath, options);
}
return result;
};
exports.transform = function (source, transform, options) {
exports.assert(source == null || typeof source === 'object', 'Invalid source object: must be null, undefined, or an object');
var result = {};
var keys = Object.keys(transform);
for (var k = 0, kl = keys.length; k < kl; ++k) {
var key = keys[k];
var path = key.split('.');
var sourcePath = transform[key];
exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
var segment;
var res = result;
while (path.length > 1) {
segment = path.shift();
if (!res[segment]) {
res[segment] = {};
}
res = res[segment];
}
segment = path.shift();
res[segment] = exports.reach(source, sourcePath, options);
}
return result;
};
exports.random = function(join) {
join = join || '';
return [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join(join);
}; |
<<<<<<<
=======
db.query("CREATE TABLE IF NOT EXISTS movies (original_name TEXT PRIMARY KEY, title TEXT, poster_path VARCHAR, backdrop_path VARCHAR, imdb_id INTEGER, rating VARCHAR, certification VARCHAR, genre VARCHAR, runtime VARCHAR, overview TEXT, cd_number TEXT, adult TEXT, hidden TEXT)");
console.log("DB error",err);
>>>>>>> |
<<<<<<<
const handle = live.handle || 'Temporary Handle';
const alias = live.directive || 'live';
const idField = live.uid || 'id';
const mutation = live.mutation;
=======
const handle = live.handle;
const alias = live.directive || 'live';
const idField = live.uid || 'id';
const mutation = false;
>>>>>>>
const handle = live.handle; // || 'Temporary Handle';
const alias = live.directive || 'live';
const idField = live.uid || 'id';
const mutation = live.mutation;
<<<<<<<
=======
//console.log('set context');
console.log(Object.keys(reference.existing), reference.existing, fieldString, reference.existing[fieldString]);
console.log('QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ', reference.existing[fieldString].subscribers, reference.replacement[fieldString].subscribers)
>>>>>>>
<<<<<<<
=======
console.log('references', live.references);
// console.log('handles', live.queue);
// if (RDL.store['5a9b26de4d33148fb6718929']) {
// console.log('RDL', RDL.store);
//}
>>>>>>>
<<<<<<<
return false;
=======
// if (reference) console.log('reference.source', reference.source);
// console.log('source', source);
return false;
>>>>>>>
return false;
<<<<<<<
console.log('CONTINUING TO RESOLVE FIELDS ON OBJECT');
return reference;
=======
return reference;
>>>>>>>
return reference; |
<<<<<<<
http.globalAgent.maxSockets = 10;
function buffer_concat(buffers,nread){
var buffer = null;
switch(buffers.length) {
case 0: buffer = new Buffer(0);
break;
case 1: buffer = buffers[0];
break;
default:
buffer = new Buffer(nread);
for (var i = 0, pos = 0, l = buffers.length; i < l; i++) {
var chunk = buffers[i];
chunk.copy(buffer, pos);
pos += chunk.length;
}
break;
}
return buffer.toString()
}
=======
>>>>>>>
function buffer_concat(buffers,nread){
var buffer = null;
switch(buffers.length) {
case 0: buffer = new Buffer(0);
break;
case 1: buffer = buffers[0];
break;
default:
buffer = new Buffer(nread);
for (var i = 0, pos = 0, l = buffers.length; i < l; i++) {
var chunk = buffers[i];
chunk.copy(buffer, pos);
pos += chunk.length;
}
break;
}
return buffer.toString()
} |
<<<<<<<
power: require('./power'),
=======
xor: require('./xor'),
>>>>>>>
power: require('./power'),
xor: require('./xor'), |
<<<<<<<
// write a function that returns:
// value, if min <= value <= max
// min, if value < min
// max, if value > max
function clamp(value, min, max) {
return value <= min ? min : value >= max ? max : value;
=======
/**
* TODO: Write a function that returns
* - value, if min <= value <= max
* - min, if value < min
* - max, if value > max
* @param {Number} value
* @param {Number} value
* @param {Number} value
*/
function clamp() {
// TODO: Your code goes here.
>>>>>>>
/**
* Write a function that returns
* - value, if min <= value <= max
* - min, if value < min
* - max, if value > max
* @param {Number} value
* @param {Number} value
* @param {Number} value
*/
function clamp(value, min, max) {
return value <= min ? min : value >= max ? max : value; |
<<<<<<<
const JSONStream = require('JSONStream');
=======
const backoff = require('backoff');
>>>>>>>
const JSONStream = require('JSONStream');
const backoff = require('backoff'); |
<<<<<<<
this._audit = { ready: false, data: null, passed: false, failed: [] };
fileUtils.generateEnvFile()
=======
fs.exists('./hosted', (exists) => {
if (!exists){
fs.mkdir('./hosted')
}
})
if (!fs.existsSync('./.env') || this.noStellarAccount()) {
let stellarKeyPair = stellar.generateKeys()
fileUtils.generateEnvFile({
'STELLAR_ACCOUNT_ID': stellarKeyPair.publicKey(),
'STELLAR_SECRET': stellarKeyPair.secret()
})
}
this._stellarAccountId = fileUtils.getStellarAccountId();
stellar.accountExists(this.stellarAccountId, (account) => {
console.log('account does exist')
account.balances.forEach((balance) =>{
console.log('Type:', balance.asset_type, ', Balance:', balance.balance);
});
stellar.createEscrowAccount(this.stellarAccountId, '100')
}, (publicKey) => {
console.log('account does not exist, creating account...')
stellar.createNewAccount(publicKey)
})
this._audit = { ready: false, data: null, passed: false };
}
noStellarAccount() {
return !dotenv.config().parsed.STELLAR_ACCOUNT_ID || !dotenv.config().parsed.STELLAR_SECRET
>>>>>>>
this._audit = { ready: false, data: null, passed: false, failed: [] };
fs.exists('./hosted', (exists) => {
if (!exists){
fs.mkdir('./hosted')
}
})
if (!fs.existsSync('./.env') || this.noStellarAccount()) {
let stellarKeyPair = stellar.generateKeys()
fileUtils.generateEnvFile({
'STELLAR_ACCOUNT_ID': stellarKeyPair.publicKey(),
'STELLAR_SECRET': stellarKeyPair.secret()
})
}
this._stellarAccountId = fileUtils.getStellarAccountId();
stellar.accountExists(this.stellarAccountId, (account) => {
console.log('account does exist')
account.balances.forEach((balance) =>{
console.log('Type:', balance.asset_type, ', Balance:', balance.balance);
});
stellar.createEscrowAccount(this.stellarAccountId, '100')
}, (publicKey) => {
console.log('account does not exist, creating account...')
stellar.createNewAccount(publicKey)
})
this._audit = { ready: false, data: null, passed: false };
}
noStellarAccount() {
return !dotenv.config().parsed.STELLAR_ACCOUNT_ID || !dotenv.config().parsed.STELLAR_SECRET
<<<<<<<
get audit() {
return this._audit
}
=======
get stellarAccountId(){
return this._stellarAccountId
}
getStellarAccountInfo(){
let accountId = this.stellarAccountId;
stellar.getAccountInfo(accountId)
}
>>>>>>>
get audit() {
return this._audit
}
get stellarAccountId(){
return this._stellarAccountId
}
getStellarAccountInfo(){
let accountId = this.stellarAccountId;
stellar.getAccountInfo(accountId)
}
<<<<<<<
while (targetKadNode[1].hostname === this.kadenceNode.contact.hostname &&
targetKadNode[1].port === this.kadenceNode.contact.port) { // change to identity and re-test
=======
console.log(targetKadNode, "Target kad node")
while ((targetKadNode[1].hostname === this.kadenceNode.contact.hostname &&
targetKadNode[1].port === this.kadenceNode.contact.port) || targetKadNode[0] === constants.SEED_NODE[0]) { // change to identity and re-test
>>>>>>>
console.log(targetKadNode, "Target kad node")
while ((targetKadNode[1].hostname === this.kadenceNode.contact.hostname &&
targetKadNode[1].port === this.kadenceNode.contact.port) || targetKadNode[0] === constants.SEED_NODE[0]) { // change to identity and re-test
<<<<<<<
if (err) { throw err; }
callback(batNode)
=======
callback(batNode, kadNodeTarget)
>>>>>>>
if (err) { throw err; }
callback(batNode, kadNodeTarget) |
<<<<<<<
const JSONStream = require('JSONStream');
=======
const stellar_account = require('../kadence_plugin').stellar_account;
>>>>>>>
const JSONStream = require('JSONStream');
const stellar_account = require('../kadence_plugin').stellar_account; |
<<<<<<<
document.addEventListener('DOMContentLoaded', () => ipcRenderer.send('pickerRequested', window.devicePixelRatio), false)
document.addEventListener('keydown', event => {
if (event.key === 'Escape') {
ipcRenderer.send('closePicker')
} else if (event.key === 'ArrowUp') {
ipcRenderer.send('movePickerUp');
} else if (event.key === 'ArrowRight') {
ipcRenderer.send('movePickerRight');
} else if (event.key === 'ArrowDown') {
ipcRenderer.send('movePickerDown');
} else if (event.key === 'ArrowLeft') {
ipcRenderer.send('movePickerLeft');
}
}, false)
document.addEventListener('keyup', event => {
if (event.key === 'Enter') {
ipcRenderer.send('selectPickerColor');
} else if (event.code === 'Space') {
ipcRenderer.send('selectPickerColor');
}
}, false)
=======
ipcRenderer.on('init', (event) => {
document.addEventListener('keydown', event => {
if (event.key === 'Escape') ipcRenderer.send('closePicker')
}, false)
})
>>>>>>>
ipcRenderer.on('init', (event) => {
document.addEventListener('keydown', event => {
if (event.key === 'Escape') {
ipcRenderer.send('closePicker')
} else if (event.key === 'ArrowUp') {
ipcRenderer.send('movePickerUp');
} else if (event.key === 'ArrowRight') {
ipcRenderer.send('movePickerRight');
} else if (event.key === 'ArrowDown') {
ipcRenderer.send('movePickerDown');
} else if (event.key === 'ArrowLeft') {
ipcRenderer.send('movePickerLeft');
}
}, false)
document.addEventListener('keyup', event => {
if (event.key === 'Enter') {
ipcRenderer.send('selectPickerColor');
} else if (event.code === 'Space') {
ipcRenderer.send('selectPickerColor');
}
}, false)
}) |
<<<<<<<
var currentEnv;
=======
// Include the standard library
argv.unshift(path.dirname(__dirname) + '/lib/prelude.roy');
var extensions = /\.l?roy$/;
var literateExtension = /\.lroy$/;
>>>>>>>
var extensions = /\.l?roy$/;
var literateExtension = /\.lroy$/;
var currentEnv;
<<<<<<<
// Write the JavaScript output.
var extension = /\.roy$/;
console.assert(filename.match(extension), 'Filename must end with ".roy"');
currentEnv = {};
var compiled = compile(source, env, currentEnv, data, aliases);
=======
if(filename.match(literateExtension)) {
// Strip out the Markdown.
source = source.match(/^ {4,}.+$/mg).join('\n').replace(/^ {4}/gm, '');
} else {
console.assert(filename.match(extensions), 'Filename must end with ".roy" or ".lroy"');
}
var compiled = compile(source, env, data, aliases);
>>>>>>>
if(filename.match(literateExtension)) {
// Strip out the Markdown.
source = source.match(/^ {4,}.+$/mg).join('\n').replace(/^ {4}/gm, '');
} else {
console.assert(filename.match(extensions), 'Filename must end with ".roy" or ".lroy"');
}
currentEnv = {};
var compiled = compile(source, env, currentEnv, data, aliases);
<<<<<<<
fs.writeFile(filename.replace(extension, '.js'), compiled.output, 'utf8');
var moduleOutput = _.map(currentEnv, function(v, k) {
return k + ': ' + v.toString();
}).join('\n') + '\n';
fs.writeFile(filename.replace(extension, '.roym'), moduleOutput, 'utf8');
=======
// Write the JavaScript output.
fs.writeFile(filename.replace(extensions, '.js'), compiled.output, 'utf8');
>>>>>>>
// Write the JavaScript output.
fs.writeFile(filename.replace(extensions, '.js'), compiled.output, 'utf8');
var moduleOutput = _.map(currentEnv, function(v, k) {
return k + ': ' + v.toString();
}).join('\n') + '\n';
fs.writeFile(filename.replace(extensions, '.roym'), moduleOutput, 'utf8'); |
<<<<<<<
var argscheck = cordova.require('cordova/argscheck');
var events = require('helpers.events');
var stubs = require('helpers.stubs');
var mobile = require('chrome.mobile.impl');
=======
var Event = require('chrome.Event');
>>>>>>>
var argscheck = cordova.require('cordova/argscheck');
var Event = require('chrome.Event');
var stubs = require('helpers.stubs');
var mobile = require('chrome.mobile.impl');
<<<<<<<
var manifestJson = null;
exports.onSuspend = {};
=======
exports.onSuspend = new Event('onSuspend');
>>>>>>>
var manifestJson = null;
exports.onSuspend = new Event('onSuspend'); |
<<<<<<<
function getUnpooledVariance(trialsA, trialsB, varianceA, varianceB) {
return Math.sqrt(
(Math.pow(varianceA, 2) / trialsA) + (Math.pow(varianceB, 2) / trialsB)
);
}
function assumeNormalDistrabution(trials, probabilityMean) {
=======
export function assumeNormalDistribution(trials, probabilityMean) {
>>>>>>>
export function getUnpooledVariance(trialsA, trialsB, varianceA, varianceB) {
return Math.sqrt(
(Math.pow(varianceA, 2) / trialsA) + (Math.pow(varianceB, 2) / trialsB)
);
}
export function assumeNormalDistribution(trials, probabilityMean) {
<<<<<<<
if (assumeNormalDistrabutionA === false || assumeNormalDistrabutionB === false) {
=======
const marginOfError = zScore * probabilityVariancePooled * Math.sqrt((1 / variantATrialCount) + (1 / variantBTrialCount));
const differenceFloor = probabilityMeanDifference - marginOfError;
const differenceCeiling = probabilityMeanDifference + marginOfError;
// const confidenceIntervalAsPercentage = Math.round(confidenceInterval * 100, -2);
if (assumeNormalDistributionA === false || assumeNormalDistributionB === false) {
>>>>>>>
if (assumeNormalDistributionA === false || assumeNormalDistributionB === false) { |
<<<<<<<
var configOptions = ['user', 'database', 'host', 'password', 'ssl', 'connection', 'stream']
=======
var _ = require('lodash');
var Client_MySQL = require('../mysql');
var Promise = require('../../promise');
var configOptions = ['user', 'database', 'host', 'password', 'port', 'ssl', 'connection', 'stream'];
var mysql2;
>>>>>>>
var configOptions = ['user', 'database', 'host', 'password', 'port', 'ssl', 'connection', 'stream']; |
<<<<<<<
if ( Utils.isChrome() ) { // Incompatible Chrome: "tab" in context menus
return;
}
=======
>>>>>>>
<<<<<<<
if (Utils.isFirefox()) { // Incompatible Chrome: "tab" in context menus
=======
if (!Utils.isChrome()) {
>>>>>>>
if (Utils.isFirefox()) {
<<<<<<<
if (Utils.isFirefox()) { // Incompatible Chrome: "tab" in context menus
=======
if (!Utils.isChrome()) {
>>>>>>>
if (Utils.isFirefox()) {
<<<<<<<
if (Utils.isFirefox()) { // Incompatible Chrome: "tab" in context menus
=======
if (!Utils.isChrome()) {
>>>>>>>
if (Utils.isFirefox()) {
<<<<<<<
if (Utils.isFirefox()) { // Incompatible Chrome: "tab" in context menus
=======
if (!Utils.isChrome()) {
>>>>>>>
if (Utils.isFirefox()) { |
<<<<<<<
Table: require('./components/table'),
Switch: require('./components/switch')
=======
Switch: require('./components/switch'),
Collapse: require('./components/Collapse'),
message: require('./components/message')
>>>>>>>
Table: require('./components/table'),
Switch: require('./components/switch'),
Collapse: require('./components/Collapse'),
message: require('./components/message') |
<<<<<<<
const wrapper = mount(<Mention defaultSuggestions={[<Mention.Nav value="light" />]} />);
=======
if (process.env.REACT === '15') {
return;
}
const wrapper = mount(
<Mention defaultSuggestions={[<Mention.Nav key="light" value="light" />]} />,
);
>>>>>>>
const wrapper = mount(
<Mention defaultSuggestions={[<Mention.Nav key="light" value="light" />]} />,
); |
<<<<<<<
import { LocaleProvider, Pagination, DatePicker, TimePicker, Calendar,
Popconfirm, Table, Modal, Select, Transfer } from '../..';
import arEG from '../ar_EG';
import bgBG from '../bg_BG';
import caES from '../ca_ES';
import csCZ from '../cs_CZ';
import daDK from '../da_DK';
import deDE from '../de_DE';
import elGR from '../el_GR';
=======
import {
LocaleProvider, Pagination, DatePicker, TimePicker, Calendar,
Popconfirm, Table, Modal, Select, Transfer,
} from '../..';
>>>>>>>
import {
LocaleProvider, Pagination, DatePicker, TimePicker, Calendar,
Popconfirm, Table, Modal, Select, Transfer,
} from '../..';
import arEG from '../ar_EG';
import bgBG from '../bg_BG';
import caES from '../ca_ES';
import csCZ from '../cs_CZ';
import daDK from '../da_DK';
import deDE from '../de_DE';
import elGR from '../el_GR';
<<<<<<<
const locales = [arEG, bgBG, caES, csCZ, daDK, deDE, elGR, enGB, enUS, esES, etEE, faIR, fiFI, frBE, frFR, heIL, huHU, isIS, itIT, jaJP, koKR, kuIQ, mnMN, nbNO, neNP, nlBE, nlNL, plPL, ptBR, ptPT, ruRU, skSK, slSI, srRS, svSE, thTH, trTR, ukUA, viVN, idID, zhCN, zhTW];
=======
const locales = [
enUS, ptBR, ptPT, ruRU, esES, svSE, frBE, deDE,
nlNL, caES, csCZ, koKR, etEE, skSK, jaJP, trTR,
zhTW, fiFI, plPL, bgBG, enGB, frFR, nlBE, itIT,
viVN, thTH, faIR, elGR, nbNO, srRS, slSI, isIS,
arEG, ukUA, zhCN, kuIQ, mnMN,
];
>>>>>>>
const locales = [
arEG, bgBG, caES, csCZ, daDK, deDE, elGR, enGB,
enUS, esES, etEE, faIR, fiFI, frBE, frFR, heIL,
huHU, isIS, itIT, jaJP, koKR, kuIQ, mnMN, nbNO,
neNP, nlBE, nlNL, plPL, ptBR, ptPT, ruRU, skSK,
slSI, srRS, svSE, thTH, trTR, ukUA, viVN, idID,
zhCN, zhTW,
]; |
<<<<<<<
timePlaceholder: 'Select time',
rangePlaceholder: ['Start date', 'End date'],
...CalendarLocale,
};
=======
}, CalendarLocale);
>>>>>>>
rangePlaceholder: ['Start date', 'End date'],
...CalendarLocale,
}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.