conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
it('correctly handles floats as single tokens', () => {
const result = sqlFormatter.format('SELECT 1e-9 AS a, 1.5e-10 AS b, 3.5E12 AS c, 3.5e12 AS d;');
expect(result).toBe(dedent`
SELECT
1e-9 AS a,
1.5e-10 AS b,
3.5E12 AS c,
3.5e12 AS d;
`);
});
=======
it('does not split UNION ALL in half', () => {
const result = sqlFormatter.format(`
SELECT * FROM tbl1
UNION ALL
SELECT * FROM tbl2;
`);
expect(result).toBe(dedent/* sql */ `
SELECT
*
FROM
tbl1
UNION ALL
SELECT
*
FROM
tbl2;
`);
});
>>>>>>>
it('correctly handles floats as single tokens', () => {
const result = sqlFormatter.format('SELECT 1e-9 AS a, 1.5e-10 AS b, 3.5E12 AS c, 3.5e12 AS d;');
expect(result).toBe(dedent`
SELECT
1e-9 AS a,
1.5e-10 AS b,
3.5E12 AS c,
3.5e12 AS d;
`);
});
it('does not split UNION ALL in half', () => {
const result = sqlFormatter.format(`
SELECT * FROM tbl1
UNION ALL
SELECT * FROM tbl2;
`);
expect(result).toBe(dedent/* sql */ `
SELECT
*
FROM
tbl1
UNION ALL
SELECT
*
FROM
tbl2;
`);
}); |
<<<<<<<
if (!opt_message) {
opt_message = '';
}
var win =
/** @type {Window} */ (goog.window.open('', opt_options, opt_parentWin));
goog.dom.safe.documentWrite(
win.document, goog.html.SafeHtml.htmlEscape(opt_message));
return win;
=======
if (!opt_message) {
opt_message = '';
}
var win = goog.window.open('', opt_options, opt_parentWin);
if (win) {
goog.dom.safe.documentWrite(
win.document, goog.html.SafeHtml.htmlEscape(opt_message));
}
return win;
>>>>>>>
if (!opt_message) {
opt_message = '';
}
if (win) {
goog.dom.safe.documentWrite(
win.document, goog.html.SafeHtml.htmlEscape(opt_message));
}
return win; |
<<<<<<<
var on = function on(elem, eventname, selector, handler, onceOnly){
=======
function on(elem, eventname, selector, handler){
>>>>>>>
function on(elem, eventname, selector, handler, onceOnly){
<<<<<<<
var once = function(elem, eventname, selector, handler){
return Event.on(elem, eventname, selector, handler, true);
=======
function once(elem, eventname, selector, handler){
var listener = function listener(event){
handler(event);
Event.off(elem, eventname, listener);
};
return Event.on(elem, eventname, selector, listener);
>>>>>>>
var once = function(elem, eventname, selector, handler){
return Event.on(elem, eventname, selector, handler, true);
<<<<<<<
// console.log(potentialDropTargets.length);
=======
>>>>>>>
<<<<<<<
Event.on('.content', 'mousemove', null, drag);
//Event.on('.scratchpad', '', null, endDragInScratchpad);
Event.on(document.body, 'mouseup', null, endDrag);
=======
Event.on(document, 'mousemove', null, drag);
Event.on('.content', 'mouseup', null, endDrag);
>>>>>>>
Event.on('.content', 'mousemove', null, drag);
//Event.on('.scratchpad', '', null, endDragInScratchpad);
Event.on(document.body, 'mouseup', null, endDrag);
<<<<<<<
=======
Event.on(document.body, 'wb-remove', '.block', removeBlock);
Event.on(document.body, 'wb-add', '.block', addBlock);
Event.on(document.body, 'wb-delete', '.block', deleteBlock);
wb.blockRegistry = blockRegistry;
>>>>>>>
Event.on(document.body, 'wb-remove', '.block', removeBlock);
Event.on(document.body, 'wb-add', '.block', addBlock);
Event.on(document.body, 'wb-delete', '.block', deleteBlock);
wb.blockRegistry = blockRegistry;
<<<<<<<
// Event.on('.tabbar', 'click', '.chrome_tab', tabSelect);
if (document.body.clientWidth < 361){
// console.log('mobile view');
Event.on('.show-files', 'click', null, showFiles);
Event.on('.show-blocks', 'click', null, showBlocks);
Event.on('.show-script', 'click', null, showScript);
Event.on('.show-result', 'click', null, showResult);
document.querySelector('.show-script').classList.add('current-button');
document.querySelector('.workspace').classList.add('current-view');
}
if (document.body.clientWidth > 360){
// console.log('desktop view');
Event.on(document.body, 'change', 'input', updateScriptsView);
Event.on(document.body, 'wb-modified', null, updateScriptsView);
}
=======
Event.on('.tabbar', 'click', '.chrome_tab', tabSelect);
wb.showWorkspace = showWorkspace;
wb.menu = menu;
>>>>>>>
// Event.on('.tabbar', 'click', '.chrome_tab', tabSelect);
if (document.body.clientWidth < 361){
// console.log('mobile view');
Event.on('.show-files', 'click', null, showFiles);
Event.on('.show-blocks', 'click', null, showBlocks);
Event.on('.show-script', 'click', null, showScript);
Event.on('.show-result', 'click', null, showResult);
document.querySelector('.show-script').classList.add('current-button');
document.querySelector('.workspace').classList.add('current-view');
}
if (document.body.clientWidth > 360){
// console.log('desktop view');
Event.on(document.body, 'change', 'input', updateScriptsView);
Event.on(document.body, 'wb-modified', null, updateScriptsView);
}
<<<<<<<
Event.on('.clear_scripts', 'click', null, wb.clearScripts);
Event.on('.edit-script', 'click', null, function(event){
wb.historySwitchState('editor');
});
Event.on(document.body, 'click', '.load-example', function(evt){
console.log('load example ' + evt.target.dataset.example);
=======
function loadExample(event){
>>>>>>>
function loadExample(event){
<<<<<<<
Event.on('.save_scripts', 'click', null, wb.saveCurrentScriptsToGist);
Event.on('.download_scripts', 'click', null, wb.createDownloadUrl);
Event.on('.load_from_gist', 'click', null, wb.loadScriptsFromGistId);
Event.on('.restore_scripts', 'click', null, wb.loadScriptsFromFilesystem);
wb.loaded = false;
=======
>>>>>>>
<<<<<<<
Event.once(document.body, 'wb-workspace-initialized', null, wb.initializeDragHandlers);
function handleDragover(evt){
=======
function handleDragover(event){
>>>>>>>
function handleDragover(evt){
<<<<<<<
function runFullSize(){
['#block_menu', '.workspace', '.scripts_text_view'].forEach(function(sel){
wb.hide(wb.find(document.body, sel));
});
wb.show(wb.find(document.body, '.stage'));
}
function runWithLayout(){
['#block_menu', '.workspace'].forEach(function(sel){
wb.show(wb.find(document.body, sel));
});
['stage', 'scripts_text_view', 'tutorial', 'scratchpad', 'scripts_workspace'].forEach(function(name){
toggleComponent({detail: {name: name, state: wb.toggleState[name]}});
});
}
function toggleComponent(evt){
var component = wb.find(document.body, '.' + evt.detail.name);
if (!component) return;
evt.detail.state ? wb.show(component) : wb.hide(component);
var results = wb.find(document.body, '.results');
// Special cases
switch(evt.detail.name){
case 'stage':
if (evt.detail.state){
wb.show(results);
}else{
wb.clearStage();
if (!wb.toggleState.scripts_text_view){
wb.hide(results);
}
}
break;
case 'scripts_text_view':
if (evt.detail.state){
wb.show(results);
wb.updateScriptsView();
}else{
if (!wb.toggleState.stage){
wb.hide(results);
}
}
break;
case 'tutorial':
case 'scratchpad':
case 'scripts_workspace':
if (! (wb.toggleState.tutorial || wb.toggleState.scratchpad || wb.toggleState.scripts_workspace)){
wb.hide(wb.find(document.body, '.workspace'));
}else{
wb.show(wb.find(document.body, '.workspace'));
}
default:
// do nothing
break;
}
if (wb.toggleState.stage){
// restart script on any toggle
// so it runs at the new size
wb.runCurrentScripts();
}
}
Event.on(document.body, 'wb-toggle', null, toggleComponent);
window.addEventListener('popstate', function(evt){
console.log('popstate event');
=======
window.addEventListener('popstate', function(event){
// console.log('popstate event');
>>>>>>>
function runFullSize(){
['#block_menu', '.workspace', '.scripts_text_view'].forEach(function(sel){
wb.hide(wb.find(document.body, sel));
});
wb.show(wb.find(document.body, '.stage'));
}
function runWithLayout(){
['#block_menu', '.workspace'].forEach(function(sel){
wb.show(wb.find(document.body, sel));
});
['stage', 'scripts_text_view', 'tutorial', 'scratchpad', 'scripts_workspace'].forEach(function(name){
toggleComponent({detail: {name: name, state: wb.toggleState[name]}});
});
}
function toggleComponent(evt){
var component = wb.find(document.body, '.' + evt.detail.name);
if (!component) return;
evt.detail.state ? wb.show(component) : wb.hide(component);
var results = wb.find(document.body, '.results');
// Special cases
switch(evt.detail.name){
case 'stage':
if (evt.detail.state){
wb.show(results);
}else{
wb.clearStage();
if (!wb.toggleState.scripts_text_view){
wb.hide(results);
}
}
break;
case 'scripts_text_view':
if (evt.detail.state){
wb.show(results);
wb.updateScriptsView();
}else{
if (!wb.toggleState.stage){
wb.hide(results);
}
}
break;
case 'tutorial':
case 'scratchpad':
case 'scripts_workspace':
if (! (wb.toggleState.tutorial || wb.toggleState.scratchpad || wb.toggleState.scripts_workspace)){
wb.hide(wb.find(document.body, '.workspace'));
}else{
wb.show(wb.find(document.body, '.workspace'));
}
default:
// do nothing
break;
}
if (wb.toggleState.stage){
// restart script on any toggle
// so it runs at the new size
wb.runCurrentScripts();
}
}
Event.on(document.body, 'wb-toggle', null, toggleComponent);
window.addEventListener('popstate', function(evt){
console.log('popstate event');
<<<<<<<
});
=======
}, false);
Event.on('.clear_scripts', 'click', null, clearScripts);
Event.on('.edit-script', 'click', null, function(event){
wb.historySwitchState('editor');
});
Event.on('.content', 'click', '.load-example', loadExample);
Event.on(document.body, 'wb-state-change', null, handleStateChange);
Event.on('.save_scripts', 'click', null, wb.saveCurrentScriptsToGist);
Event.on('.download_scripts', 'click', null, wb.createDownloadUrl);
Event.on('.load_from_gist', 'click', null, wb.loadScriptsFromGistId);
Event.on('.restore_scripts', 'click', null, wb.loadScriptsFromFilesystem);
Event.on('.workspace', 'click', '.disclosure', disclosure);
Event.on('.workspace', 'dblclick', '.locals .name', wb.changeName);
Event.on('.workspace', 'keypress', 'input', wb.resize);
Event.on('.workspace', 'change', 'input, select', function(event){
Event.trigger(document.body, 'wb-modified', {block: event.wbTarget, type: 'valueChanged'});
});
Event.on(document.body, 'wb-script-loaded', null, handleScriptLoad);
Event.on(document.body, 'wb-modified', null, handleScriptModify);
wb.language = location.pathname.match(/\/([^/.]*)\.html/)[1];
wb.loaded = false;
wb.clearScripts = clearScripts;
wb.historySwitchState = historySwitchState;
wb.createWorkspace = createWorkspace;
wb.wireUpWorkspace = wireUpWorkspace;
>>>>>>>
}, false);
Event.once(document.body, 'wb-workspace-initialized', null, wb.initializeDragHandlers);
Event.on('.clear_scripts', 'click', null, clearScripts);
Event.on('.edit-script', 'click', null, function(event){
wb.historySwitchState('editor');
});
Event.on('.content', 'click', '.load-example', loadExample);
Event.on(document.body, 'wb-state-change', null, handleStateChange);
Event.on('.save_scripts', 'click', null, wb.saveCurrentScriptsToGist);
Event.on('.download_scripts', 'click', null, wb.createDownloadUrl);
Event.on('.load_from_gist', 'click', null, wb.loadScriptsFromGistId);
Event.on('.restore_scripts', 'click', null, wb.loadScriptsFromFilesystem);
Event.on('.workspace', 'click', '.disclosure', disclosure);
Event.on('.workspace', 'dblclick', '.locals .name', wb.changeName);
Event.on('.workspace', 'keypress', 'input', wb.resize);
Event.on('.workspace', 'change', 'input, select', function(event){
Event.trigger(document.body, 'wb-modified', {block: event.wbTarget, type: 'valueChanged'});
});
Event.on(document.body, 'wb-script-loaded', null, handleScriptLoad);
Event.on(document.body, 'wb-modified', null, handleScriptModify);
wb.language = location.pathname.match(/\/([^/.]*)\.html/)[1];
wb.loaded = false;
wb.clearScripts = clearScripts;
wb.historySwitchState = historySwitchState;
wb.createWorkspace = createWorkspace;
wb.wireUpWorkspace = wireUpWorkspace; |
<<<<<<<
function propagateChange(newName) {
console.log('now update all instances too');
var source = wb.closest(nameSpan, '.block');
var instances = wb.findAll(wb.closest(source, '.context'), '[data-local-source="' + source.dataset.localSource + '"]');
instances.forEach(function(elem){
wb.find(elem, '.name').textContent = newName;
});
//Change name of parent
var parent = document.getElementById(source.dataset.localSource);
var nameTemplate = JSON.parse(parent.dataset.sockets)[0].name;
nameTemplate = nameTemplate.replace(/[^' ']*##/g, newName);
//Change locals name of parent
var parentLocals = JSON.parse(parent.dataset.locals);
var localSocket = parentLocals[0].sockets[0];
localSocket.name = newName;
parent.dataset.locals = JSON.stringify(parentLocals);
wb.find(parent, '.name').textContent = nameTemplate;
}
var action = {
undo: function() {
propagateChange(oldName);
},
redo: function() {
propagateChange(newName);
},
}
wb.history.add(action);
action.redo();
=======
console.log('now update all instances too');
var source = wb.closest(nameSpan, '.block');
var instances = wb.findAll(wb.closest(source, '.context'), '[data-local-source="' + source.dataset.localSource + '"]');
instances.forEach(function(elem){
wb.find(elem, '.name').textContent = newName;
});
//Change name of parent
var parent = document.getElementById(source.dataset.localSource);
var nameTemplate = JSON.parse(parent.dataset.sockets)[0].name;
nameTemplate = nameTemplate.replace(/[^' ']*##/g, newName);
//Change locals name of parent
var parentLocals = JSON.parse(parent.dataset.locals);
var localSocket = parentLocals[0].sockets[0];
localSocket.name = newName;
parent.dataset.locals = JSON.stringify(parentLocals);
wb.find(parent, '.name').textContent = nameTemplate;
Event.trigger(document.body, 'wb-modified', {block: event.wbTarget, type: 'nameChanged'});
>>>>>>>
function propagateChange(newName) {
console.log('now update all instances too');
var source = wb.closest(nameSpan, '.block');
var instances = wb.findAll(wb.closest(source, '.context'), '[data-local-source="' + source.dataset.localSource + '"]');
instances.forEach(function(elem){
wb.find(elem, '.name').textContent = newName;
});
//Change name of parent
var parent = document.getElementById(source.dataset.localSource);
var nameTemplate = JSON.parse(parent.dataset.sockets)[0].name;
nameTemplate = nameTemplate.replace(/[^' ']*##/g, newName);
//Change locals name of parent
var parentLocals = JSON.parse(parent.dataset.locals);
var localSocket = parentLocals[0].sockets[0];
localSocket.name = newName;
parent.dataset.locals = JSON.stringify(parentLocals);
wb.find(parent, '.name').textContent = nameTemplate;
Event.trigger(document.body, 'wb-modified', {block: event.wbTarget, type: 'nameChanged'});
}
var action = {
undo: function() {
propagateChange(oldName);
},
redo: function() {
propagateChange(newName);
},
}
wb.history.add(action);
action.redo(); |
<<<<<<<
debug("React Rendering");
// standardize to an array of EarlyPromises of ReactElements
var elementPromises = PageUtil.standardizeElements(page.getElements());
// TODO: deal with the timeouts.
// I learned how to chain an array of promises from http://bahmutov.calepin.co/chaining-promises.html
return elementPromises.reduce((chain, next, index) => {
return chain.then((element) => {
renderElement(res, element, context, index - 1);
return next;
})
}).then((element) => {
// reduce is called length - 1 times. we need to call one final time here to make sure we
// chain the final promise.
renderElement(res, element, context, elementPromises.length - 1);
}).catch((err) => {
debug("Error while rendering", err);
});
}
=======
logger.debug("React Rendering");
// TODO: deal with promises and arrays of elements -sra.
var element = page.getElements();
element = React.addons.cloneWithProps(element, { context: context });
element = <div>{element}</div>;
>>>>>>>
logger.debug("React Rendering");
// standardize to an array of EarlyPromises of ReactElements
var elementPromises = PageUtil.standardizeElements(page.getElements());
// TODO: deal with the timeouts.
// I learned how to chain an array of promises from http://bahmutov.calepin.co/chaining-promises.html
return elementPromises.reduce((chain, next, index) => {
return chain.then((element) => {
renderElement(res, element, context, index - 1);
return next;
})
}).then((element) => {
// reduce is called length - 1 times. we need to call one final time here to make sure we
// chain the final promise.
renderElement(res, element, context, elementPromises.length - 1);
}).catch((err) => {
logger.debug("Error while rendering", err);
});
}
<<<<<<<
function writeData(req, res, context, start) {
debug('Exposing context state');
=======
logger.debug('Exposing context state');
>>>>>>>
function writeData(req, res, context, start) {
logger.debug('Exposing context state'); |
<<<<<<<
longTermCaching: true,
=======
timingLogLevel: "none",
gaugeLogLevel: "no",
>>>>>>>
longTermCaching: true,
timingLogLevel: "none",
gaugeLogLevel: "no", |
<<<<<<<
describe('#connect.core.initRingtoneEngines()', function () {
describe('with default settings', function () {
before(function () {
this.params.ringtone = {
voice: {
ringtoneUrl: ""
},
queue_callback: {
ringtoneUrl: ""
}
};
sinon.stub(connect, "ifMaster");
sinon.stub(connect, "VoiceRingtoneEngine");
sinon.stub(connect, "QueueCallbackRingtoneEngine");
sinon.stub(connect, "ChatRingtoneEngine");
sinon.stub(connect, "TaskRingtoneEngine");
});
after(function () {
connect.ifMaster.restore();
connect.VoiceRingtoneEngine.restore();
connect.QueueCallbackRingtoneEngine.restore();
connect.ChatRingtoneEngine.restore();
connect.TaskRingtoneEngine.restore();
});
it("Ringtone init with VoiceRingtoneEngine", function () {
this.params.ringtone.voice.disabled = false;
connect.core.initRingtoneEngines(this.params);
connect.core.getEventBus().trigger(connect.AgentEvents.INIT, new connect.Agent());
connect.core.getEventBus().trigger(connect.AgentEvents.REFRESH, new connect.Agent());
connect.ifMaster.callArg(1);
assert.isTrue(connect.VoiceRingtoneEngine.calledWithNew());
});
it("Ringtone init with QueueCallbackRingtoneEngine", function () {
this.params.ringtone.queue_callback.disabled = false;
this.params.ringtone.voice.disabled = true;
connect.core.getEventBus().trigger(connect.AgentEvents.INIT, new connect.Agent());
connect.core.getEventBus().trigger(connect.AgentEvents.REFRESH, new connect.Agent());
connect.ifMaster.callArg(1);
assert.isTrue(connect.QueueCallbackRingtoneEngine.calledWithNew());
});
it("Ringtone no init with ChatRingtoneEngine", function () {
connect.core.getEventBus().trigger(connect.AgentEvents.INIT, new connect.Agent());
connect.core.getEventBus().trigger(connect.AgentEvents.REFRESH, new connect.Agent());
connect.ifMaster.callArg(1);
assert.isFalse(connect.ChatRingtoneEngine.calledWithNew());
});
it("Ringtone no init with TaskRingtoneEngine", function () {
connect.core.getEventBus().trigger(connect.AgentEvents.INIT, new connect.Agent());
connect.core.getEventBus().trigger(connect.AgentEvents.REFRESH, new connect.Agent());
connect.ifMaster.callArg(1);
assert.isFalse(connect.TaskRingtoneEngine.calledWithNew());
});
});
describe('with optional chat and task ringtone params', function () {
before(function () {
this.params.ringtone = {
voice: {
ringtoneUrl: ""
},
queue_callback: {
ringtoneUrl: ""
},
chat: {
ringtoneUrl: ""
},
task: {
ringtoneUrl: ""
}
};
sinon.stub(connect, "ifMaster");
sinon.stub(connect, "VoiceRingtoneEngine");
sinon.stub(connect, "QueueCallbackRingtoneEngine");
sinon.stub(connect, "ChatRingtoneEngine");
sinon.stub(connect, "TaskRingtoneEngine");
});
after(function () {
connect.ifMaster.restore();
connect.VoiceRingtoneEngine.restore();
connect.QueueCallbackRingtoneEngine.restore();
connect.ChatRingtoneEngine.restore();
connect.TaskRingtoneEngine.restore();
});
it("Ringtone init with ChatRingtoneEngine", function () {
connect.core.initRingtoneEngines(this.params);
this.params.ringtone.chat.disabled = false;
connect.core.getEventBus().trigger(connect.AgentEvents.INIT, new connect.Agent());
connect.core.getEventBus().trigger(connect.AgentEvents.REFRESH, new connect.Agent());
connect.ifMaster.callArg(1);
assert.isTrue(connect.ChatRingtoneEngine.calledWithNew());
});
it("Ringtone init with TaskRingtoneEngine", function () {
this.params.ringtone.task.disabled = false;
connect.core.getEventBus().trigger(connect.AgentEvents.INIT, new connect.Agent());
connect.core.getEventBus().trigger(connect.AgentEvents.REFRESH, new connect.Agent());
connect.ifMaster.callArg(1);
assert.isTrue(connect.TaskRingtoneEngine.calledWithNew());
});
});
});
=======
>>>>>>> |
<<<<<<<
this.cancelNextTimeout();
/* TODO: I dunno what else should be cleaned. */
=======
this.pause();
this.clearPerFrameHandlers();
>>>>>>>
this.cancelNextTimeout();
this.clearPerFrameHandlers();
<<<<<<<
this.scheduleNextStep();
=======
this.nextTimeout = enqueue(this.doNextStep, this.delay);
>>>>>>>
this.scheduleNextStep();
<<<<<<<
* Uses the emitter provided in options to emit events.
*/
Process.prototype.emit = function emit(name, data) {
if (this.emitter === null) {
return;
}
return this.emitter(name, data);
};
/**
* (Maybe) schedules the next instruction to run.
*/
Process.prototype.scheduleNextStep = function scheduleNextStep(stepRequested) {
assert(this.nextTimeout === null,
'Tried to schedule a callback when one is already scheduled.');
/* TODO: Decide if we should pause at this instruction due to a
* breakpoint, error condition, etc. */
/* TODO: Decide if we should switch to a different strand. */
/* TODO: do stuff if step*/
/* TODO: schedule animation frame, if necessary. */
/* Issue an event of which step is the next to execute. */
if (this.paused) {
/* This is enqueuing on behalf of a step. */
this.emit('step', {target: this.nextInstruction});
}
if (this.paused && !stepRequested) {
/* Paused and not requested from a step. */
return;
}
this.nextTimeout = enqueue(this.doNextStep, this.rate);
};
/**
=======
* Runs blocks during requestAnimationFrame().
*/
Process.prototype.handleAnimationFrame = function onAnimationFrame() {
var currTime = new Date().valueOf();
/* Do I dare change these not quite global variables? */
runtime.control._elapsed = currTime - this.lastTime;
/* FIXME: This does not trivially allow for multiple eachFrame
* handlers! */
runtime.control._frame++;
/* Why, yes, I do dare. */
this.lastTime = currTime;
if (!this.paused && this.delay === 0) {
/* Run ALL of the frame handlers synchronously. */
this.perFrameHandlers.forEach(function (strand){
strand.startSync();
});
} else {
/* TODO: Run one step when paused or in slow down mode. */
throw new Error('Slow down frame handler not implemented.');
}
/* Enqueue the next call for this function. */
this.currentAnimationFrameHandler =
requestAnimationFrame(this.onAnimationFrame);
};
/**
* Register this container as a frame handler.
*/
Process.prototype.addFrameHandler = function addFrameHandler(container) {
if (this.perFrameHandlers.length > 0) {
throw new Error('Cannot install more than one per-frame handler. Yet!');
}
var frame = Frame.createFromContainer(container, this.currentStrand.scope);
var strand = new ReusableStrand(frame, this);
this.perFrameHandlers.push(strand);
this.startEventLoop();
};
/**
* Starts requestAnimationFrame loop.
*/
Process.prototype.startEventLoop = function() {
runtime.control._frame = 0;
runtime.control._sinceLastTick = 0;
assert(this.perFrameHandlers.length > 0,
'Must have at least one per-frame handler defined.');
/* Alias to handleAnimationFrame, but bound to `this`. */
this.onAnimationFrame = this.handleAnimationFrame.bind(this);
if (!this.currentAnimationFrameHandler){
this.currentAnimationFrameHandler =
requestAnimationFrame(this.onAnimationFrame);
}
};
/**
* Cancels all per-frame handlers, and the current
* `requestAnimationFrame`.
*/
Process.prototype.clearPerFrameHandlers = function () {
this.perFrameHandlers = [];
this.lastTime = new Date().valueOf();
cancelAnimationFrame(this.currentAnimationFrameHandler);
this.currentAnimationFrameHandler = null;
};
/**
>>>>>>>
* Uses the emitter provided in options to emit events.
*/
Process.prototype.emit = function emit(name, data) {
if (this.emitter === null) {
return;
}
return this.emitter(name, data);
};
/**
* (Maybe) schedules the next instruction to run.
*/
Process.prototype.scheduleNextStep = function scheduleNextStep(stepRequested) {
assert(this.nextTimeout === null,
'Tried to schedule a callback when one is already scheduled.');
/* TODO: Decide if we should pause at this instruction due to a
* breakpoint, error condition, etc. */
/* TODO: Decide if we should switch to a different strand. */
/* TODO: do stuff if step*/
/* TODO: schedule animation frame, if necessary. */
/* Issue an event of which step is the next to execute. */
if (this.paused) {
/* This is enqueuing on behalf of a step. */
this.emit('step', {target: this.nextInstruction});
}
if (this.paused && !stepRequested) {
/* Paused and not requested from a step. */
return;
}
this.nextTimeout = enqueue(this.doNextStep, this.delay);
};
/**
* Runs blocks during requestAnimationFrame().
*/
Process.prototype.handleAnimationFrame = function onAnimationFrame() {
var currTime = new Date().valueOf();
/* Do I dare change these not quite global variables? */
runtime.control._elapsed = currTime - this.lastTime;
/* FIXME: This does not trivially allow for multiple eachFrame
* handlers! */
runtime.control._frame++;
/* Why, yes, I do dare. */
this.lastTime = currTime;
if (!this.paused && this.delay === 0) {
/* Run ALL of the frame handlers synchronously. */
this.perFrameHandlers.forEach(function (strand){
strand.startSync();
});
} else {
/* TODO: Run one step when paused or in slow down mode. */
throw new Error('Slow down frame handler not implemented.');
}
/* Enqueue the next call for this function. */
this.currentAnimationFrameHandler =
requestAnimationFrame(this.onAnimationFrame);
};
/**
* Register this container as a frame handler.
*/
Process.prototype.addFrameHandler = function addFrameHandler(container) {
if (this.perFrameHandlers.length > 0) {
throw new Error('Cannot install more than one per-frame handler. Yet!');
}
var frame = Frame.createFromContainer(container, this.currentStrand.scope);
var strand = new ReusableStrand(frame, this);
this.perFrameHandlers.push(strand);
this.startEventLoop();
};
/**
* Starts requestAnimationFrame loop.
*/
Process.prototype.startEventLoop = function() {
runtime.control._frame = 0;
runtime.control._sinceLastTick = 0;
assert(this.perFrameHandlers.length > 0,
'Must have at least one per-frame handler defined.');
/* Alias to handleAnimationFrame, but bound to `this`. */
this.onAnimationFrame = this.handleAnimationFrame.bind(this);
if (!this.currentAnimationFrameHandler){
this.currentAnimationFrameHandler =
requestAnimationFrame(this.onAnimationFrame);
}
};
/**
* Cancels all per-frame handlers, and the current
* `requestAnimationFrame`.
*/
Process.prototype.clearPerFrameHandlers = function () {
this.perFrameHandlers = [];
this.lastTime = new Date().valueOf();
cancelAnimationFrame(this.currentAnimationFrameHandler);
this.currentAnimationFrameHandler = null;
};
/** |
<<<<<<<
* enum Configuration Events
*/
var ConfigurationEvents = connect.makeNamespacedEnum('configuration', [
'configure',
'set_speaker_device',
'set_microphone_device',
'set_ringer_device',
'speaker_device_changed',
'microphone_device_changed',
'ringer_device_changed'
]);
/**---------------------------------------------------------------
=======
* enum Configuration Events
*/
var ConfigurationEvents = connect.makeNamespacedEnum('configuration', [
'configure',
'set_speaker_device',
'set_microphone_device',
'set_ringer_device',
'speaker_device_changed',
'microphone_device_changed',
'ringer_device_changed'
]);
var DisasterRecoveryEvents = connect.makeNamespacedEnum('disasterRecovery', [
'suppress',
'force_offline', // letting the sharedworker know to force offline
'set_offline', // iframe letting the native ccp to set offline
'init_disaster_recovery',
'failover' // used to propagate failover state to other windows
]);
/**---------------------------------------------------------------
* enum Configuration Events
*/
var ConfigurationEvents = connect.makeNamespacedEnum('configuration', [
'configure',
'set_speaker_device',
'set_microphone_device',
'set_ringer_device',
'speaker_device_changed',
'microphone_device_changed',
'ringer_device_changed'
]);
/**---------------------------------------------------------------
>>>>>>>
* enum Configuration Events
*/
var ConfigurationEvents = connect.makeNamespacedEnum('configuration', [
'configure',
'set_speaker_device',
'set_microphone_device',
'set_ringer_device',
'speaker_device_changed',
'microphone_device_changed',
'ringer_device_changed'
]);
/**---------------------------------------------------------------
<<<<<<<
if (eventName.startsWith(connect.ContactEvents.ACCEPTED) && data !== null && data.contactId && !(data instanceof connect.Contact)) {
data = new connect.Contact(data.contactId);
}
=======
if (
eventName.startsWith(connect.ContactEvents.ACCEPTED) &&
data &&
data.contactId &&
!(data instanceof connect.Contact)
) {
data = new connect.Contact(data.contactId);
}
if (eventName.startsWith(connect.ContactEvents.ACCEPTED) && data.contactId && !(data instanceof connect.Contact)) {
data = new connect.Contact(data.contactId);
}
>>>>>>>
if (
eventName.startsWith(connect.ContactEvents.ACCEPTED) &&
data &&
data.contactId &&
!(data instanceof connect.Contact)
) {
data = new connect.Contact(data.contactId);
}
<<<<<<<
connect.ConfigurationEvents = ConfigurationEvents;
connect.ConnnectionEvents = ConnnectionEvents;
=======
connect.ConfigurationEvents = ConfigurationEvents;
connect.ConnectionEvents = ConnectionEvents;
connect.ConnnectionEvents = ConnectionEvents; //deprecate on next major version release.
>>>>>>>
connect.ConfigurationEvents = ConfigurationEvents;
connect.ConnnectionEvents = ConnnectionEvents; |
<<<<<<<
beforeEach(function () {
sinon.stub(connect.Agent.prototype, "getContacts").returns([]);
this.ringtoneEngine = new connect.VoiceRingtoneEngine(ringtoneObj);
this.ringtoneSetup = sinon.stub(this.ringtoneEngine, "_ringtoneSetup");
assert.doesNotThrow(this.ringtoneEngine._driveRingtone, Error, "Not implemented.");
});
afterEach(function () {
sinon.restore();
});
=======
before(function () {
sandbox.stub(connect.core, "getEventBus").returns(bus);
sandbox.stub(connect.Agent.prototype, "getContacts").returns([]);
this.voiceRingtoneEngine = new connect.VoiceRingtoneEngine(ringtoneObj);
this.ringtoneSetup = sandbox.stub(this.voiceRingtoneEngine, "_ringtoneSetup");
assert.doesNotThrow(this.voiceRingtoneEngine._driveRingtone, Error, "Not implemented.");
sandbox.stub(contact, "getType").returns(lily.ContactType.VOICE);
sandbox.stub(contact, "isSoftphoneCall").returns(true);
sandbox.stub(contact, "isInbound").returns(true);
});
after(function () {
sandbox.restore();
});
>>>>>>>
before(function () {
sandbox.stub(connect.core, "getEventBus").returns(bus);
sandbox.stub(connect.Agent.prototype, "getContacts").returns([]);
this.voiceRingtoneEngine = new connect.VoiceRingtoneEngine(ringtoneObj);
this.ringtoneSetup = sandbox.stub(this.voiceRingtoneEngine, "_ringtoneSetup");
assert.doesNotThrow(this.voiceRingtoneEngine._driveRingtone, Error, "Not implemented.");
sandbox.stub(contact, "getType").returns(lily.ContactType.VOICE);
sandbox.stub(contact, "isSoftphoneCall").returns(true);
sandbox.stub(contact, "isInbound").returns(true);
});
after(function () {
sandbox.restore();
});
<<<<<<<
=======
describe('#connect.ChatRingtoneEngine', function () {
before(function () {
sandbox.stub(connect.core, "getEventBus").returns(bus);
this.chatRingtoneEngine = new connect.ChatRingtoneEngine(ringtoneObj);
this.ringtoneSetup = sandbox.stub(this.chatRingtoneEngine, "_ringtoneSetup");
assert.doesNotThrow(this.chatRingtoneEngine._driveRingtone, Error, "Not implemented.");
sandbox.stub(contact, "getType").returns(lily.ContactType.CHAT);
sandbox.stub(contact, "isInbound").returns(true);
});
after(function () {
sandbox.restore();
});
it('validate the ChatRingtoneEngine implemements _driveRingtone method and calls the _ringtoneSetup for CHAT calls ', function () {
bus.trigger(connect.ContactEvents.INIT, contact);
bus.trigger(connect.core.getContactEventName(connect.ContactEvents.CONNECTING, contactId), contact);
assert.isTrue(this.ringtoneSetup.withArgs(contact).calledOnce);
});
it('validate the ChatRingtoneEngine should not call the _ringtoneSetup for Voice calls ', function () {
contact.getType.restore();
sandbox.stub(contact, "getType").returns(lily.ContactType.VOICE);
this.ringtoneSetup.restore();
this.ringtoneSetup = sandbox.stub(this.chatRingtoneEngine, "_ringtoneSetup");
bus.trigger(connect.ContactEvents.INIT, contact);
bus.trigger(connect.core.getContactEventName(connect.ContactEvents.CONNECTING, contactId), contact);
assert.isTrue(this.ringtoneSetup.notCalled);
});
});
>>>>>>> |
<<<<<<<
returns: {
blocktype: 'expression',
label: 'digital_input##',
script: 'digital_input##',
type: 'string'
}
=======
locals: [
{
blocktype: 'expression',
labels: ['digital_input##'],
script: 'digital_input##',
type: 'string'
}
]
>>>>>>>
locals: [
{
blocktype: 'expression',
label: 'digital_input##',
script: 'digital_input##',
type: 'string'
}
]
<<<<<<<
returns: {
blocktype: 'expression',
label: 'analog_input##',
script: 'analog_input##',
type: 'string'
}
=======
locals: [
{
blocktype: 'expression',
labels: 'analog_input##'],
script: 'analog_input##',
type: 'string'
}
]
>>>>>>>
locals: [
{
blocktype: 'expression',
label: 'analog_input##',
script: 'analog_input##',
type: 'string'
}
]
<<<<<<<
returns: {
blocktype: 'expression',
label: 'analog_output##',
script: 'analog_output##',
type: 'string'
}
=======
locals: [
{
blocktype: 'expression',
labels: ['analog_output##'],
script: 'analog_output##',
type: 'string'
}
]
>>>>>>>
locals: [
{
blocktype: 'expression',
label: 'analog_output##',
script: 'analog_output##',
type: 'string'
}
] |
<<<<<<<
const enrichMessages = () => {
const messageWithDates = insertDates(messages, lastRead, client.userID);
=======
const enrichedMessages = useMemo(() => {
const messageWithDates =
disableDateSeparator || threadList
? messages
: insertDates(messages, lastRead, client.userID, hideDeletedMessages);
>>>>>>>
const enrichMessages = () => {
const messageWithDates =
disableDateSeparator || threadList
? messages
: insertDates(messages, lastRead, client.userID, hideDeletedMessages);
<<<<<<<
};
const enrichedMessages = enrichMessages();
=======
}, [
client.userID,
disableDateSeparator,
HeaderComponent,
headerPosition,
hideDeletedMessages,
lastRead,
messages,
threadList,
]);
>>>>>>>
};
const enrichedMessages = enrichMessages(); |
<<<<<<<
require('./null.spec');
=======
require('./get.cache.spec');
>>>>>>>
require('./null.spec');
require('./get.cache.spec'); |
<<<<<<<
partiallyReadSequences: {
type: Array,
canRead: [Users.owns],
canUpdate: [Users.owns],
optional: true,
hidden: true,
},
"partiallyReadSequences.$": {
type: partiallyReadSequenceItem,
optional: true,
},
=======
// ReCaptcha v3 Integration
signUpReCaptchaRating: {
type: Number,
optional: true,
canRead: [Users.owns, 'sunshineRegiment', 'admins']
}
>>>>>>>
partiallyReadSequences: {
type: Array,
canRead: [Users.owns],
canUpdate: [Users.owns],
optional: true,
hidden: true,
},
"partiallyReadSequences.$": {
type: partiallyReadSequenceItem,
optional: true,
},
// ReCaptcha v3 Integration
signUpReCaptchaRating: {
type: Number,
optional: true,
canRead: [Users.owns, 'sunshineRegiment', 'admins']
} |
<<<<<<<
export { default as withMutation } from './containers/withMutation.js';
export { default as withIdle } from './containers/withIdle.jsx';
export { default as withIdlePollingStoper } from './containers/withIdlePollingStopper.jsx';
=======
export { default as withMutation } from './containers/withMutation.js';
export { default as withUpsert } from './containers/withUpsert.js';
>>>>>>>
export { default as withMutation } from './containers/withMutation.js';
export { default as withIdle } from './containers/withIdle.jsx';
export { default as withIdlePollingStoper } from './containers/withIdlePollingStopper.jsx';
export { default as withUpsert } from './containers/withUpsert.js'; |
<<<<<<<
'click .invite-link': function(e, instance){
e.preventDefault();
var user = Meteor.users.findOne(instance.data._id);
Meteor.users.update(user._id,{
$set:{
isInvited: true
}
}, {multi: false}, function(error){
if(error){
throwError();
}else{
Meteor.call('createNotification','accountApproved', {}, user);
}
});
},
'click .uninvite-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isInvited: false
}
});
},
'click .admin-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isAdmin: true
}
});
},
'click .unadmin-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isAdmin: false
}
});
},
'click .delete-link': function(e, instance){
e.preventDefault();
if(confirm(i18n.t("Are you sure you want to delete ")+getDisplayName(instance.data)+"?"))
Meteor.users.remove(instance.data._id);
}
=======
'click .invite-link': function(e, instance){
e.preventDefault();
var user = Meteor.users.findOne(instance.data._id);
Meteor.users.update(user._id,{
$set:{
isInvited: true
}
}, {multi: false}, function(error){
if(error){
throwError();
}else{
Meteor.call('createNotification', {
event: 'accountApproved',
properties: {},
userToNotify: user,
userDoingAction: Meteor.user(),
sendEmail: getSetting("emailNotifications")
});
}
});
},
'click .uninvite-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isInvited: false
}
});
},
'click .admin-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isAdmin: true
}
});
},
'click .unadmin-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isAdmin: false
}
});
},
'click .delete-link': function(e, instance){
e.preventDefault();
if(confirm("Are you sure you want to delete "+getDisplayName(instance.data)+"?"))
Meteor.users.remove(instance.data._id);
}
>>>>>>>
'click .invite-link': function(e, instance){
e.preventDefault();
var user = Meteor.users.findOne(instance.data._id);
Meteor.users.update(user._id,{
$set:{
isInvited: true
}
}, {multi: false}, function(error){
if(error){
throwError();
}else{
Meteor.call('createNotification', {
event: 'accountApproved',
properties: {},
userToNotify: user,
userDoingAction: Meteor.user(),
sendEmail: getSetting("emailNotifications")
});
}
});
},
'click .uninvite-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isInvited: false
}
});
},
'click .admin-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isAdmin: true
}
});
},
'click .unadmin-link': function(e, instance){
e.preventDefault();
Meteor.users.update(instance.data._id,{
$set:{
isAdmin: false
}
});
},
'click .delete-link': function(e, instance){
e.preventDefault();
if(confirm(i18n.t("Are you sure you want to delete ")+getDisplayName(instance.data)+"?"))
Meteor.users.remove(instance.data._id);
} |
<<<<<<<
// schema utils
import { generateIdResolverMulti, generateIdResolverSingle } from './modules/schemaUtils.js'
=======
// Permissions
import './modules/permissions.js';
// Head tags
import './modules/headtags.js'
>>>>>>>
// schema utils
import { generateIdResolverMulti, generateIdResolverSingle } from './modules/schemaUtils.js'
// Permissions
import './modules/permissions.js';
// Head tags
import './modules/headtags.js'
<<<<<<<
Localgroups,
generateIdResolverMulti,
generateIdResolverSingle
=======
UserSequenceRels,
UserCollectionRels,
Localgroups,
Comments
>>>>>>>
Localgroups,
generateIdResolverMulti,
generateIdResolverSingle,
Comments |
<<<<<<<
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
=======
version: "0.27.5-nova",
git: "https://github.com/TelescopeJS/telescope.git"
>>>>>>>
version: "0.27.5-nova",
git: "https://github.com/TelescopeJS/Telescope.git" |
<<<<<<<
import '../components/common/SubscribeLinks.jsx';
=======
import '../components/common/ErrorBoundary.jsx';
>>>>>>>
import '../components/common/SubscribeLinks.jsx';
import '../components/common/ErrorBoundary.jsx'; |
<<<<<<<
=======
import '../components/posts/PostsEdit.jsx';
import '../components/posts/PostsBody/PostsBody.jsx';
import '../components/posts/PostsHighlight.jsx';
import '../components/posts/LinkPostMessage.jsx';
import '../components/posts/CategoryDisplay.jsx';
>>>>>>> |
<<<<<<<
'click input[type=submit]': function(e, instance){
e.preventDefault();
if(!Meteor.user()) throw i18n.t('You must be logged in.');
var selectedCommentId=Session.get('selectedCommentId');
var selectedPostId=Comments.findOne(selectedCommentId).post;
var content = cleanUp(instance.editor.exportFile());
var commentId = Comments.update(selectedCommentId,
{
$set: {
body: content
}
}
);
trackEvent("edit comment", {'postId': selectedPostId, 'commentId': selectedCommentId});
Meteor.Router.to("/posts/"+selectedPostId+"/comment/"+selectedCommentId);
}
, 'click .delete-link': function(e){
e.preventDefault();
if(confirm(i18n.t("Are you sure?"))){
var selectedCommentId=Session.get('selectedCommentId');
Meteor.call('removeComment', selectedCommentId);
Meteor.Router.to("/comments/deleted");
}
}
=======
'click input[type=submit]': function(e, instance){
var comment = this;
var content = cleanUp(instance.editor.exportFile());
e.preventDefault();
if(!Meteor.user())
throw 'You must be logged in.';
Comments.update(comment._id, {
$set: {
body: content
}
});
trackEvent("edit comment", {'postId': comment.post, 'commentId': comment._id});
Router.go("/posts/"+comment.post+"/comment/"+comment._id);
},
'click .delete-link': function(e){
var comment = this;
e.preventDefault();
if(confirm("Are you sure?")){
Meteor.call('removeComment', comment._id);
Router.go("/comments/deleted");
}
}
>>>>>>>
'click input[type=submit]': function(e, instance){
var comment = this;
var content = cleanUp(instance.editor.exportFile());
e.preventDefault();
if(!Meteor.user())
throw i18n.t('You must be logged in.');
Comments.update(comment._id, {
$set: {
body: content
}
});
trackEvent("edit comment", {'postId': comment.post, 'commentId': comment._id});
Router.go("/posts/"+comment.post+"/comment/"+comment._id);
},
'click .delete-link': function(e){
var comment = this;
e.preventDefault();
if(confirm(i18n.t("Are you sure?"))){
Meteor.call('removeComment', comment._id);
Router.go("/comments/deleted");
}
} |
<<<<<<<
import './2019-01-04-voteSchema';
import './2019-01-21-denormalizeVoteCount';
import './2019-01-24-karmaChangeSettings';
=======
import './2019-01-04-voteSchema';
import './2019-01-24-karmaChangeSettings';
import './2019-01-30-migrateEditableFields'
import './2019-02-04-testCommentMigration'
import './2019-02-04-addSchemaVersionEverywhere'
import './2019-02-04-replaceObjectIdsInEditableFields'
import './2019-02-06-fixBigPosts'
>>>>>>>
import './2019-01-04-voteSchema';
import './2019-01-21-denormalizeVoteCount';
import './2019-01-24-karmaChangeSettings';
import './2019-01-30-migrateEditableFields'
import './2019-02-04-testCommentMigration'
import './2019-02-04-addSchemaVersionEverywhere'
import './2019-02-04-replaceObjectIdsInEditableFields'
import './2019-02-06-fixBigPosts' |
<<<<<<<
options.limit = (terms.limit < 1 || terms.limit > 100) ? 100 : terms.limit;
options.skip = terms.offset;
// keep only fields that should be viewable by current user
=======
options.limit = (limit < 1 || limit > 100) ? 100 : limit;
options.skip = offset;
>>>>>>>
options.limit = (terms.limit < 1 || terms.limit > 100) ? 100 : terms.limit;
options.skip = terms.offset; |
<<<<<<<
import { createDummyUser, createDummyPost, createDummyComment, createDummyConversation, createDummyMessage } from '../../../testing/utils.js'
import { performSubscriptionAction } from '../subscriptions/mutations.js';
=======
import { createDummyUser, createDummyPost, createDummyConversation, createDummyMessage } from '../../../testing/utils.js'
import { performSubscriptionAction } from '../../subscriptions/mutations.js';
>>>>>>>
import { createDummyUser, createDummyPost, createDummyConversation, createDummyMessage } from '../../../testing/utils.js'
import { performSubscriptionAction } from '../subscriptions/mutations.js'; |
<<<<<<<
// getPostCategories = function(post){
// var postCategories = _.map(post.categories, function(categoryId){
// return Categories.findOne(categoryId);
// });
// // put resulting array through a filter to remove empty values in case
// // some of the post's categories weren't found in the database
// return _.filter(postCategories, function(e){return e});
// }
=======
getDomain = function(url){
urlObject = require('url');
return urlObject.parse(url).hostname;
}
>>>>>>>
// getPostCategories = function(post){
// var postCategories = _.map(post.categories, function(categoryId){
// return Categories.findOne(categoryId);
// });
// // put resulting array through a filter to remove empty values in case
// // some of the post's categories weren't found in the database
// return _.filter(postCategories, function(e){return e});
// }
getDomain = function(url){
urlObject = require('url');
return urlObject.parse(url).hostname;
} |
<<<<<<<
import '../components/common/SubscribeWidget.jsx';
import '../components/common/SubscribeDialog.jsx';
import '../components/linkPreview/HoverPreviewLink.jsx';
import '../components/linkPreview/PostLinkPreview.jsx';
import '../components/users/AccountsVerifyEmail.jsx';
import '../components/users/EnrollAccount.jsx';
import '../components/users/UsersMenu.jsx';
import '../components/users/UsersEditForm.jsx';
import '../components/users/UsersAccount.jsx';
import '../components/users/UsersAccountMenu.jsx';
import '../components/users/UsersProfile.jsx';
import '../components/users/UsersName.jsx';
import '../components/users/UsersNameWrapper.jsx';
import '../components/users/UsersNameDisplay.jsx';
import '../components/users/UsersSingle.jsx';
import '../components/users/UsersEmailVerification.jsx';
import '../components/users/EmailConfirmationRequiredCheckbox.jsx';
import '../components/users/LoginPage.jsx';
import '../components/users/LoginPopupButton.jsx';
import '../components/users/LoginPopup.jsx';
import '../components/users/KarmaChangeNotifier.jsx';
import '../components/users/KarmaChangeNotifierSettings.jsx';
import '../components/users/AccountsResetPassword.jsx';
import '../components/users/EmailTokenPage.jsx';
import '../components/users/EmailTokenResult.jsx';
import '../components/users/SignupSubscribeToCurated.jsx';
import '../components/users/UserNameDeleted.jsx';
import '../components/users/WrappedLoginForm.jsx';
import '../components/users/ResendVerificationEmailPage.jsx';
import '../components/icons/OmegaIcon.jsx';
import '../components/icons/SettingsIcon.jsx';
=======
importComponent("SubscribeWidget", () => require('../components/common/SubscribeWidget.jsx'));
importComponent("SubscribeDialog", () => require('../components/common/SubscribeDialog.jsx'));
importComponent("AccountsVerifyEmail", () => require('../components/users/AccountsVerifyEmail.jsx'));
importComponent("AccountsEnrollAccount", () => require('../components/users/EnrollAccount.jsx'));
importComponent("UsersMenu", () => require('../components/users/UsersMenu.jsx'));
importComponent("UsersEditForm", () => require('../components/users/UsersEditForm.jsx'));
importComponent("UsersAccount", () => require('../components/users/UsersAccount.jsx'));
importComponent("UsersAccountMenu", () => require('../components/users/UsersAccountMenu.jsx'));
importComponent("UsersProfile", () => require('../components/users/UsersProfile.jsx'));
importComponent("UsersName", () => require('../components/users/UsersName.jsx'));
importComponent("UsersNameWrapper", () => require('../components/users/UsersNameWrapper.jsx'));
importComponent("UsersNameDisplay", () => require('../components/users/UsersNameDisplay.jsx'));
importComponent("UsersSingle", () => require('../components/users/UsersSingle.jsx'));
importComponent("UsersEmailVerification", () => require('../components/users/UsersEmailVerification.jsx'));
importComponent("EmailConfirmationRequiredCheckbox", () => require('../components/users/EmailConfirmationRequiredCheckbox.jsx'));
importComponent("LoginPage", () => require('../components/users/LoginPage.jsx'));
importComponent("LoginPopupButton", () => require('../components/users/LoginPopupButton.jsx'));
importComponent("LoginPopup", () => require('../components/users/LoginPopup.jsx'));
importComponent("KarmaChangeNotifier", () => require('../components/users/KarmaChangeNotifier.jsx'));
importComponent("KarmaChangeNotifierSettings", () => require('../components/users/KarmaChangeNotifierSettings.jsx'));
importComponent("AccountsResetPassword", () => require('../components/users/AccountsResetPassword.jsx'));
importComponent("EmailTokenPage", () => require('../components/users/EmailTokenPage.jsx'));
importComponent("EmailTokenResult", () => require('../components/users/EmailTokenResult.jsx'));
importComponent("SignupSubscribeToCurated", () => require('../components/users/SignupSubscribeToCurated.jsx'));
importComponent("UserNameDeleted", () => require('../components/users/UserNameDeleted.jsx'));
importComponent("WrappedLoginForm", () => require('../components/users/WrappedLoginForm.jsx'));
importComponent("ResendVerificationEmailPage", () => require('../components/users/ResendVerificationEmailPage.jsx'));
importComponent("OmegaIcon", () => require('../components/icons/OmegaIcon.jsx'));
importComponent("SettingsIcon", () => require('../components/icons/SettingsIcon.jsx'));
>>>>>>>
importComponent("SubscribeWidget", () => require('../components/common/SubscribeWidget.jsx'));
importComponent("SubscribeDialog", () => require('../components/common/SubscribeDialog.jsx'));
import '../components/linkPreview/HoverPreviewLink.jsx';
import '../components/linkPreview/PostLinkPreview.jsx';
importComponent("AccountsVerifyEmail", () => require('../components/users/AccountsVerifyEmail.jsx'));
importComponent("AccountsEnrollAccount", () => require('../components/users/EnrollAccount.jsx'));
importComponent("UsersMenu", () => require('../components/users/UsersMenu.jsx'));
importComponent("UsersEditForm", () => require('../components/users/UsersEditForm.jsx'));
importComponent("UsersAccount", () => require('../components/users/UsersAccount.jsx'));
importComponent("UsersAccountMenu", () => require('../components/users/UsersAccountMenu.jsx'));
importComponent("UsersProfile", () => require('../components/users/UsersProfile.jsx'));
importComponent("UsersName", () => require('../components/users/UsersName.jsx'));
importComponent("UsersNameWrapper", () => require('../components/users/UsersNameWrapper.jsx'));
importComponent("UsersNameDisplay", () => require('../components/users/UsersNameDisplay.jsx'));
importComponent("UsersSingle", () => require('../components/users/UsersSingle.jsx'));
importComponent("UsersEmailVerification", () => require('../components/users/UsersEmailVerification.jsx'));
importComponent("EmailConfirmationRequiredCheckbox", () => require('../components/users/EmailConfirmationRequiredCheckbox.jsx'));
importComponent("LoginPage", () => require('../components/users/LoginPage.jsx'));
importComponent("LoginPopupButton", () => require('../components/users/LoginPopupButton.jsx'));
importComponent("LoginPopup", () => require('../components/users/LoginPopup.jsx'));
importComponent("KarmaChangeNotifier", () => require('../components/users/KarmaChangeNotifier.jsx'));
importComponent("KarmaChangeNotifierSettings", () => require('../components/users/KarmaChangeNotifierSettings.jsx'));
importComponent("AccountsResetPassword", () => require('../components/users/AccountsResetPassword.jsx'));
importComponent("EmailTokenPage", () => require('../components/users/EmailTokenPage.jsx'));
importComponent("EmailTokenResult", () => require('../components/users/EmailTokenResult.jsx'));
importComponent("SignupSubscribeToCurated", () => require('../components/users/SignupSubscribeToCurated.jsx'));
importComponent("UserNameDeleted", () => require('../components/users/UserNameDeleted.jsx'));
importComponent("WrappedLoginForm", () => require('../components/users/WrappedLoginForm.jsx'));
importComponent("ResendVerificationEmailPage", () => require('../components/users/ResendVerificationEmailPage.jsx'));
importComponent("OmegaIcon", () => require('../components/icons/OmegaIcon.jsx'));
importComponent("SettingsIcon", () => require('../components/icons/SettingsIcon.jsx'));
<<<<<<<
import '../components/posts/PostsSingleSlug.jsx';
import '../components/posts/PostsSingleRoute.jsx';
import '../components/posts/PostsList2.jsx';
import '../components/posts/PostsTimeBlock.jsx';
import '../components/posts/PostsCommentsThread.jsx';
import '../components/posts/PostsNewForm.jsx';
import '../components/posts/PostsEditForm.jsx';
import '../components/posts/PostsEditPage.jsx';
import '../components/posts/PostsGroupDetails.jsx';
import '../components/posts/PostsStats.jsx';
=======
importComponent("PostsSingleSlug", () => require('../components/posts/PostsSingleSlug.jsx'));
importComponent("PostsSingleRoute", () => require('../components/posts/PostsSingleRoute.jsx'));
importComponent("PostsSingleSlugWrapper", () => require('../components/posts/PostsSingleSlugWrapper.jsx'));
importComponent("PostsList2", () => require('../components/posts/PostsList2.jsx'));
importComponent("PostsTimeBlock", () => require('../components/posts/PostsTimeBlock.jsx'));
importComponent("PostsCommentsThread", () => require('../components/posts/PostsCommentsThread.jsx'));
importComponent("PostsNewForm", () => require('../components/posts/PostsNewForm.jsx'));
importComponent("PostsEditForm", () => require('../components/posts/PostsEditForm.jsx'));
importComponent("PostsEditPage", () => require('../components/posts/PostsEditPage.jsx'));
importComponent("PostsGroupDetails", () => require('../components/posts/PostsGroupDetails.jsx'));
importComponent("PostsStats", () => require('../components/posts/PostsStats.jsx'));
>>>>>>>
importComponent("PostsSingleSlug", () => require('../components/posts/PostsSingleSlug.jsx'));
importComponent("PostsSingleRoute", () => require('../components/posts/PostsSingleRoute.jsx'));
importComponent("PostsList2", () => require('../components/posts/PostsList2.jsx'));
importComponent("PostsTimeBlock", () => require('../components/posts/PostsTimeBlock.jsx'));
importComponent("PostsCommentsThread", () => require('../components/posts/PostsCommentsThread.jsx'));
importComponent("PostsNewForm", () => require('../components/posts/PostsNewForm.jsx'));
importComponent("PostsEditForm", () => require('../components/posts/PostsEditForm.jsx'));
importComponent("PostsEditPage", () => require('../components/posts/PostsEditPage.jsx'));
importComponent("PostsGroupDetails", () => require('../components/posts/PostsGroupDetails.jsx'));
importComponent("PostsStats", () => require('../components/posts/PostsStats.jsx')); |
<<<<<<<
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
=======
version: "0.27.5-nova",
git: "https://github.com/TelescopeJS/telescope.git"
>>>>>>>
version: "0.27.5-nova",
git: "https://github.com/TelescopeJS/Telescope.git" |
<<<<<<<
shareWithUsers
enableCollaboration
=======
group {
_id
name
}
>>>>>>>
shareWithUsers
enableCollaboration
group {
_id
name
} |
<<<<<<<
},
promised: function() {
var v = new Variable(new Promise(function (r) {
setTimeout(function() { r('a') }, 100)
}))
assert.equal(v.valueOf(), undefined)
return new Promise(setTimeout).then(function () {
// still initial/undefined value
assert.equal(v.valueOf(), undefined)
return new Promise(function (r) { setTimeout(r, 150) }).then(function() {
// should contain resolved value now
assert.equal(v.valueOf(), 'a')
v.put(new Promise(function (r) {
setTimeout(function() { r('b') }, 100)
}))
assert.equal(v.valueOf(), 'a')
return new Promise(function (r) { setTimeout(r, 300) }).then(function() {
assert.equal(v.valueOf(), 'b')
})
})
})
},
promisedWithInitialValue: function() {
var v = new Variable('z')
assert.equal(v.valueOf(), 'z')
v.put(new Promise(function (r) {
setTimeout(function() { r('b') }, 100)
}))
// still initial value
assert.equal(v.valueOf(), 'z')
return new Promise(function (r) { setTimeout(r, 110) }).then(function() {
// should contain new resolved value now
assert.equal(v.valueOf(), 'b')
})
},
promisedAsTransform: function() {
var s = new Variable()
var t = s.to(function(primitiveValue) { return '<' + primitiveValue + '>' })
s.put(new Promise(function (r) {
setTimeout(function() { r('a') }, 100)
}))
assert.equal(t.valueOf(), undefined)
return new Promise(setTimeout).then(function () {
// still initial/undefined value
assert.equal(t.valueOf(), undefined)
return new Promise(function (r) { setTimeout(r, 100) }).then(function() {
// should contain resolved value now
assert.equal(t.valueOf(), '<a>')
})
})
},
promisedAsTransformWithInitial: function() {
var s = new Variable('z')
var t = s.to(function(primitiveValue) { return '<' + primitiveValue + '>' })
s.put(new Promise(function (r) {
setTimeout(function() { r('a') }, 100)
}))
assert.equal(t.valueOf(), '<z>' )
return new Promise(setTimeout).then(function () {
assert.equal(t.valueOf(), '<z>')
return new Promise(function (r) { setTimeout(r, 100) }).then(function() {
// should contain resolved value now
assert.equal(t.valueOf(), '<a>')
})
})
=======
},
'initialized variable updates source': function() {
var sourceVariable = new Variable({foo: 1})
var containingVariable = new Variable(sourceVariable)
sourceVariable.set('foo', 2) // this will propagate down to containingVariable
containingVariable.set('foo', 3) // this will update the sourceVariable
assert.equal(containingVariable.get('foo'), 3)
assert.equal(sourceVariable.get('foo'), 3)
},
'initialized property updates source': function() {
var source = new Variable('a')
// transform as initial value
var transform = function(v) {
var d = {}
d[v] = true
return d
}
var reverseCalled = 0
transform.reverse = function(output, inputs) {
// do nothing
reverseCalled++
}
var defaults = source.to(transform)
var selection = new Variable(defaults)
var pa = selection.property('a')
var pb = selection.property('b')
assert.deepEqual(defaults.valueOf(), { a: true })
assert.deepEqual(selection.valueOf(), { a : true })
assert.equal(pa.valueOf(), true)
assert.equal(pb.valueOf(), undefined)
// reverse function not called
assert.equal(reverseCalled, 0)
pa.put(false)
// upstream value has been updated
assert.deepEqual(defaults.valueOf(), { a: false })
assert.deepEqual(selection.valueOf(), { a : false })
assert.equal(pa.valueOf(), false)
assert.equal(pb.valueOf(), undefined)
assert.equal(reverseCalled, 0)
// updating the upstream source should not (no longer) affect downstream variable initialized with reference to source-derived transform
source.put('b')
assert.deepEqual(defaults.valueOf(), { b: true })
// updates to source still propagate downstream
assert.deepEqual(selection.valueOf(), { b : true })
assert.equal(pa.valueOf(), undefined)
assert.equal(pb.valueOf(), true)
assert.equal(reverseCalled, 0)
},
'Variable default returned when variable value is undefined': function() {
var v = new Variable()
v.default = 'a'
assert.equal(v.valueOf(), 'a')
v.put('b')
assert.equal(v.valueOf(), 'b')
/* Isn't this an explicit assignment of the variable?
v.put(undefined)
assert.equal(v.valueOf(), 'a')*/
},
'Variable default is not resolved': function() {
var d = new Variable('default')
var v = new Variable()
v.default = d
assert.strictEqual(v.valueOf(), 'default')
},
'Property resolves to default value': function() {
var v = new Variable()
v.default = { v: 'default' }
var vp = v.property('v')
assert.deepEqual(v.valueOf(), { v: 'default' })
assert.deepEqual(vp.valueOf(), 'default')
},
'Assignment does not change defaults': function() {
var v = new Variable()
var defaultObject = v.default = { v: 'default' }
var vp = v.property('v')
assert.equal(vp.valueOf(), 'default')
vp.put('new value')
assert.equal(vp.valueOf(), 'new value')
assert.equal(defaultObject.v, 'default')
>>>>>>>
},
promised: function() {
var v = new Variable(new Promise(function (r) {
setTimeout(function() { r('a') }, 100)
}))
assert.equal(v.valueOf(), undefined)
return new Promise(setTimeout).then(function () {
// still initial/undefined value
assert.equal(v.valueOf(), undefined)
return new Promise(function (r) { setTimeout(r, 150) }).then(function() {
// should contain resolved value now
assert.equal(v.valueOf(), 'a')
v.put(new Promise(function (r) {
setTimeout(function() { r('b') }, 100)
}))
assert.equal(v.valueOf(), 'a')
return new Promise(function (r) { setTimeout(r, 300) }).then(function() {
assert.equal(v.valueOf(), 'b')
})
})
})
},
promisedWithInitialValue: function() {
var v = new Variable('z')
assert.equal(v.valueOf(), 'z')
v.put(new Promise(function (r) {
setTimeout(function() { r('b') }, 100)
}))
// still initial value
assert.equal(v.valueOf(), 'z')
return new Promise(function (r) { setTimeout(r, 110) }).then(function() {
// should contain new resolved value now
assert.equal(v.valueOf(), 'b')
})
},
promisedAsTransform: function() {
var s = new Variable()
var t = s.to(function(primitiveValue) { return '<' + primitiveValue + '>' })
s.put(new Promise(function (r) {
setTimeout(function() { r('a') }, 100)
}))
assert.equal(t.valueOf(), undefined)
return new Promise(setTimeout).then(function () {
// still initial/undefined value
assert.equal(t.valueOf(), undefined)
return new Promise(function (r) { setTimeout(r, 100) }).then(function() {
// should contain resolved value now
assert.equal(t.valueOf(), '<a>')
})
})
},
promisedAsTransformWithInitial: function() {
var s = new Variable('z')
var t = s.to(function(primitiveValue) { return '<' + primitiveValue + '>' })
s.put(new Promise(function (r) {
setTimeout(function() { r('a') }, 100)
}))
assert.equal(t.valueOf(), '<z>' )
return new Promise(setTimeout).then(function () {
assert.equal(t.valueOf(), '<z>')
return new Promise(function (r) { setTimeout(r, 100) }).then(function() {
// should contain resolved value now
assert.equal(t.valueOf(), '<a>')
})
})
},
'initialized variable updates source': function() {
var sourceVariable = new Variable({foo: 1})
var containingVariable = new Variable(sourceVariable)
sourceVariable.set('foo', 2) // this will propagate down to containingVariable
containingVariable.set('foo', 3) // this will update the sourceVariable
assert.equal(containingVariable.get('foo'), 3)
assert.equal(sourceVariable.get('foo'), 3)
},
'initialized property updates source': function() {
var source = new Variable('a')
// transform as initial value
var transform = function(v) {
var d = {}
d[v] = true
return d
}
var reverseCalled = 0
transform.reverse = function(output, inputs) {
// do nothing
reverseCalled++
}
var defaults = source.to(transform)
var selection = new Variable(defaults)
var pa = selection.property('a')
var pb = selection.property('b')
assert.deepEqual(defaults.valueOf(), { a: true })
assert.deepEqual(selection.valueOf(), { a : true })
assert.equal(pa.valueOf(), true)
assert.equal(pb.valueOf(), undefined)
// reverse function not called
assert.equal(reverseCalled, 0)
pa.put(false)
// upstream value has been updated
assert.deepEqual(defaults.valueOf(), { a: false })
assert.deepEqual(selection.valueOf(), { a : false })
assert.equal(pa.valueOf(), false)
assert.equal(pb.valueOf(), undefined)
assert.equal(reverseCalled, 0)
// updating the upstream source should not (no longer) affect downstream variable initialized with reference to source-derived transform
source.put('b')
assert.deepEqual(defaults.valueOf(), { b: true })
// updates to source still propagate downstream
assert.deepEqual(selection.valueOf(), { b : true })
assert.equal(pa.valueOf(), undefined)
assert.equal(pb.valueOf(), true)
assert.equal(reverseCalled, 0)
},
'Variable default returned when variable value is undefined': function() {
var v = new Variable()
v.default = 'a'
assert.equal(v.valueOf(), 'a')
v.put('b')
assert.equal(v.valueOf(), 'b')
/* Isn't this an explicit assignment of the variable?
v.put(undefined)
assert.equal(v.valueOf(), 'a')*/
},
'Variable default is not resolved': function() {
var d = new Variable('default')
var v = new Variable()
v.default = d
assert.strictEqual(v.valueOf(), 'default')
},
'Property resolves to default value': function() {
var v = new Variable()
v.default = { v: 'default' }
var vp = v.property('v')
assert.deepEqual(v.valueOf(), { v: 'default' })
assert.deepEqual(vp.valueOf(), 'default')
},
'Assignment does not change defaults': function() {
var v = new Variable()
var defaultObject = v.default = { v: 'default' }
var vp = v.property('v')
assert.equal(vp.valueOf(), 'default')
vp.put('new value')
assert.equal(vp.valueOf(), 'new value')
assert.equal(defaultObject.v, 'default') |
<<<<<<<
version: "0.27.4-nova",
git: 'https://github.com/TelescopeJS/Telescope.git'
=======
version: "0.27.5-nova",
git: 'https://github.com/TelescopeJS/telescope.git'
>>>>>>>
version: "0.27.5-nova",
git: 'https://github.com/TelescopeJS/Telescope.git' |
<<<<<<<
// 2. Notify users who are subscribed to the post (which may or may not include the post's author)
const post = await Posts.findOne(comment.postId);
const usersSubscribedToPost = await getSubscribedUsers({
documentId: comment.postId,
collectionName: "Posts",
type: subscriptionTypes.newComments,
potentiallyDefaultSubscribedUserIds: [post.userId],
userIsDefaultSubscribed: u => u.auto_subscribe_to_my_posts
})
const userIdsSubscribedToPost = _.map(usersSubscribedToPost, u=>u._id);
=======
// 2. Notify users who are subscribed to the post (which may or may not include the post's author)
if (post && post.subscribers && post.subscribers.length) {
// remove userIds of users that have already been notified
// and of comment author (they could be replying in a thread they're subscribed to)
let postSubscribersToNotify = _.difference(post.subscribers, notifiedUsers, [comment.userId]);
createNotifications(postSubscribersToNotify, 'newComment', 'comment', comment._id);
}
}
}
addCallback("comments.new.async", CommentsNewNotifications);
async function sendPrivateMessagesEmail(conversationId, messageIds) {
const conversation = await Conversations.findOne(conversationId);
const participants = await Users.find({_id: {$in: conversation.participantIds}}).fetch();
const participantsById = keyBy(participants, u=>u._id);
const messages = await Messages.find(
{_id: {$in: messageIds}},
{ sort: {createdAt:1} })
.fetch();
for (const recipientUser of participants)
{
// If this user is responsible for every message that would be in the
// email, don't send it to them (you only want emails that contain at
// least one message that's not your own; your own messages are optional
// context).
if (!_.some(messages, message=>message.userId !== recipientUser._id))
continue;
const otherParticipants = _.filter(participants, u=>u._id != recipientUser._id);
const subject = `Private message conversation with ${otherParticipants.map(u=>u.displayName).join(', ')}`;
>>>>>>>
// 2. Notify users who are subscribed to the post (which may or may not include the post's author)
const post = await Posts.findOne(comment.postId);
const usersSubscribedToPost = await getSubscribedUsers({
documentId: comment.postId,
collectionName: "Posts",
type: subscriptionTypes.newComments,
potentiallyDefaultSubscribedUserIds: [post.userId],
userIsDefaultSubscribed: u => u.auto_subscribe_to_my_posts
})
const userIdsSubscribedToPost = _.map(usersSubscribedToPost, u=>u._id);
<<<<<<<
async function messageNewNotification(message) {
=======
const privateMessagesDebouncer = new EventDebouncer({
name: "privateMessage",
delayMinutes: 15,
maxDelayMinutes: 30,
callback: sendPrivateMessagesEmail
});
async function messageNewNotification(message) {
>>>>>>>
async function messageNewNotification(message) {
<<<<<<<
// Create notification
await createNotifications(recipientIds, 'newMessage', 'message', message._id);
=======
// Create on-site notification
createNotifications(recipients, 'newMessage', 'message', message._id);
// Generate debounced email notifications
await privateMessagesDebouncer.recordEvent({
key: conversationId,
data: message._id,
af: conversation.af,
});
>>>>>>>
// Create on-site notification
await createNotifications(recipients, 'newMessage', 'message', message._id);
// Generate debounced email notifications
await privateMessagesDebouncer.recordEvent({
key: conversationId,
data: message._id,
af: conversation.af,
}); |
<<<<<<<
karmaChangeNotifierSettings
karmaChanges {
totalChange
updateFrequency
startDate
endDate
posts {
scoreChange
post {
title
pageUrlRelative
}
}
comments {
scoreChange
comment {
plaintextExcerpt
pageUrlRelative
}
}
}
=======
shortformFeedId
>>>>>>>
karmaChangeNotifierSettings
karmaChanges {
totalChange
updateFrequency
startDate
endDate
posts {
scoreChange
post {
title
pageUrlRelative
}
}
comments {
scoreChange
comment {
plaintextExcerpt
pageUrlRelative
}
}
}
shortformFeedId |
<<<<<<<
import '../components/posts/TableOfContents.jsx';
=======
import '../components/posts/ShowOrHideHighlightButton.jsx';
import '../components/posts/PostsUserAndCoauthors.jsx';
import '../components/questions/NewQuestionDialog.jsx';
>>>>>>>
import '../components/posts/TableOfContents.jsx';
import '../components/posts/ShowOrHideHighlightButton.jsx';
import '../components/posts/PostsUserAndCoauthors.jsx';
import '../components/questions/NewQuestionDialog.jsx'; |
<<<<<<<
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
=======
version: "0.27.5-nova",
git: "https://github.com/TelescopeJS/telescope.git"
>>>>>>>
version: "0.27.5-nova",
git: "https://github.com/TelescopeJS/Telescope.git" |
<<<<<<<
=======
enableMarkDownEditor: true,
hintText: (
<div>
<div>Write here. Select text for formatting options.</div>
<div>We support LaTeX: Cmd-4 for inline, Cmd-M for block-level (Ctrl on Windows).</div>
<div>You can switch between rich text and markdown in your user settings.</div>
</div>
),
pingbacks: false,
>>>>>>>
hintText: (
<div>
<div>Write here. Select text for formatting options.</div>
<div>We support LaTeX: Cmd-4 for inline, Cmd-M for block-level (Ctrl on Windows).</div>
<div>You can switch between rich text and markdown in your user settings.</div>
</div>
),
pingbacks: false,
<<<<<<<
pingbacks = false,
=======
enableMarkDownEditor,
pingbacks,
>>>>>>>
pingbacks = false,
<<<<<<<
},
form: {
hintText: hintText,
fieldName: fieldName || "contents",
commentEditor,
commentStyles,
getLocalStorageId,
},
=======
}
},
form: {
hintText: hintText,
multiLine:true,
fullWidth:true,
disableUnderline:true,
fieldName: fieldName || "contents",
commentEditor,
commentStyles,
getLocalStorageId,
enableMarkDownEditor,
>>>>>>>
}
},
form: {
hintText: hintText,
fieldName: fieldName || "contents",
commentEditor,
commentStyles,
getLocalStorageId,
<<<<<<<
// /**
// Draft-js content
// */
// {
// fieldName: Utils.camelCaseify(`${fieldName}Content`),
// fieldSchema: {
// type: Object,
// optional: true,
// ...permissions,
// control: 'EditorFormComponent',
// blackbox: true,
// group: formGroup,
// hidden: true,
// order,
// form: {
// hintText:"Plain Markdown Editor",
// multiLine:true,
// fullWidth:true,
// disableUnderline:true,
// fieldName: fieldName,
// commentEditor,
// commentStyles,
// getLocalStorageId,
// },
// }
// },
// /**
// Html Body field, made editable to allow access in edit form
// */
// {
// fieldName: Utils.camelCaseify(`${fieldName}HtmlBody`),
// fieldSchema: {
// type: String,
// optional: true,
// viewableBy: ['guests'],
// editableBy: ['admins'],
// insertableBy: ['admins'],
// control: "textarea",
// group: adminFormGroup,
// hidden: !adminFormGroup, // Only display htmlBody if admin form group is given
// }
// },
/*
body: Stores a markdown version of the post
*/
// {
// fieldName: Utils.camelCaseify(`${fieldName}Body`),
// fieldSchema: {
// type: String,
// viewableBy: ['guests'],
// insertableBy: ['members'],
// editableBy: ['members'],
// control: "textarea",
// optional: true,
// hidden: true,
// max: 1000000, //overwriting Vulcan's character limit
// }
// },
// /*
// htmlHighlight: stores an HTML highlight of an HTML body
// */
// {
// fieldName: Utils.camelCaseify(`${fieldName}HtmlHighlight`),
// fieldSchema: {
// type: String,
// optional: true,
// hidden:true,
// viewableBy: ['guests'],
// }
// },
// /*
// wordCount: count of words
// */
// {
// fieldName: Utils.camelCaseify(`${fieldName}WordCount`),
// fieldSchema: {
// type: Number,
// viewableBy: ['guests'],
// optional: true,
// hidden:true
// }
// },
// /*
// plaintextExcerpt: Version of the excerpt that is plaintext, used for the description head tags which are
// used by Facebook and Google to extract previews of content.
// */
// {
// fieldName: Utils.camelCaseify(`${fieldName}PlaintextExcerpt`),
// fieldSchema: {
// type: String,
// viewableBy: ['guests'],
// hidden: true,
// optional: true
// }
// },
// /*
// lastEditedAs: Records whether the post was last edited in HTML, Markdown or Draft-JS, and displays the
// appropriate editor when being edited, overwriting user-preferences
// */
// {
// fieldName: Utils.camelCaseify(`${fieldName}LastEditedAs`),
// fieldSchema: {
// type: String,
// viewableBy: ['guests'],
// insertableBy: ['members'],
// editableBy: ['members'],
// optional: true,
// hidden: true,
// group: adminFormGroup,
// }
// },
])
=======
});
>>>>>>>
}); |
<<<<<<<
import '../components/users/EmailTokenPage.jsx';
=======
import '../components/users/UserNameDeleted.jsx';
>>>>>>>
import '../components/users/EmailTokenPage.jsx';
import '../components/users/UserNameDeleted.jsx'; |
<<<<<<<
editableBy: ['alignmentForum'],
insertableBy: ['alignmentForum'],
=======
editableBy: ['alignmentForum', 'alignmentVoters', 'admins'],
insertableBy: ['alignmentForum', 'alignmentVoters', 'admins'],
>>>>>>>
editableBy: ['alignmentForum', 'admins'],
insertableBy: ['alignmentForum', 'admins'], |
<<<<<<<
'vulcan:[email protected]',
'vulcan:[email protected]',
'vulcan:[email protected]',
'vulcan:[email protected]',
'vulcan:[email protected]',
=======
'vulcan:[email protected]',
'vulcan:[email protected]',
'vulcan:[email protected]',
'vulcan:[email protected]',
>>>>>>>
'vulcan:[email protected]',
'vulcan:[email protected]',
'vulcan:[email protected]',
'vulcan:[email protected]',
'vulcan:[email protected]', |
<<<<<<<
if (ts < 0) return locale.unableToVisit;
var date = new Date(ts),
days = [locale.sun, locale.mon,
locale.tue, locale.wed, locale.thu, locale.fri, locale.sat
=======
// Note: failed ads will have a negative time-stamp
var date = new Date(Math.abs(ts)),
days = ["Sunday", "Monday",
"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
>>>>>>>
if (ts < 0) return locale.unableToVisit;
// Note: failed ads will have a negative time-stamp
var date = new Date(ts),
days = [locale.sun, locale.mon,
locale.tue, locale.wed, locale.thu, locale.fri, locale.sat |
<<<<<<<
options.limit = (terms.limit < 1 || terms.limit > 100) ? 100 : terms.limit;
options.skip = terms.offset;
// keep only fields that should be viewable by current user
=======
options.limit = (limit < 1 || limit > 100) ? 100 : limit;
options.skip = offset;
>>>>>>>
options.limit = (terms.limit < 1 || terms.limit > 100) ? 100 : terms.limit;
options.skip = terms.offset; |
<<<<<<<
version: "0.27.3-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
=======
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope.git"
>>>>>>>
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git" |
<<<<<<<
=======
import './fragments.js'
import './permissions.js'
const options = {
editCheck: (user, document) => {
if (!user || !document) return false;
return Users.owns(user, document) ? Users.canDo(user, 'sequences.edit.own') : Users.canDo(user, `sequences.edit.all`)
},
removeCheck: (user, document) => {
if (!user || !document) return false;
return Users.owns(user, document) ? Users.canDo(user, 'sequences.edit.own') : Users.canDo(user, `sequences.edit.all`)
},
}
/*
The sequenceNew mutation is altered to include the addition of a null Chapter.
*/
let mutations = getDefaultMutations('Sequences', options)
mutations.new = {
name: 'sequencesNew',
check(user, document) {
if (!user) return false;
return Users.canDo(user, 'posts.new');
},
mutation(root, {document}, context) {
Utils.performCheck(this.check, context.currentUser, document);
let chapterData = {
number: 0,
}
let chapter = newMutation({
collecton: context.Chapters,
document: chapterData,
curentUser: context.currentUser,
validate: true,
context,
})
document.chapterIds = [chapter._id]
return newMutation({
collection: context.Posts,
document: document,
currentUser: context.currentUser,
validate: true,
context,
});
},
}
>>>>>>>
import './fragments.js'
import './permissions.js'
const options = {
editCheck: (user, document) => {
if (!user || !document) return false;
return Users.owns(user, document) ? Users.canDo(user, 'sequences.edit.own') : Users.canDo(user, `sequences.edit.all`)
},
removeCheck: (user, document) => {
if (!user || !document) return false;
return Users.owns(user, document) ? Users.canDo(user, 'sequences.edit.own') : Users.canDo(user, `sequences.edit.all`)
},
} |
<<<<<<<
version: "0.27.3-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
=======
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope.git"
>>>>>>>
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git" |
<<<<<<<
version: "0.27.3-nova",
git: "https://github.com/TelescopeJS/Telescope.git"
=======
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/telescope.git"
>>>>>>>
version: "0.27.4-nova",
git: "https://github.com/TelescopeJS/Telescope.git" |
<<<<<<<
import { debug, debugGroup, debugGroupEnd, runCallbacksAsync, runCallbacks, addCallback } from 'meteor/vulcan:core';
=======
import { Connectors, getSetting, debug, debugGroup, debugGroupEnd /* runCallbacksAsync, runCallbacks, addCallback */ } from 'meteor/vulcan:core';
>>>>>>>
import { Connectors, getSetting, debug, debugGroup, debugGroupEnd, runCallbacksAsync, runCallbacks, addCallback } from 'meteor/vulcan:core';
<<<<<<<
Votes.remove({_id: vote._id});
newDocument.baseScore -= vote.power;
newDocument.score = recalculateScore(newDocument);
=======
await Connectors[database].delete(Votes, {_id: vote._id});
>>>>>>>
await Connectors[database].delete(Votes, {_id: vote._id});
newDocument.baseScore -= vote.power;
newDocument.score = recalculateScore(newDocument);
<<<<<<<
collection.update({_id: document._id}, {$inc: {baseScore: -vote.power }, $set: {inactive: false, score: newDocument.score}});
=======
// update document score
await Connectors[database].update(collection, {_id: document._id}, {$inc: {baseScore: -vote.power }});
>>>>>>>
// update document score
await Connectors[database].update(collection, {_id: document._id}, {$inc: {baseScore: -vote.power }, $set: {inactive: false, score: newDocument.score}});
<<<<<<<
let voteDocTuple = cancelVoteServer(voteOptions);
document = voteDocTuple.newDocument;
runCallbacksAsync(`votes.cancel.async`, voteDocTuple, collection, user);
=======
document = await cancelVoteServer(voteOptions);
// runCallbacksAsync(`votes.cancel.async`, vote, document, collection, user);
>>>>>>>
let voteDocTuple = await cancelVoteServer(voteOptions);
document = voteDocTuple.newDocument;
runCallbacksAsync(`votes.cancel.async`, voteDocTuple, collection, user);
<<<<<<<
let voteDocTuple = addVoteServer({...voteOptions, document}); //Make sure to pass the new document to addVoteServer
document = voteDocTuple.newDocument;
runCallbacksAsync(`votes.${voteType}.async`, voteDocTuple, collection, user);
=======
document = await addVoteServer(voteOptions);
// runCallbacksAsync(`votes.${voteType}.async`, vote, document, collection, user);
>>>>>>>
let voteDocTuple = await addVoteServer({...voteOptions, document}); //Make sure to pass the new document to addVoteServer
document = voteDocTuple.newDocument;
runCallbacksAsync(`votes.${voteType}.async`, voteDocTuple, collection, user); |
<<<<<<<
const { collection, pollInterval = 20000, stopPollingIdleStatus = "INACTIVE" } = options,
=======
const { collection, pollInterval = getSetting('pollInterval', 20000), enableCache = false, extraQueries } = options,
>>>>>>>
const { collection, pollInterval = getSetting('pollInterval', 20000), enableCache = false, stopPollingIdleStatus = "INACTIVE", extraQueries } = options,
<<<<<<<
return compose(
// wrap component with withIdle to get access to idle state
withIdle,
graphql(gql`
query ${queryName}($documentId: String, $slug: String) {
${singleResolverName}(documentId: $documentId, slug: $slug) {
__typename
...${fragmentName}
}
=======
return graphql(gql`
query ${queryName}($documentId: String, $slug: String, $enableCache: Boolean) {
${singleResolverName}(documentId: $documentId, slug: $slug, enableCache: $enableCache) {
__typename
...${fragmentName}
}
${extraQueries || ''}
}
${fragment}
`, {
alias: 'withDocument',
options(ownProps) {
const graphQLOptions = {
variables: { documentId: ownProps.documentId, slug: ownProps.slug, enableCache },
pollInterval, // note: pollInterval can be set to 0 to disable polling (20s by default)
};
if (options.fetchPolicy) {
graphQLOptions.fetchPolicy = options.fetchPolicy;
>>>>>>>
return compose(
// wrap component with withIdle to get access to idle state
withIdle,
graphql(gql`
query ${queryName}($documentId: String, $slug: String, $enableCache: Boolean) {
${singleResolverName}(documentId: $documentId, slug: $slug, enableCache: $enableCache) {
__typename
...${fragmentName}
}
${extraQueries || ''}
<<<<<<<
return graphQLOptions;
},
props: returnedProps => {
const { ownProps, data } = returnedProps;
const propertyName = options.propertyName || 'document';
return {
startPolling: data.startPolling,
stopPolling: data.stopPolling,
loading: data.networkStatus === 1,
// document: Utils.convertDates(collection, data[singleResolverName]),
[ propertyName ]: data[singleResolverName],
fragmentName,
fragment,
};
},
}),
withIdlePollingStopper(stopPollingIdleStatus)
)
=======
return graphQLOptions;
},
props: returnedProps => {
const { ownProps, data } = returnedProps;
const propertyName = options.propertyName || 'document';
const props = {
loading: data.loading,
// document: Utils.convertDates(collection, data[singleResolverName]),
[ propertyName ]: data[singleResolverName],
fragmentName,
fragment,
data,
};
if (data.error) {
// get graphQL error (see https://github.com/thebigredgeek/apollo-errors/issues/12)
props.error = data.error.graphQLErrors[0];
}
return props;
},
});
>>>>>>>
return graphQLOptions;
},
props: returnedProps => {
const { ownProps, data } = returnedProps;
const propertyName = options.propertyName || 'document';
const props = {
startPolling: data.startPolling,
stopPolling: data.stopPolling,
loading: data.loading,
// document: Utils.convertDates(collection, data[singleResolverName]),
[ propertyName ]: data[singleResolverName],
fragmentName,
fragment,
data,
};
if (data.error) {
// get graphQL error (see https://github.com/thebigredgeek/apollo-errors/issues/12)
props.error = data.error.graphQLErrors[0];
}
return props;
},
}),
withIdlePollingStopper(stopPollingIdleStatus)
) |
<<<<<<<
// if the email is already in the Mailchimp list, no need to throw an error
if (error.code === 214) {
return {result: 'already-subscribed'};
=======
console.log(error)
let name, message;
if (error.code == 212) {
name = 'has_unsubscribed';
} else if (error.code == 214) {
name = 'already_subscribed';
} else {
name = 'subscription_failed';
message = error.message;
>>>>>>>
console.log(error)
let name, message;
if (error.code == 214) {
name = 'has_unsubscribed';
} else if (error.code == 214) {
name = 'already_subscribed';
} else {
name = 'subscription_failed';
message = error.message; |
<<<<<<<
import '../lib/modules/alignment-forum/posts/tests.js';
import '../server/emails/tests.jsx';
=======
import '../lib/modules/alignment-forum/posts/tests.js';
import '../lib/modules/alignment-forum/users/tests.js';
>>>>>>>
import '../lib/modules/alignment-forum/posts/tests.js';
import '../lib/modules/alignment-forum/users/tests.js';
import '../server/emails/tests.jsx'; |
<<<<<<<
extendFragment('UsersCurrent', `
...UsersMinimumInfo
voteBanned
banned
isReviewed
nullifyVotes
hideIntercom
hideNavigationSidebar
currentFrontpageFilter
allPostsTimeframe
allPostsSorting
allPostsFilter
allPostsShowLowKarma
allPostsOpenSettings
lastNotificationsCheck
groups
bannedUserIds
moderationStyle
moderationGuidelines {
...RevisionEdit
}
markDownPostEditor
commentSorting
location
googleLocation
mongoLocation
emailSubscribedToCurated
unsubscribeFromAll
emails
whenConfirmationEmailSent
noCollapseCommentsFrontpage
noCollapseCommentsPosts
noSingleLineComments
karmaChangeNotifierSettings
karmaChangeLastOpened
shortformFeedId
viewUnreviewedComments
sunshineShowNewUserContent
recommendationSettings
auto_subscribe_to_my_posts
auto_subscribe_to_my_comments
autoSubscribeAsOrganizer
=======
registerFragment(`
fragment UsersCurrent on User {
...UsersMinimumInfo
_id
username
createdAt
isAdmin
displayName
email
slug
groups
services
pageUrl
locale
voteBanned
banned
isReviewed
nullifyVotes
hideIntercom
hideNavigationSidebar
currentFrontpageFilter
allPostsTimeframe
allPostsSorting
allPostsFilter
allPostsShowLowKarma
allPostsOpenSettings
lastNotificationsCheck
subscribedItems
groups
bannedUserIds
moderationStyle
moderationGuidelines {
...RevisionEdit
}
markDownPostEditor
commentSorting
location
googleLocation
mongoLocation
emailSubscribedToCurated
unsubscribeFromAll
emails
whenConfirmationEmailSent
noCollapseCommentsFrontpage
noCollapseCommentsPosts
noSingleLineComments
karmaChangeNotifierSettings
karmaChangeLastOpened
shortformFeedId
viewUnreviewedComments
sunshineShowNewUserContent
recommendationSettings
}
>>>>>>>
registerFragment(`
fragment UsersCurrent on User {
...UsersMinimumInfo
_id
username
createdAt
isAdmin
displayName
email
slug
groups
services
pageUrl
locale
voteBanned
banned
isReviewed
nullifyVotes
hideIntercom
hideNavigationSidebar
currentFrontpageFilter
allPostsTimeframe
allPostsSorting
allPostsFilter
allPostsShowLowKarma
allPostsOpenSettings
lastNotificationsCheck
groups
bannedUserIds
moderationStyle
moderationGuidelines {
...RevisionEdit
}
markDownPostEditor
commentSorting
location
googleLocation
mongoLocation
emailSubscribedToCurated
unsubscribeFromAll
emails
whenConfirmationEmailSent
noCollapseCommentsFrontpage
noCollapseCommentsPosts
noSingleLineComments
karmaChangeNotifierSettings
karmaChangeLastOpened
shortformFeedId
viewUnreviewedComments
sunshineShowNewUserContent
recommendationSettings
auto_subscribe_to_my_posts
auto_subscribe_to_my_comments
autoSubscribeAsOrganizer
} |
<<<<<<<
controller('ProjectDetailCtrl', function($rootScope, $modal, $scope, $timeout, $routeParams, $route, $location, $q, appConfig, Project, Graph, GraphTransform) {
$rootScope.projectId = $routeParams.projectId;
=======
controller('ProjectDetailCtrl', function($rootScope, $modal, $scope, $timeout, $routeParams, $route, $location, $q, appConfig, Project, Graph, GraphTransform, Community) {
$scope.projectId = $routeParams.projectId;
$scope.showExploreContext = function(val){
$scope.toggle = val;
return val;
};
//Updated projectId and graphId
Project.query({projectId: $routeParams.projectId})
.$then(function(dataProject){
$scope.project = dataProject.data.project;
$rootScope.graphId = $scope.project.current_graph;
$scope.projectName = dataProject.data.project.name;
});
$scope.historyEnabled = appConfig.historyServer.enabled();
$scope.projectHasData = false;
$scope.$on('event:projectHasData', function() {
$scope.projectHasData = true;
});
>>>>>>>
controller('ProjectDetailCtrl', function($rootScope, $modal, $scope, $timeout, $routeParams, $route, $location, $q, appConfig, Project, Graph, GraphTransform) {
$rootScope.projectId = $routeParams.projectId;
$scope.showExploreContext = function(val){
$scope.toggle = val;
return val;
};
<<<<<<<
$rootScope.graphId = $routeParams.graphId;
$scope.graph = Graph.get({graphId: $routeParams.graphId});
=======
$scope.graph = Graph.get({graphId: $scope.graphId});
>>>>>>>
$rootScope.graphId = $routeParams.graphId;
$scope.graph = Graph.get({graphId: $rootScope.graphId});
<<<<<<<
$rootScope.graphId = $routeParams.graphId;
=======
>>>>>>>
$rootScope.graphId = $routeParams.graphId;
<<<<<<<
$scope.vertexFrom = "";
Graph.get({graphId: $routeParams.graphId})
.$then(function(dataGraph) {
$scope.queryProject = Project.get({projectId: dataGraph.data.graph.projectId});
$rootScope.$broadcast('event:projectHasData');
});
=======
$scope.vertexFrom = "";
>>>>>>>
$scope.vertexFrom = "";
Graph.get({graphId: $routeParams.graphId})
.$then(function(dataGraph) {
$scope.queryProject = Project.get({projectId: dataGraph.data.graph.projectId});
$rootScope.$broadcast('event:projectHasData');
});
<<<<<<<
$rootScope.graphId = $routeParams.graphId;
$scope.vertexId = $routeParams.vertexId;
=======
$scope.vertexId = $scope.selectedItems[0]._id;
>>>>>>>
$scope.vertexId = $scope.selectedItems[0]._id;
<<<<<<<
// ensure age is numeric
$scope.$watch('vertex.age',function(val,old){
$scope.vertex.age = parseInt(val);
});
=======
>>>>>>>
// ensure age is numeric
$scope.$watch('vertex.age',function(val,old){
$scope.vertex.age = parseInt(val);
});
<<<<<<<
controller('EdgeDetailCtrl', function($rootScope, $scope, $routeParams, $location, Edge, Vertex) {
$rootScope.graphId = $routeParams.graphId;
=======
controller('EdgeDetailCtrl', function($rootScope,$scope, $routeParams, $location, Edge, Vertex) {
>>>>>>>
controller('EdgeDetailCtrl', function($rootScope, $scope, $routeParams, $location, Edge, Vertex) {
<<<<<<<
controller('EdgeCreateCtrl', function($rootScope, $scope, $routeParams, $location, Edge, Vertex) {
$rootScope.graphId = $routeParams.graphId;
=======
controller('EdgeCreateCtrl', function($scope, $routeParams, $location, Edge, Vertex) {
>>>>>>>
controller('EdgeCreateCtrl', function($rootScope, $scope, $routeParams, $location, Edge, Vertex) {
<<<<<<<
controller('EdgeEditCtrl', function($rootScope, $scope, $routeParams, $location, User, Edge, Vertex) {
$rootScope.graphId = $routeParams.graphId;
$scope.edgeId = $routeParams.edgeId;
=======
controller('EdgeEditCtrl', function($scope, $routeParams, $location, User, Edge, Vertex) {
$scope.edgeId = $scope.selectedItems[0]._id;
>>>>>>>
controller('EdgeEditCtrl', function($rootScope, $scope, $routeParams, $location, User, Edge, Vertex) {
$scope.edgeId = $scope.selectedItems[0]._id; |
<<<<<<<
export { middleware as idleMiddleware, reducer as idleReducer, actions as idleActions, IDLE_STATUSES} from './redux-idle-monitor';
=======
export * from './startup.js';
>>>>>>>
export { middleware as idleMiddleware, reducer as idleReducer, actions as idleActions, IDLE_STATUSES} from './redux-idle-monitor';
export * from './startup.js'; |
<<<<<<<
import { foreignKeyField, addFieldsDict, resolverOnlyField, denormalizedCountOfReferences, denormalizedField, googleLocationToMongoLocation } from '../../modules/utils/schemaUtils'
=======
import { foreignKeyField, addFieldsDict, resolverOnlyField, denormalizedCountOfReferences, arrayOfForeignKeysField, denormalizedField } from '../../modules/utils/schemaUtils'
>>>>>>>
import { foreignKeyField, addFieldsDict, resolverOnlyField, denormalizedCountOfReferences, arrayOfForeignKeysField, denormalizedField, googleLocationToMongoLocation } from '../../modules/utils/schemaUtils' |
<<<<<<<
=======
algoliaMetaInfo.authorFullName = postAuthor.fullName;
algoliaMetaInfo.authorUserName = postAuthor.username;
>>>>>>>
algoliaMetaInfo.authorFullName = postAuthor.fullName; |
<<<<<<<
version: "0.27.3-nova",
git: 'https://github.com/TelescopeJS/Telescope.git'
=======
version: "0.27.4-nova",
git: 'https://github.com/TelescopeJS/telescope.git'
>>>>>>>
version: "0.27.4-nova",
git: 'https://github.com/TelescopeJS/Telescope.git' |
<<<<<<<
import './server/migrations';
=======
>>>>>>>
import './server/migrations';
<<<<<<<
import './server/votingCron.js';
import './server/votingGraphQL.js';
import './server/updateScores.js';
=======
import './server/siteAdminMetadata.js';
>>>>>>>
import './server/votingCron.js';
import './server/votingGraphQL.js';
import './server/updateScores.js';
import './server/siteAdminMetadata.js'; |
<<<<<<<
if (this._particles.length > 0 || this.props.needsRedraw) {
this._window.requestAnimationFrame(this._drawFrame);
}
this.props.needsRedraw = this._particles.length === 0;
=======
window.requestAnimationFrame(this._drawFrame);
>>>>>>>
if (this._particles.length > 0 || this.props.needsRedraw) {
window.requestAnimationFrame(this._drawFrame);
}
this.props.needsRedraw = this._particles.length === 0;
<<<<<<<
// Get current coordinates of the cursor relative the container and
// spawn new articles.
const { top, left } = this._cursor.getBoundingClientRect();
=======
const { x, y } = cursorFrame;
>>>>>>>
const { x, y } = cursorFrame; |
<<<<<<<
displayLongNames: false,
displayTpe: 'detail',
logoHeaderText: 'Cryptocurrencies'
=======
displayLongNames: false,
headers: ['change1h', 'change24h', 'change7d']
>>>>>>>
displayLongNames: false,
displayTpe: 'detail',
logoHeaderText: 'Cryptocurrencies',
headers: ['change1h', 'change24h', 'change7d']
<<<<<<<
if (this.config.displayType == 'logo') {
return this.buildIconView(this.result);
}
=======
var data = this.result;
>>>>>>>
if (this.config.displayType == 'logo') {
return this.buildIconView(this.result);
}
var data = this.result;
<<<<<<<
=======
// Build object key to get proper rounding
var rightCurrencyFormat = this.config.conversion.toLowerCase();
// Round the price and adds the currency string
var formattedPrice = Math.round(currentCurrency['price_'+rightCurrencyFormat] * 100) / 100+' '+this.config.conversion;
// Build optional headers using lodash
>>>>>>>
<<<<<<<
oneCurrency.price,
oneCurrency.percent_change_24h + '%'
=======
formattedPrice
>>>>>>>
currentCurrency.price, |
<<<<<<<
import {connect} from 'react-redux';
import { selectHero, loadHeroes } from './hero.actions';
import { putHeroesApi, postHeroesApi, deleteHeroApi } from './hero.api';
=======
>>>>>>>
import {connect} from 'react-redux';
import { selectHero, loadHeroes } from './hero.actions';
<<<<<<<
// this.setState({ selectedHero: {} });
this.props.selectHero(null);
};
=======
this.setState({ selectedHero: {} });
};
getHeroes = async () => {
const newHeroes = await getHeroesApi();
const heroes = [...newHeroes];
this.setState({ heroes }, () => captains.log(this.state));
this.handleCancelHero();
};
>>>>>>>
// this.setState({ selectedHero: {} });
this.props.selectHero(null);
};
getHeroes = async () => {
const newHeroes = await getHeroesApi();
const heroes = [...newHeroes];
this.setState({ heroes }, () => captains.log(this.state));
this.handleCancelHero();
};
<<<<<<<
const { selectedHero, getHeroes } = this.props;
if (selectedHero) {
putHeroesApi(hero).then(() => {
=======
debugger;
captains.log(this.state.selectedHero);
if (this.state.selectedHero && this.state.selectedHero.name) {
putHeroesApi(hero).then(() => {
>>>>>>>
const { selectedHero, getHeroes } = this.props;
if (selectedHero && selectedHero.name) {
putHeroesApi(hero).then(() => {
<<<<<<<
const { getHeroes } = this.props;
const confirmDelete = e.target.dataset.modalResponse == 'yes';
=======
const confirmDelete = e.target.dataset.modalResponse === 'yes';
>>>>>>>
const { getHeroes } = this.props;
const confirmDelete = e.target.dataset.modalResponse === 'yes';
<<<<<<<
handleSaveHero={this.handleSaveHero}
// todo
=======
handleSaveHero={this.handleSaveHero}
>>>>>>>
handleSaveHero={this.handleSaveHero} |
<<<<<<<
function testValue(field, value) {
expect(blackberry.app[field]).toBeDefined();
expect(blackberry.app[field]).toEqual(value);
}
function testReadOnly(field) {
var before = blackberry.app[field];
blackberry.app[field] = "MODIFIED";
expect(blackberry.app[field]).toEqual(before);
}
=======
/*
* Copyright 2010-2011 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
>>>>>>>
/*
* Copyright 2010-2011 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function testValue(field, value) {
expect(blackberry.app[field]).toBeDefined();
expect(blackberry.app[field]).toEqual(value);
}
function testReadOnly(field) {
var before = blackberry.app[field];
blackberry.app[field] = "MODIFIED";
expect(blackberry.app[field]).toEqual(before);
} |
<<<<<<<
var _self = {};
=======
/*
* Copyright 2010-2011 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function requireLocal(id) {
id = id.replace(/local:\/\//, "").replace(/\.js$/, "");
return !!require.resolve ? require("../../" + id) : window.require(id);
}
var _self = {},
performExec = requireLocal('lib/utils').performExec; // uses lib/utils for require id, ../.. causes problems
>>>>>>>
/*
* Copyright 2010-2011 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var _self = {}; |
<<<<<<<
function requireLocal(id) {
return !!require.resolve ? require("../../" + id) : window.require(id);
}
var config = requireLocal("lib/config");
=======
/*
* Copyright 2010-2011 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var config = require("lib/config"); // uses lib/config for require id, ../.. causes problems
>>>>>>>
/*
* Copyright 2010-2011 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function requireLocal(id) {
return !!require.resolve ? require("../../" + id) : window.require(id);
}
var config = requireLocal("lib/config"); |
<<<<<<<
=======
// Define navigator events callbacks which get invoked by native code
registerNavigatorEvents();
// Workaround for executeJavascript doing nothing for the first time
webview.executeJavascript("1 + 1");
>>>>>>>
// Define navigator events callbacks which get invoked by native code
registerNavigatorEvents(); |
<<<<<<<
if (i < ls.length) {
ls[i] = undefined;
while (ls.length > 1 && !ls[ls.length - 1]) {
ls.pop();
}
} else {
console.warn('listener unknown: ', repl._id);
//TODO ??? throw new Error("listener unknown");
}
=======
if (i < ls.length) ls[i] = undefined;
while (ls.length > 1 && !ls[ls.length - 1]) ls.pop();
console.warn('listener', repl._id, 'is unknown to', this._id);
>>>>>>>
if (i < ls.length) {
ls[i] = undefined;
} else {
console.warn('listener', repl._id, 'is unknown to', this._id);
}
while (ls.length > 1 && !ls[ls.length - 1]) ls.pop(); |
<<<<<<<
await this.p2pServer.listen(this.config.p2p.port);
=======
this.p2pServer = new P2PServer(this.p2p);
await this.p2pServer.listen(this.config.p2p.peerPort);
>>>>>>>
this.p2pServer = new P2PServer(this.p2p);
await this.p2pServer.listen(this.config.p2p.port); |
<<<<<<<
// use key inputs for focus
$(document).on("keydown", (evt) => {
if (evt.altKey || evt.ctrlKey || evt.shiftKey)
return true;
=======
>>>>>>>
<<<<<<<
ko.applyBindings(view, $(document.body)[0]);
// listen for the server providing the population count
window.reader = new PopulationReader();
=======
if (val == null || !isFinite(val) || isNaN(val)) {
f.extraAmount(parseFloat(localStorage.getItem(id)) || 0);
return;
}
localStorage.setItem(id, val);
});
} else {
f.extraAmount.subscribe(val => {
if (val == null || !isFinite(val) || isNaN(val)) {
f.extraAmount(0);
}
});
}
}
var keyBindings = ko.computed(() => {
var bindings = new Map();
for (var l of view.populationLevels) {
for (var c of l.name().toLowerCase()) {
if (!bindings.has(c)) {
bindings.set(c, $(`.ui-race-unit-name[race-unit-name=${l.name()}] ~ .input .input-group input`));
break;
}
}
}
return bindings;
})
$(document).on("keydown", (evt) => {
if (evt.altKey || evt.ctrlKey || evt.shiftKey)
return true;
var focused = false;
var bindings = keyBindings();
if (bindings.has(evt.key)) {
focused = true;
bindings.get(evt.key).focus().select();
}
if (evt.target.tagName === 'INPUT' && !isNaN(parseInt(evt.key)) || focused) {
let isDigit = evt.key >= "0" && evt.key <= "9";
return ['ArrowUp', 'ArrowDown', 'Backspace', 'Delete'].includes(evt.key) || isDigit || evt.key === "." || evt.key === ",";
}
});
>>>>>>>
if (val == null || !isFinite(val) || isNaN(val)) {
f.extraAmount(parseFloat(localStorage.getItem(id)) || 0);
return;
}
localStorage.setItem(id, val);
});
} else {
f.extraAmount.subscribe(val => {
if (val == null || !isFinite(val) || isNaN(val)) {
f.extraAmount(0);
}
});
}
}
var keyBindings = ko.computed(() => {
var bindings = new Map();
for (var l of view.populationLevels) {
for (var c of l.name().toLowerCase()) {
if (!bindings.has(c)) {
bindings.set(c, $(`.ui-race-unit-name[race-unit-name=${l.name()}] ~ .input .input-group input`));
break;
}
}
}
return bindings;
})
$(document).on("keydown", (evt) => {
if (evt.altKey || evt.ctrlKey || evt.shiftKey)
return true;
var focused = false;
var bindings = keyBindings();
if (bindings.has(evt.key)) {
focused = true;
bindings.get(evt.key).focus().select();
}
if (evt.target.tagName === 'INPUT' && !isNaN(parseInt(evt.key)) || focused) {
let isDigit = evt.key >= "0" && evt.key <= "9";
return ['ArrowUp', 'ArrowDown', 'Backspace', 'Delete'].includes(evt.key) || isDigit || evt.key === "." || evt.key === ",";
}
});
// listen for the server providing the population count
window.reader = new PopulationReader();
<<<<<<<
download: {
english: "Downloads",
german: "Downloads"
},
downloadCalculator: {
english: "Download the calculator (source code of this website) to run it locally.",
german: "Lade den Warenrechner (Quellcode dieser Seite) herunter, um ihn lokal auszuführen."
},
downloadCalculatorServer: {
english: "Download a standalone executable that reads the current population count while playing the game. If you then run the calculator locally (using the source code from above), the population count gets updated automatically. See the following link for more information: ",
german: "Lade eine ausführbare Datei herunter, die beim Spielen die aktuellen Bevölkerungszahlen erfasst. Wird der Warenrechner lokal ausgeführt (siehe obiger Quellcode), werden die Bevölkerungszahlen automatisch aktualisiert. Siehe folgenden Link für weitere Informationen: "
},
=======
consumptionModifier: {
english: "Modify the percental amount of consumption for this tier and product",
german: "Verändere die prozentuale Verbrauchsmenge für diese Ware und Bevölkerungsstufe"
},
>>>>>>>
consumptionModifier: {
english: "Modify the percental amount of consumption for this tier and product",
german: "Verändere die prozentuale Verbrauchsmenge für diese Ware und Bevölkerungsstufe"
},
download: {
english: "Downloads",
german: "Downloads"
},
downloadCalculator: {
english: "Download the calculator (source code of this website) to run it locally.",
german: "Lade den Warenrechner (Quellcode dieser Seite) herunter, um ihn lokal auszuführen."
},
downloadCalculatorServer: {
english: "Download a standalone executable that reads the current population count while playing the game. If you then run the calculator locally (using the source code from above), the population count gets updated automatically. See the following link for more information: ",
german: "Lade eine ausführbare Datei herunter, die beim Spielen die aktuellen Bevölkerungszahlen erfasst. Wird der Warenrechner lokal ausgeführt (siehe obiger Quellcode), werden die Bevölkerungszahlen automatisch aktualisiert. Siehe folgenden Link für weitere Informationen: "
}, |
<<<<<<<
optionViews.push(this._renderRowSeparator(i));
=======
optionViews.push(<View key={`separator-${i}`} style={styles.rowSeparator} />);
>>>>>>>
optionViews.push(this._renderRowSeparator(i));
<<<<<<<
{this._renderTitle()}
{this._renderMessage()}
{optionViews}
=======
<ScrollView>{optionViews}</ScrollView>
>>>>>>>
{this._renderTitle()}
{this._renderMessage()}
<ScrollView>{optionViews}</ScrollView> |
<<<<<<<
this.conn = conn;
this.send = function(to, message) {
=======
this.send = function(to, message, group) {
>>>>>>>
this.conn = conn;
this.send = function(to, message, group) {
<<<<<<<
conn.send(new xmpp.Element('presence'));
}, 1000 * 10);
=======
conn.send(' ');
}, 1000 * 60)
>>>>>>>
conn.send(' ');
}, 1000 * 60); |
<<<<<<<
, adjust_targets_when_high: true
// create maxCOB and default it to 120 because that's the most a typical body can absorb over 4 hours.
// (If someone enters more carbs or stacks more; OpenAPS will just truncate dosing based on 120.
// Essentially, this just limits AMA as a safety cap against weird COB calculations)
, maxCOB: 120
=======
, adv_target_adjustments: false
>>>>>>>
, adv_target_adjustments: false
// create maxCOB and default it to 120 because that's the most a typical body can absorb over 4 hours.
// (If someone enters more carbs or stacks more; OpenAPS will just truncate dosing based on 120.
// Essentially, this just limits AMA as a safety cap against weird COB calculations)
, maxCOB: 120 |
<<<<<<<
model_input = params.model ? params.params._.slice(5, 6).pop() : false;
var carbratio_input = params._.slice(6, 7).pop()
var temptargets_input = params._.slice(7, 8).pop()
=======
model_input = params.model ? params._.slice(5, 6).pop() : false;
carbratio_input = params._.slice(6, 7).pop()
>>>>>>>
model_input = params.model ? params._.slice(5, 6).pop() : false;
carbratio_input = params._.slice(6, 7).pop()
temptargets_input = params._.slice(7, 8).pop() |
<<<<<<<
eg.module("flicking", ["jQuery", eg, eg.MovableCoord, window, document], function ($, ns, MC, global, doc) {
"use strict";
=======
eg.module("flicking", ["jQuery", eg, window, document, eg.MovableCoord], function ($, ns, global, doc, MC) {
>>>>>>>
eg.module("flicking", ["jQuery", eg, window, document, eg.MovableCoord], function ($, ns, global, doc, MC) {
"use strict"; |
<<<<<<<
//require('../basal-set-temp');
var determine_basal = function determine_basal(glucose_status, currenttemp, iob_data, profile, autosens_data, meal_data, tempBasalFunctions) {
=======
var round_basal = require('../round-basal')
// Rounds value to 'digits' decimal places
function round(value, digits)
{
var scale = Math.pow(10, digits);
return Math.round(value * scale) / scale;
}
function calculate_expected_delta(dia, target_bg, eventual_bg, bgi) {
// (hours * mins_per_hour) / 5 = how many 5 minute periods in dia
var dia_in_5min_blocks = (dia * 60) / 5;
var target_delta = target_bg - eventual_bg;
var expectedDelta = round(bgi + (target_delta / dia_in_5min_blocks), 1);
return expectedDelta;
}
function convert_bg(value, profile)
{
if (profile.out_units == "mmol/L")
{
return round(value / 18, 1);
}
else
{
return value;
}
}
var determine_basal = function determine_basal(glucose_status, currenttemp, iob_data, profile, autosens_data, meal_data, setTempBasal) {
>>>>>>>
var round_basal = require('../round-basal')
// Rounds value to 'digits' decimal places
function round(value, digits)
{
var scale = Math.pow(10, digits);
return Math.round(value * scale) / scale;
}
// we expect BG to rise or fall at the rate of BGI,
// adjusted by the rate at which BG would need to rise /
// fall to get eventualBG to target over DIA/2 hours
function calculate_expected_delta(dia, target_bg, eventual_bg, bgi) {
// (hours * mins_per_hour) / 5 = how many 5 minute periods in dia/2
var dia_in_5min_blocks = (dia/2 * 60) / 5;
var target_delta = target_bg - eventual_bg;
var expectedDelta = round(bgi + (target_delta / dia_in_5min_blocks), 1);
return expectedDelta;
}
function convert_bg(value, profile)
{
if (profile.out_units == "mmol/L")
{
return round(value / 18, 1);
}
else
{
return value;
}
}
var determine_basal = function determine_basal(glucose_status, currenttemp, iob_data, profile, autosens_data, meal_data, tempBasalFunctions) {
<<<<<<<
var bgi = Math.round(( -iob_data.activity * sens * 5 )*100)/100;
// project deviations for 30 minutes
var deviation = Math.round( 30 / 5 * ( minDelta - bgi ) );
// don't overreact to a big negative delta: use avgdelta if deviation is negative
=======
var bgi = round(( -iob_data.activity * sens * 5 ), 2);
// project positive deviations for 15 minutes
var deviation = Math.round( (15 / 5) * (minDelta - bgi ) ) ;
// project negative deviations for 30 minutes
>>>>>>>
var bgi = round(( -iob_data.activity * sens * 5 ), 2);
// project deviations for 30 minutes
var deviation = Math.round( 30 / 5 * ( minDelta - bgi ) );
// don't overreact to a big negative delta: use avgdelta if deviation is negative
<<<<<<<
// we expect BG to rise or fall at the rate of BGI,
// adjusted by the rate at which BG would need to rise /
// fall to get eventualBG to target over DIA/2 hours
var expectedDelta = Math.round(( bgi + ( target_bg - eventualBG ) / ( profile.dia / 2 * 60 / 5 ) )*10)/10;
if (typeof eventualBG === 'undefined' || isNaN(eventualBG)) {
=======
var expectedDelta = calculate_expected_delta(profile.dia, target_bg, eventualBG, bgi);
if (typeof eventualBG === 'undefined' || isNaN(eventualBG)) {
>>>>>>>
var expectedDelta = calculate_expected_delta(profile.dia, target_bg, eventualBG, bgi);
if (typeof eventualBG === 'undefined' || isNaN(eventualBG)) {
<<<<<<<
minPredBG = Math.min(minPredBG, eventualBG);
// set snoozeBG to minPredBG
snoozeBG = Math.round(Math.max(snoozeBG,minPredBG));
rT.snoozeBG = snoozeBG;
=======
//console.error("eventualBG: "+eventualBG+", mAeventualBG: "+mAeventualBG+", rT.eventualBG: "+rT.eventualBG);
}
// lower target for meal-assist or wtf-assist (high and rising)
wtfAssist = round( Math.max(wtfAssist, mealAssist), 2);
if (wtfAssist > 0) {
min_bg = wtfAssist*80 + (1-wtfAssist)*min_bg;
target_bg = (min_bg + profile.max_bg) / 2;
expectedDelta = calculate_expected_delta(profile.dia, target_bg, eventualBG, bgi);
mealAssistPct = Math.round(mealAssist*100);
wtfAssistPct = Math.round(wtfAssist*100);
rT.mealAssist = "On: "+mealAssistPct+"%, "+wtfAssistPct+"%, Carbs: " + meal_data.carbs + " Boluses: " + meal_data.boluses + " ISF: " + convert_bg(sens, profile) + ", Target: " + convert_bg(Math.round(target_bg), profile) + " Deviation: " + convert_bg(deviation, profile) + " BGI: " + bgi;
} else {
rT.mealAssist = "Off: Carbs: " + meal_data.carbs + " Boluses: " + meal_data.boluses + " ISF: " + convert_bg(sens, profile) + ", Target: " + convert_bg(Math.round(target_bg), profile) + " Deviation: " + convert_bg(deviation, profile) + " BGI: " + bgi;
>>>>>>>
minPredBG = Math.min(minPredBG, eventualBG);
// set snoozeBG to minPredBG
snoozeBG = Math.round(Math.max(snoozeBG,minPredBG));
rT.snoozeBG = snoozeBG;
<<<<<<<
=======
rT.reason += "; no high-temp to cancel";
return rT;
*/
}
// if there are still carbs we haven't bolused or high-temped for,
// and they're enough to get snoozeBG above min_bg
//if (remainingMealBolus > 0 && snoozeBG + remainingMealBolus*sens > min_bg && minDelta > Math.max(0,expectedDelta)) {
if (remainingMealBolus > 0 && snoozeBG + remainingMealBolus*sens > min_bg && minDelta > expectedDelta) {
// simulate an extended bolus to deliver the remainder over DIA (so 30m is 0.5x remainder/dia)
//var insulinReq = Math.round( (0.5 * remainingMealBolus / profile.dia)*100)/100;
var basalAdj = round( (remainingMealBolus / profile.dia), 2);
if (minDelta < 0 && minDelta > expectedDelta) {
var newbasalAdj = round(( basalAdj * (1 - (minDelta / expectedDelta))), 2);
console.error("Reducing basalAdj from " + basalAdj + " to " + newbasalAdj);
basalAdj = newbasalAdj;
}
rT.reason += remainingMealBolus+"U meal bolus remaining, ";
// by rebasing everything off an adjusted basal rate
basal += basalAdj;
basal = round_basal(basal, profile);
//rT.reason += ", setting " + rate + "U/hr";
//var rate = basal + (2 * insulinReq);
//rate = Math.round( rate * 1000 ) / 1000;
//return setTempBasal(rate, 30, profile, rT, currenttemp);
//} else if (snoozeBG > min_bg) { // if adding back in the bolus contribution BG would be above min
>>>>>>>
<<<<<<<
//if (mealAssist > 0) {
//rT.reason += "Meal assist: " + meal_data.carbs + "g, " + meal_data.boluses + "U";
//} else {
rT.reason += "Eventual BG " + eventualBG + "<" + min_bg;
// if 5m or 30m avg BG is rising faster than expected delta
=======
if (mealAssist > 0) {
//if (mealAssist === true) {
rT.reason += "Meal assist: " + meal_data.carbs + "g, " + meal_data.boluses + "U";
} else {
rT.reason += "Eventual BG " + convert_bg(eventualBG, profile) + " < " + convert_bg(min_bg, profile);
// if 5m or 15m avg BG is rising faster than expected delta
>>>>>>>
rT.reason += "Eventual BG " + convert_bg(eventualBG, profile) + "<" + convert_bg(min_bg, profile);
// if 5m or 30m avg BG is rising faster than expected delta
if (minDelta > expectedDelta && minDelta > 0) {
if (glucose_status.delta > minDelta) {
rT.reason += ", but Delta " + tick + " > Exp. Delta " + expectedDelta;
} else {
rT.reason += ", but Avg. Delta " + minDelta.toFixed(2) + " > Exp. Delta " + expectedDelta;
}
if (currenttemp.duration > 15 && (round_basal(basal, profile) === round_basal(currenttemp.rate, profile))) {
rT.reason += ", temp " + currenttemp.rate + " ~ req " + basal + "U/hr";
return rT;
} else {
rT.reason += "; setting current basal of " + basal + " as temp";
return tempBasalFunctions.setTempBasal(basal, 30, profile, rT, currenttemp);
}
}
if (eventualBG < min_bg) {
// if we've bolused recently, we can snooze until the bolus IOB decays (at double speed)
if (snoozeBG > min_bg) { // if adding back in the bolus contribution BG would be above min
rT.reason += ", bolus snooze: eventual BG range " + convert_bg(eventualBG, profile) + "-" + convert_bg(snoozeBG, profile);
//console.error(currenttemp, basal );
if (currenttemp.duration > 15 && (round_basal(basal, profile) === round_basal(currenttemp.rate, profile))) {
rT.reason += ", temp " + currenttemp.rate + " ~ req " + basal + "U/hr";
return rT;
} else {
rT.reason += "; setting current basal of " + basal + " as temp";
return tempBasalFunctions.setTempBasal(basal, 30, profile, rT, currenttemp);
}
} else {
// calculate 30m low-temp required to get projected BG up to target
// use snoozeBG to more gradually ramp in any counteraction of the user's boluses
// multiply by 2 to low-temp faster for increased hypo safety
var insulinReq = 2 * Math.min(0, (snoozeBG - target_bg) / sens);
<<<<<<<
rT.reason += ", bolus snooze: eventual BG range " + eventualBG + "-" + snoozeBG;
//console.error(currenttemp, basal );
if (currenttemp.duration > 15 && basal < currenttemp.rate + 0.1 && basal > currenttemp.rate - 0.1) {
=======
rT.reason += ", bolus snooze: eventual BG range " + convert_bg(eventualBG, profile) + "-" + convert_bg(snoozeBG, profile);
//console.log(currenttemp, basal );
if (currenttemp.duration > 15 && (round_basal(basal, profile) === round_basal(currenttemp.rate, profile))) {
>>>>>>>
rT.reason += ", bolus snooze: eventual BG range " + convert_bg(eventualBG, profile) + "-" + convert_bg(snoozeBG, profile);
//console.error(currenttemp, basal );
if (currenttemp.duration > 15 && (round_basal(basal, profile) === round_basal(currenttemp.rate, profile))) {
<<<<<<<
rT.reason += ", Snooze BG " + snoozeBG;
var newinsulinReq = Math.round(( insulinReq * (minDelta / expectedDelta) ) * 100)/100;
//console.error("Increasing insulinReq from " + insulinReq + " to " + newinsulinReq);
=======
rT.reason += ", Snooze BG " + convert_bg(snoozeBG, profile);
var newinsulinReq = round(( insulinReq * (minDelta / expectedDelta) ), 2);
//console.log("Increasing insulinReq from " + insulinReq + " to " + newinsulinReq);
>>>>>>>
rT.reason += ", Snooze BG " + convert_bg(snoozeBG, profile);
var newinsulinReq = round(( insulinReq * (minDelta / expectedDelta) ), 2);
//console.error("Increasing insulinReq from " + insulinReq + " to " + newinsulinReq);
<<<<<<<
if (eventualBG < max_bg || snoozeBG < max_bg) {
rT.reason += eventualBG+"-"+snoozeBG+" in range: no temp required";
if (currenttemp.duration > 15 && basal < currenttemp.rate + 0.1 && basal > currenttemp.rate - 0.1) {
=======
if (eventualBG < profile.max_bg || snoozeBG < profile.max_bg) {
rT.reason += convert_bg(eventualBG, profile)+"-"+convert_bg(snoozeBG, profile)+" in range: no temp required";
if (currenttemp.duration > 15 && (round_basal(basal, profile) === round_basal(currenttemp.rate, profile))) {
>>>>>>>
if (eventualBG < max_bg || snoozeBG < max_bg) {
rT.reason += convert_bg(eventualBG, profile)+"-"+convert_bg(snoozeBG, profile)+" in range: no temp required";
if (currenttemp.duration > 15 && (round_basal(basal, profile) === round_basal(currenttemp.rate, profile))) {
<<<<<<<
rT.reason += "Eventual BG " + eventualBG + ">=" + max_bg + ", ";
=======
rT.reason += "Eventual BG " + convert_bg(eventualBG, profile) + " >= " + convert_bg(profile.max_bg, profile) + ", ";
>>>>>>>
rT.reason += "Eventual BG " + convert_bg(eventualBG, profile) + ">=" + convert_bg(profile.max_bg, profile) + ", ";
<<<<<<<
var newinsulinReq = Math.round(( insulinReq * (1 - (minDelta / expectedDelta)) ) * 100)/100;
//console.error("Reducing insulinReq from " + insulinReq + " to " + newinsulinReq);
=======
var newinsulinReq = round(( insulinReq * (1 - (minDelta / expectedDelta)) ), 2);
//console.log("Reducing insulinReq from " + insulinReq + " to " + newinsulinReq);
>>>>>>>
var newinsulinReq = round(( insulinReq * (1 - (minDelta / expectedDelta)) ), 2);
//console.error("Reducing insulinReq from " + insulinReq + " to " + newinsulinReq);
<<<<<<<
rT.reason += currenttemp.duration + "m@" + (currenttemp.rate - basal).toFixed(3) + " = " + insulinScheduled.toFixed(3) + " > req " + insulinReq + "+0.1U";
return tempBasalFunctions.setTempBasal(rate, 30, profile, rT, currenttemp);
=======
rT.reason += currenttemp.duration + "m@" + (currenttemp.rate - basal).toFixed(3) + " = " + insulinScheduled.toFixed(3) + " > req " + insulinReq + "+0.1U. Setting temp basal of " + basal + "U/hr";
return setTempBasal(rate, 30, profile, rT, currenttemp);
>>>>>>>
rT.reason += currenttemp.duration + "m@" + (currenttemp.rate - basal).toFixed(3) + " = " + insulinScheduled.toFixed(3) + " > req " + insulinReq + "+0.1U. Setting temp basal of " + basal + "U/hr";
return tempBasalFunctions.setTempBasal(rate, 30, profile, rT, currenttemp);
<<<<<<<
if (currenttemp.duration > 5 && rate < currenttemp.rate + 0.1) { // if required temp <~ existing temp basal
=======
if (currenttemp.duration > 5 && (round_basal(rate, profile) <= round_basal(currenttemp.rate, profile))) { // if required temp <~ existing temp basal
>>>>>>>
if (currenttemp.duration > 5 && (round_basal(rate, profile) <= round_basal(currenttemp.rate, profile))) { // if required temp <~ existing temp basal |
<<<<<<<
if (hoursBeforeMeal > 6 || hoursBeforeMeal < 0) {
continue;
}
}
// only consider last hour of data in CI mode
// this allows us to calculate deviations for the last ~45m
if (typeof ciTime) {
hoursAgo = (ciTime-bgTime)/(60*60*1000);
if (hoursAgo > 1 || hoursAgo < 0) {
continue;
=======
if (hoursBeforeMeal > 6 || hoursBeforeMeal < 0) {
continue;
}
}
// only consider BGs since lastSiteChange
if (lastSiteChange) {
hoursSinceSiteChange = (bgTime-lastSiteChange)/(60*60*1000);
if (hoursSinceSiteChange < 0) {
continue;
>>>>>>>
if (hoursBeforeMeal > 6 || hoursBeforeMeal < 0) {
continue;
}
}
// only consider last hour of data in CI mode
// this allows us to calculate deviations for the last ~45m
if (typeof ciTime) {
hoursAgo = (ciTime-bgTime)/(60*60*1000);
if (hoursAgo > 1 || hoursAgo < 0) {
continue;
}
}
// only consider BGs since lastSiteChange
if (lastSiteChange) {
hoursSinceSiteChange = (bgTime-lastSiteChange)/(60*60*1000);
if (hoursSinceSiteChange < 0) {
continue; |
<<<<<<<
editor.focus(function () {
toolbarElement.css({
"display" : "inline-block",
"bottom" : -25
});
currentCallback = callback;
container.prepend(toolbarElement);
toolbarElement.css("visibility", "visible");
=======
editor.mousedown(function () {
mouseupCallback = function () {
checkSelection(container, callback, true);
};
});
editor.keyup(function () {
checkSelection(container, callback);
>>>>>>>
editor.mousedown(function () {
mouseupCallback = function () {
checkSelection(container, callback, true);
};
editor.focus(function () {
toolbarElement.css({
"display" : "inline-block",
"bottom" : -25
});
currentCallback = callback;
container.prepend(toolbarElement);
toolbarElement.css("visibility", "visible");
});
editor.keyup(function () {
checkSelection(container, callback); |
<<<<<<<
this.setState({buttonDisabled: true})
=======
if (this.props.onStart) this.props.onStart()
>>>>>>>
this.setState({buttonDisabled: true})
if (this.props.onStart) this.props.onStart()
<<<<<<<
=======
let rotation = 0
const {originalRotation} = response
if (this.props.onResponse) this.props.onResponse(response)
>>>>>>>
let rotation = 0
const {originalRotation} = response
if (this.props.onResponse) this.props.onResponse(response) |
<<<<<<<
outputCoder.decodeNote = (note) => {
=======
/**
* Decode a note
*
* @method decodeNote
* @param {note} note - AZTEC note
* @returns {Object[]} note variables - extracted variables: noteType, owner,
* noteHash, gamma, sigma, ephemeral
*/
outputCoder.decodeNote = (note) => {
const length = parseInt(note.slice(0x00, 0x40), 16);
if (length === 0xe1) {
return outputCoder.decodeOutputNote(note);
}
if (length === 0xc0) {
return outputCoder.decodeInputNote(note);
}
throw new Error(`unknown note length ${length}`);
};
/**
* Decode an output note
*
* @method decodeOutputNote
* @param {note} note - AZTEC note
* @returns {Object[]} note variables - extracted variables: noteType, owner,
* noteHash, gamma, sigma, ephemeral
*/
outputCoder.decodeOutputNote = (note) => {
>>>>>>>
/**
* Decode a note
*
* @method decodeNote
* @param {note} note - AZTEC note
* @returns {Object[]} note variables - extracted variables: noteType, owner,
* noteHash, gamma, sigma, ephemeral
*/
outputCoder.decodeNote = (note) => {
<<<<<<<
=======
const ephemeral = secp256k1.decompressHex(note.slice(0x1c0, 0x202));
>>>>>>>
<<<<<<<
outputCoder.decodeNotes = (notes) => {
=======
/**
* Decode an array of notes
*
* @method decodeNotes
* @param {note} notes - array of AZTEC notes
* @returns {Object[]} array of note variables - array of decoded and extracted note variables
* where each element corresponds to the note variables for an individual note
*/
outputCoder.decodeNotes = (notes) => {
>>>>>>>
/**
* Decode an array of notes
*
* @method decodeNotes
* @param {note} notes - array of AZTEC notes
* @returns {Object[]} array of note variables - array of decoded and extracted note variables
* where each element corresponds to the note variables for an individual note
*/
outputCoder.decodeNotes = (notes) => { |
<<<<<<<
function($q, $meteorSubscribe, $meteorUtils, $rootScope, $timeout, diffArray) {
var deepCopyChanges = diffArray.deepCopyChanges;
var deepCopyRemovals = diffArray.deepCopyRemovals;
function AngularMeteorCollection(curDefFunc, collection, diffArrayFunc, autoClientSave) {
=======
function ($q, $meteorSubscribe, $meteorUtils, $rootScope, $timeout, diffArray) {
function AngularMeteorCollection (cursor, collection, diffArrayFunc) {
>>>>>>>
function($q, $meteorSubscribe, $meteorUtils, $rootScope, $timeout, diffArray) {
function AngularMeteorCollection(curDefFunc, collection, diffArrayFunc, autoClientSave) {
<<<<<<<
function onComplete(docId, error, action) {
if (error) {
deferred.reject(error);
return;
}
deferred.resolve({_id: docId, action: action});
}
=======
>>>>>>>
<<<<<<<
var modifier = useUnsetModifier ? {$unset: doc} : {$set: doc};
collection.update(docId, modifier, function(error) {
onComplete(docId, error, 'updated');
});
=======
var modifier;
if (useUnsetModifier)
modifier = { $unset: doc };
else
modifier = { $set: doc };
fulfill = createFulfill({ _id: docId, action: 'updated' });
collection.update(docId, modifier, fulfill);
>>>>>>>
var modifier = useUnsetModifier ? {$unset: doc} : {$set: doc};
fulfill = createFulfill({_id: docId, action: 'updated'});
collection.update(docId, modifier, fulfill);
<<<<<<<
collection.insert(doc, function(error, docId) {
onComplete(docId, error, 'inserted');
});
=======
fulfill = createFulfill({ _id: docId, action: 'inserted' });
collection.insert(doc, fulfill);
>>>>>>>
fulfill = createFulfill({_id: docId, action: 'inserted'});
collection.insert(doc, fulfill);
<<<<<<<
collection.remove(id, function(err) {
if (err) {
deffered.reject(err);
return;
}
deffered.resolve({_id: id, action: 'removed'});
});
return deffered.promise;
=======
var fulfill = $meteorUtils.fulfill(deferred, { _id: id, action: 'removed' });
collection.remove(id, fulfill);
return deferred.promise;
>>>>>>>
var fulfill = $meteorUtils.fulfill(deferred, { _id: id, action: 'removed' });
collection.remove(id, fulfill);
return deferred.promise;
<<<<<<<
changedAt: function(doc, oldDoc, atIndex) {
deepCopyChanges(self[atIndex], doc);
deepCopyRemovals(self[atIndex], doc);
=======
changedAt: function (doc, oldDoc, atIndex) {
diffArray.deepCopyChanges(self[atIndex], doc);
diffArray.deepCopyRemovals(self[atIndex], doc);
>>>>>>>
changedAt: function(doc, oldDoc, atIndex) {
diffArray.deepCopyChanges(self[atIndex], doc);
diffArray.deepCopyRemovals(self[atIndex], doc);
<<<<<<<
function($meteorCollection, diffArray) {
function $meteorCollectionFS(reactiveFunc, autoClientSave, collection) {
var noNestedDiffArray = function(lastSeqArray, seqArray, callbacks) {
return diffArray(lastSeqArray, seqArray, callbacks, true);
};
return new $meteorCollection(reactiveFunc, autoClientSave,
collection, noNestedDiffArray);
=======
function ($meteorCollection, diffArray) {
function $meteorCollectionFS(reactiveFunc, auto, collection) {
return new $meteorCollection(reactiveFunc, auto, collection, noNestedDiffArray);
>>>>>>>
function($meteorCollection, diffArray) {
function $meteorCollectionFS(reactiveFunc, autoClientSave, collection) {
return new $meteorCollection(reactiveFunc, autoClientSave, collection, noNestedDiffArray); |
<<<<<<<
it ('Should not run getReactively for cursors', function() {
$reactive(context).attach(testScope);
expect(testScope.$$watchersCount).toBe(0);
context.helpers({
myHelper: function() {
return bigCollection.find({});
}
});
expect(testScope.$$watchersCount).toBe(0);
});
=======
it('Should call the subscription method with the correct context', function (done) {
$reactive(context);
context.subscribe('test', function () {
expect(this).toBe(context);
done();
});
});
>>>>>>>
it ('Should not run getReactively for cursors', function() {
$reactive(context).attach(testScope);
expect(testScope.$$watchersCount).toBe(0);
context.helpers({
myHelper: function() {
return bigCollection.find({});
}
});
expect(testScope.$$watchersCount).toBe(0);
});
it('Should call the subscription method with the correct context', function (done) {
$reactive(context);
context.subscribe('test', function () {
expect(this).toBe(context);
done();
});
}); |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
import { useNotifyContext } from 'contexts/NotifyContext';
import { notifyHandler } from 'helpers/notifyHelper';
=======
import { getRedirectToTrade, setRedirectToTrade } from 'ducks/ui';
>>>>>>>
import { useNotifyContext } from 'contexts/NotifyContext';
import { notifyHandler } from 'helpers/notifyHelper';
import { getRedirectToTrade, setRedirectToTrade } from 'ducks/ui';
<<<<<<<
const Trade = ({
onDestroy,
walletDetails,
currentGasPrice,
fetchBalancesRequest,
fetchDebtStatusRequest,
}) => {
=======
const Trade = ({
onDestroy,
walletDetails,
createTransaction,
currentGasPrice,
redirectToTrade,
setRedirectToTrade,
}) => {
>>>>>>>
const Trade = ({
onDestroy,
walletDetails,
currentGasPrice,
fetchBalancesRequest,
fetchDebtStatusRequest,
redirectToTrade,
setRedirectToTrade,
}) => {
<<<<<<<
fetchBalancesRequest,
fetchDebtStatusRequest,
=======
createTransaction,
setRedirectToTrade,
>>>>>>>
fetchBalancesRequest,
fetchDebtStatusRequest,
setRedirectToTrade, |
<<<<<<<
<PageTitle>{t('error.pageTitle')}</PageTitle>
{transactionError.code ? (
<PLarge>
{t('error.pageSubtitle')} {transactionError.code}
</PLarge>
) : null}
<PLarge>{transactionError.message}</PLarge>
=======
<PageTitle>Something went wrong...</PageTitle>
{transactionError.code ? <PLarge>Code: {transactionError.code}</PLarge> : null}
<PLarge>{t(transactionError.message)}</PLarge>
>>>>>>>
<PageTitle>{t('error.pageTitle')}</PageTitle>
{transactionError.code ? (
<PLarge>
{t('error.pageSubtitle')} {transactionError.code}
</PLarge>
) : null}
<PLarge>{t(transactionError.message)}</PLarge> |
<<<<<<<
const [transaction, setTransaction] = useState(null); // eslint-disable-line
=======
const [transaction, setTransaction] = useState(null);
const [error, setError] = useState(null);
>>>>>>>
const [transaction, setTransaction] = useState(null);
const [error, setError] = useState(null);
<<<<<<<
};
=======
error,
}
>>>>>>>
error,
}; |
<<<<<<<
<PageTitle>{t('error.pageTitle')}</PageTitle>
{transactionError.code ? (
<PLarge>
{t('error.pageSubtitle')} {transactionError.code}
</PLarge>
) : null}
<PLarge>{transactionError.message}</PLarge>
=======
<PageTitle>Something went wrong...</PageTitle>
{transactionError.code ? <PLarge>Code: {transactionError.code}</PLarge> : null}
<PLarge>{t(transactionError.message)}</PLarge>
>>>>>>>
<PageTitle>{t('error.pageTitle')}</PageTitle>
{transactionError.code ? (
<PLarge>
{t('error.pageSubtitle')} {transactionError.code}
</PLarge>
) : null}
<PLarge>{t(transactionError.message)}</PLarge> |
<<<<<<<
<WalletStatusButton>0x3e...bAe0</WalletStatusButton>
<DashboardHeaderButton>{t('header.support')}</DashboardHeaderButton>
=======
<WalletStatusButton>1111dfljhsdfdf111</WalletStatusButton>
<DashboardHeaderButton>
{t('dashboard.header.support')}
</DashboardHeaderButton>
>>>>>>>
<WalletStatusButton>0x3e...bAe0</WalletStatusButton>
<DashboardHeaderButton>
{t('dashboard.header.support')}
</DashboardHeaderButton> |
<<<<<<<
<DataHeaderLarge>
{t('mintrActions.burn.confirmation.subActionDescription')}
</DataHeaderLarge>
<Amount>
{issuanceRatio
? formatCurrency(burnAmount / issuanceRatio / SNXPrice)
: '--'}{' '}
SNX
</Amount>
=======
<DataHeaderLarge>AND UNLOCKING:</DataHeaderLarge>
<Amount>{formatCurrency(transferableAmount)} SNX</Amount>
>>>>>>>
<DataHeaderLarge>
{t('mintrActions.burn.confirmation.subActionDescription')}
</DataHeaderLarge>
<Amount>{formatCurrency(transferableAmount)} SNX</Amount> |
<<<<<<<
lines.push('extension ' + struct.baseName + ' {');
if (createDecoder) {
lines.push(' static func decodeJson' + decodeArguments(struct) + ' -> ' + struct.baseName + '? {');
lines.push(' guard let dict = json as? [String : AnyObject] else {');
lines.push(' assertionFailure("json not a dictionary");');
lines.push(' return nil');
lines.push(' }');
lines.push('');
struct.varDecls.forEach(function (d) {
var subs = makeFieldDecode(d, struct.typeArguments).map(indent(4));
lines = lines.concat(subs);
});
lines = lines.concat(indent(4)(makeReturn(struct)));
lines.push(' }');
}
if (createDecoder && createEncoder) {
lines.push('');
}
// encoder
if (createEncoder) {
lines.push(' func encodeJson' + encodeArguments(struct) + ' -> AnyObject {');
lines.push(' var dict: [String: AnyObject] = [:]');
lines.push('');
struct.varDecls.forEach(function (d) {
var subs = makeFieldEncode(d, struct.typeArguments).map(indent(4));
lines = lines.concat(subs);
});
lines.push('');
lines.push(' return dict');
lines.push(' }');
}
lines.push('}');
=======
lines.push(' static func decodeJson(json: AnyObject) -> ' + en.baseName + '? {');
lines.push(' if let value = json as? ' + en.rawTypeName + ' {');
lines.push(' return ' + en.baseName + '(rawValue: value)');
lines.push(' }');
lines.push(' return nil');
lines.push(' }');
return lines.join('\n');
}
function makeEnumEncoder(en) {
var lines = [];
lines.push(' func encodeJson() -> AnyObject {');
lines.push(' return rawValue');
lines.push(' }');
return lines.join('\n');
}
function makeStructDecoder(struct) {
var lines = [];
lines.push(' static func decodeJson' + decodeArguments(struct) + ' -> ' + struct.baseName + '? {');
lines.push(' let _dict = json as? [String : AnyObject]');
lines.push(' if _dict == nil { return nil }');
lines.push(' let dict = _dict!');
lines.push('');
struct.varDecls.forEach(function (d) {
var subs = makeFieldDecode(d, struct.typeArguments).map(indent(4));
lines = lines.concat(subs);
});
lines = lines.concat(indent(4)(makeReturn(struct)));
lines.push(' }');
return lines.join('\n');
}
function makeStructEncoder(struct) {
var lines = [];
lines.push(' func encodeJson' + encodeArguments(struct) + ' -> AnyObject {');
lines.push(' var dict: [String: AnyObject] = [:]');
lines.push('');
struct.varDecls.forEach(function (d) {
var subs = makeFieldEncode(d, struct.typeArguments).map(indent(4));
lines = lines.concat(subs);
});
lines.push('');
lines.push(' return dict');
lines.push(' }');
>>>>>>>
lines.push(' static func decodeJson(json: AnyObject) -> ' + en.baseName + '? {');
lines.push(' if let value = json as? ' + en.rawTypeName + ' {');
lines.push(' return ' + en.baseName + '(rawValue: value)');
lines.push(' }');
lines.push(' return nil');
lines.push(' }');
return lines.join('\n');
}
function makeEnumEncoder(en) {
var lines = [];
lines.push(' func encodeJson() -> AnyObject {');
lines.push(' return rawValue');
lines.push(' }');
return lines.join('\n');
}
function makeStructDecoder(struct) {
var lines = [];
lines.push(' static func decodeJson' + decodeArguments(struct) + ' -> ' + struct.baseName + '? {');
lines.push(' guard let dict = json as? [String : AnyObject] else {');
lines.push(' assertionFailure("json not a dictionary");');
lines.push(' return nil');
lines.push(' }');
lines.push('');
struct.varDecls.forEach(function (d) {
var subs = makeFieldDecode(d, struct.typeArguments).map(indent(4));
lines = lines.concat(subs);
});
lines = lines.concat(indent(4)(makeReturn(struct)));
lines.push(' }');
return lines.join('\n');
}
function makeStructEncoder(struct) {
var lines = [];
lines.push(' func encodeJson' + encodeArguments(struct) + ' -> AnyObject {');
lines.push(' var dict: [String: AnyObject] = [:]');
lines.push('');
struct.varDecls.forEach(function (d) {
var subs = makeFieldEncode(d, struct.typeArguments).map(indent(4));
lines = lines.concat(subs);
});
lines.push('');
lines.push(' return dict');
lines.push(' }'); |
<<<<<<<
this.route('editable-field');
=======
this.route('form-controls');
this.route('institutions-widget');
>>>>>>>
this.route('editable-field');
this.route('form-controls');
this.route('institutions-widget'); |
<<<<<<<
=======
initialize:function() {
this.parent();
if (base.dictionary.currentLanguage()=='es') {
var esDict = {
'Tool':'Herramienta',
'Selected tool':'Herramienta seleccionada',
'this track does not contain any item':'esta pista no contiene ningún elemento',
'Click on timeline outside any track to select current playback time.':'Haz clic en el fondo de la línea de tiempo para establecer el instante actual de reproducción',
'Quick help':'Ayuda rápida',
'item':'elemento',
'items':'elementos',
'from':'desde',
'to':'hasta'
};
base.dictionary.addDictionary(esDict);
}
},
>>>>>>>
initialize:function() {
this.parent();
if (base.dictionary.currentLanguage()=='es') {
var esDict = {
'Tool':'Herramienta',
'Selected tool':'Herramienta seleccionada',
'this track does not contain any item':'esta pista no contiene ningún elemento',
'Click on timeline outside any track to select current playback time.':'Haz clic en el fondo de la línea de tiempo para establecer el instante actual de reproducción',
'Quick help':'Ayuda rápida',
'item':'elemento',
'items':'elementos',
'from':'desde',
'to':'hasta'
};
base.dictionary.addDictionary(esDict);
}
}, |
<<<<<<<
showPlaybackBar() {
if (!this.controls) {
this.controls = new paella.ControlsContainer(this.playerId + '_controls');
this.mainContainer.appendChild(this.controls.domElement);
this.controls.onresize();
paella.events.trigger(paella.events.loadPlugins,{pluginManager:paella.pluginManager});
}
}
isLiveStream() {
if (this._isLiveStream===undefined) {
var loader = paella.initDelegate.initParams.videoLoader;
var checkSource = function(sources,index) {
if (sources.length>index) {
var source = sources[index];
for (var key in source.sources) {
if (typeof(source.sources[key])=="object") {
for (var i=0; i<source.sources[key].length; ++i) {
var stream = source.sources[key][i];
if (stream.isLiveStream) return true;
}
}
=======
},
isLiveStream:function() {
var loader = paella.initDelegate.initParams.videoLoader;
var checkSource = function(sources,index) {
if (sources.length>index) {
var source = sources[index];
for (var key in source.sources) {
if (typeof(source.sources[key])=="object") {
for (var i=0; i<source.sources[key].length; ++i) {
var stream = source.sources[key][i];
if (stream.isLiveStream) return true;
>>>>>>>
showPlaybackBar() {
if (!this.controls) {
this.controls = new paella.ControlsContainer(this.playerId + '_controls');
this.mainContainer.appendChild(this.controls.domElement);
this.controls.onresize();
paella.events.trigger(paella.events.loadPlugins,{pluginManager:paella.pluginManager});
}
}
isLiveStream() {
var loader = paella.initDelegate.initParams.videoLoader;
var checkSource = function(sources,index) {
if (sources.length>index) {
var source = sources[index];
for (var key in source.sources) {
if (typeof(source.sources[key])=="object") {
for (var i=0; i<source.sources[key].length; ++i) {
var stream = source.sources[key][i];
if (stream.isLiveStream) return true;
}
<<<<<<<
return false;
};
this._isLiveStream = checkSource(loader.streams,0) || checkSource(loader.streams,1);
}
return this._isLiveStream;
}
loadPreviews() {
var streams = paella.initDelegate.initParams.videoLoader.streams;
var slavePreviewImg = null;
var masterPreviewImg = streams[0].preview;
if (streams.length >=2) {
slavePreviewImg = streams[1].preview;
}
if (masterPreviewImg) {
var masterRect = paella.player.videoContainer.overlayContainer.getVideoRect(0);
this.masterPreviewElem = document.createElement('img');
this.masterPreviewElem.src = masterPreviewImg;
paella.player.videoContainer.overlayContainer.addElement(this.masterPreviewElem,masterRect);
}
if (slavePreviewImg) {
var slaveRect = paella.player.videoContainer.overlayContainer.getVideoRect(1);
this.slavePreviewElem = document.createElement('img');
this.slavePreviewElem.src = slavePreviewImg;
paella.player.videoContainer.overlayContainer.addElement(this.slavePreviewElem,slaveRect);
}
paella.events.bind(paella.events.timeUpdate,function(event) {
paella.player.unloadPreviews();
});
}
unloadPreviews() {
if (this.masterPreviewElem) {
paella.player.videoContainer.overlayContainer.removeElement(this.masterPreviewElem);
this.masterPreviewElem = null;
}
if (this.slavePreviewElem) {
paella.player.videoContainer.overlayContainer.removeElement(this.slavePreviewElem);
this.slavePreviewElem = null;
}
}
loadComplete(event,params) {
var thisClass = this;
//var master = paella.player.videoContainer.masterVideo();
=======
}
}
return false;
};
return checkSource(loader.streams,0) || checkSource(loader.streams,1);
},
loadPreviews:function() {
var streams = paella.initDelegate.initParams.videoLoader.streams;
var slavePreviewImg = null;
>>>>>>>
}
return false;
};
return checkSource(loader.streams,0) || checkSource(loader.streams,1);
}
loadPreviews() {
var streams = paella.initDelegate.initParams.videoLoader.streams;
var slavePreviewImg = null;
var masterPreviewImg = streams[0].preview;
if (streams.length >=2) {
slavePreviewImg = streams[1].preview;
}
if (masterPreviewImg) {
var masterRect = paella.player.videoContainer.overlayContainer.getVideoRect(0);
this.masterPreviewElem = document.createElement('img');
this.masterPreviewElem.src = masterPreviewImg;
paella.player.videoContainer.overlayContainer.addElement(this.masterPreviewElem,masterRect);
}
if (slavePreviewImg) {
var slaveRect = paella.player.videoContainer.overlayContainer.getVideoRect(1);
this.slavePreviewElem = document.createElement('img');
this.slavePreviewElem.src = slavePreviewImg;
paella.player.videoContainer.overlayContainer.addElement(this.slavePreviewElem,slaveRect);
}
paella.events.bind(paella.events.timeUpdate,function(event) {
paella.player.unloadPreviews();
});
}
unloadPreviews() {
if (this.masterPreviewElem) {
paella.player.videoContainer.overlayContainer.removeElement(this.masterPreviewElem);
this.masterPreviewElem = null;
}
if (this.slavePreviewElem) {
paella.player.videoContainer.overlayContainer.removeElement(this.slavePreviewElem);
this.slavePreviewElem = null;
}
}
loadComplete(event,params) {
var thisClass = this;
//var master = paella.player.videoContainer.masterVideo(); |
<<<<<<<
showIcon:true,
=======
firstPlay:false,
>>>>>>>
showIcon:true,
firstPlay:false,
<<<<<<<
if ((this.enabled && this.isPlaying) || !this.enabled || !this.showIcon) {
=======
if (this.firstPlay || (this.enabled && this.isPlaying) || !this.enabled) {
>>>>>>>
if ((this.enabled && this.isPlaying) || !this.enabled || !this.showIcon) { |
<<<<<<<
// Onboarding flow
$('.panel-link').off().on('click', function(){
$('.panel').addClass('hidden');
$('#panel-' + $(this).data('panel')).removeClass('hidden');
$('li.step-' + ($(this).data('panel')-1)).html("<span class='glyphicon glyphicon-ok'></span>").addClass('filled-circle');
});
=======
$('input.send-email').off().on('change', function(){
var chosen = $("input.send-email:radio:checked").val();
if (chosen === 'true') {
$('.smtp-settings').removeClass('hidden');
} else {
$('.smtp-settings').addClass('hidden');
}
});
>>>>>>>
// Onboarding flow
$('.panel-link').off().on('click', function(){
$('.panel').addClass('hidden');
$('#panel-' + $(this).data('panel')).removeClass('hidden');
$('li.step-' + ($(this).data('panel')-1)).html("<span class='glyphicon glyphicon-ok'></span>").addClass('filled-circle');
});
$('input.send-email').off().on('change', function(){
var chosen = $("input.send-email:radio:checked").val();
if (chosen === 'true') {
$('.smtp-settings').removeClass('hidden');
} else {
$('.smtp-settings').addClass('hidden');
}
}); |
<<<<<<<
maintenance: 'maintenance',
=======
cookieConsent: 'osf_cookieconsent',
>>>>>>>
cookieConsent: 'osf_cookieconsent',
maintenance: 'maintenance', |
<<<<<<<
let idCounter = 0
class SubscriptionRegistry {
=======
module.exports = class SubscriptionRegistry {
>>>>>>>
let idCounter = 0
module.exports = class SubscriptionRegistry {
<<<<<<<
const subscription = this._subscriptions.get(name)
if (!subscription) {
=======
if (socket !== C.SOURCE_MESSAGE_CONNECTOR) {
this._options.message.send(message.topic, message)
}
if (!this._subscriptions.has(name)) {
>>>>>>>
if (socket !== C.SOURCE_MESSAGE_CONNECTOR) {
this._options.message.send(message.topic, message)
}
const subscription = this._subscriptions.get(name)
if (!subscription) { |
<<<<<<<
this._connectionEndpoint.onMessages = this._messageProcessor.process.bind(this._messageProcessor)
=======
>>>>>>> |
<<<<<<<
import * as Logger from "/common/modules/Logger/Logger.js";
import * as QrError from "./QrError.js";
=======
>>>>>>>
import * as QrError from "./QrError.js";
<<<<<<<
Logger.logInfo("generated new qr kjua code", kjuaOptions);
try {
return kjua(kjuaOptions);
} catch (err) {
throw err.message.startsWith("code length overflow.")
? new QrError.DataOverflowError() : err;
}
=======
console.info("generated new qr kjua code", kjuaOptions);
return kjua(kjuaOptions);
>>>>>>>
console.info("generated new qr kjua code", kjuaOptions);
try {
return kjua(kjuaOptions);
} catch (err) {
throw err.message.startsWith("code length overflow.")
? new QrError.DataOverflowError() : err;
} |
<<<<<<<
* @private
* @returns {void}
=======
* @function
* @returns {Promise}
>>>>>>>
* @private
* @returns {Promise}
<<<<<<<
* @private
* @returns {void}
=======
* @function
* @returns {Promise}
>>>>>>>
* @private
* @returns {Promise} |
<<<<<<<
const browsers = [
{ name: 'chrome',
version: '36.0.1985.125',
type: 'chrome',
command: 'google-chrome' },
{ name: 'chromium',
version: '36.0.1985.125',
type: 'chrome',
command: 'chromium-browser' },
{ name: 'firefox',
version: '31.0',
type: 'firefox',
command: 'firefox' },
{ name: 'phantomjs',
version: '1.9.7',
type: 'phantom',
command: 'phantomjs' },
{ name: 'opera',
version: '12.16',
type: 'opera',
command: 'opera' },
{ name: 'ie',
version: '11',
type: 'ie',
command: 'ie' },
{ name: 'safari',
version: '1',
type: 'safari',
command: 'safari' }];
=======
const {enabled, rate} = data.throttle;
>>>>>>>
const {enabled, rate} = data.throttle;
const browsers = [
{ name: 'chrome',
version: '36.0.1985.125',
type: 'chrome',
command: 'google-chrome' },
{ name: 'chromium',
version: '36.0.1985.125',
type: 'chrome',
command: 'chromium-browser' },
{ name: 'firefox',
version: '31.0',
type: 'firefox',
command: 'firefox' },
{ name: 'phantomjs',
version: '1.9.7',
type: 'phantom',
command: 'phantomjs' },
{ name: 'opera',
version: '12.16',
type: 'opera',
command: 'opera' },
{ name: 'ie',
version: '11',
type: 'ie',
command: 'ie' },
{ name: 'safari',
version: '1',
type: 'safari',
command: 'safari' }]; |
<<<<<<<
componentWillMount() {
this.setState({
=======
constructor(props) {
super(props);
this.onClick = this.onClick.bind(this);
this.state = {
>>>>>>>
constructor(props) {
super(props);
this.onClick = this.onClick.bind(this);
this.setState({
<<<<<<<
return <div className="main-content">
{activeWindow}
=======
return <div className="main-content" onClick={this.onClick} onContextMenu={this.onClick}>
>>>>>>>
return <div className="main-content" onClick={this.onClick} onContextMenu={this.onClick}>
{activeWindow} |
<<<<<<<
it('adds a slash to `newUrl` when the url has no path and no slash at the end', function() {
const url = 'foo.com/bar/baz';
const newUrl = 'foo.com';
const isLocal = false;
const isActive = true;
urlMapper.set(
url,
newUrl,
isLocal,
isActive
);
expect(dbMock.insert).toHaveBeenCalledWith({
url,
newUrl: 'foo.com/',
isLocal,
isActive
});
});
it('does not add a slash when the path is local', function() {
const url = 'foo.com/bar/baz';
const newUrl = 'foo/bar';
const isLocal = true;
const isActive = true;
urlMapper.set(
url,
newUrl,
isLocal,
isActive
);
expect(dbMock.insert).toHaveBeenCalledWith({
url,
newUrl: 'foo/bar',
isLocal,
isActive
});
});
describe('protocol-removal', function() {
const newUrl = 'newUrl';
const isLocal = true;
const isActive = true;
const expectedMapping = {
url: 'foo.com/bar',
newUrl: newUrl,
isLocal: isLocal,
isActive: isActive
};
it('should work for http sources', function() {
const http = {
url: 'http://foo.com/bar',
newUrl: newUrl,
isLocal: isLocal,
isActive: isActive
};
set(http);
expect(dbMock.insert).toHaveBeenCalledWith(expectedMapping);
});
it('should work for https sources', function() {
const https = {
url: 'https://foo.com/bar',
newUrl: newUrl,
isLocal: isLocal,
isActive: isActive
};
set(https);
expect(dbMock.insert).toHaveBeenCalledWith(expectedMapping);
});
it('should apply to requests coming in', function() {
const http = {
url: 'http://foo.com/bar',
newUrl: newUrl,
isLocal: isLocal,
isActive: isActive
};
set(http);
check('http://foo.com/bar', expectedMapping);
});
});
it('should remove the protocol from the destination url', function() {
const mapping = {
url: 'http://foo.com/bar',
newUrl: 'newUrl',
isLocal: true,
isActive: true
};
const expected = {
url: 'foo.com/bar',
newUrl: mapping.newUrl,
isLocal: mapping.isLocal,
isActive: mapping.isActive
};
set(mapping);
expect(dbMock.insert).toHaveBeenCalledWith(expected);
});
=======
>>>>>>>
});
describe('protocol-removal', function() {
const newUrl = 'newUrl';
const isLocal = true;
const isActive = true;
const expectedMapping = {
url: 'foo.com/bar',
newUrl: newUrl,
isLocal: isLocal,
isActive: isActive
};
it('should work for http sources', function() {
const http = {
url: 'http://foo.com/bar',
newUrl: newUrl,
isLocal: isLocal,
isActive: isActive
};
set(http);
expect(dbMock.insert).toHaveBeenCalledWith(expectedMapping);
});
it('should work for https sources', function() {
const https = {
url: 'https://foo.com/bar',
newUrl: newUrl,
isLocal: isLocal,
isActive: isActive
};
set(https);
expect(dbMock.insert).toHaveBeenCalledWith(expectedMapping);
});
it('should apply to requests coming in', function() {
const http = {
url: 'http://foo.com/bar',
newUrl: newUrl,
isLocal: isLocal,
isActive: isActive
};
set(http);
check('http://foo.com/bar', expectedMapping);
});
it('should remove the protocol from the destination url', function() {
const mapping = {
url: 'http://foo.com/bar',
newUrl: 'newUrl',
isLocal: true,
isActive: true
};
const expected = {
url: 'foo.com/bar',
newUrl: mapping.newUrl,
isLocal: mapping.isLocal,
isActive: mapping.isActive
};
set(mapping);
expect(dbMock.insert).toHaveBeenCalledWith(expected);
});
<<<<<<<
it('returns undefined if no matching maps', function() {
set(specific);
set(oneWildcard);
set(multiWildcard);
expect(urlMapper.get('dunx')).toEqual(undefined);
=======
it('returns undefined if no matching maps', function() {
urlMapper.set(
specific.url,
specific.newUrl,
true,
true
);
urlMapper.set(
oneWildcard.url,
oneWildcard.newUrl,
true,
true
);
urlMapper.set(
multiWildcard.url,
multiWildcard.newUrl,
true,
true
);
expect(urlMapper.get('http://dunx')).toEqual(undefined);
>>>>>>>
it('returns undefined if no matching maps', function() {
set(specific);
set(oneWildcard);
set(multiWildcard);
expect(urlMapper.get('dunx')).toEqual(undefined);
<<<<<<<
set(oneWildcard);
check('foo.com/1/baz', oneWildcard);
=======
urlMapper.set(
oneWildcard.url,
oneWildcard.newUrl,
true,
true
);
expect(urlMapper.get('http://foo.com/1/baz').newUrl).toEqual(oneWildcard.newUrl);
});
it('doesn\'t match wildcard regardless of trailing slash or not', function() {
urlMapper.set(
'http://foo.com/*',
'newUrl',
true,
true
);
expect(urlMapper.get('http://foo.com')).toEqual(undefined);
expect(urlMapper.get('http://foo.com/')).toEqual(undefined);
>>>>>>>
set(oneWildcard);
check('foo.com/1/baz', oneWildcard);
});
it('doesn\'t match wildcard regardless of trailing slash or not', function() {
urlMapper.set(
'http://foo.com/*',
'newUrl',
true,
true
);
expect(urlMapper.get('http://foo.com')).toEqual(undefined);
expect(urlMapper.get('http://foo.com/')).toEqual(undefined);
<<<<<<<
set(multiWildcard);
check('foo.com/2/bork', multiWildcard);
=======
urlMapper.set(
multiWildcard.url,
multiWildcard.newUrl,
true,
true
);
expect(urlMapper.get('http://foo.com/2/bork').newUrl).toEqual(multiWildcard.newUrl);
>>>>>>>
set(multiWildcard);
check('foo.com/2/bork', multiWildcard);
<<<<<<<
set(specific);
set(oneWildcard);
set(multiWildcard);
check('foo.com/bar/baz', specific);
check('foo.com/derp/baz', oneWildcard);
check('foo.com/derp/any', multiWildcard);
=======
urlMapper.set(
specific.url,
specific.newUrl,
true,
true
);
urlMapper.set(
oneWildcard.url,
oneWildcard.newUrl,
true,
true
);
urlMapper.set(
multiWildcard.url,
multiWildcard.newUrl,
true,
true
);
expect(urlMapper.get('http://foo.com/bar/baz').newUrl).toEqual(specific.newUrl);
expect(urlMapper.get('http://foo.com/derp/baz').newUrl).toEqual(oneWildcard.newUrl);
expect(urlMapper.get('http://foo.com/derp/any').newUrl).toEqual(multiWildcard.newUrl);
>>>>>>>
set(specific);
set(oneWildcard);
set(multiWildcard);
check('foo.com/bar/baz', specific);
check('foo.com/derp/baz', oneWildcard);
check('foo.com/derp/any', multiWildcard);
<<<<<<<
set(early);
set(late);
check('foo.com/bar/spaghetti', late);
=======
urlMapper.set(
early.url,
early.newUrl,
true,
true
);
urlMapper.set(
late.url,
late.newUrl,
true,
true
);
expect(urlMapper.get('http://foo.com/bar/spaghetti').newUrl).toEqual(late.newUrl);
>>>>>>>
set(early);
set(late);
check('foo.com/bar/spaghetti', late);
<<<<<<<
set(earlyMulti);
set(lateMulti);
check('bar.com/yolo/foo/baz', lateMulti);
=======
urlMapper.set(
earlyMulti.url,
earlyMulti.newUrl,
true,
true
);
urlMapper.set(
lateMulti.url,
lateMulti.newUrl,
true,
true
);
expect(urlMapper.get('http://bar.com/yolo/foo/baz').newUrl).toEqual(lateMulti.newUrl);
>>>>>>>
set(earlyMulti);
set(lateMulti);
check('bar.com/yolo/foo/baz', lateMulti);
<<<<<<<
url = 'foo.com/bar/baz';
newUrl = 'foo/bar';
isLocal = true;
=======
>>>>>>>
<<<<<<<
const first = {
url: 'foo.com/bar/baz',
newUrl: 'foo/bar',
isLocal: true,
isActive: true
};
const second = {
url: 'foo.com/bar/baz2',
newUrl: 'foo/bar2',
isLocal: true,
isActive: false
};
=======
>>>>>>> |
<<<<<<<
=======
_filterRequests(str) {
if(str === '') {
str = null;
}
this.setState({
filter: str
});
}
>>>>>>>
<<<<<<<
let {
requestData,
config,
services,
activeWindow,
setFromIndex,
setFilter
} = this.props;
=======
let {requests, config, activeWindow} = this.props;
>>>>>>>
let {
requestData,
config,
activeWindow,
setFromIndex,
setFilter
} = this.props;
<<<<<<<
=======
const filterRequests = (str) => {
this._filterRequests(str);
this.render();
};
>>>>>>>
<<<<<<<
if(requestData.totalCount > 0) {
SearchBar = <Search setFilter={setFilter}></Search>;
=======
if(requests.length > 0) {
SearchBar = <Search filterRequests={filterRequests}></Search>;
>>>>>>>
if(requestData.totalCount > 0) {
SearchBar = <Search setFilter={setFilter}></Search>; |
<<<<<<<
async findNewPdrs(pdrs) {
let newPdrs = await super.findNewPdrs(pdrs);
if (this.limit) newPdrs = newPdrs.slice(0, this.limit);
return Promise.all(newPdrs.map((p) => queue.queuePdr(this.event, p)));
=======
async findNewPdrs(_pdrs) {
let pdrs = _pdrs;
pdrs = await super.findNewPdrs(pdrs);
if (this.limit) {
pdrs = pdrs.slice(0, this.limit);
}
return Promise.all(pdrs.map((p) => queue.queuePdr(
this.queueUrl,
this.templateUri,
this.provider,
this.collection,
p
)));
>>>>>>>
async findNewPdrs(pdrs) {
let newPdrs = await super.findNewPdrs(pdrs);
if (this.limit) newPdrs = newPdrs.slice(0, this.limit);
return Promise.all(newPdrs.map((p) => queue.queuePdr(
this.queueUrl,
this.templateUri,
this.provider,
this.collection,
p
)));
<<<<<<<
parse(pdrLocalPath) {
=======
async parse(pdrLocalPath) {
>>>>>>>
parse(pdrLocalPath) { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.