conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
steed.each(keys, function(k,next){
=======
});
subsStream.on('end', function(){
async.each(keys, function(k,next){
>>>>>>>
});
subsStream.on('end', function(){
steed.each(keys, function(k,next){
<<<<<<<
steed.each(from(matches), function(client, cb) {
that._storePacket(client, packet, cb);
}, done);
=======
var pipeline = this._client.pipeline();
async.each(matches, function(client, cb) {
that._storePacket(client, packet, pipeline, cb);
}, function(){
pipeline.exec(done);
});
>>>>>>>
var pipeline = this._client.pipeline();
steed.each(from(matches), function(client, cb) {
that._storePacket(client, packet, pipeline, cb);
}, function(){
pipeline.exec(done);
}); |
<<<<<<<
import NodeBalancers from '~/nodebalancers';
import Domains from '~/domains';
import Support from '~/support';
import StackScripts from './stackscripts';
import Images from '~/images';
=======
import Volumes from '~/volumes';
>>>>>>>
import NodeBalancers from '~/nodebalancers';
import Domains from '~/domains';
import Support from '~/support';
import StackScripts from './stackscripts';
import Images from '~/images';
import Volumes from '~/volumes';
<<<<<<<
<Route path="/nodebalancers" component={NodeBalancers} />
<Route path="/domains" component={Domains} />
<Route path="/support" component={Support} />
<Route path="/support" component={Support} />
<Route path="/stackscripts" component={StackScripts} />
<Route path="/images" component={Images} />
{/* <Route path="/volumes" component={Volumes} />
<Route path="/billing" component={Billing} />
<Route path="/profile" component={Profile} />
<Route path="/settings" component={Settings} />
<Route path="/users" component={Users} /> */}
=======
<Route path="/volumes" component={Volumes} />
>>>>>>>
<Route path="/nodebalancers" component={NodeBalancers} />
<Route path="/domains" component={Domains} />
<Route path="/support" component={Support} />
<Route path="/support" component={Support} />
<Route path="/stackscripts" component={StackScripts} />
<Route path="/images" component={Images} />
<Route path="/volumes" component={Volumes} />
{/* <Route path="/billing" component={Billing} />
<Route path="/profile" component={Profile} />
<Route path="/settings" component={Settings} />
<Route path="/users" component={Users} /> */} |
<<<<<<<
import NodeBalancers from '~/nodebalancers';
import Domains from '~/domains';
import Support from '~/support';
import StackScripts from './stackscripts';
import Images from '~/images';
import Volumes from '~/volumes';
import Billing from '~/billing';
=======
import Profile from '~/profile';
>>>>>>>
import NodeBalancers from '~/nodebalancers';
import Domains from '~/domains';
import Support from '~/support';
import StackScripts from './stackscripts';
import Images from '~/images';
import Volumes from '~/volumes';
import Billing from '~/billing';
import Profile from '~/profile';
<<<<<<<
<Route path="/nodebalancers" component={NodeBalancers} />
<Route path="/domains" component={Domains} />
<Route path="/support" component={Support} />
<Route path="/support" component={Support} />
<Route path="/stackscripts" component={StackScripts} />
<Route path="/images" component={Images} />
<Route path="/volumes" component={Volumes} />
<Route path="/billing" component={Billing} />
{/* <Route path="/profile" component={Profile} />
<Route path="/settings" component={Settings} />
<Route path="/users" component={Users} /> */}
=======
<Route path="/profile" component={Profile} />
>>>>>>>
<Route path="/nodebalancers" component={NodeBalancers} />
<Route path="/domains" component={Domains} />
<Route path="/support" component={Support} />
<Route path="/support" component={Support} />
<Route path="/stackscripts" component={StackScripts} />
<Route path="/images" component={Images} />
<Route path="/volumes" component={Volumes} />
<Route path="/billing" component={Billing} />
<Route path="/profile" component={Profile} />
{/* <Route path="/settings" component={Settings} />
<Route path="/users" component={Users} /> */} |
<<<<<<<
import thunk from 'redux-thunk';
import reducers from './reducers';
import createHistory from 'history/createBrowserHistory';
=======
import { browserHistory } from 'react-router';
import authenticationMiddleware from '~/middleware/authentication';
import reducer from '~/reducers';
import DevTools from '~/components/DevTools';
const enhancers = [
applyMiddleware(
thunk,
routerMiddleware(browserHistory),
authenticationMiddleware
),
];
if (DevTools.instrument) {
enhancers.push(DevTools.instrument());
}
const composedEnhancers = compose(...enhancers);
>>>>>>>
import thunk from 'redux-thunk';
import authenticationMiddleware from '~/middleware/authentication';
import reducers from './reducers';
import createHistory from 'history/createBrowserHistory'; |
<<<<<<<
postInsert: function() {
// iframes need to be linked into the DOM tree before their contentDocument
// can be instantiated.
this.buildBodyDom(this.domNode);
},
=======
formatFileSize: function(size) {
// XXX: localize this!
const units = [ "bytes", "KB", "MB", "GB", "TB" ];
var unitSize = size;
var unitIndex = 0;
while ((unitSize >= 999.5) && (unitIndex < units.length)) {
unitSize /= 1024;
unitIndex++;
}
return (unitIndex == 0 ? unitSize.toFixed(0) : unitSize.toPrecision(3)) +
" " + units[unitIndex];
},
>>>>>>>
postInsert: function() {
// iframes need to be linked into the DOM tree before their contentDocument
// can be instantiated.
this.buildBodyDom(this.domNode);
},
formatFileSize: function(size) {
// XXX: localize this!
const units = [ "bytes", "KB", "MB", "GB", "TB" ];
var unitSize = size;
var unitIndex = 0;
while ((unitSize >= 999.5) && (unitIndex < units.length)) {
unitSize /= 1024;
unitIndex++;
}
return (unitIndex == 0 ? unitSize.toFixed(0) : unitSize.toPrecision(3)) +
" " + units[unitIndex];
}, |
<<<<<<<
// mismatch rewrites
if (resource === 'account') {
resource = 'profile';
}
// Paginated endpoints will modify the schema, so we need to be using a copy of the data.
resourceObject = _.cloneDeep(getResourceObjByName(resource));
=======
resourceObject = getResourceObjByName(resource);
>>>>>>>
// Paginated endpoints will modify the schema, so we need to be using a copy of the data.
resourceObject = _.cloneDeep(getResourceObjByName(resource)); |
<<<<<<<
it('should render without error', () => {
const mockDispatch = jest.fn();
const wrapper = shallow(
<UserForm
dispatch={mockDispatch}
user={testUser}
/>
).dive();
expect(wrapper).toMatchSnapshot();
});
=======
>>>>>>> |
<<<<<<<
import NodeBalancers from '~/nodebalancers';
=======
import Domains from '~/domains';
>>>>>>>
import NodeBalancers from '~/nodebalancers';
import Domains from '~/domains';
<<<<<<<
<Route path="/nodebalancers" component={NodeBalancers} />
{/* <Route path="/domains" component={Domains} />
<Route path="/support" component={Support} />
=======
{/* <Route path="/nodebalancers" component={NodeBalancers} /> */}
<Route path="/domains" component={Domains} />
{/* <Route path="/support" component={Support} />
>>>>>>>
<Route path="/nodebalancers" component={NodeBalancers} />
<Route path="/domains" component={Domains} />
{/* <Route path="/support" component={Support} /> |
<<<<<<<
import NodeBalancers from '~/nodebalancers';
import Domains from '~/domains';
import Support from '~/support';
=======
import StackScripts from './stackscripts';
>>>>>>>
import NodeBalancers from '~/nodebalancers';
import Domains from '~/domains';
import Support from '~/support';
import StackScripts from './stackscripts';
<<<<<<<
<Route path="/nodebalancers" component={NodeBalancers} />
<Route path="/domains" component={Domains} />
<Route path="/support" component={Support} />
<Route path="/support" component={Support} />
{/* <Route path="/stackscripts" component={Stackscripts} />
<Route path="/images" component={Images} />
<Route path="/volumes" component={Volumes} />
<Route path="/billing" component={Billing} />
<Route path="/profile" component={Profile} />
<Route path="/settings" component={Settings} />
<Route path="/users" component={Users} /> */}
=======
<Route path="/stackscripts" component={StackScripts} />
>>>>>>>
<Route path="/nodebalancers" component={NodeBalancers} />
<Route path="/domains" component={Domains} />
<Route path="/support" component={Support} />
<Route path="/support" component={Support} />
<Route path="/stackscripts" component={StackScripts} />
{/* <Route path="/images" component={Images} />
<Route path="/volumes" component={Volumes} />
<Route path="/billing" component={Billing} />
<Route path="/profile" component={Profile} />
<Route path="/settings" component={Settings} />
<Route path="/users" component={Users} /> */} |
<<<<<<<
const mixin = require("es6-class-mixin");
const {plugin} = require("./pluginHelper");
const DojoAMDDependencyParserMixin = require("./DojoAMDDependencyParserMixin");
=======
const plugin = require("./pluginHelper").plugin;
if (!Object.entries) require("object.entries").shim();
const DojoAMDRequireItemDependency = require("./DojoAMDRequireItemDependency");
const DojoAMDRequireArrayDependency = require("./DojoAMDRequireArrayDependency");
const ConstDependency = require("webpack/lib/dependencies/ConstDependency");
>>>>>>>
const mixin = require("es6-class-mixin");
if (!Object.entries) require("object.entries").shim();
const {plugin} = require("./pluginHelper");
const DojoAMDDependencyParserMixin = require("./DojoAMDDependencyParserMixin"); |
<<<<<<<
render_rotated_skewed_text_as: {defaultValue: "image", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "image, html", notes: ""},
show_completion_dialog_box: {defaultValue: "true", includeInSettingsBlock: true, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "trueFalse", possibleValues: "", notes: "Set this to false if you don't want to see the dialog box confirming completion of the script."},
clickable_link: {defaultValue: "", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "", notes: "If you put a url in this field, an <a> tag will be added, wrapping around the output and pointing to that url."},
=======
render_rotated_skewed_text_as: {defaultValue: "html", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "image, html", notes: ""},
>>>>>>>
show_completion_dialog_box: {defaultValue: "true", includeInSettingsBlock: true, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "trueFalse", possibleValues: "", notes: "Set this to false if you don't want to see the dialog box confirming completion of the script."},
clickable_link: {defaultValue: "", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "", notes: "If you put a url in this field, an <a> tag will be added, wrapping around the output and pointing to that url."},
render_rotated_skewed_text_as: {defaultValue: "html", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "image, html", notes: ""},
<<<<<<<
render_rotated_skewed_text_as: {defaultValue: "image", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "image, html", notes: ""},
show_completion_dialog_box: {defaultValue: "yes", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "yesNo", possibleValues: "", notes: "Set this to “no” if you don't want to see the dialog box confirming completion of the script."},
clickable_link: {defaultValue: "", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "", notes: "If you put a url in this field, an <a> tag will be added, wrapping around the output and pointing to that url."},
=======
render_rotated_skewed_text_as: {defaultValue: "html", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "image, html", notes: ""},
>>>>>>>
show_completion_dialog_box: {defaultValue: "yes", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "yesNo", possibleValues: "", notes: "Set this to “no” if you don't want to see the dialog box confirming completion of the script."},
clickable_link: {defaultValue: "", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "", notes: "If you put a url in this field, an <a> tag will be added, wrapping around the output and pointing to that url."},
render_rotated_skewed_text_as: {defaultValue: "html", includeInSettingsBlock: false, includeInConfigFile: false, useQuoteMarksInConfigFile: false, inputType: "text", possibleValues: "image, html", notes: ""},
<<<<<<<
if (docSettings.show_completion_dialog_box=="yes") {
alert(alertHed + "\n" + alertText + "\n\n\n================\nai2html-nyt5 v"+scriptVersion);
};
=======
=========\nai2html-nyt5 v"+scriptVersion);
=======
alert(alertHed + "\n" + alertText + "\n\n\n================\nai2html-nyt5 v"+scriptVersion);
function textIsTransformed(textFrame) {
return !(textFrame.matrix.mValueA==1 &&
textFrame.matrix.mValueB==0 &&
textFrame.matrix.mValueC==0 &&
textFrame.matrix.mValueD==1);
// || textFrame.textRange.characterAttributes.horizontalScale != 100
// || textFrame.textRange.characterAttributes.verticalScale != 100;
}
function getUntransformedTextBounds(textFrame) {
var oldSelection = activeDocument.selection;
activeDocument.selection = [textFrame];
app.copy();
app.paste();
var textFrameCopy = activeDocument.selection[0];
// move to same position
textFrameCopy.left = textFrame.left;
textFrameCopy.top = textFrame.top;
var bnds = textFrameCopy.geometricBounds;
var old_center_x = (bnds[0] + bnds[2]) * 0.5,
old_center_y = (bnds[1] + bnds[3]) * 0.5;
// inverse transformation of copied text frame
textFrameCopy.transform(app.invertMatrix(textFrame.matrix));
// remove scale
textFrameCopy.textRange.characterAttributes.horizontalScale = 100;
textFrameCopy.textRange.characterAttributes.verticalScale = 100;
// move transformed text frame back to old center point
var new_center_x, new_center_y;
var max_iter = 5;
while (--max_iter > 0) {
bnds = textFrameCopy.geometricBounds;
new_center_x = (bnds[0] + bnds[2]) * 0.5;
new_center_y = (bnds[1] + bnds[3]) * 0.5;
textFrameCopy.translate(old_center_x - new_center_x, old_center_y - new_center_y);
}
var bounds = textFrameCopy.geometricBounds;
textFrameCopy.textRange.characterAttributes.fillColor = getRGBColor(250, 50, 50);
textFrameCopy.remove();
// reset selection
activeDocument.selection = oldSelection;
return bounds;
}
function getRGBColor(r,g,b) {
var col = new RGBColor();
col.red = r || 0;
col.green = g || 0;
col.blue = b || 0;
return col;
}
function getAnchorPoint(untransformedBounds, matrix, hAlign, vAlign, sx, sy) {
var center_x = (untransformedBounds[0] + untransformedBounds[2]) * 0.5,
center_y = (untransformedBounds[1] + untransformedBounds[3]) * 0.5,
anchor_x = (hAlign == 'left' ? untransformedBounds[0] :
(hAlign == 'center' ? center_x : untransformedBounds[2])),
anchor_y = (vAlign == 'top' ? untransformedBounds[1] :
(vAlign == 'bottom' ? untransformedBounds[3] : center_y)),
anchor_dx = (anchor_x - center_x),
anchor_dy = (anchor_y - center_y);
var mat = app.concatenateMatrix(app.getScaleMatrix(sx*100, sy*100), matrix);
var t_anchor_x = center_x + mat.mValueA * anchor_dx + mat.mValueC * anchor_dy,
t_anchor_y = center_y + mat.mValueB * anchor_dx + mat.mValueD * anchor_dy;
return [t_anchor_x, t_anchor_y];
}
function hideElementsOutsideArtboardRect(artbnds) {
var hidden = [], all_groups;
checkLayers(doc.layers);
function checkLayers(layers) {
for (var lid=0; lid<layers.length; lid++) {
var layer = layers[lid];
if (layer.visible) { // only deal with visible layers
var checkItemGroups = [layer.pathItems, layer.symbolItems, layer.compoundPathItems];
all_groups = [];
traverseGroups(layer);
// feedback.push('layer.groupItems '+layer.groupItems.length);
// alert('groups: '+groups.length);
for (var g=0; g<all_groups.length; g++) {
checkItemGroups.push(all_groups[g].pathItems);
checkItemGroups.push(all_groups[g].symbolItems);
checkItemGroups.push(all_groups[g].compoundPathItems);
}
for (var cig=0; cig<checkItemGroups.length; cig++) {
for (var item_i=0; item_i<checkItemGroups[cig].length; item_i++) {
var check_item = checkItemGroups[cig][item_i],
item_bnds = check_item.visibleBounds;
// bounds are [left,-top,right,-bottom]
if (item_bnds[0] > artbnds[2] ||
item_bnds[2] < artbnds[0] ||
item_bnds[1] < artbnds[3] ||
item_bnds[3] > artbnds[1]) {
if (!check_item.hidden) {
hidden.push(check_item);
check_item.hidden = true;
}
}
}
}
if (layer.layers.length > 0) checkLayers(layer.layers);
}
}
function traverseGroups(groupItems) {
for (var g=0;g<groupItems.length;g++) {
// check group bounds
var bnds = groupItems[g].visibleBounds;
if (bnds[0] > artbnds[2] || bnds[2] < artbnds[0] || bnds[1] < artbnds[3] || bnds[3] > artbnds[1]) {
// group entirely out of artboard, so ignore
groupItems[g].hidden = true;
hidden.push(groupItems[g]);
} else {
// recursively check sub-groups
all_groups.push(groupItems[g]);
if (groupItems[g].groupItems.length > 0) {
getGroups(groupItems[g].groupItems);
}
}
}
}
}
return hidden;
}
function round(number, precision) {
var d = Math.pow(10, precision || 0);
return Math.round(number * d) / d;
}
>>>>>>>
if (docSettings.show_completion_dialog_box=="yes") {
alert(alertHed + "\n" + alertText + "\n\n\n================\nai2html-nyt5 v"+scriptVersion);
};
function textIsTransformed(textFrame) {
return !(textFrame.matrix.mValueA==1 &&
textFrame.matrix.mValueB==0 &&
textFrame.matrix.mValueC==0 &&
textFrame.matrix.mValueD==1);
// || textFrame.textRange.characterAttributes.horizontalScale != 100
// || textFrame.textRange.characterAttributes.verticalScale != 100;
}
function getUntransformedTextBounds(textFrame) {
var oldSelection = activeDocument.selection;
activeDocument.selection = [textFrame];
app.copy();
app.paste();
var textFrameCopy = activeDocument.selection[0];
// move to same position
textFrameCopy.left = textFrame.left;
textFrameCopy.top = textFrame.top;
var bnds = textFrameCopy.geometricBounds;
var old_center_x = (bnds[0] + bnds[2]) * 0.5,
old_center_y = (bnds[1] + bnds[3]) * 0.5;
// inverse transformation of copied text frame
textFrameCopy.transform(app.invertMatrix(textFrame.matrix));
// remove scale
textFrameCopy.textRange.characterAttributes.horizontalScale = 100;
textFrameCopy.textRange.characterAttributes.verticalScale = 100;
// move transformed text frame back to old center point
var new_center_x, new_center_y;
var max_iter = 5;
while (--max_iter > 0) {
bnds = textFrameCopy.geometricBounds;
new_center_x = (bnds[0] + bnds[2]) * 0.5;
new_center_y = (bnds[1] + bnds[3]) * 0.5;
textFrameCopy.translate(old_center_x - new_center_x, old_center_y - new_center_y);
}
var bounds = textFrameCopy.geometricBounds;
textFrameCopy.textRange.characterAttributes.fillColor = getRGBColor(250, 50, 50);
textFrameCopy.remove();
// reset selection
activeDocument.selection = oldSelection;
return bounds;
}
function getRGBColor(r,g,b) {
var col = new RGBColor();
col.red = r || 0;
col.green = g || 0;
col.blue = b || 0;
return col;
}
function getAnchorPoint(untransformedBounds, matrix, hAlign, vAlign, sx, sy) {
var center_x = (untransformedBounds[0] + untransformedBounds[2]) * 0.5,
center_y = (untransformedBounds[1] + untransformedBounds[3]) * 0.5,
anchor_x = (hAlign == 'left' ? untransformedBounds[0] :
(hAlign == 'center' ? center_x : untransformedBounds[2])),
anchor_y = (vAlign == 'top' ? untransformedBounds[1] :
(vAlign == 'bottom' ? untransformedBounds[3] : center_y)),
anchor_dx = (anchor_x - center_x),
anchor_dy = (anchor_y - center_y);
var mat = app.concatenateMatrix(app.getScaleMatrix(sx*100, sy*100), matrix);
var t_anchor_x = center_x + mat.mValueA * anchor_dx + mat.mValueC * anchor_dy,
t_anchor_y = center_y + mat.mValueB * anchor_dx + mat.mValueD * anchor_dy;
return [t_anchor_x, t_anchor_y];
}
function hideElementsOutsideArtboardRect(artbnds) {
var hidden = [], all_groups;
checkLayers(doc.layers);
function checkLayers(layers) {
for (var lid=0; lid<layers.length; lid++) {
var layer = layers[lid];
if (layer.visible) { // only deal with visible layers
var checkItemGroups = [layer.pathItems, layer.symbolItems, layer.compoundPathItems];
all_groups = [];
traverseGroups(layer);
// feedback.push('layer.groupItems '+layer.groupItems.length);
// alert('groups: '+groups.length);
for (var g=0; g<all_groups.length; g++) {
checkItemGroups.push(all_groups[g].pathItems);
checkItemGroups.push(all_groups[g].symbolItems);
checkItemGroups.push(all_groups[g].compoundPathItems);
}
for (var cig=0; cig<checkItemGroups.length; cig++) {
for (var item_i=0; item_i<checkItemGroups[cig].length; item_i++) {
var check_item = checkItemGroups[cig][item_i],
item_bnds = check_item.visibleBounds;
// bounds are [left,-top,right,-bottom]
if (item_bnds[0] > artbnds[2] ||
item_bnds[2] < artbnds[0] ||
item_bnds[1] < artbnds[3] ||
item_bnds[3] > artbnds[1]) {
if (!check_item.hidden) {
hidden.push(check_item);
check_item.hidden = true;
}
}
}
}
if (layer.layers.length > 0) checkLayers(layer.layers);
}
}
function traverseGroups(groupItems) {
for (var g=0;g<groupItems.length;g++) {
// check group bounds
var bnds = groupItems[g].visibleBounds;
if (bnds[0] > artbnds[2] || bnds[2] < artbnds[0] || bnds[1] < artbnds[3] || bnds[3] > artbnds[1]) {
// group entirely out of artboard, so ignore
groupItems[g].hidden = true;
hidden.push(groupItems[g]);
} else {
// recursively check sub-groups
all_groups.push(groupItems[g]);
if (groupItems[g].groupItems.length > 0) {
getGroups(groupItems[g].groupItems);
}
}
}
}
}
return hidden;
}
function round(number, precision) {
var d = Math.pow(10, precision || 0);
return Math.round(number * d) / d;
} |
<<<<<<<
NetInfo.isConnected.removeEventListener('connectionChange', this.handleConnectivityChange);
},
=======
NetInfo.isConnected.removeEventListener('change', this.handleConnectivityChange);
}
>>>>>>>
NetInfo.isConnected.removeEventListener('connectionChange', this.handleConnectivityChange);
} |
<<<<<<<
const { render, fireEvent, cleanup } = require('@marko/testing-library');
const template = require('..');
=======
const { render, fireEvent, cleanup, wait } = require('@marko/testing-library');
>>>>>>>
const { render, fireEvent, cleanup, wait } = require('@marko/testing-library');
const template = require('..'); |
<<<<<<<
return notificationNode;
=======
this.updateStatusBarIcon(true);
>>>>>>>
this.updateStatusBarIcon(true);
return notificationNode; |
<<<<<<<
console.log('Initializing npm...');
npm.load({}, function() {
// Bootstrap routes
require('./config/routes')(app);
var logo = "\n\n\n ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` \n";
logo += " ,` ,.\n";
logo += ",` ,\n";
logo += ", ,\n";
logo += ", . ,\n";
logo += ", , ,\n";
logo += ", `, ,\n";
logo += ", ,. ,\n";
logo += ", ,, ,\n";
logo += ", ,,, ,\n";
logo += ", ,,,. ,\n";
logo += ", .,,, ,\n";
logo += ", `,,,, ,\n";
logo += ", ,,,,` ,\n";
logo += ", ,,,,, ,\n";
logo += ", ,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,,. ,\n";
logo += ", .,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,` ,\n";
logo += ", ,,,,,, ,\n";
logo += ", ,,,,, ,\n";
logo += ", ,,,, ,\n";
logo += ", ,,,, ,\n";
logo += ", ,,,` ,\n";
logo += ", `,,. ,\n";
logo += ", ,,, ,\n";
logo += ", ,, ,\n";
logo += ", `, ,\n";
logo += ", , ,\n";
logo += ", ` ,\n";
logo += ", ` ,\n";
logo += ", ,\n";
logo += "`, .,\n";
logo += " .,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, \n\n\n\n";
console.log(logo.magenta);
console.log('Lightning started on port: ' + port);
console.log('Running database: ' + dbConfig.dialect);
server.listen(port);
});
=======
// Bootstrap routes
require('./config/routes')(app);
server.listen(port);
var logo = "\n\n\n ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` \n";
logo += " ,` ,.\n";
logo += ",` ,\n";
logo += ", ,\n";
logo += ", . ,\n";
logo += ", , ,\n";
logo += ", `, ,\n";
logo += ", ,. ,\n";
logo += ", ,, ,\n";
logo += ", ,,, ,\n";
logo += ", ,,,. ,\n";
logo += ", .,,, ,\n";
logo += ", `,,,, ,\n";
logo += ", ,,,,` ,\n";
logo += ", ,,,,, ,\n";
logo += ", ,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,,. ,\n";
logo += ", .,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,` ,\n";
logo += ", ,,,,,, ,\n";
logo += ", ,,,,, ,\n";
logo += ", ,,,, ,\n";
logo += ", ,,,, ,\n";
logo += ", ,,,` ,\n";
logo += ", `,,. ,\n";
logo += ", ,,, ,\n";
logo += ", ,, ,\n";
logo += ", `, ,\n";
logo += ", , ,\n";
logo += ", ` ,\n";
logo += ", ` ,\n";
logo += ", ,\n";
logo += "`, .,\n";
logo += " .,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, \n\n\n\n";
console.log(logo.magenta);
console.log('Lightning started on port: ' + port);
console.log('Running database: ' + dbConfig.dialect);
module.exports = server;
>>>>>>>
console.log('Initializing npm...');
npm.load({}, function() {
// Bootstrap routes
require('./config/routes')(app);
var logo = "\n\n\n ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` \n";
logo += " ,` ,.\n";
logo += ",` ,\n";
logo += ", ,\n";
logo += ", . ,\n";
logo += ", , ,\n";
logo += ", `, ,\n";
logo += ", ,. ,\n";
logo += ", ,, ,\n";
logo += ", ,,, ,\n";
logo += ", ,,,. ,\n";
logo += ", .,,, ,\n";
logo += ", `,,,, ,\n";
logo += ", ,,,,` ,\n";
logo += ", ,,,,, ,\n";
logo += ", ,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,,. ,\n";
logo += ", .,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,,,,,,,,,, ,\n";
logo += ", ,,,,,` ,\n";
logo += ", ,,,,,, ,\n";
logo += ", ,,,,, ,\n";
logo += ", ,,,, ,\n";
logo += ", ,,,, ,\n";
logo += ", ,,,` ,\n";
logo += ", `,,. ,\n";
logo += ", ,,, ,\n";
logo += ", ,, ,\n";
logo += ", `, ,\n";
logo += ", , ,\n";
logo += ", ` ,\n";
logo += ", ` ,\n";
logo += ", ,\n";
logo += "`, .,\n";
logo += " .,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, \n\n\n\n";
console.log(logo.magenta);
console.log('Lightning started on port: ' + port);
console.log('Running database: ' + dbConfig.dialect);
server.listen(port);
});
module.exports = server; |
<<<<<<<
=======
// Sanity check that pepper is not true normally, as otherwise all the following tests would pass for the wrong reasons!
>>>>>>> |
<<<<<<<
Command.prototype.description = function(str, argsDescription) {
if (0 === arguments.length) return this._description;
=======
Command.prototype.description = function(str) {
if (arguments.length === 0) return this._description;
>>>>>>>
Command.prototype.description = function(str, argsDescription) {
if (arguments.length === 0) return this._description;
<<<<<<<
var commands = this.prepareCommands();
var width = this.padWidth();
=======
var commands = this.commands.filter(function(cmd) {
return !cmd._noHelp;
}).map(function(cmd) {
var args = cmd._args.map(function(arg) {
return humanReadableArgName(arg);
}).join(' ');
return [
cmd._name +
(cmd._alias ? '|' + cmd._alias : '') +
(cmd.options.length ? ' [options]' : '') +
(args ? ' ' + args : ''),
cmd._description
];
});
var width = commands.reduce(function(max, command) {
return Math.max(max, command[0].length);
}, 0);
>>>>>>>
var commands = this.prepareCommands();
var width = this.padWidth();
<<<<<<<
' Commands:'
, ''
, commands.map(function(cmd) {
=======
'',
' Commands:',
'',
commands.map(function(cmd) {
>>>>>>>
' Commands:',
'',
commands.map(function(cmd) {
<<<<<<<
' Options:'
, ''
, '' + this.optionHelp().replace(/^/gm, ' ')
, ''
=======
'',
' Options:',
'',
'' + this.optionHelp().replace(/^/gm, ' '),
''
>>>>>>>
' Options:',
'',
'' + this.optionHelp().replace(/^/gm, ' '),
'' |
<<<<<<<
this.canvas = null;
this.cb = null;
this.level = null;
this.numChildren = 2;
this.children = [];
this.IDs = sender.getIDs(2);
this.numChildrenRun = 0;
this.childComplete = function() {
if (++this.numChildrenRun == this.numChildren) {
this.cb(this.level);
} else {
var index = this.numChildrenRun;
this.children[index].begin(this.canvas);
}
};
=======
var RunTransparent = function (vertexShaderText, fragmentShaderText, SusanImage, SusanModel, canvasName, alp, ID) {
var WebGL;
var gl;
var canvas = getCanvas(canvasName);
gl = getGL("#" + canvasName);
WebGL = true;
if (!gl) {
console.log('WebGL not supported, falling back on experimental-webgl');
WebGL = false;
gl = canvas.getContext('experimental-webgl', {antialias: false});
}
if (!gl) {
alert('Your browser does not support WebGL');
}
gl.clearColor(0.0, 0.0, 0.0, 0.0);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
gl.enable(gl.DEPTH_TEST);
gl.enable(gl.CULL_FACE);
gl.frontFace(gl.CCW);
gl.cullFace(gl.BACK);
//
// Create shaders
//
var vertexShader = gl.createShader(gl.VERTEX_SHADER);
var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);
gl.shaderSource(vertexShader, vertexShaderText);
gl.shaderSource(fragmentShader, fragmentShaderText);
gl.compileShader(vertexShader);
if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {
console.error('ERROR compiling vertex shader!', gl.getShaderInfoLog(vertexShader));
return;
}
gl.compileShader(fragmentShader);
if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
console.error('ERROR compiling fragment shader!', gl.getShaderInfoLog(fragmentShader));
return;
}
var program = gl.createProgram();
gl.attachShader(program, vertexShader);
gl.attachShader(program, fragmentShader);
gl.linkProgram(program);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
console.error('ERROR linking program!', gl.getProgramInfoLog(program));
return;
}
gl.validateProgram(program);
if (!gl.getProgramParameter(program, gl.VALIDATE_STATUS)) {
console.error('ERROR validating program!', gl.getProgramInfoLog(program));
return;
}
//
// Create buffer
//
var susanVertices = SusanModel.meshes[0].vertices;
var susanIndices = [].concat.apply([], SusanModel.meshes[0].faces);
var susanTexCoords = SusanModel.meshes[0].texturecoords[0];
var susanNormals = SusanModel.meshes[0].normals;
var susanPosVertexBufferObject = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, susanPosVertexBufferObject);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(susanVertices), gl.STATIC_DRAW);
var susanTexCoordVertexBufferObject = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, susanTexCoordVertexBufferObject);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(susanTexCoords), gl.STATIC_DRAW);
var susanIndexBufferObject = gl.createBuffer();
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, susanIndexBufferObject);
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(susanIndices), gl.STATIC_DRAW);
var susanNormalBufferObject = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, susanNormalBufferObject);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(susanNormals), gl.STATIC_DRAW);
gl.bindBuffer(gl.ARRAY_BUFFER, susanPosVertexBufferObject);
var positionAttribLocation = gl.getAttribLocation(program, 'vertPosition');
gl.vertexAttribPointer(
positionAttribLocation, // Attribute location
3, // Number of elements per attribute
gl.FLOAT, // Type of elements
gl.FALSE,
3 * Float32Array.BYTES_PER_ELEMENT, // Size of an individual vertex
0 // Offset from the beginning of a single vertex to this attribute
);
gl.enableVertexAttribArray(positionAttribLocation);
gl.bindBuffer(gl.ARRAY_BUFFER, susanTexCoordVertexBufferObject);
var texCoordAttribLocation = gl.getAttribLocation(program, 'vertTexCoord');
gl.vertexAttribPointer(
texCoordAttribLocation, // Attribute location
2, // Number of elements per attribute
gl.FLOAT, // Type of elements
gl.FALSE,
2 * Float32Array.BYTES_PER_ELEMENT, // Size of an individual vertex
0
);
gl.enableVertexAttribArray(texCoordAttribLocation);
gl.bindBuffer(gl.ARRAY_BUFFER, susanNormalBufferObject);
var normalAttribLocation = gl.getAttribLocation(program, 'vertNormal');
gl.vertexAttribPointer(
normalAttribLocation,
3, gl.FLOAT,
gl.TRUE,
3 * Float32Array.BYTES_PER_ELEMENT,
0
);
gl.enableVertexAttribArray(normalAttribLocation);
//
// Create texture
//
var susanTexture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, susanTexture);
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texImage2D(
gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA,
gl.UNSIGNED_BYTE,
SusanImage
);
gl.bindTexture(gl.TEXTURE_2D, null);
// Tell OpenGL state machine which program should be active.
gl.useProgram(program);
var matWorldUniformLocation = gl.getUniformLocation(program, 'mWorld');
var matViewUniformLocation = gl.getUniformLocation(program, 'mView');
var matProjUniformLocation = gl.getUniformLocation(program, 'mProj');
var worldMatrix = new Float32Array(16);
var viewMatrix = new Float32Array(16);
var projMatrix = new Float32Array(16);
mat4.identity(worldMatrix);
//mat4.lookAt(viewMatrix, [0, 0, -8], [0, 0, 0], [0, 1, 0]);
if(canvasName == 'transparent_susan') mat4.lookAt(viewMatrix, [0, 0, -5], [0, 0, 0], [0, 1, 0]);
else mat4.lookAt(viewMatrix, [0, 0, -120], [0, 0, 0], [0, 1, 0]);
mat4.perspective(projMatrix, glMatrix.toRadian(45), canvas.width / canvas.height, 0.1, 1000.0);
gl.uniformMatrix4fv(matWorldUniformLocation, gl.FALSE, worldMatrix);
gl.uniformMatrix4fv(matViewUniformLocation, gl.FALSE, viewMatrix);
gl.uniformMatrix4fv(matProjUniformLocation, gl.FALSE, projMatrix);
var xRotationMatrix = new Float32Array(16);
var yRotationMatrix = new Float32Array(16);
//
// Lighting information
//
gl.useProgram(program);
var ambientUniformLocation = gl.getUniformLocation(program, 'ambientLightIntensity');
var sunlightDirUniformLocation = gl.getUniformLocation(program, 'sun.direction');
var sunlightDiffuse = gl.getUniformLocation(program, 'sun.diffuse');
var sunlightSpecular = gl.getUniformLocation(program, 'sun.specular');
var uAlpha = gl.getUniformLocation(program, 'uAlpha');
gl.uniform3f(ambientUniformLocation, 0.3, 0.3, 0.3);
gl.uniform3f(sunlightDirUniformLocation, 0.8, -0.8, -0.8);
gl.uniform3f(sunlightDiffuse, 0.75, 0.75, 1.0);
gl.uniform3f(sunlightSpecular, 0.8, 0.8, 0.8);
gl.uniform1f(uAlpha, alp / 100);
//
// Main render loop
//
var identityMatrix = new Float32Array(16);
mat4.identity(identityMatrix);
var angle = 0;
var count = 10;
var ven, ren;
var identityMatrix = new Float32Array(16);
mat4.identity(identityMatrix);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE);
gl.disable(gl.DEPTH_TEST);
gl.enable(gl.BLEND);
gl.clearColor(0.0, 0.0, 0.0, 1.0);
gl.clear(gl.DEPTH_BUFFER_BIT | gl.COLOR_BUFFER_BIT);
//ctx.font = "48px";
var loop = function () {
angle = count++ / 20;
mat4.rotate(yRotationMatrix, identityMatrix, angle, [0, 1, 0]);
mat4.rotate(xRotationMatrix, identityMatrix, -1.5, [1, 0, 0]);
mat4.mul(worldMatrix, yRotationMatrix, xRotationMatrix);
gl.uniformMatrix4fv(matWorldUniformLocation, gl.FALSE, worldMatrix);
gl.clear(gl.DEPTH_BUFFER_BIT | gl.COLOR_BUFFER_BIT);
gl.bindTexture(gl.TEXTURE_2D, susanTexture);
gl.activeTexture(gl.TEXTURE0);
gl.drawElements(gl.TRIANGLES, susanIndices.length, gl.UNSIGNED_SHORT, 0);
//ctx.fillText("Hello world", 9, 50);
if(count == 50){
sender.getData(gl, ID);
}
>>>>>>>
this.canvas = null;
this.cb = null;
this.level = null;
this.numChildren = 4;
this.children = [];
this.IDs = sender.getIDs(this.numChildren);
this.numChildrenRun = 0;
this.childComplete = function() {
if (++this.numChildrenRun == this.numChildren) {
this.cb(this.level);
} else {
var index = this.numChildrenRun;
this.children[index].begin(this.canvas);
}
};
<<<<<<<
self.children.push(new RunTransparent(vsText, fsText, img, modelObj, 0, self));
=======
var test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_susan', 100, self.IDs[0]);
>>>>>>>
self.children.push(new RunTransparent(vsText, fsText, img, modelObj, 100, 0, self));
<<<<<<<
self.children.push(new RunTransparent(vsText, fsText, img, modelObj, 1, self));
=======
var test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_9', 9, self.IDs[1]);
test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_10', 10, self.IDs[2]);
test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_11', 11, self.IDs[3]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_39', 39, self.IDs[4]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_40', 40, self.IDs[5]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_41', 41, self.IDs[6]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_69', 69, self.IDs[7]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_70', 70, self.IDs[8]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_71', 71, self.IDs[9]);
>>>>>>>
self.children.push(new RunTransparent(vsText, fsText, img, modelObj, 9, 1, self));
self.children.push(new RunTransparent(vsText, fsText, img, modelObj, 10, 2, self));
self.children.push(new RunTransparent(vsText, fsText, img, modelObj, 11, 3, self));
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_39', 39, self.IDs[4]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_40', 40, self.IDs[5]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_41', 41, self.IDs[6]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_69', 69, self.IDs[7]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_70', 70, self.IDs[8]);
//test = new RunTransparent(vsText, fsText, img, modelObj, 'transparent_simple_71', 71, self.IDs[9]); |
<<<<<<<
getGL = function(canvas) {
=======
getCanvas = function(canvasName) {
var canvas = $('#' + canvasName);
if(!canvas[0]){
$('#test_canvas').append("<canvas id='" + canvasName + "' width='256' height='256'></canvas>");
}
return canvas = $('#' + canvasName)[0];
}
getGL = function(canvasSelector) {
var canvas = $(canvasSelector)[0];
>>>>>>>
getCanvas = function(canvasName) {
var canvas = $('#' + canvasName);
if(!canvas[0]){
$('#test_canvas').append("<canvas id='" + canvasName + "' width='256' height='256'></canvas>");
}
return canvas = $('#' + canvasName)[0];
}
getGL = function(canvas) { |
<<<<<<<
var textInput = new Element('textArea', {'type': 'text', 'name': data.name}).hide();
textInput.disabled = true;
textInput.id = "cancer_notes_" + cancerName;
var expandNotes = new Element('label', {'class': 'clickable cancer-notes', 'for': textInput.id}).update("<span class='fa fa-file-text-o'></span>");
var toggleNotes = (function(textInput, expandNotes){
return function(){
if (textInput.disabled == true) {
textInput.disabled = false;
textInput.show();
expandNotes.hide();
} else if (textInput.value == "") {
textInput.hide();
textInput.disabled = true;
expandNotes.show()
}
};
})(textInput, expandNotes);
var enableNotes = (function(expandNotes, textInput, toggleNotes){
return function(){
expandNotes.observe('click', toggleNotes);
textInput.observe('blur', toggleNotes);
expandNotes.removeClassName('disabled');
};
})(expandNotes, textInput, toggleNotes);
var disableNotes = (function(expandNotes, textInput, toggleNotes){
return function(){
expandNotes.stopObserving('click', toggleNotes);
textInput.stopObserving('blur', toggleNotes);
textInput.value="";
textInput.hide();
textInput.disabled = true;
expandNotes.show()
expandNotes.addClassName('disabled');
};
})(expandNotes, textInput, toggleNotes);
cancersUIElements.push({"name": cancerName, "status": select, "age": selectAge, "notes": textInput, "enableNotes": enableNotes});
=======
var spanSelect = spanSelectProto.cloneNode(true);
var select = spanSelect.firstChild;
select.id = "cancer_status_" + cancerName;
>>>>>>>
var spanSelect = spanSelectProto.cloneNode(true);
var select = spanSelect.firstChild;
select.id = "cancer_status_" + cancerName;
var textInput = new Element('textArea', {'type': 'text', 'name': data.name}).hide();
textInput.disabled = true;
textInput.id = "cancer_notes_" + cancerName;
var expandNotes = new Element('label', {'class': 'clickable cancer-notes', 'for': textInput.id}).update("<span class='fa fa-file-text-o'></span>");
var toggleNotes = (function(textInput, expandNotes){
return function(){
if (textInput.disabled == true) {
textInput.disabled = false;
textInput.show();
expandNotes.hide();
} else if (textInput.value == "") {
textInput.hide();
textInput.disabled = true;
expandNotes.show()
}
};
})(textInput, expandNotes);
var enableNotes = (function(expandNotes, textInput, toggleNotes){
return function(){
expandNotes.observe('click', toggleNotes);
textInput.observe('blur', toggleNotes);
expandNotes.removeClassName('disabled');
};
})(expandNotes, textInput, toggleNotes);
var disableNotes = (function(expandNotes, textInput, toggleNotes){
return function(){
expandNotes.stopObserving('click', toggleNotes);
textInput.stopObserving('blur', toggleNotes);
textInput.value="";
textInput.hide();
textInput.disabled = true;
expandNotes.show()
expandNotes.addClassName('disabled');
};
})(expandNotes, textInput, toggleNotes);
<<<<<<<
var statusSelect = container.down('select[id="cancer_status_' + cancerName + '"]');
var ageSelect = container.down('select[id="cancer_age_' + cancerName + '"]');
var notesInput = container.down('"#cancer_notes_' + cancerName + '"');
var enableNotesIcon = container.down("label[for=" + notesInput.id + "]");
=======
for (var i = 0; i < cancerList.length; i++) {
var cancerName = cancerList[i];
>>>>>>>
for (var i = 0; i < cancerList.length; i++) {
var cancerName = cancerList[i];
<<<<<<<
if (value[cancerName].hasOwnProperty("notes") && value[cancerName].notes != "") {
notesInput.value = value[cancerName].notes;
notesInput.show();
notesInput.disabled = false;
enableNotesIcon.hide();
} else {
notesInput.hide();
notesInput.disabled = true;
enableNotesIcon.show();
enableNotesIcon.removeClassName('disabled');
}
ageSelect.enable();
} else {
var optionStatus = statusSelect.down('option[value=""]');
=======
if (value[cancerName].hasOwnProperty("ageAtDiagnosis")) {
var ageOption = ageSelect.down('option[value="' + value[cancerName].ageAtDiagnosis + '"]');
} else {
var ageOption = ageSelect.down('option[value=""]');
}
ageSelect.enable();
} else {
var optionStatus = statusSelect.down('option[value=""]');
>>>>>>>
if (value[cancerName].hasOwnProperty("ageAtDiagnosis")) {
var ageOption = ageSelect.down('option[value="' + value[cancerName].ageAtDiagnosis + '"]');
} else {
var ageOption = ageSelect.down('option[value=""]');
}
if (value[cancerName].hasOwnProperty("notes") && value[cancerName].notes != "") {
notesInput.value = value[cancerName].notes;
notesInput.show();
notesInput.disabled = false;
enableNotesIcon.hide();
} else {
notesInput.hide();
notesInput.disabled = true;
enableNotesIcon.show();
enableNotesIcon.removeClassName('disabled');
}
ageSelect.enable();
} else {
var optionStatus = statusSelect.down('option[value=""]');
<<<<<<<
ageSelect.disable();
notesInput.value = "";
notesInput.hide();
notesInput.disabled = true;
if(enableNotesIcon){
enableNotesIcon.show();
enableNotesIcon.addClassName('disabled');
};
}
if (optionStatus) {
optionStatus.selected = 'selected';
=======
ageSelect.disable();
}
if (optionStatus) {
optionStatus.selected = 'selected';
}
if (ageOption) {
ageOption.selected = 'selected';
}
>>>>>>>
ageSelect.disable();
notesInput.value = "";
notesInput.hide();
notesInput.disabled = true;
if(enableNotesIcon){
enableNotesIcon.show();
enableNotesIcon.addClassName('disabled');
};
}
if (optionStatus) {
optionStatus.selected = 'selected';
}
if (ageOption) {
ageOption.selected = 'selected';
} |
<<<<<<<
function getFBUserIDByName(fb_api, name){
return Q.nfcall(api.getUserID, name)
.then( data => { return data[0].userID;});
}
=======
>>>>>>>
function getFBUserIDByName(fb_api, name){
return Q.nfcall(api.getUserID, name)
.then( data => { return data[0].userID;});
} |
<<<<<<<
import Cookies from "universal-cookie";
import axios from "axios/index";
import {API_SERVER} from "../../config";
=======
import {h, Component, render} from 'preact';
>>>>>>>
<<<<<<<
const deleteTokenCookie = () => {
const cookies = new Cookies();
cookies.remove(TOKEN_COOKIE);
}
const getToken = () => {
const cookies = new Cookies();
return cookies.get(TOKEN_COOKIE);
}
=======
const renderElement = (content, element_id) => {
let element = document.getElementById(element_id);
render(content, element, element.lastChild);
}
const passwordsMatch = (formData) => {
//If there is no confirm_password field (like signin page), return true
return formData.confirm_password === undefined || formData.password === formData.confirm_password;
}
>>>>>>>
<<<<<<<
const setTokenCookie = (val) => {
const cookies = new Cookies();
cookies.set(TOKEN_COOKIE, val, {path: '/'});
}
const setStateValue = (key, value, component) => {
const stateObject = {};
stateObject[key] = value;
component.setState(stateObject);
}
const validEmail = (email) => {
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(String(email).toLowerCase());
};
const validPassword = (password) => {
const re = /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{6,}$/;
return re.test(String(password));
};
const passwordsMatch = (password1, password2) => {
return password1 === password2;
}
/**
* Checks whether any of the fields are empty
* Checks whether confirm_password matches password
* Checks whether password is of minimum 6 characters & that it has atleast one number,
* one letter, & atleast one specail character.
* Checks whether the email address is of a valid format
*/
const formIsValid = (args) => {
let {message_key, formData, component, matchPasswordFields, passwordToValidate} = args;
if(!formData){
setStateValue(message_key, 'One or more fields were left empty', component);
return false;
}
if(matchPasswordFields){
const [password1, password2] = matchPasswordFields;
if (!passwordsMatch(formData[password1],formData[password2])) {
setStateValue(message_key, 'Passwords do no match.', component);
return false;
}
}
if (!validPassword(formData[passwordToValidate])) {
setStateValue(message_key,
'Password should have minimum length of 6 & it should have atleast one letter, one number, and one special character', component);
return false;
}
if (!validEmail(formData.email)) {
setStateValue(message_key, 'Email is not of the valid format', component);
return false;
}
return true;
}
// Exports below
export const handleSubmit = (args) => {
let {event, path, message_key, component, matchPasswordFields, passwordToValidate, successMessage} = args;
=======
const handleSubmit = (event, path) => {
>>>>>>>
const setStateValue = (key, value, component) => {
const stateObject = {};
stateObject[key] = value;
component.setState(stateObject);
}
const validEmail = (email) => {
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(String(email).toLowerCase());
};
const validPassword = (password) => {
const re = /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{6,}$/;
return re.test(String(password));
};
const passwordsMatch = (password1, password2) => {
return password1 === password2;
}
/**
* Checks whether any of the fields are empty
* Checks whether confirm_password matches password
* Checks whether password is of minimum 6 characters & that it has atleast one number,
* one letter, & atleast one specail character.
* Checks whether the email address is of a valid format
*/
const formIsValid = (args) => {
let {message_key, formData, component, matchPasswordFields, passwordToValidate} = args;
if(!formData){
setStateValue(message_key, 'One or more fields were left empty', component);
return false;
}
if(matchPasswordFields){
const [password1, password2] = matchPasswordFields;
if (!passwordsMatch(formData[password1],formData[password2])) {
setStateValue(message_key, 'Passwords do no match.', component);
return false;
}
}
if (!validPassword(formData[passwordToValidate])) {
setStateValue(message_key,
'Password should have minimum length of 6 & it should have atleast one letter, one number, and one special character', component);
return false;
}
if (!validEmail(formData.email)) {
setStateValue(message_key, 'Email is not of the valid format', component);
return false;
}
return true;
}
// Exports below
export const handleSubmit = (args) => {
let {event, path, message_key, component, matchPasswordFields, passwordToValidate, successMessage} = args;
<<<<<<<
axios.post(`${API_SERVER}${path}`, formData)
.then(function (response) {
setTokenCookie(response.data.token);
getSignInPromise()
.then(() => {
route(`/profile?success=${successMessage}`,true);
});
=======
makeRequest('POST', path, '', formData)
.then(function (response) {
token.setCookie(response.data.token);
populateSignInOut();
route('/profile', true);
>>>>>>>
makeRequest('POST', path, '', formData)
.then(function (response) {
token.setCookie(response.data.token);
route(`/profile?success=${successMessage}`,true);
<<<<<<<
deleteTokenCookie();
return setStateValue(message_key, 'Wrong password.', component);
=======
token.deleteCookie();
renderElement('Wrong password.', MESSAGE_AREA);
>>>>>>>
token.deleteCookie();
return setStateValue(message_key, 'Wrong password.', component);
<<<<<<<
return setStateValue(message_key, error.response.data, component);
=======
console.log(error);
renderElement(error.response.data, MESSAGE_AREA);
>>>>>>>
return setStateValue(message_key, error.response.data, component);
<<<<<<<
deleteTokenCookie();
=======
token.deleteCookie();
populateSignInOut();
route('/', true);
>>>>>>>
token.deleteCookie(); |
<<<<<<<
import {h, Component} from 'preact';
=======
import {h, Component} from 'preact';
import {Link} from 'preact-router/match';
import PropTypes from 'prop-types';
>>>>>>>
import {h, Component} from 'preact';
import {Link} from 'preact-router/match';
import PropTypes from 'prop-types';
<<<<<<<
import {handleRegisterSubmit, clearForms} from "../../js/utilities";
=======
import ResetPasswordForm from "../ResetPasswordForm";
>>>>>>>
import {handleRegisterSubmit, clearForms} from "../../js/utilities";
import ResetPasswordForm from "../ResetPasswordForm"; |
<<<<<<<
=======
import { LOGIN_PATH, RESET_PATH, REGISTER_PATH } from "../../config";
import { BASE_ENDPOINTS, makeRequest } from '../js/server-requests-utils';
>>>>>>>
import { BASE_ENDPOINTS, makeRequest } from '../js/server-requests-utils'; |
<<<<<<<
fn = impl.fn,
tagName = conf.tagName || root.tagName.toLowerCase(), attr = {},
implAttr = {},
=======
tagName = root.tagName.toLowerCase(),
attr = {},
>>>>>>>
fn = impl.fn,
tagName = conf.tagName || root.tagName.toLowerCase(), attr = {},
implAttr = {},
<<<<<<<
defineProperty(this, 'update', function tagUpdate(data) {
=======
/**
* Update the tag expressions and options
* @param { * } data - data we want to use to extend the tag properties
* @param { Boolean } isInherited - is this update coming from a parent tag?
* @returns { self }
*/
defineProperty(this, 'update', function(data, isInherited) {
>>>>>>>
/**
* Update the tag expressions and options
* @param { * } data - data we want to use to extend the tag properties
* @param { Boolean } isInherited - is this update coming from a parent tag?
* @returns { self }
*/
defineProperty(this, 'update', function(data, isInherited) {
<<<<<<<
=======
defineProperty(self, 'root', root)
// parse the named dom nodes in the looped child
// adding them to the parent as well
if (isLoop)
parseNamedElements(self.root, self.parent, null, true)
>>>>>>>
defineProperty(self, 'root', root)
// parse the named dom nodes in the looped child
// adding them to the parent as well
if (isLoop)
parseNamedElements(self.root, self.parent, null, true)
<<<<<<<
=======
// proxy function to bind updates
// dispatched from a parent tag
function onChildUpdate(data) { self.update(data, true) }
function toggle(isMount) {
// mount/unmount children
each(childTags, function(child) { child[isMount ? 'mount' : 'unmount']() })
// listen/unlisten parent (events flow one way from parent to children)
if (!parent) return
var evt = isMount ? 'on' : 'off'
// the loop tags will be always in sync with the parent automatically
if (isLoop)
parent[evt]('unmount', self.unmount)
else {
parent[evt]('update', onChildUpdate)[evt]('unmount', self.unmount)
}
}
// named elements available for fn
parseNamedElements(dom, this, childTags)
>>>>>>> |
<<<<<<<
var
reToSrc = /<yield\s+to=(['"])?@\1\s*>([\S\s]+?)<\/yield\s*>/.source,
rootEls = { tr: 'tbody', th: 'tr', td: 'tr', col: 'colgroup' },
GENERIC = 'div'
=======
var
reHasYield = /<yield\b/i,
reYieldAll = /<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/ig,
reYieldCls = /<yield\s+to=[^>]+>[\S\s]*?<\/yield\s*>\s*/ig,
reYieldDest = /<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/ig,
rsYieldSrc = '<yield\\s+to=[\'"]@[\'"]\\s*>([\\S\\s]*?)</yield\\s*>',
rootEls = { tr: 'tbody', th: 'tr', td: 'tr', col: 'colgroup' }
>>>>>>>
var
reHasYield = /<yield\b/i,
reYieldAll = /<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/ig,
reYieldCls = /<yield\s+to=[^>]+>[\S\s]*?<\/yield\s*>\s*/ig,
reYieldDest = /<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/ig,
rsYieldSrc = '<yield\\s+to=[\'"]@[\'"]\\s*>([\\S\\s]*?)</yield\\s*>',
rootEls = { tr: 'tbody', th: 'tr', td: 'tr', col: 'colgroup' },
GENERIC = 'div'
<<<<<<<
el = mkEl(GENERIC)
=======
el = mkEl('div')
if (!html) html = ''
if (impl.attrs) attr.attrs = replaceYield(impl.attrs, html)
>>>>>>>
el = mkEl(GENERIC)
if (!html) html = ''
if (impl.attrs) attr.attrs = replaceYield(impl.attrs, html)
<<<<<<<
//if ((checkIE || !startsWith(tagName, 'opt')) && SPECIAL_TAGS_REGEX.test(tagName))
if (tblTags.test(tagName))
el = specialTags(el, templ, tagName)
=======
if (tblTags.test(tagName))
el = specialTags(el, templ, tagName)
>>>>>>>
if (tblTags.test(tagName))
el = specialTags(el, templ, tagName)
<<<<<<<
// creates the root element for table and select child elements
// tr/th/td/thead/tfoot/tbody/caption/col/colgroup/option/optgroup
function specialTags(el, templ, tagName) {
var
select = tagName[0] === 'o',
parent = select ? 'select>' : 'table>'
// trim() is important here, this ensures we don't have artifacts,
// so we can check if we have only one element inside the parent
el.innerHTML = '<' + parent + templ.trim() + '</' + parent
parent = el.firstChild
// returns the immediate parent if tr/th/td/col is the only element, if not
// returns the whole tree, as this can include additional elements
if (select) {
parent.selectedIndex = -1 // for IE9, compatible w/current riot behavior
} else {
var tname = rootEls[tagName]
if (tname && parent.children.length === 1) parent = $(tname, parent)
}
return parent
=======
/*
Creates the root element for table or select child elements:
tr/th/td/thead/tfoot/tbody/caption/col/colgroup/option/optgroup
*/
function specialTags(el, templ, tagName) {
var
select = tagName[0] === 'o',
parent = select ? 'select>' : 'table>'
// trim() is important here, this ensures we don't have artifacts,
// so we can check if we have only one element inside the parent
el.innerHTML = '<' + parent + templ.trim() + '</' + parent
parent = el.firstChild
// returns the immediate parent if tr/th/td/col is the only element, if not
// returns the whole tree, as this can include additional elements
if (select) {
parent.selectedIndex = -1 // for IE9, compatible w/current riot behavior
} else {
var tname = rootEls[tagName]
if (tname && parent.children.length === 1) parent = $(tname, parent)
}
return parent
>>>>>>>
/*
Creates the root element for table or select child elements:
tr/th/td/thead/tfoot/tbody/caption/col/colgroup/option/optgroup
*/
function specialTags(el, templ, tagName) {
var
select = tagName[0] === 'o',
parent = select ? 'select>' : 'table>'
// trim() is important here, this ensures we don't have artifacts,
// so we can check if we have only one element inside the parent
el.innerHTML = '<' + parent + templ.trim() + '</' + parent
parent = el.firstChild
// returns the immediate parent if tr/th/td/col is the only element, if not
// returns the whole tree, as this can include additional elements
if (select) {
parent.selectedIndex = -1 // for IE9, compatible w/current riot behavior
} else {
var tname = rootEls[tagName]
if (tname && parent.children.length === 1) parent = $(tname, parent)
}
return parent |
<<<<<<<
import ParticpantsList from "../SyntaxChat/ParticipantsList";
=======
import { CallEnd } from "@material-ui/icons";
import { Link } from "react-router-dom";
>>>>>>>
import ParticpantsList from "../SyntaxChat/ParticipantsList";
import { CallEnd } from "@material-ui/icons";
import { Link } from "react-router-dom"; |
<<<<<<<
amaMessage: i18n.__('Thank\'s for trust us')
=======
amaMessage: 'Thanks for trusting us'
>>>>>>>
amaMessage: i18n.__('Thank\'s for trusting us') |
<<<<<<<
clearRequest: function(id)
{
if(id in this.requestsById)
{
delete this.requestsById[id];
}
for(var i = 0; i < this.requestQueue.length; i++)
{
var request = this.requestQueue[i];
=======
// Clear everything in the queue except for certain keys, speciied
// by an object of the form
//
// { key: throwawayvalue }
clearExcept: function(validKeys) {
>>>>>>>
clearRequest: function(id)
{
if(id in this.requestsById)
{
delete this.requestsById[id];
}
for(var i = 0; i < this.requestQueue.length; i++)
{
var request = this.requestQueue[i];
<<<<<<<
=======
>>>>>>>
<<<<<<<
// pull it back out of the (hidden) DOM
=======
// pull it back out of the (hidden) DOM
>>>>>>>
// pull it back out of the (hidden) DOM |
<<<<<<<
getLayers: function() {
return this.layers;
=======
// layers
getProviders: function() {
var providers = [];
for(var i = 0; i < this.layers.length; i++) {
providers.push(this.layers[i].provider);
}
return providers;
>>>>>>>
// layers
getLayers: function() {
return this.layers; |
<<<<<<<
const { removeEmpty, ifElse, merge } = require('../utils');
const envVars = require('../config/envVars');
const appName = require('../../package.json').name;
=======
const { removeEmpty, ifElse, merge, happyPackPlugin } = require('../utils');
const envVars = require('../config/envVars');
>>>>>>>
const { removeEmpty, ifElse, merge, happyPackPlugin } = require('../utils');
const envVars = require('../config/envVars');
const appName = require('../../package.json').name;
<<<<<<<
'process.env.APP_NAME': JSON.stringify(appName),
=======
'process.env.USE_DLLS': JSON.stringify(process.env.USE_DLLS),
'process.env.HAPPY_CACHE': JSON.stringify(process.env.HAPPY_CACHE),
>>>>>>>
'process.env.APP_NAME': JSON.stringify(appName),
<<<<<<<
ifProdClient(
new SWPrecacheWebpackPlugin(
{
cacheId: appName,
filename: `${appName}-sw.js`,
}
)
),
]),
module: {
rules: [
// Javascript
{
test: /\.jsx?$/,
loader: 'babel-loader',
include: [path.resolve(appRootPath, './src')],
=======
// HappyPack plugins
// @see https://github.com/amireh/happypack/
//
// HappyPack allows us to use threads to execute our loaders. This means
// that we can get parallel execution of our loaders, significantly
// improving build and recompile times.
//
// This may not be an issue for you whilst your project is small, but
// the compile times can be signficant when the project scales. A lengthy
// compile time can significantly impare your development experience.
// Therefore we employ HappyPack to do threaded execution of our
// "heavy-weight" loaders.
// HappyPack 'javascript' instance.
happyPackPlugin({
name: 'happypack-javascript',
// We will use babel to do all our JS processing.
loaders: [{
path: 'babel',
>>>>>>>
ifProdClient(
new SWPrecacheWebpackPlugin(
{
cacheId: appName,
filename: `${appName}-sw.js`,
}
)
),
// HappyPack plugins
// @see https://github.com/amireh/happypack/
//
// HappyPack allows us to use threads to execute our loaders. This means
// that we can get parallel execution of our loaders, significantly
// improving build and recompile times.
//
// This may not be an issue for you whilst your project is small, but
// the compile times can be signficant when the project scales. A lengthy
// compile time can significantly impare your development experience.
// Therefore we employ HappyPack to do threaded execution of our
// "heavy-weight" loaders.
// HappyPack 'javascript' instance.
happyPackPlugin({
name: 'happypack-javascript',
// We will use babel to do all our JS processing.
loaders: [{
path: 'babel', |
<<<<<<<
function createNotification(subject, msg, open) {
const title = `${subject.toUpperCase()} DEVSERVER`;
console.log(`==> ${title} -> ${msg}`);
=======
function createNotification(subject, msg) {
const title = `🔥 ${subject.toUpperCase()}`;
>>>>>>>
function createNotification(subject, msg, open) {
const title = `🔥 ${subject.toUpperCase()}`;
<<<<<<<
message: msg
};
if (typeof open === "string") {
notifyProps.open = open;
}
notifier.notify(notifyProps);
}
/**
* -----------------------------------------------------------------------------
* Server Bundle Server
*/
let serverListener = null;
let lastConnectionKey = 0;
const connectionMap = {};
const serverBundleCompiler = webpack(serverBundleConfig);
const serverBundlePath = path.resolve(
serverBundleConfig.output.path, `${Object.keys(serverBundleConfig.entry)[0]}.js`
);
serverBundleCompiler.plugin('done', (stats) => {
if (stats.hasErrors()) {
createNotification('server', '😵 Build failed, check console for error');
console.log(stats.toString());
return;
}
createNotification('server', '✅ Bundle built');
=======
message: msg,
});
>>>>>>>
message: msg
};
if (typeof open === "string") {
notifyProps.open = open;
}
notifier.notify(notifyProps);
<<<<<<<
createNotification('server', '🌎 Running', `http://localhost:${process.env.SERVER_PORT}`);
} catch (err) {
createNotification('server', '😵 Bundle invalid, check console for error');
console.log(err);
=======
class HotServer {
constructor(compiler) {
this.compiler = compiler;
this.listenerManager = null;
const compiledOutputPath = path.resolve(
compiler.options.output.path, `${Object.keys(compiler.options.entry)[0]}.js`
);
try {
// The server bundle will automatically start the web server just by
// requiring it. It returns the http listener too.
this.listenerManager = new ListenerManager(require(compiledOutputPath).default);
createNotification('server', '✅ Running');
} catch (err) {
createNotification('server', '😵 Bundle invalid, check console for error');
console.log(err);
}
>>>>>>>
class HotServer {
constructor(compiler) {
this.compiler = compiler;
this.listenerManager = null;
const compiledOutputPath = path.resolve(
compiler.options.output.path, `${Object.keys(compiler.options.entry)[0]}.js`
);
try {
// The server bundle will automatically start the web server just by
// requiring it. It returns the http listener too.
this.listenerManager = new ListenerManager(require(compiledOutputPath).default);
createNotification('server', '✅ Running');
} catch (err) {
createNotification('server', '😵 Bundle invalid, check console for error');
console.log(err);
} |
<<<<<<<
menu.append(new electron.remote.MenuItem({
type: 'separator'
}))
const sortedByName = this.state.saved.prefs.sortByName
menu.append(new electron.remote.MenuItem({
label: `${sortedByName ? '✓ ' : ''}Sort by Name`,
click: () => dispatch('updatePreferences', 'sortByName', !sortedByName)
}))
menu.popup(electron.remote.getCurrentWindow())
=======
menu.popup({ window: electron.remote.getCurrentWindow() })
>>>>>>>
menu.append(new electron.remote.MenuItem({
type: 'separator'
}))
const sortedByName = this.state.saved.prefs.sortByName
menu.append(new electron.remote.MenuItem({
label: `${sortedByName ? '✓ ' : ''}Sort by Name`,
click: () => dispatch('updatePreferences', 'sortByName', !sortedByName)
}))
menu.popup({ window: electron.remote.getCurrentWindow() }) |
<<<<<<<
renderDownloadPathSelector(state),
renderFileHandlers(state)
=======
renderDownloadDirSelector(state),
renderExternalPlayerSelector(state)
>>>>>>>
renderDownloadPathSelector(state),
renderFileHandlers(state),
renderExternalPlayerSelector(state)
<<<<<<<
function renderFileHandlers (state) {
var definition = {
key: 'file-handlers',
label: 'Handle Torrent Files'
}
var buttonText = state.unsaved.prefs.isFileHandler
? 'Remove default app for torrent files'
: 'Make WebTorrent the default app for torrent files'
var controls = [(
<button key='toggle-handlers'
className='btn'
onClick={toggleFileHandlers}>
{buttonText}
</button>
)]
return renderControlGroup(definition, controls)
function toggleFileHandlers () {
var isFileHandler = state.unsaved.prefs.isFileHandler
dispatch('updatePreferences', 'isFileHandler', !isFileHandler)
}
}
=======
function renderExternalPlayerSelector (state) {
return renderFileSelector({
label: 'External Media Player',
description: 'Progam that will be used to play media externally',
property: 'externalPlayerPath',
options: {
title: 'Select media player executable',
properties: [ 'openFile' ]
}
},
state.unsaved.prefs.externalPlayerPath || '<VLC>', // TODO: should we get/store vlc path instead?
function (filePath) {
if (path.extname(filePath) === '.app') {
// Get executable in packaged mac app
var name = path.basename(filePath, '.app')
filePath += '/Contents/MacOS/' + name
}
setStateValue('externalPlayerPath', filePath)
})
}
>>>>>>>
function renderFileHandlers (state) {
var definition = {
key: 'file-handlers',
label: 'Handle Torrent Files'
}
var buttonText = state.unsaved.prefs.isFileHandler
? 'Remove default app for torrent files'
: 'Make WebTorrent the default app for torrent files'
var controls = [(
<button key='toggle-handlers'
className='btn'
onClick={toggleFileHandlers}>
{buttonText}
</button>
)]
return renderControlGroup(definition, controls)
function toggleFileHandlers () {
var isFileHandler = state.unsaved.prefs.isFileHandler
dispatch('updatePreferences', 'isFileHandler', !isFileHandler)
}
}
function renderExternalPlayerSelector (state) {
return renderFileSelector({
label: 'External Media Player',
description: 'Progam that will be used to play media externally',
property: 'externalPlayerPath',
options: {
title: 'Select media player executable',
properties: [ 'openFile' ]
}
},
state.unsaved.prefs.externalPlayerPath || '<VLC>', // TODO: should we get/store vlc path instead?
function (filePath) {
if (path.extname(filePath) === '.app') {
// Get executable in packaged mac app
var name = path.basename(filePath, '.app')
filePath += '/Contents/MacOS/' + name
}
dispatch('updatePreferences', 'externalPlayerPath', filePath)
})
} |
<<<<<<<
customMarkdownLintConfig: this.customMarkdownLintConfigCM.getCodeMirror().getValue(),
dateFormatISO8601: this.refs.dateFormatISO8601.checked
=======
customMarkdownLintConfig: this.customMarkdownLintConfigCM.getCodeMirror().getValue(),
prettierConfig: this.prettierConfigCM.getCodeMirror().getValue(),
deleteUnusedAttachments: this.refs.deleteUnusedAttachments.checked
>>>>>>>
customMarkdownLintConfig: this.customMarkdownLintConfigCM.getCodeMirror().getValue(),
dateFormatISO8601: this.refs.dateFormatISO8601.checked
prettierConfig: this.prettierConfigCM.getCodeMirror().getValue(),
deleteUnusedAttachments: this.refs.deleteUnusedAttachments.checked |
<<<<<<<
// TODO: add support for windows
var child = spawn('/bin/sh', ['-c', opt.cmd], { 'cwd': opt.cwd });
child.stdout.on('data', function (data) {
console.log(data.toString());
});
child.stderr.on('data', function (data) {
console.log(data.toString().error);
});
child.on('exit', function (code) {
console.log('child process exited with code ' + code);
if (code === 0) {
next();
}
else {
next(new Error('Error running command: ' + opt.cmd));
}
}.bind(this));
/* exec(opt.cmd, { 'cwd': opt.cwd, stdio: ['pipe', 'pipe', 'pipe'] }, function (error, stdout, stderr) {
=======
// TODO: add support for windows
var child = spawn('/bin/sh', ['-c', opt.cmd], { 'cwd': opt.cwd });
child.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});
child.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
child.on('exit', function (code) {
console.log('child process exited with code ' + code);
next();
}.bind(this));
/* exec(opt.cmd, { 'cwd': opt.cwd, stdio: ['pipe', 'pipe', 'pipe'] }, function (error, stdout, stderr) {
>>>>>>>
// TODO: add support for windows
var child = spawn('/bin/sh', ['-c', opt.cmd], { 'cwd': opt.cwd });
child.stdout.on('data', function (data) {
console.log(data.toString());
});
child.stderr.on('data', function (data) {
console.log(data.toString().error);
});
child.on('exit', function (code) {
if (code === 0) {
next();
}
else {
next(new Error('Error running command: ' + opt.cmd));
}
}.bind(this));
/* exec(opt.cmd, { 'cwd': opt.cwd, stdio: ['pipe', 'pipe', 'pipe'] }, function (error, stdout, stderr) { |
<<<<<<<
eRegister = dappContract.Register().watch(function (error, result) {
if(!error){
=======
eRegister = dappContract.RegisterEvent().watch(function (error, result) {
var addr = result.addr;
>>>>>>>
eRegister = dappContract.RegisterEvent().watch(function (error, result) {
if(!error){
var addr = result.addr;
<<<<<<<
eAttend = dappContract.Attend().watch(function (error, result) {
if(!error){
=======
eAttend = dappContract.AttendEvent().watch(function (error, result) {
>>>>>>>
eAttend = dappContract.AttendEvent().watch(function (error, result) {
if(!error){
<<<<<<<
ePayback = dappContract.Payback().watch(function (error, result) {
if(!error){
var addr = result.addr;
=======
ePayback = dappContract.PaybackEvent().watch(function (error, result) {
var addr = result.addr;
>>>>>>>
ePayback = dappContract.PaybackEvent().watch(function (error, result) {
if(!error){
var addr = result.addr; |
<<<<<<<
localAddress: this.options.localAddress,
=======
logFile: this.options.logFile,
>>>>>>>
localAddress: this.options.localAddress,
logFile: this.options.logFile, |
<<<<<<<
await eventService.remove(null, { query: { id, transactionHash, confirmed: false } });
=======
logger.info('attempting to remove event:', event);
await eventService.remove(null, {
query: { id, transactionHash, status: EventStatus.WAITING },
});
>>>>>>>
await eventService.remove(null, {
query: { id, transactionHash, status: EventStatus.WAITING },
}); |
<<<<<<<
=======
DAC_ID: '5fd339eaa5ffa2a6198ecd70',
>>>>>>>
DAC_ID: '5fd339eaa5ffa2a6198ecd70', |
<<<<<<<
var className = classNames((_a = {
"hierarchical-menu-list": true
},
_a[this.props.id] = true,
_a
));
return (React.createElement("div", {"className": className}, React.createElement("div", {"className": "hierarchical-menu-list__header"}, this.props.title), this.renderOptions(0)));
var _a;
=======
return (React.createElement("div", {"className": "hierarchical-menu-list"}, React.createElement("div", {"className": "hierarchical-menu-list__header"}, this.props.title), React.createElement("div", {"className": "hierarchical-menu-list__root"}, this.renderOptions(0))));
>>>>>>>
var className = classNames((_a = {
"hierarchical-menu-list": true
},
_a[this.props.id] = true,
_a
));
return (React.createElement("div", {"className": className}, React.createElement("div", {"className": "hierarchical-menu-list__header"}, this.props.title), React.createElement("div", {"className": "hierarchical-menu-list__root"}, this.renderOptions(0))));
var _a; |
<<<<<<<
return (React.createElement(core_1.FastClick, {"handler": this.updateQueryString.bind(this, firstSuggestion)}, React.createElement("div", {"className": this.bemBlocks.container("suggestion")}, this.translate("NoHits.DidYouMean", { suggestion: firstSuggestion }))));
=======
if (!firstSuggestion)
return null;
return (React.createElement(core_1.FastClick, {"handler": this.updateQueryString(firstSuggestion)}, React.createElement("div", {"className": this.bemBlocks.container("suggestion")}, this.translate("NoHits.DidYouMean", { suggestion: firstSuggestion }))));
>>>>>>>
if (!firstSuggestion)
return null;
return (React.createElement(core_1.FastClick, {"handler": this.updateQueryString.bind(this, firstSuggestion)}, React.createElement("div", {"className": this.bemBlocks.container("suggestion")}, this.translate("NoHits.DidYouMean", { suggestion: firstSuggestion })))); |
<<<<<<<
=======
>>>>>>>
<<<<<<<
// lst is null if no window is associated (ex: some XHR)
var lst = this.getApplicableListForChannel(channel);
if (channel.URI.spec in https_everywhere_blacklist) {
this.log(DBUG, "Avoiding blacklisted " + channel.URI.spec);
if (lst) {
lst.breaking_rule(https_everywhere_blacklist[channel.URI.spec]);
}
else {
this.log(NOTE,"Failed to indicate breakage in content menu");
}
return;
}
HTTPS.replaceChannel(lst, channel, this.httpNowhereEnabled);
=======
var lst = this.getApplicableListForChannel(channel); // null if no window is associated (ex: xhr)
if (this.shouldIgnoreURI(channel, lst)) return;
HTTPS.replaceChannel(lst, channel);
>>>>>>>
// lst is null if no window is associated (ex: some XHR)
var lst = this.getApplicableListForChannel(channel);
if (this.shouldIgnoreURI(channel, lst)) return;
HTTPS.replaceChannel(lst, channel, this.httpNowhereEnabled); |
<<<<<<<
))
.add("Composite", () => (
<UniversalDataViewer
onSaveTaskOutputItem={action("onSaveTaskOutputItem")}
hideHeader
oha={{
interface: {
type: "composite",
fields: [
{
type: "data_entry",
description: "",
surveyjs: {
pages: [
{
name: "page1",
elements: [
{
type: "radiogroup",
name: "group_letter",
title: "Group Letter",
choices: [
{
value: "A",
text: "A"
},
{
value: "B",
text: "B"
},
{
value: "C",
text: "C"
}
]
},
{
type: "text",
name: "feedback",
title: "Feedback"
}
]
}
]
}
}
]
},
taskData: [
{
description: "Cucumber"
},
{
description: "Hat"
},
{
description: "Something"
}
],
taskOutput: [
{
group_letter: "A",
feedback: "this is some feedback"
},
null,
null
]
}}
/>
=======
))
.add("Audio Transcription", () => (
<UniversalDataViewer
onSaveTaskOutputItem={action("onSaveTaskOutputItem")}
hideHeader
oha={{
interface: {
type: "audio_transcription",
description: ""
},
taskData: [
{
audioUrl: "https://html5tutorial.info/media/vincent.mp3"
}
],
taskOutput: ["starry starry night"]
}}
/>
>>>>>>>
))
.add("Audio Transcription", () => (
<UniversalDataViewer
onSaveTaskOutputItem={action("onSaveTaskOutputItem")}
hideHeader
oha={{
interface: {
type: "audio_transcription",
description: ""
},
taskData: [
{
audioUrl: "https://html5tutorial.info/media/vincent.mp3"
}
],
taskOutput: ["starry starry night"]
}}
/>
))
.add("Composite", () => (
<UniversalDataViewer
onSaveTaskOutputItem={action("onSaveTaskOutputItem")}
hideHeader
oha={{
interface: {
type: "composite",
fields: [
{
type: "data_entry",
description: "",
surveyjs: {
pages: [
{
name: "page1",
elements: [
{
type: "radiogroup",
name: "group_letter",
title: "Group Letter",
choices: [
{
value: "A",
text: "A"
},
{
value: "B",
text: "B"
},
{
value: "C",
text: "C"
}
]
},
{
type: "text",
name: "feedback",
title: "Feedback"
}
]
}
]
}
}
]
},
taskData: [
{
description: "Cucumber"
},
{
description: "Hat"
},
{
description: "Something"
}
],
taskOutput: [
{
group_letter: "A",
feedback: "this is some feedback"
},
null,
null
]
}}
/> |
<<<<<<<
return $( '<li class="ime-lang-title">' ).text( 'Change input language' );
}
function imeList () {
return $( '<li class="ime-list-title"></li><li><div class="ime-list"/></li>' );
}
function divider () {
return $( '<li class="ime-divider">' );
=======
return $( '<li class="ime-lang-title">' ).text( 'Other languages' );
>>>>>>>
return $( '<li class="ime-lang-title">' ).text( 'Other languages' );
}
function imeList () {
return $( '<li class="ime-list-title"></li><li><div class="ime-list"/></li>' );
}
function divider () {
return $( '<li class="ime-divider">' ); |
<<<<<<<
QUnit.module( 'jquery.ime - input method rule files test', {
setup: function () {
},
teardown: function () {
}
} );
$.each( $.ime.sources, function( inputmethodId ) {
var testDescription;
// The internal input method name helps find it in the source,
// and since it's always in Latin, it helps isolate RTL names
// from the subsequent numbers
testDescription = 'Input method rules file test for input method ' +
$.ime.sources[inputmethodId].name + ' - ' + inputmethodId;
QUnit.test( testDescription, function () {
var ime,
$input = $( '<input>' );
$input.attr( { id: inputmethodId, type: 'text' } );
$input.appendTo( '#qunit-fixture' );
$input.ime();
$input.focus();
ime = $input.data( 'ime' );
QUnit.expect( 1 );
QUnit.stop();
ime.load( inputmethodId ).done( function () {
QUnit.ok( true, !!$.ime.inputmethods[inputmethodId], 'Rules file for '+ inputmethodId + ' exist and loaded correctly.' );
QUnit.start();
} );
} );
} );
$.each( $.ime.languages, function ( language ) {
var language = $.ime.languages[language];
QUnit.test( 'Input method rules test for language ' + language.autonym, function () {
var i,
inputmethod,
inputmethods = language.inputmethods;
QUnit.expect( inputmethods.length );
for ( i = 0 ; i < inputmethods.length; i++ ) {
inputmethod = $.ime.sources[inputmethods[i]];
QUnit.ok( true, !!inputmethod, 'Definition for '+ inputmethods[i] + ' exist.' );
}
} );
} );
=======
function caretTest( text, start, end ) {
QUnit.test( 'Curser positioning tests -'+text+ '('+ start + ','+ end + ')' , 1, function ( assert ) {
var $ced = $( '<div contenteditable="true">' ),
correction,
position,
ime;
$( '#qunit-fixture' ).append( $ced );
$ced.ime();
ime = $ced.data( 'ime' );
$ced.html( text );
correction = ime.setCaretPosition( $ced, { start: start, end: end } );
position = ime.getCaretPosition( $ced );
assert.deepEqual( position, [start - correction[0], end + correction[1] ], 'Caret is at ' + ( start - correction[0] ) + ', ' + ( end + correction[1] ) );
} );
}
caretTests = [
['ക്', 0, 0],
['ക്', 1, 1],
['ന്ത്', 1, 3],
['ന്ത്', 1, 4],
['ക്ത്ര', 1, 4]
];
$.each( caretTests, function( i, test ) {
caretTest( test[0], test[1], test[2] );
} );
>>>>>>>
QUnit.module( 'jquery.ime - input method rule files test', {
setup: function () {
},
teardown: function () {
}
} );
$.each( $.ime.sources, function( inputmethodId ) {
var testDescription;
// The internal input method name helps find it in the source,
// and since it's always in Latin, it helps isolate RTL names
// from the subsequent numbers
testDescription = 'Input method rules file test for input method ' +
$.ime.sources[inputmethodId].name + ' - ' + inputmethodId;
QUnit.test( testDescription, function () {
var ime,
$input = $( '<input>' );
$input.attr( { id: inputmethodId, type: 'text' } );
$input.appendTo( '#qunit-fixture' );
$input.ime();
$input.focus();
ime = $input.data( 'ime' );
QUnit.expect( 1 );
QUnit.stop();
ime.load( inputmethodId ).done( function () {
QUnit.ok( true, !!$.ime.inputmethods[inputmethodId], 'Rules file for '+ inputmethodId + ' exist and loaded correctly.' );
QUnit.start();
} );
} );
} );
$.each( $.ime.languages, function ( language ) {
var language = $.ime.languages[language];
QUnit.test( 'Input method rules test for language ' + language.autonym, function () {
var i,
inputmethod,
inputmethods = language.inputmethods;
QUnit.expect( inputmethods.length );
for ( i = 0 ; i < inputmethods.length; i++ ) {
inputmethod = $.ime.sources[inputmethods[i]];
QUnit.ok( true, !!inputmethod, 'Definition for '+ inputmethods[i] + ' exist.' );
}
} );
} );
function caretTest( text, start, end ) {
QUnit.test( 'Curser positioning tests -'+text+ '('+ start + ','+ end + ')' , 1, function ( assert ) {
var $ced = $( '<div contenteditable="true">' ),
correction,
position,
ime;
$( '#qunit-fixture' ).append( $ced );
$ced.ime();
ime = $ced.data( 'ime' );
$ced.html( text );
correction = ime.setCaretPosition( $ced, { start: start, end: end } );
position = ime.getCaretPosition( $ced );
assert.deepEqual( position, [start - correction[0], end + correction[1] ], 'Caret is at ' + ( start - correction[0] ) + ', ' + ( end + correction[1] ) );
} );
}
caretTests = [
['ക്', 0, 0],
['ക്', 1, 1],
['ന്ത്', 1, 3],
['ന്ത്', 1, 4],
['ക്ത്ര', 1, 4]
];
$.each( caretTests, function( i, test ) {
caretTest( test[0], test[1], test[2] );
} );
<<<<<<<
$.each( testFixtures, function ( i, fixture ) {
=======
$.each( testFixtures, function ( i, fixture ) {
imeTest( fixture );
// Run all tests for content editable divs too
fixture.inputType = 'contenteditable';
>>>>>>>
$.each( testFixtures, function ( i, fixture ) {
imeTest( fixture );
// Run all tests for content editable divs too
fixture.inputType = 'contenteditable'; |
<<<<<<<
this.focus(); // shows the trigger in case it is hidden
var position = this.$element.offset();
=======
var that, position, top, left;
that = this;
position = this.$element.offset();
top = position.top + this.$element.outerHeight();
left = position.left + this.$element.outerWidth()
- this.$imeSetting.outerWidth();
if ( $( window ).height() - top < this.$imeSetting.outerHeight() ) {
top = position.top - this.$imeSetting.outerHeight();
this.$menu.css( 'top',
- ( this.$menu.outerHeight() +
this.$imeSetting.outerHeight()
) )
.addClass( 'position-top' );
}
>>>>>>>
this.focus(); // shows the trigger in case it is hidden
var that, position, top, left;
that = this;
position = this.$element.offset();
top = position.top + this.$element.outerHeight();
left = position.left + this.$element.outerWidth()
- this.$imeSetting.outerWidth();
if ( $( window ).height() - top < this.$imeSetting.outerHeight() ) {
top = position.top - this.$imeSetting.outerHeight();
this.$menu.css( 'top',
- ( this.$menu.outerHeight() +
this.$imeSetting.outerHeight()
) )
.addClass( 'position-top' );
} |
<<<<<<<
build(options) {
=======
build(options, continueProcessing) {
this.context = options.context || [constants.contexts.build];
>>>>>>>
build(options) {
this.context = options.context || [constants.contexts.build];
<<<<<<<
=======
this.context = options.context || [constants.contexts.upload, constants.contexts.build];
// populate options that were instantiated with initConfig to pass around
options.buildDir = 'dist/';
options.storageConfig = this.config.storageConfig;
options.events = this.events;
options.logger = this.logger;
options.config = this.config;
// load plugins
this.plugins.loadInternalPlugin('ipfs', options);
this.plugins.loadInternalPlugin('swarm', options);
>>>>>>>
this.context = options.context || [constants.contexts.upload, constants.contexts.build]; |
<<<<<<<
displayLineNumbers={config.editor.displayLineNumbers}
=======
scrollPastEnd={config.editor.scrollPastEnd}
>>>>>>>
displayLineNumbers={config.editor.displayLineNumbers}
scrollPastEnd={config.editor.scrollPastEnd} |
<<<<<<<
if (err && err !== NO_NODE) {
return cb(err);
=======
if (err === NO_NODE) {
return cb(err);
}
if (err) {
self.logger.error(err);
return;
>>>>>>>
if (err && err !== NO_NODE) {
return cb(err);
} |
<<<<<<<
import timeago from 'timeago.js';
import Button from './js/Button';
import {importData, exportData} from './js/importExport';
=======
import truncateString from './js/truncateString';
>>>>>>>
import Button from './js/Button';
import {importData, exportData} from './js/importExport';
import truncateString from './js/truncateString';
<<<<<<<
<h4 className="page-header">Import / Export</h4>
<div className="row">
<div className="col-xs-8">
<Button label='Export' clickHandler={_exportData} className='glyphicon-export'/>
<Button label='Import' clickHandler={() => {this.fileselector.click()}} className='glyphicon-import'/>
<input id="fileselector" type="file" onChange={_importData} ref={(input) => {this.fileselector = input}}/>
</div>
<div className="col-xs-8">
<p className="help-block">
Export all information about wrangled tabs. This is a convenient way to restore an old state after reinstalling the extension.
</p>
<p className="help-block">
<strong>Warning:</strong> Importing data will overwrite all existing data. There is no way back (unless you have a backup).
</p>
</div>
</div>
=======
>>>>>>>
<h4 className="page-header">Import / Export</h4>
<div className="row">
<div className="col-xs-8">
<Button label='Export' clickHandler={_exportData} className='glyphicon-export'/>
<Button label='Import' clickHandler={() => {this.fileselector.click()}} className='glyphicon-import'/>
<input id="fileselector" type="file" onChange={_importData} ref={(input) => {this.fileselector = input}}/>
</div>
<div className="col-xs-8">
<p className="help-block">
Export all information about wrangled tabs. This is a convenient way to restore an old state after reinstalling the extension.
</p>
<p className="help-block">
<strong>Warning:</strong> Importing data will overwrite all existing data. There is no way back (unless you have a backup).
</p>
</div>
</div> |
<<<<<<<
)(...x)
)
// customizer -> ([f, g]) -> (x, y) -> {...f(x, y), ...g(x, y)}
export let mergeOverAllWith = _.curryN(3, (customizer, fns, ...x) =>
_.flow(
_.over(fns),
_.mergeAllWith(customizer)
)(...x)
)
// ([f, g]) -> (x, y) -> {...f(x, y), ...g(x, y)}
export let mergeOverAllArrays = mergeOverAllWith(mergeArrays)
=======
)
// (x -> y) -> k -> {k: x} -> y
export let getWith = _.curry((customizer, path, object) =>
customizer(_.get(path, object))
)
// ({a} -> {b}) -> {a} -> {a, b}
export let expandObject = _.curry((transform, obj) => ({
...obj,
...transform(obj),
}))
// k -> (a -> {b}) -> {k: a} -> {a, b}
export let expandObjectBy = _.curry((key, fn, obj) =>
expandObject(getWith(fn, key))(obj)
)
>>>>>>>
)(...x)
)
// customizer -> ([f, g]) -> (x, y) -> {...f(x, y), ...g(x, y)}
export let mergeOverAllWith = _.curryN(3, (customizer, fns, ...x) =>
_.flow(
_.over(fns),
_.mergeAllWith(customizer)
)(...x)
)
// ([f, g]) -> (x, y) -> {...f(x, y), ...g(x, y)}
export let mergeOverAllArrays = mergeOverAllWith(mergeArrays)
// (x -> y) -> k -> {k: x} -> y
export let getWith = _.curry((customizer, path, object) =>
customizer(_.get(path, object))
)
// ({a} -> {b}) -> {a} -> {a, b}
export let expandObject = _.curry((transform, obj) => ({
...obj,
...transform(obj),
}))
// k -> (a -> {b}) -> {k: a} -> {a, b}
export let expandObjectBy = _.curry((key, fn, obj) =>
expandObject(getWith(fn, key))(obj)
) |
<<<<<<<
it('mergeOverAllWith', () => {
let reverseArrayCustomizer = (objValue, srcValue) =>
srcValue.length ? srcValue.reverse() : srcValue
let qux = a => ({ x: a.map(x => x + 3) })
expect(
F.mergeOverAllWith(reverseArrayCustomizer, [() => ({}), qux])([1, 2, 3])
).to.deep.equal({ x: [6, 5, 4] })
})
it('mergeOverAllArrays', () => {
// should merge arrays
let qux = a => ({ x: a.map(x => x + 3) })
expect(F.mergeOverAllArrays([x => ({ x }), qux])([1, 2, 3])).to.deep.equal({
x: [1, 2, 3, 4, 5, 6],
})
})
=======
it('getWith', () => {
let square = x => x * x
let getWithSquare = F.getWith(square)
let foo = { a: 1, b: 3, c: 5 }
expect(getWithSquare('c', foo)).to.equal(25)
expect(F.getWith(x => x + 1, 'b', foo)).to.equal(4)
// edge case: throws when customizer is not a function
expect(() => F.getWith(undefined, 'b', foo)).to.throw(TypeError)
})
it('expandObject', () => {
let foo = { a: 1, b: 2, c: 'a' }
// should expand object
let toOptions = F.mapIndexed((v, k) => ({ label: k, value: v }))
expect(
F.expandObject(obj => ({ options: toOptions(obj) }), foo)
).to.deep.equal({
a: 1,
b: 2,
c: 'a',
options: [
{ label: 'a', value: 1 },
{ label: 'b', value: 2 },
{ label: 'c', value: 'a' },
],
})
// should override keys
expect(F.expandObject(_.invert, foo)).to.deep.equal({
'1': 'a',
'2': 'b',
a: 'c',
b: 2,
c: 'a',
})
})
it('expandObjectBy', () => {
let primeFactorization = x =>
x === 42 ? { '2': 1, '3': 1, '7': 1 } : 'dunno'
let foo = { a: 1, b: 42 }
expect(F.expandObjectBy('b', primeFactorization, foo)).to.deep.equal({
a: 1,
b: 42,
'2': 1,
'3': 1,
'7': 1,
})
expect(F.expandObjectBy('a', primeFactorization, foo)).to.deep.equal({
'0': 'd',
'1': 'u',
'2': 'n',
'3': 'n',
'4': 'o',
a: 1,
b: 42,
})
})
>>>>>>>
it('mergeOverAllWith', () => {
let reverseArrayCustomizer = (objValue, srcValue) =>
srcValue.length ? srcValue.reverse() : srcValue
let qux = a => ({ x: a.map(x => x + 3) })
expect(
F.mergeOverAllWith(reverseArrayCustomizer, [() => ({}), qux])([1, 2, 3])
).to.deep.equal({ x: [6, 5, 4] })
})
it('mergeOverAllArrays', () => {
// should merge arrays
let qux = a => ({ x: a.map(x => x + 3) })
expect(F.mergeOverAllArrays([x => ({ x }), qux])([1, 2, 3])).to.deep.equal({
x: [1, 2, 3, 4, 5, 6],
})
})
it('getWith', () => {
let square = x => x * x
let getWithSquare = F.getWith(square)
let foo = { a: 1, b: 3, c: 5 }
expect(getWithSquare('c', foo)).to.equal(25)
expect(F.getWith(x => x + 1, 'b', foo)).to.equal(4)
// edge case: throws when customizer is not a function
expect(() => F.getWith(undefined, 'b', foo)).to.throw(TypeError)
})
it('expandObject', () => {
let foo = { a: 1, b: 2, c: 'a' }
// should expand object
let toOptions = F.mapIndexed((v, k) => ({ label: k, value: v }))
expect(
F.expandObject(obj => ({ options: toOptions(obj) }), foo)
).to.deep.equal({
a: 1,
b: 2,
c: 'a',
options: [
{ label: 'a', value: 1 },
{ label: 'b', value: 2 },
{ label: 'c', value: 'a' },
],
})
// should override keys
expect(F.expandObject(_.invert, foo)).to.deep.equal({
'1': 'a',
'2': 'b',
a: 'c',
b: 2,
c: 'a',
})
})
it('expandObjectBy', () => {
let primeFactorization = x =>
x === 42 ? { '2': 1, '3': 1, '7': 1 } : 'dunno'
let foo = { a: 1, b: 42 }
expect(F.expandObjectBy('b', primeFactorization, foo)).to.deep.equal({
a: 1,
b: 42,
'2': 1,
'3': 1,
'7': 1,
})
expect(F.expandObjectBy('a', primeFactorization, foo)).to.deep.equal({
'0': 'd',
'1': 'u',
'2': 'n',
'3': 'n',
'4': 'o',
a: 1,
b: 42,
})
}) |
<<<<<<<
phoneTemplate = document.getElementById('add-phone-#i#');
emailTemplate = document.getElementById('add-email-#i#');
addressTemplate = document.getElementById('add-address-#i#');
=======
phoneTemplate = document.getElementById('add-phone-#i#');
emailTemplate = document.getElementById('add-email-#i#');
>>>>>>>
phoneTemplate = document.getElementById('add-phone-#i#');
emailTemplate = document.getElementById('add-email-#i#');
addressTemplate = document.getElementById('add-address-#i#');
<<<<<<<
deleteContactButton = document.getElementById('delete-contact');
deleteContactButton.onclick = function deleteClicked(event) {
var msg = 'Are you sure you want to remove this contact?';
Permissions.show('', msg, function onAccept() {
deleteContact(currentContact);
},function onCancel() {
Permissions.hide();
});
};
=======
customTag = document.getElementById('custom-tag');
>>>>>>>
deleteContactButton = document.getElementById('delete-contact');
customTag = document.getElementById('custom-tag');
deleteContactButton.onclick = function deleteClicked(event) {
var msg = 'Are you sure you want to remove this contact?';
Permissions.show('', msg, function onAccept() {
deleteContact(currentContact);
},function onCancel() {
Permissions.hide();
});
};
<<<<<<<
template.appendChild(removeFieldIcon(template.id));
=======
template.appendChild(removeFieldIcon('add-phone-' + tel));
>>>>>>>
template.appendChild(removeFieldIcon(template.id));
<<<<<<<
template.appendChild(removeFieldIcon(template.id));
=======
template.appendChild(removeFieldIcon('add-email-' + email));
>>>>>>>
template.appendChild(removeFieldIcon(template.id));
<<<<<<<
currentContact.tel = [];
currentContact.email = [];
currentContact.adr = [];
=======
currentContact.tel = [];
currentContact.email = [];
>>>>>>>
currentContact.tel = [];
currentContact.email = [];
currentContact.adr = [];
<<<<<<<
contact['email'][i] = emailValue;
}
};
var getAddresses = function getAddresses(contact) {
var selector = '#view-contact-form form div.address-template';
var addresses = document.querySelectorAll(selector);
for (var i = 0; i < addresses.length; i++) {
var currentAddress = addresses[i];
var arrayIndex = currentAddress.dataset.index;
var addressField = document.getElementById('streetAddress_' + arrayIndex);
var addressValue = addressField.value || '';
var selector = 'address_type_' + arrayIndex;
var typeField = document.getElementById(selector).textContent || '';
selector = 'locality_' + arrayIndex;
var locality = document.getElementById(selector).value || '';
selector = 'postalCode_' + arrayIndex;
var postalCode = document.getElementById(selector).value || '';
selector = 'countryName_' + arrayIndex;
var countryName = document.getElementById(selector).value || '';
contact['adr'] = contact['adr'] || [];
contact['adr'][i] = {
streetAddress: addressValue,
postalCode: postalCode,
locality: locality,
countryName: countryName,
type: typeField
};
=======
contact['email'][i] = emailValue;
>>>>>>>
contact['email'][i] = emailValue;
}
};
var getAddresses = function getAddresses(contact) {
var selector = '#view-contact-form form div.address-template';
var addresses = document.querySelectorAll(selector);
for (var i = 0; i < addresses.length; i++) {
var currentAddress = addresses[i];
var arrayIndex = currentAddress.dataset.index;
var addressField = document.getElementById('streetAddress_' + arrayIndex);
var addressValue = addressField.value || '';
var selector = 'address_type_' + arrayIndex;
var typeField = document.getElementById(selector).textContent || '';
selector = 'locality_' + arrayIndex;
var locality = document.getElementById(selector).value || '';
selector = 'postalCode_' + arrayIndex;
var postalCode = document.getElementById(selector).value || '';
selector = 'countryName_' + arrayIndex;
var countryName = document.getElementById(selector).value || '';
contact['adr'] = contact['adr'] || [];
contact['adr'][i] = {
streetAddress: addressValue,
postalCode: postalCode,
locality: locality,
countryName: countryName,
type: typeField
};
<<<<<<<
var insertEmptyAddress = function insertEmptyAddress() {
var addressField = {
type: TAG_OPTIONS['address-type'][0].value,
streetAddress: '',
postalCode: '',
locality: '',
countryName: '',
i: numberAddresses || 0
};
var template = utils.templates.render(addressTemplate, addressField);
template.appendChild(removeFieldIcon(template.id));
addressContainer.appendChild(template);
numberAddresses++;
};
var resetForm = function resetForm() {
=======
var resetForm = function resetForm() {
>>>>>>>
var insertEmptyAddress = function insertEmptyAddress() {
var addressField = {
type: TAG_OPTIONS['address-type'][0].value,
streetAddress: '',
postalCode: '',
locality: '',
countryName: '',
i: numberAddresses || 0
};
var template = utils.templates.render(addressTemplate, addressField);
template.appendChild(removeFieldIcon(template.id));
addressContainer.appendChild(template);
numberAddresses++;
};
var resetForm = function resetForm() { |
<<<<<<<
var elb = require("./elb");
var iam = require("./iam");
var sts = require("./sts");
=======
var cw = require("./cw");
>>>>>>>
var elb = require("./elb");
var iam = require("./iam");
var sts = require("./sts");
var cw = require("./cw");
<<<<<<<
exports.createSESClient = ses.init(genericAWSClient);
exports.createELBClient = elb.init(genericAWSClient);
exports.createIAMClient = iam.init(genericAWSClient);
exports.createSTSClient = sts.init(genericAWSClient);
=======
exports.createSESClient = ses.init(genericAWSClient);
exports.createCWClient = cw.init(genericAWSClient);
>>>>>>>
exports.createSESClient = ses.init(genericAWSClient);
exports.createELBClient = elb.init(genericAWSClient);
exports.createIAMClient = iam.init(genericAWSClient);
exports.createSTSClient = sts.init(genericAWSClient);
exports.createCWClient = cw.init(genericAWSClient); |
<<<<<<<
import theme from './mui-theme';
import '../sass/main.scss';
=======
import muiTheme from './mui-theme';
import styledTheme from './styled-theme';
>>>>>>>
import '../sass/main.scss';
import muiTheme from './mui-theme';
import styledTheme from './styled-theme'; |
<<<<<<<
<form onSubmit={this.onSearchFormSubmit.bind(this)} className="bs-navbar-form" role="search">
<div className="bs-input-group site-search">
=======
<form className="navbar-form" role="search">
<div className="input-group site-search">
>>>>>>>
<form onSubmit={this.onSearchFormSubmit.bind(this)} className="navbar-form" role="search">
<div className="input-group site-search"> |
<<<<<<<
text = '' + text; // ensure Number and Boolean are converted to String
return options.ignoreText ? '' : text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
=======
return options.ignoreText ? '' : text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
>>>>>>>
text = '' + text; // ensure Number and Boolean are converted to String
return options.ignoreText ? '' : text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"); |
<<<<<<<
import '../sass/main.scss';
=======
import stringOccurs from './utils/stringOccurs';
>>>>>>>
import '../sass/main.scss';
import stringOccurs from './utils/stringOccurs'; |
<<<<<<<
onEventClick: '=',
dayViewStart: '=',
dayViewEnd: '=',
dayViewSplit: '='
=======
onEventClick: '=',
onEventDrop: '='
>>>>>>>
onEventClick: '=',
onEventDrop: '=',
dayViewStart: '=',
dayViewEnd: '=',
dayViewSplit: '=' |
<<<<<<<
var epiColorDomain = genericDomain;
var dfreqColorDomain = genericDomain.map(function(d){return Math.round(100*(-0.18+d*0.36))/100;});
var HIColorDomain = genericDomain.map(function(d){return Math.round(100*(d*3.6))/100;});
=======
var dfreqColorDomain = genericDomain.map(function(d){return Math.round(100*(0.2+d*1.8))/100;});
>>>>>>>
var HIColorDomain = genericDomain.map(function(d){return Math.round(100*(d*3.6))/100;});
var dfreqColorDomain = genericDomain.map(function(d){return Math.round(100*(0.2+d*1.8))/100;}); |
<<<<<<<
.domain([0,1,2,3,4,5,6,7,8,9])
.range(colors);
var HIColorScale = d3.scale.linear().clamp([true])
.domain([-2.5,-2, 1.5, -1, 0.5, 0,0.5 ,1,1.5, 2])
//.domain([0,1.5, 3, 4.5, 6, 7.5, 9, 10.5, 12, 13.5])
=======
.domain([4,5,6,7,8,9,10,11,12,13])
>>>>>>>
.domain([4,5,6,7,8,9,10,11,12,13])
var HIColorScale = d3.scale.linear().clamp([true])
.domain([-2.5,-2, 1.5, -1, 0.5, 0,0.5 ,1,1.5, 2])
//.domain([0,1.5, 3, 4.5, 6, 7.5, 9, 10.5, 12, 13.5]) |
<<<<<<<
"name": "Historical Telemetry Table",
"cssClass": "icon-tabular",
"description": "A static table of all values over time for all included telemetry elements. Rows are timestamped data values for each telemetry element; columns are data fields. The number of rows is based on the range of your query. New incoming data must be manually re-queried for.",
=======
"name": "Telemetry Table",
"cssclass": "icon-tabular-realtime",
"description": "A table of values over a given time period. The table will be automatically updated with new values as they become available",
>>>>>>>
"name": "Telemetry Table",
"cssClass": "icon-tabular-realtime",
"description": "A table of values over a given time period. The table will be automatically updated with new values as they become available",
<<<<<<<
},
{
"key": "rttable",
"name": "Real-time Telemetry Table",
"cssClass": "icon-tabular-realtime",
"description": "A scrolling table of latest values for all included telemetry elements. Rows are timestamped data values for each telemetry element; columns are data fields. New incoming data is automatically added to the view.",
"priority": 860,
"features": "creation",
"delegates": [
"telemetry"
],
"inspector": tableInspector,
"contains": [
{
"has": "telemetry"
}
],
"model": {
"composition": []
},
"views": [
"rt-table",
"scrolling-table"
]
=======
>>>>>>>
<<<<<<<
"template": historicalTableTemplate,
"cssClass": "icon-tabular",
"needs": [
"telemetry"
],
"delegation": true,
"editable": false
},
{
"name": "Real-time Table",
"key": "rt-table",
"cssClass": "icon-tabular-realtime",
"template": rtTableTemplate,
=======
"cssclass": "icon-tabular-realtime",
"template": telemetryTableTemplate,
>>>>>>>
"cssClass": "icon-tabular-realtime",
"template": telemetryTableTemplate, |
<<<<<<<
=======
this.telemetryMetaData = this.openmct.telemetry.getMetadata(obj).valueMetadatas;
this.telemetryObjectIdAsString = this.objectAPI.makeKeyString(this.telemetryObject.identifier);
>>>>>>>
this.telemetryMetaData = this.openmct.telemetry.getMetadata(obj).valueMetadatas;
<<<<<<<
formatData(data) {
=======
handleSubscription(data) {
if (data) {
data = this.createNormalizedDatum(data);
}
>>>>>>>
formatData(data) {
const normalizedDatum = this.createNormalizedDatum(data); |
<<<<<<<
=======
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
>>>>>>>
<<<<<<<
//TODO: Disabled for NEM beta
xdescribe("The action capability", function () {
=======
"use strict";
describe("The action capability", function () {
>>>>>>>
describe("The action capability", function () { |
<<<<<<<
mutations[id] = domainObject.getCapability('mutation');
=======
mutations[id] = object.getCapability('mutation');
// Also cache the persistence capability for later
persists[id] = object.getCapability('persistence');
>>>>>>>
mutations[id] = object.getCapability('mutation'); |
<<<<<<<
'./webPage/plugin',
'./condition/plugin'
=======
'./webPage/plugin',
'./themes/espresso',
'./themes/maelstrom',
'./themes/snow'
>>>>>>>
'./webPage/plugin',
'./condition/plugin'
'./themes/espresso',
'./themes/maelstrom',
'./themes/snow'
<<<<<<<
WebPagePlugin,
ConditionPlugin
=======
WebPagePlugin,
Espresso,
Maelstrom,
Snow
>>>>>>>
WebPagePlugin,
ConditionPlugin
Espresso,
Maelstrom,
Snow
<<<<<<<
plugins.Condition = ConditionPlugin.default;
=======
plugins.Espresso = Espresso.default;
plugins.Maelstrom = Maelstrom.default;
plugins.Snow = Snow.default;
>>>>>>>
plugins.Condition = ConditionPlugin.default;
plugins.Espresso = Espresso.default;
plugins.Maelstrom = Maelstrom.default;
plugins.Snow = Snow.default; |
<<<<<<<
["../../src/models/CachingModelDecorator"],
function (CachingModelDecorator) {
=======
[
"../../src/models/CachingModelDecorator",
"../../src/models/ModelCacheService"
],
function (CachingModelDecorator, ModelCacheService) {
"use strict";
>>>>>>>
[
"../../src/models/CachingModelDecorator",
"../../src/models/ModelCacheService"
],
function (CachingModelDecorator, ModelCacheService) { |
<<<<<<<
'./webPage/plugin',
'./condition/plugin'
=======
'./webPage/plugin',
'./themes/espresso',
'./themes/maelstrom',
'./themes/snow'
>>>>>>>
'./webPage/plugin',
'./condition/plugin'
'./themes/espresso',
'./themes/maelstrom',
'./themes/snow'
<<<<<<<
WebPagePlugin,
ConditionPlugin
=======
WebPagePlugin,
Espresso,
Maelstrom,
Snow
>>>>>>>
WebPagePlugin,
ConditionPlugin
Espresso,
Maelstrom,
Snow
<<<<<<<
plugins.Condition = ConditionPlugin.default;
=======
plugins.Espresso = Espresso.default;
plugins.Maelstrom = Maelstrom.default;
plugins.Snow = Snow.default;
>>>>>>>
plugins.Condition = ConditionPlugin.default;
plugins.Espresso = Espresso.default;
plugins.Maelstrom = Maelstrom.default;
plugins.Snow = Snow.default; |
<<<<<<<
couldEdit = false,
lastId,
=======
lastIdPath = [],
>>>>>>>
couldEdit = false,
lastIdPath = [],
<<<<<<<
function unchanged(canRepresent, canEdit, id, key) {
=======
function unchanged(canRepresent, idPath, key) {
>>>>>>>
function unchanged(canRepresent, canEdit, idPath, key) {
<<<<<<<
id === lastId &&
key === lastKey &&
canEdit &&
couldEdit;
=======
key === lastKey &&
idPath.length === lastIdPath.length &&
idPath.every(function (id, i) {
return id === lastIdPath[i];
});
}
function getIdPath(domainObject) {
if (!domainObject) {
return [];
}
if (!domainObject.hasCapability('context')) {
return [domainObject.getId()];
}
return domainObject.getCapability('context')
.getPath().map(function (pathObject) {
return pathObject.getId();
});
>>>>>>>
key === lastKey &&
idPath.length === lastIdPath.length &&
idPath.every(function (id, i) {
return id === lastIdPath[i];
}) &&
canEdit &&
couldEdit;
}
function getIdPath(domainObject) {
if (!domainObject) {
return [];
}
if (!domainObject.hasCapability('context')) {
return [domainObject.getId()];
}
return domainObject.getCapability('context')
.getPath().map(function (pathObject) {
return pathObject.getId();
});
<<<<<<<
canEdit = !!(domainObject && domainObject.hasCapability('editor')),
id = domainObject && domainObject.getId(),
=======
idPath = getIdPath(domainObject),
>>>>>>>
canEdit = !!(domainObject && domainObject.hasCapability('editor')),
idPath = getIdPath(domainObject),
<<<<<<<
if (unchanged(canRepresent, canEdit, id, key)) {
=======
if (unchanged(canRepresent, idPath, key)) {
>>>>>>>
if (unchanged(canRepresent, canEdit, idPath, key)) {
<<<<<<<
couldEdit = canEdit;
lastId = id;
=======
lastIdPath = idPath;
>>>>>>>
lastIdPath = idPath;
couldEdit = canEdit; |
<<<<<<<
function EditController($scope, $q, navigationService) {
=======
function EditController($scope, navigationService) {
var navigatedObject;
>>>>>>>
function EditController($scope, $q, navigationService) {
var navigatedObject;
<<<<<<<
$scope.navigatedObject =
domainObject && new EditableDomainObject(domainObject, $q);
=======
navigatedObject =
domainObject && new EditableDomainObject(domainObject);
>>>>>>>
navigatedObject =
domainObject && new EditableDomainObject(domainObject, $q); |
<<<<<<<
import { createMultisigConfigFile, createSinglesigConfigFile, createSinglesigHWWConfigFile, createColdCardBlob, downloadFile, containsColdcard, formatFilename } from '../../utils/files';
=======
import { createMultisigConfigFile, createSinglesigConfigFile, createSinglesigHWWConfigFile, createColdCardBlob, downloadFile, formatFilename } from '../../utils/files';
>>>>>>>
import { createMultisigConfigFile, createSinglesigConfigFile, createSinglesigHWWConfigFile, createColdCardBlob, downloadFile, containsColdcard, formatFilename } from '../../utils/files';
<<<<<<<
=======
const importMultisigDevice = async (device, index) => {
try {
const response = await window.ipcRenderer.invoke('/xpub', {
deviceType: device.type,
devicePath: device.path,
path: getMultisigDeriationPathForNetwork(currentBitcoinNetwork) // we are assuming BIP48 P2WSH wallet
});
setImportedDevices([...importedDevices, { ...device, ...response }]);
availableDevices.splice(index, 1);
if (errorDevices.includes(device.fingerprint)) {
const errorDevicesCopy = [...errorDevices];
errorDevicesCopy.splice(errorDevices.indexOf(device.fingerprint), 1);
setErrorDevices(errorDevicesCopy);
}
setAvailableDevices([...availableDevices]);
} catch (e) {
const errorDevicesCopy = [...errorDevices];
errorDevicesCopy.push(device.fingerprint);
setErrorDevices([...errorDevicesCopy])
}
}
const importSingleSigDevice = async (device, index) => {
try {
const response = await window.ipcRenderer.invoke('/xpub', {
deviceType: device.type,
devicePath: device.path,
path: getP2shDeriationPathForNetwork(currentBitcoinNetwork) // we are assuming BIP48 P2WSH wallet
});
setImportedDevices([...importedDevices, { ...device, ...response }]);
availableDevices.splice(index, 1);
if (errorDevices.includes(device.fingerprint)) {
const errorDevicesCopy = [...errorDevices];
errorDevicesCopy.splice(errorDevices.indexOf(device.fingerprint), 1);
setErrorDevices(errorDevicesCopy);
}
setAvailableDevices([...availableDevices]);
setStep(3);
} catch (e) {
const errorDevicesCopy = [...errorDevices];
errorDevicesCopy.push(device.fingerprint);
setErrorDevices([...errorDevicesCopy])
}
}
// TODO: eventually support this for single hww implementations
const importDeviceFromFile = (parsedFile) => {
const zpub = bs58check.decode(parsedFile.p2wsh);
const xpub = zpubToXpub(zpub);
const newDevice = {
type: 'coldcard',
fingerprint: parsedFile.xfp,
xpub: xpub
}
const updatedImportedDevices = [...importedDevices, newDevice];
setImportedDevices(updatedImportedDevices)
}
const importMultisigWalletFromFile = (parsedFile) => {
const numPubKeys = Object.keys(parsedFile).filter((key) => key.startsWith('x')).length // all exports start with x
const devicesFromFile = [];
for (let i = 1; i < numPubKeys + 1; i++) {
const zpub = bs58check.decode(parsedFile[`x${i}/`].xpub);
const xpub = zpubToXpub(zpub);
const newDevice = {
type: parsedFile[`x${i}/`].hw_type,
fingerprint: parsedFile[`x${i}/`].label.substring(parsedFile[`x${i}/`].label.indexOf('Coldcard ') + 'Coldcard '.length),
xpub: xpub
};
devicesFromFile.push(newDevice);
}
const updatedImportedDevices = [...importedDevices, ...devicesFromFile];
setImportedDevices(updatedImportedDevices)
}
>>>>>>>
<<<<<<<
=======
const exportSetupFilesMultisig = async () => {
const contentType = "text/plain;charset=utf-8;";
const ccFile = createColdCardBlob(configRequiredSigners, importedDevices.length, accountName, importedDevices, currentBitcoinNetwork);
const configObject = createMultisigConfigFile(importedDevices, configRequiredSigners, accountName, config, currentBitcoinNetwork);
const encryptedConfigObject = AES.encrypt(JSON.stringify(configObject), password).toString();
const encryptedConfigFile = new Blob([decodeURIComponent(encodeURI(encryptedConfigObject))], { type: contentType });
downloadFile(ccFile, formatFilename(`${accountName}-lily-coldcard-file`, currentBitcoinNetwork, 'txt'));
// KBC-TODO: electron-dl bug requires us to wait for the first file to finish downloading before downloading the second
// this should be fixed somehow
setTimeout(() => {
downloadFile(encryptedConfigFile, formatFilename('lily_wallet_config', currentBitcoinNetwork, 'txt'))
}, 500);
setConfigFile(configObject);
}
>>>>>>> |
<<<<<<<
orsSettingsFactory[currentSettingsObj].onNext(set);
};
/**
* Sets user specific options in settings (language and units)
* @param {Object} options- Consists of routing instruction language and units km/mi
*/
orsSettingsFactory.setUserOptions = (params) => {
if (params === undefined) return;
let set = orsSettingsFactory.userOptionsSubject.getValue();
for (var k in params) {
set[k] = params[k];
}
console.dir(set);
orsSettingsFactory.userOptionsSubject.onNext(set);
=======
orsSettingsFactory[currentSettingsObj].onNext(params);
>>>>>>>
orsSettingsFactory[currentSettingsObj].onNext(set);
};
/**
* Sets user specific options in settings (language and units)
* @param {Object} options- Consists of routing instruction language and units km/mi
*/
orsSettingsFactory.setUserOptions = (params) => {
if (params === undefined) return;
let set = orsSettingsFactory.userOptionsSubject.getValue();
for (var k in params) {
set[k] = params[k];
}
orsSettingsFactory.userOptionsSubject.onNext(set); |
<<<<<<<
layerRouteDrag: L.featureGroup(),
=======
layerTmcMarker: L.featureGroup()
>>>>>>>
layerRouteDrag: L.featureGroup(),
layerTmcMarker: L.featureGroup() |
<<<<<<<
ctrl.addPolygons = (package) => {
console.log(package);
=======
ctrl.addPolygon = (package) => {
>>>>>>>
ctrl.addPolygons = (package) => {
<<<<<<<
=======
// rgb = [Math.floor((255 * rangePos) / 1), Math.floor((255 * (1 - rangePos)) / 1), 0];
>>>>>>>
<<<<<<<
=======
ctrl.mapModel.geofeatures[package.layerCode].setOpacity(0.1);
>>>>>>>
// for (var i = 0 - 1; i < package.geometry.length; i++) {
// L.polygon(package.geometry[i], {
// fillColor: package.geometry.length == 1 ? getGradientColor(1) : getGradientColor(i / (package.geometry.length - 1)),
// color: '#333333',
// weight: 1,
// fillOpacity: 0.3
// }).addTo(ctrl.mapModel.geofeatures[package.layerCode]);
// }
// ctrl.mapModel.geofeatures[package.layerCode].setOpacity(0.1); |
<<<<<<<
controller($location, orsSettingsFactory, orsObjectsFactory, orsUtilsService, orsRequestService, orsErrorhandlerService, orsParamsService, orsCookiesFactory) {
var ctrl = this;
ctrl.$routerCanReuse = function(next, prev) {
return next.urlPath === prev.urlPath;
=======
controller: ['orsSettingsFactory', 'orsParamsService', 'orsUtilsService', 'orsCookiesFactory', function(orsSettingsFactory, orsParamsService, orsUtilsService, orsCookiesFactory) {
let ctrl = this;
ctrl.$routerCanReuse = (next, prev) => {
return next.params.name === prev.params.name;
>>>>>>>
controller: ['orsSettingsFactory', 'orsParamsService', 'orsUtilsService', 'orsCookiesFactory', function(orsSettingsFactory, orsParamsService, orsUtilsService, orsCookiesFactory) {
let ctrl = this;
ctrl.$routerCanReuse = (next, prev) => {
return next.urlPath === prev.urlPath;
<<<<<<<
ctrl.$routerOnReuse = function(next, prev) {
// No need to update permalink here, this is done via settings-subject
// const settings = orsSettingsFactory.getSettings();
// const userSettings = orsSettingsFactory.getUserOptions();
// console.log(next, prev);
// orsUtilsService.parseSettingsToPermalink(settings, userSettings);
=======
// ctrl.$onChanges = function(changes) {
// console.info(changes)
// }
ctrl.$routerOnReuse = (next, prev) => {
// update permalink
const settings = orsSettingsFactory.getSettings();
const userSettings = orsSettingsFactory.getUserOptions();
orsUtilsService.parseSettingsToPermalink(settings, userSettings);
>>>>>>>
ctrl.$routerOnReuse = function(next, prev) {
// No need to update permalink here, this is done via settings-subject
// const settings = orsSettingsFactory.getSettings();
// const userSettings = orsSettingsFactory.getUserOptions();
// console.log(next, prev);
// orsUtilsService.parseSettingsToPermalink(settings, userSettings); |
<<<<<<<
describe('with interactive mode turned off', function () {
before(function (done) {
var runOptions = {
collection: {
item: {
name: 'DigestAuth',
request: {
url: 'https://postman-echo.com/digest-auth',
auth: {
type: 'digest',
digest: {
algorithm: 'MD5',
username: '{{uname}}',
password: '{{pass}}',
disableRetryRequest: true
}
}
}
}
},
environment: {
values: [{
key: 'uname',
value: 'postman'
}, {
key: 'pass',
value: 'password'
}]
},
authorizer: {
interactive: true
}
};
// perform the collection run
this.run(runOptions, function (err, results) {
testrun = results;
done(err);
});
});
it('must have completed the run', function () {
expect(testrun).be.ok();
expect(testrun.done.callCount).to.be(1);
testrun.done.getCall(0).args[0] && console.error(testrun.done.getCall(0).args[0].stack);
expect(testrun.done.getCall(0).args[0]).to.be(null);
expect(testrun.start.callCount).to.be(1);
});
it('must have sent only one request', function () {
expect(testrun.io.callCount).to.be(1);
expect(testrun.request.callCount).to.be(1);
var err = testrun.io.firstCall.args[0],
request = testrun.io.firstCall.args[4],
response = testrun.io.firstCall.args[3];
expect(err).to.be(null);
expect(request.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(response.code).to.eql(401);
});
});
=======
describe('with correct details (MD5-sess)', function () {
before(function (done) {
var runOptions = {
collection: {
item: {
name: 'DigestAuth',
request: {
url: 'https://postman-echo.com/digest-auth',
auth: {
type: 'digest',
digest: {
algorithm: 'MD5-sess',
username: '{{uname}}',
password: '{{pass}}'
}
}
}
}
},
environment: {
values: [{
key: 'uname',
value: 'postman'
}, {
key: 'pass',
value: 'password'
}]
},
authorizer: {
interactive: true
}
};
// perform the collection run
this.run(runOptions, function (err, results) {
testrun = results;
done(err);
});
});
it('must have completed the run', function () {
expect(testrun).be.ok();
expect(testrun.done.callCount).to.be(1);
testrun.done.getCall(0).args[0] && console.error(testrun.done.getCall(0).args[0].stack);
expect(testrun.done.getCall(0).args[0]).to.be(null);
expect(testrun.start.callCount).to.be(1);
});
it('must have sent two requests internally', function () {
expect(testrun.io.callCount).to.be(2);
expect(testrun.request.callCount).to.be(2);
var firstError = testrun.io.firstCall.args[0],
secondError = testrun.io.secondCall.args[0],
firstRequest = testrun.io.firstCall.args[4],
firstResponse = testrun.io.firstCall.args[3],
secondRequest = testrun.io.secondCall.args[4],
secondResponse = testrun.io.secondCall.args[3];
expect(firstError).to.be(null);
expect(secondError).to.be(null);
expect(firstRequest.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(firstResponse.code).to.eql(401);
expect(secondRequest.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(secondResponse.code).to.eql(200);
});
it('must have failed the digest authorization in first attempt', function () {
var request = testrun.request.getCall(0).args[3],
response = testrun.request.getCall(0).args[2];
expect(request.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(response.code).to.eql(401);
});
it('must have passed the digest authorization in second attempt', function () {
var request = testrun.request.getCall(1).args[3],
response = testrun.request.getCall(1).args[2];
expect(request.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(response.code).to.eql(200);
});
});
>>>>>>>
describe('with correct details (MD5-sess)', function () {
before(function (done) {
var runOptions = {
collection: {
item: {
name: 'DigestAuth',
request: {
url: 'https://postman-echo.com/digest-auth',
auth: {
type: 'digest',
digest: {
algorithm: 'MD5-sess',
username: '{{uname}}',
password: '{{pass}}'
}
}
}
}
},
environment: {
values: [{
key: 'uname',
value: 'postman'
}, {
key: 'pass',
value: 'password'
}]
},
authorizer: {
interactive: true
}
};
// perform the collection run
this.run(runOptions, function (err, results) {
testrun = results;
done(err);
});
});
it('must have completed the run', function () {
expect(testrun).be.ok();
expect(testrun.done.callCount).to.be(1);
testrun.done.getCall(0).args[0] && console.error(testrun.done.getCall(0).args[0].stack);
expect(testrun.done.getCall(0).args[0]).to.be(null);
expect(testrun.start.callCount).to.be(1);
});
it('must have sent two requests internally', function () {
expect(testrun.io.callCount).to.be(2);
expect(testrun.request.callCount).to.be(2);
var firstError = testrun.io.firstCall.args[0],
secondError = testrun.io.secondCall.args[0],
firstRequest = testrun.io.firstCall.args[4],
firstResponse = testrun.io.firstCall.args[3],
secondRequest = testrun.io.secondCall.args[4],
secondResponse = testrun.io.secondCall.args[3];
expect(firstError).to.be(null);
expect(secondError).to.be(null);
expect(firstRequest.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(firstResponse.code).to.eql(401);
expect(secondRequest.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(secondResponse.code).to.eql(200);
});
it('must have failed the digest authorization in first attempt', function () {
var request = testrun.request.getCall(0).args[3],
response = testrun.request.getCall(0).args[2];
expect(request.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(response.code).to.eql(401);
});
it('must have passed the digest authorization in second attempt', function () {
var request = testrun.request.getCall(1).args[3],
response = testrun.request.getCall(1).args[2];
expect(request.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(response.code).to.eql(200);
});
});
describe('with interactive mode turned off', function () {
before(function (done) {
var runOptions = {
collection: {
item: {
name: 'DigestAuth',
request: {
url: 'https://postman-echo.com/digest-auth',
auth: {
type: 'digest',
digest: {
algorithm: 'MD5',
username: '{{uname}}',
password: '{{pass}}',
disableRetryRequest: true
}
}
}
}
},
environment: {
values: [{
key: 'uname',
value: 'postman'
}, {
key: 'pass',
value: 'password'
}]
},
authorizer: {
interactive: true
}
};
// perform the collection run
this.run(runOptions, function (err, results) {
testrun = results;
done(err);
});
});
it('must have completed the run', function () {
expect(testrun).be.ok();
expect(testrun.done.callCount).to.be(1);
testrun.done.getCall(0).args[0] && console.error(testrun.done.getCall(0).args[0].stack);
expect(testrun.done.getCall(0).args[0]).to.be(null);
expect(testrun.start.callCount).to.be(1);
});
it('must have sent only one request', function () {
expect(testrun.io.callCount).to.be(1);
expect(testrun.request.callCount).to.be(1);
var err = testrun.io.firstCall.args[0],
request = testrun.io.firstCall.args[4],
response = testrun.io.firstCall.args[3];
expect(err).to.be(null);
expect(request.url.toString()).to.eql('https://postman-echo.com/digest-auth');
expect(response.code).to.eql(401);
});
}); |
<<<<<<<
=======
import { computed } from '@ember/object';
import { notEmpty } from '@ember/object/computed';
>>>>>>>
import { computed } from '@ember/object';
import { notEmpty } from '@ember/object/computed';
<<<<<<<
content: null,
=======
contentIsComponentHash: notEmpty('content.componentName').readOnly(),
contentIsComponentDefinition: computed('content', function() {
let contentConstructorName = this.get('content.constructor.name') || '';
return contentConstructorName.indexOf('ComponentDefinition') > -1;
}).readOnly(),
>>>>>>>
content: null,
contentIsComponentHash: notEmpty('content.componentName').readOnly(),
contentIsComponentDefinition: computed('content', function() {
let contentConstructorName = this.get('content.constructor.name') || '';
return contentConstructorName.indexOf('ComponentDefinition') > -1;
}).readOnly(), |
<<<<<<<
setInput() {
this.set('input', document.querySelector(`[id='${this.get('id')}']`));
},
init() {
this._super(...arguments);
let { id, type } = this.getProperties('id', 'type');
assert(
`ember-polaris::polaris-text-field - ${type} is not a valid type.`,
allowedTypes.indexOf(type) > -1
);
id = id || `TextField-${guidFor(this)}`;
this.setProperties({
height: null,
focus: false,
id,
});
},
didReceiveAttrs() {
this._super(...arguments);
this.checkFocus();
},
didInsertElement() {
this._super(...arguments);
this.setInput();
this.checkFocus();
},
actions: {
handleNumberChange(steps) {
let { id, onChange, value, step, min, max } = this.getProperties(
'id',
'onChange',
'value',
'step',
'min',
'max'
);
=======
let id = this.get('id');
>>>>>>>
setInput() {
this.set('input', document.querySelector(`[id='${this.get('id')}']`));
},
init() {
this._super(...arguments);
let { id } = this.get('id');
id = id || `TextField-${guidFor(this)}`;
this.setProperties({
height: null,
focus: false,
id,
});
},
didReceiveAttrs() {
this._super(...arguments);
this.checkFocus();
},
didInsertElement() {
this._super(...arguments);
this.setInput();
this.checkFocus();
},
actions: {
handleNumberChange(steps) {
let { id, onChange, value, step, min, max } = this.getProperties(
'id',
'onChange',
'value',
'step',
'min',
'max'
); |
<<<<<<<
,view({name:"blockui",visible:false, bgcolor:vec4(0.2,0.2,0.2,0.5),padding:5, borderradius:vec4(10,10,10,1), borderwidth:2, bordercolor:"black",position:"absolute", flexdirection:"column"},
//,view({name:"blockui",x:-200,bg:1,clearcolor:vec4(0,0,0,0),bgcolor:vec4(0,0,0,0),position:"absolute"},
label({text:"Block", bg:0, margin:4})
,button({padding:0,borderwidth:0, click:function(){this.removeBlock(undefined)}.bind(this),fgcolor:"white", icon:"remove",text:"delete", margin:4, fgcolor:"white", bg:0})
=======
,view({name:"blocklayer", bg:0, dataset: this.sourceset, arender:function(){
return this.renderBlocks();
}.bind(this)}
,block({name:"phone", title:"Phone", x:200, y:20})
,block({name:"tv", title:"Television", x:50, y:200})
,block({name:"tablet", title:"Tablet",x:300, y:120})
,block({name:"thing", title:"Thing",x:500, y:120})
,block({name:"a", title:"block A", x:50, y:300})
,block({name:"b", title:"block B", x:150, y:500})
,block({name:"c", title:"block C", x:250, y:400})
,block({name:"d", title:"block D", x:350, y:500})
,block({name:"e", title:"block E", x:450, y:600})
,block({name:"f", title:"block F", x:550, y:700})
>>>>>>>
,view({name:"blockui",visible:false, bgcolor:vec4(0.2,0.2,0.2,0.5),padding:5, borderradius:vec4(10,10,10,1), borderwidth:2, bordercolor:"black",position:"absolute", flexdirection:"column"},
//,view({name:"blockui",x:-200,bg:1,clearcolor:vec4(0,0,0,0),bgcolor:vec4(0,0,0,0),position:"absolute"},
label({text:"Block", bg:0, margin:4})
,button({padding:0,borderwidth:0, click:function(){this.removeBlock(undefined)}.bind(this),fgcolor:"white", icon:"remove",text:"delete", margin:4, fgcolor:"white", bg:0})
,view({name:"blocklayer", bg:0, dataset: this.sourceset, arender:function(){
return this.renderBlocks();
}.bind(this)}
,block({name:"phone", title:"Phone", x:200, y:20})
,block({name:"tv", title:"Television", x:50, y:200})
,block({name:"tablet", title:"Tablet",x:300, y:120})
,block({name:"thing", title:"Thing",x:500, y:120})
,block({name:"a", title:"block A", x:50, y:300})
,block({name:"b", title:"block B", x:150, y:500})
,block({name:"c", title:"block C", x:250, y:400})
,block({name:"d", title:"block D", x:350, y:500})
,block({name:"e", title:"block E", x:450, y:600})
,block({name:"f", title:"block F", x:550, y:700})
<<<<<<<
,this.selectorrect({name:"selectorrect"})
=======
,view({bg:false}, connection({name:"openconnector", hasball: false, visible:false}))
>>>>>>>
,this.selectorrect({name:"selectorrect"})
,view({bg:false}, connection({name:"openconnector", hasball: false, visible:false})) |
<<<<<<<
}, run.options.requester, function (err, requester) { // eslint-disable-line handle-callback-err
=======
}, function (err, requester) {
>>>>>>>
}, function (err, requester) { // eslint-disable-line handle-callback-err |
<<<<<<<
import analytics from './analytics/index';
import crash from './crash/index';
import core from './core/index';
import database from './database/index';
import messaging from './messaging/index';
import storage from './storage/index';
import auth from './auth/index';
import config from './config/index';
import performance from './perf/index';
import admob from './admob/index';
import links from './links/index';
=======
import analytics from './analytics';
import crash from './crash';
import core from './core';
import database from './database';
import messaging from './messaging';
import storage from './storage';
import auth from './auth';
import config from './config';
import performance from './perf';
import admob from './admob';
import firestore from './firestore';
>>>>>>>
import analytics from './analytics';
import crash from './crash';
import core from './core';
import database from './database';
import messaging from './messaging';
import storage from './storage';
import auth from './auth';
import config from './config';
import performance from './perf';
import admob from './admob';
import firestore from './firestore';
import links from './links/index';
<<<<<<<
admob,
links,
=======
storage,
>>>>>>>
storage,
links, |
<<<<<<<
const HEIGHT = BLOCK_COLUMN_WIDTH * -1.5 + 0.01;
const Marker = ({ barNum, offset, type }) => {
const depth = type === 'bar' ? 0.3 : type === 'beat' ? 0.2 : 0.08;
=======
const Marker = ({ beatNum, offset, type }) => {
const depth = type === 'bar' ? 0.3 : type === 'beat' ? 0.2 : 0.05;
>>>>>>>
const HEIGHT = BLOCK_COLUMN_WIDTH * -1.5 + 0.01;
const Marker = ({ beatNum, offset, type }) => {
const depth = type === 'bar' ? 0.3 : type === 'beat' ? 0.2 : 0.08;
<<<<<<<
{typeof barNum === 'number' && (
<mesh position={[SURFACE_WIDTH / 2 + textPadding, HEIGHT, offset]}>
=======
{typeof beatNum === 'number' && (
<mesh
position={[SURFACE_WIDTH / 2 + textPadding, -2.74, offset]}
rotation={[0, 0, 0]}
>
>>>>>>>
{typeof beatNum === 'number' && (
<mesh
position={[SURFACE_WIDTH / 2 + textPadding, HEIGHT, offset]}
rotation={[0, 0, 0]}
> |
<<<<<<<
export const makeGetEventsForTrack = trackId =>
createSelector(
getStartAndEndBeat,
getTracks,
({ startBeat, endBeat }, tracks) => {
return tracks[trackId].filter(
event => event.beatNum >= startBeat && event.beatNum < endBeat
);
}
);
export const getInitialTrackLightingColor = (state, trackId, startBeat) => {
=======
export const getEventForTrackAtBeat = (state, trackId, startBeat) => {
>>>>>>>
export const makeGetEventsForTrack = trackId =>
createSelector(
getStartAndEndBeat,
getTracks,
({ startBeat, endBeat }, tracks) => {
return tracks[trackId].filter(
event => event.beatNum >= startBeat && event.beatNum < endBeat
);
}
);
export const getEventForTrackAtBeat = (state, trackId, startBeat) => { |
<<<<<<<
if(isMeteor()) {
=======
if(typeof Meteor !== 'undefined') {
>>>>>>>
if(isMeteor()) {
<<<<<<<
} else if(isCordova()) {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
=======
} else if(typeof cordova === 'object') {
utils.getGlobal().requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
>>>>>>>
} else if(isCordova()) {
utils.getGlobal().requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
<<<<<<<
} else if(isCordova()) {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
=======
} else if(typeof cordova === 'object') {
utils.getGlobal().requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
>>>>>>>
} else if(isCordova()) {
utils.getGlobal().requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) { |
<<<<<<<
initAutoMode(scene);
// TODO: too bad to plop stuff onto window?
=======
>>>>>>>
initAutoMode(scene); |
<<<<<<<
=======
>>>>>>>
<<<<<<<
.y(__.dimensions[axis].yscale)
.on("brushstart", function() {
if(d3.event.sourceEvent !== null) {
d3.event.sourceEvent.stopPropagation();
}
})
=======
.y(yscale[axis])
.on("brushstart", function() {
if(d3.event.sourceEvent !== null) {
d3.event.sourceEvent.stopPropagation();
}
})
>>>>>>>
.y(__.dimensions[axis].yscale)
.on("brushstart", function() {
if(d3.event.sourceEvent !== null) {
d3.event.sourceEvent.stopPropagation();
}
})
<<<<<<<
.y(__.dimensions[axis].yscale)
.on("brushstart", function() { d3.event.sourceEvent.stopPropagation() })
=======
.y(yscale[axis])
.on("brushstart", function() {
if(d3.event.sourceEvent !== null) {
d3.event.sourceEvent.stopPropagation();
}
})
>>>>>>>
.y(__.dimensions[axis].yscale)
.on("brushstart", function() {
if(d3.event.sourceEvent !== null) {
d3.event.sourceEvent.stopPropagation();
}
}) |
<<<<<<<
.y(__.dimensions[axis].yscale)
.on("brushstart", function() { d3.event.sourceEvent.stopPropagation() })
=======
.y(yscale[axis])
.on("brushstart", function() {
if(d3.event.sourceEvent !== null) {
d3.event.sourceEvent.stopPropagation();
}
})
>>>>>>>
.y(__.dimensions[axis].yscale)
.on("brushstart", function() {
if(d3.event.sourceEvent !== null) {
d3.event.sourceEvent.stopPropagation();
}
}) |
<<<<<<<
objects.set(xoObject)
}
} catch (error) {
console.error('ERROR: xapiObjectToXo', error)
=======
if (xoObject) {
const prevId = xapiIdsToXo[xapiId]
const currId = xoObject.id
if (prevId !== currId) {
// If there was a previous XO object for this XAPI object
// (with a different id), removes it.
if (prevId) {
objects.unset(prevId)
}
xapiIdsToXo[xapiId] = currId
}
>>>>>>>
if (prevId !== currId) {
// If there was a previous XO object for this XAPI object
// (with a different id), removes it.
if (prevId) {
objects.unset(prevId)
}
xapiIdsToXo[xapiId] = currId
}
objects.set(xoObject)
}
} catch (error) {
console.error('ERROR: xapiObjectToXo', error) |
<<<<<<<
vertex = thisGl.createBuffer();
thisGl.bindBuffer(thisGl.ARRAY_BUFFER, vertex);
thisGl.bufferData(thisGl.ARRAY_BUFFER, new Float32Array([
-1, -1, 0,
1, -1, 0,
1, 1, 0,
-1, 1, 0
]), thisGl.STATIC_DRAW);
=======
vertex = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, vertex);
gl.bufferData(gl.ARRAY_BUFFER, shape.vertices, gl.STATIC_DRAW);
>>>>>>>
vertex = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, vertex);
gl.bufferData(gl.ARRAY_BUFFER, shape.vertices, gl.STATIC_DRAW);
<<<<<<<
if (this.lastRenderTime === undefined || this.lastRenderTime !== this.currentTime) {
gl.bindTexture(gl.TEXTURE_2D, this.sourceTexture);
=======
if (this.dirty) {
gl.bindTexture(gl.TEXTURE_2D, this.texture);
>>>>>>>
if (this.dirty) {
gl.bindTexture(gl.TEXTURE_2D, this.sourceTexture);
<<<<<<<
this.lastRenderTime = this.currentTime;
this.dirty = true;
}
=======
this.lastRenderTime = Date.now() / 1000;
>>>>>>>
this.lastRenderTime = Date.now() / 1000;
this.dirty = true;
}
<<<<<<<
this.lastRenderTime = this.currentTime || 0;
this.dirty = true;
=======
this.lastRenderTime = Date.now() / 1000;
this.dirty = false;
>>>>>>>
this.lastRenderTime = Date.now() / 1000;
this.dirty = true; |
<<<<<<<
test('Source Info', 10, function () {
var inputs,
seriously,
source;
Seriously.plugin('removeme', {});
seriously = new Seriously();
source = seriously.source('#colorbars');
ok(source.id >= 0, 'Source id reported');
equal(source.width, 672, 'Source width reported');
equal(source.height, 504, 'Source height reported');
equal(source.original, document.getElementById('colorbars'), 'Source original reported');
ok(seriously.isSource(source), 'isSource detects source');
ok(!seriously.isSource(null), 'isSource rejects null');
ok(!seriously.isSource(seriously.effect('removeme')), 'isSource rejects effect');
ok(!seriously.isSource(seriously.transform('2d')), 'isSource rejects transform');
ok(!seriously.isSource(seriously.target(document.createElement('canvas'))), 'isSource rejects target');
source.destroy();
ok(!seriously.isSource(source), 'isSource rejects destroyed source');
seriously.destroy();
Seriously.removePlugin('removeme');
});
=======
asyncTest('Video Source', 5, function () {
var seriously,
source,
dupSource,
target,
reformat,
video,
//for iOS
div,
// 2 x 2 pixels
data = [
127, 0, 40, 255,
34, 1, 39, 255,
126, 1, 123, 255,
34, 1, 121, 255
];
function finish() {
if (div && div.parentNode) {
div.parentNode.removeChild(div);
}
seriously.destroy();
start();
}
seriously = new Seriously();
target = seriously.target(document.createElement('canvas'));
target.width = 2;
target.height = 2;
video = document.createElement('video');
video.setAttribute('preload', 'auto');
video.addEventListener('canplaythrough', function () {
var pixels;
if (!video.videoWidth) {
console.log('Browser failed to properly report video dimensions');
}
ok(source.width === video.videoWidth && source.height === video.videoHeight,
'Source node correctly calculates size from video');
try {
pixels = target.readPixels(0, 0, 2, 2);
/*
Allow for slight variations in how different codecs interpret video pixel colors.
*/
ok(compare(pixels, data, 8), 'Video source rendered.');
} catch (e) {
ok(seriously.incompatible(), 'Cannot read pixels without WebGL support');
}
finish();
});
if (video.canPlayType('video/mp4')) {
video.src = 'media/tiny.mp4';
} else {
video.src = 'media/tiny.webm';
}
video.loop = true;
video.load();
/*
iOS will not load any part of a video until there is a touch or click event,
So we give a chance to touch to proceed. If no touch after 10 seconds, just skip the test and move on.
*/
setTimeout(function () {
if (!video.readyState) {
div = document.createElement('div');
div.innerHTML = 'Touch here to enable video test';
div.setAttribute('style', 'position: fixed; top: 0; right: 0; padding: 20px;' +
'color: darkred; background-color: lightgray; font-size: 20px; cursor: pointer;');
document.body.appendChild(div);
div.onclick = function () {
if (video && !video.readyState) {
video.load();
}
};
setTimeout(function () {
if (!video.readyState) {
console.log('Skipped video source render test');
expect(3);
finish();
}
}, 10000);
}
}, 100);
source = seriously.source(video);
equal(source.original, video, 'Video source created by passing video element');
source.destroy();
source = seriously.source('video', video);
equal(source.original, video, 'Video source created with explicit source plugin hook');
dupSource = seriously.source(video);
equal(dupSource, source, 'Trying to create a second source with the same video returns the original');
reformat = seriously.transform('reformat');
reformat.width = reformat.height = target.height;
reformat.source = source;
target.source = reformat;
});
>>>>>>>
test('Source Info', 10, function () {
var inputs,
seriously,
source;
Seriously.plugin('removeme', {});
seriously = new Seriously();
source = seriously.source('#colorbars');
ok(source.id >= 0, 'Source id reported');
equal(source.width, 672, 'Source width reported');
equal(source.height, 504, 'Source height reported');
equal(source.original, document.getElementById('colorbars'), 'Source original reported');
ok(seriously.isSource(source), 'isSource detects source');
ok(!seriously.isSource(null), 'isSource rejects null');
ok(!seriously.isSource(seriously.effect('removeme')), 'isSource rejects effect');
ok(!seriously.isSource(seriously.transform('2d')), 'isSource rejects transform');
ok(!seriously.isSource(seriously.target(document.createElement('canvas'))), 'isSource rejects target');
source.destroy();
ok(!seriously.isSource(source), 'isSource rejects destroyed source');
seriously.destroy();
Seriously.removePlugin('removeme');
});
asyncTest('Video Source', 5, function () {
var seriously,
source,
dupSource,
target,
reformat,
video,
//for iOS
div,
// 2 x 2 pixels
data = [
127, 0, 40, 255,
34, 1, 39, 255,
126, 1, 123, 255,
34, 1, 121, 255
];
function finish() {
if (div && div.parentNode) {
div.parentNode.removeChild(div);
}
seriously.destroy();
start();
}
seriously = new Seriously();
target = seriously.target(document.createElement('canvas'));
target.width = 2;
target.height = 2;
video = document.createElement('video');
video.setAttribute('preload', 'auto');
video.addEventListener('canplaythrough', function () {
var pixels;
if (!video.videoWidth) {
console.log('Browser failed to properly report video dimensions');
}
ok(source.width === video.videoWidth && source.height === video.videoHeight,
'Source node correctly calculates size from video');
try {
pixels = target.readPixels(0, 0, 2, 2);
/*
Allow for slight variations in how different codecs interpret video pixel colors.
*/
ok(compare(pixels, data, 8), 'Video source rendered.');
} catch (e) {
ok(seriously.incompatible(), 'Cannot read pixels without WebGL support');
}
finish();
});
if (video.canPlayType('video/mp4')) {
video.src = 'media/tiny.mp4';
} else {
video.src = 'media/tiny.webm';
}
video.loop = true;
video.load();
/*
iOS will not load any part of a video until there is a touch or click event,
So we give a chance to touch to proceed. If no touch after 10 seconds, just skip the test and move on.
*/
setTimeout(function () {
if (!video.readyState) {
div = document.createElement('div');
div.innerHTML = 'Touch here to enable video test';
div.setAttribute('style', 'position: fixed; top: 0; right: 0; padding: 20px;' +
'color: darkred; background-color: lightgray; font-size: 20px; cursor: pointer;');
document.body.appendChild(div);
div.onclick = function () {
if (video && !video.readyState) {
video.load();
}
};
setTimeout(function () {
if (!video.readyState) {
console.log('Skipped video source render test');
expect(3);
finish();
}
}, 10000);
}
}, 100);
source = seriously.source(video);
equal(source.original, video, 'Video source created by passing video element');
source.destroy();
source = seriously.source('video', video);
equal(source.original, video, 'Video source created with explicit source plugin hook');
dupSource = seriously.source(video);
equal(dupSource, source, 'Trying to create a second source with the same video returns the original');
reformat = seriously.transform('reformat');
reformat.width = reformat.height = target.height;
reformat.source = source;
target.source = reformat;
}); |
<<<<<<<
=======
this._type = validType;
>>>>>>>
this._type = validType;
<<<<<<<
=======
this._opacity = 1.0;
>>>>>>>
this._opacity = 1.0; |
<<<<<<<
=======
function new_array(length, val) {
val = typeof val !== 'undefined' ? val : 0;
var array = [];
var i = 0;
while (i < length) {
array[i++] = val;
}
return array;
}
>>>>>>>
<<<<<<<
=======
/**
* Parses a line of label-file data -- the only important field is the first.
*
* @param {!string} line to parse.
* @return {!number} vertex index
* @protected
*/
X.parserLBL.prototype.parseLine = function(line) {
// trim the line
line = line.replace(/^\s+|\s+$/g, '');
// split to array
var lineFields = line.split(' ');
// return the vertex index
return parseInt(lineFields[0], 10);
};
>>>>>>> |
<<<<<<<
goog.exportSymbol('X.object.prototype.file', X.object.prototype.file);
goog.exportSymbol('X.object.prototype.setCaption', X.object.prototype.setCaption);
goog.exportSymbol('X.object.prototype.setVisible', X.object.prototype.setVisible);
goog.exportSymbol('X.object.prototype.magicMode', X.object.prototype.magicMode);
goog.exportSymbol('X.object.prototype.setMagicMode', X.object.prototype.setMagicMode);
goog.exportSymbol('X.object.prototype.intersect', X.object.prototype.intersect);
goog.exportSymbol('X.object.prototype.inverse', X.object.prototype.inverse);
goog.exportSymbol('X.object.prototype.subtract', X.object.prototype.subtract);
goog.exportSymbol('X.object.prototype.union', X.object.prototype.union);
=======
goog.exportSymbol('X.object.prototype.file', X.object.prototype.file);
goog.exportSymbol('X.object.OPACITY_COMPARATOR', X.object.OPACITY_COMPARATOR);
>>>>>>>
goog.exportSymbol('X.object.prototype.file', X.object.prototype.file);
goog.exportSymbol('X.object.prototype.setCaption', X.object.prototype.setCaption);
goog.exportSymbol('X.object.prototype.setVisible', X.object.prototype.setVisible);
goog.exportSymbol('X.object.prototype.magicMode', X.object.prototype.magicMode);
goog.exportSymbol('X.object.prototype.setMagicMode', X.object.prototype.setMagicMode);
goog.exportSymbol('X.object.prototype.intersect', X.object.prototype.intersect);
goog.exportSymbol('X.object.prototype.inverse', X.object.prototype.inverse);
goog.exportSymbol('X.object.prototype.subtract', X.object.prototype.subtract);
goog.exportSymbol('X.object.prototype.union', X.object.prototype.union);
goog.exportSymbol('X.object.OPACITY_COMPARATOR', X.object.OPACITY_COMPARATOR); |
<<<<<<<
};
// export symbols (requiered for advanced compilation)
goog.exportSymbol('X.renderer',X.renderer);
goog.exportSymbol('X.renderer.prototype.getDimension',X.renderer.prototype.getDimension);
goog.exportSymbol('X.renderer.prototype.getWidth',X.renderer.prototype.getWidth);
goog.exportSymbol('X.renderer.prototype.setWidth', X.renderer.prototype.setWidth);
goog.exportSymbol('X.renderer.prototype.getHeight', X.renderer.prototype.getHeight);
goog.exportSymbol('X.renderer.prototype.setHeight', X.renderer.prototype.setHeight);
goog.exportSymbol('X.renderer.prototype.getBackgroundColor', X.renderer.prototype.getBackgroundColor);
goog.exportSymbol('X.renderer.prototype.setBackgroundColor', X.renderer.prototype.setBackgroundColor);
goog.exportSymbol('X.renderer.prototype.getContainer', X.renderer.prototype.getContainer);
goog.exportSymbol('X.renderer.prototype.setContainer', X.renderer.prototype.setContainer);
goog.exportSymbol('X.renderer.prototype.init', X.renderer.prototype.init);
goog.exportSymbol('X.renderer.prototype.setContainerById', X.renderer.prototype.setContainerById);
=======
/**
* @param vector
* @returns {goog.math.Vec2}
*/
X.renderer.prototype.convertWorldToDisplayCoordinates = function(vector) {
var view = this._camera.view();
var perspective = this._camera.perspective();
var viewPerspective = goog.math.Matrix.createIdentityMatrix(4);
viewPerspective.multiply(view);
viewPerspective.multiply(perspective);
var twoDVectorAsMatrix;
twoDVectorAsMatrix = viewPerspective.multiplyByVector(vector);
var x = (twoDVectorAsMatrix.getValueAt(0, 0) + 1) / 2.0;
x = x * this.width();
var y = (1 - twoDVectorAsMatrix.getValueAt(0, 1)) / 2.0;
y = y * this.height();
return new goog.math.Vec2(Math.round(x), Math.round(y));
};
>>>>>>>
/**
* @param vector
* @returns {goog.math.Vec2}
*/
X.renderer.prototype.convertWorldToDisplayCoordinates = function(vector) {
var view = this._camera.view();
var perspective = this._camera.perspective();
var viewPerspective = goog.math.Matrix.createIdentityMatrix(4);
viewPerspective.multiply(view);
viewPerspective.multiply(perspective);
var twoDVectorAsMatrix;
twoDVectorAsMatrix = viewPerspective.multiplyByVector(vector);
var x = (twoDVectorAsMatrix.getValueAt(0, 0) + 1) / 2.0;
x = x * this.width();
var y = (1 - twoDVectorAsMatrix.getValueAt(0, 1)) / 2.0;
y = y * this.height();
return new goog.math.Vec2(Math.round(x), Math.round(y));
};
// export symbols (requiered for advanced compilation)
goog.exportSymbol('X.renderer',X.renderer);
goog.exportSymbol('X.renderer.prototype.getDimension',X.renderer.prototype.getDimension);
goog.exportSymbol('X.renderer.prototype.getWidth',X.renderer.prototype.getWidth);
goog.exportSymbol('X.renderer.prototype.setWidth', X.renderer.prototype.setWidth);
goog.exportSymbol('X.renderer.prototype.getHeight', X.renderer.prototype.getHeight);
goog.exportSymbol('X.renderer.prototype.setHeight', X.renderer.prototype.setHeight);
goog.exportSymbol('X.renderer.prototype.getBackgroundColor', X.renderer.prototype.getBackgroundColor);
goog.exportSymbol('X.renderer.prototype.setBackgroundColor', X.renderer.prototype.setBackgroundColor);
goog.exportSymbol('X.renderer.prototype.getContainer', X.renderer.prototype.getContainer);
goog.exportSymbol('X.renderer.prototype.setContainer', X.renderer.prototype.setContainer);
goog.exportSymbol('X.renderer.prototype.init', X.renderer.prototype.init);
goog.exportSymbol('X.renderer.prototype.setContainerById', X.renderer.prototype.setContainerById); |
<<<<<<<
/**
* The events of this class.
*
* @enum {string}
*/
X.camera.events = {
// the pan event, where the camera and focus get moved accordingly
PAN: X.event.uniqueId('pan'),
// the rotate event, where only the camera gets moved
ROTATE: X.event.uniqueId('rotate'),
// the zoom event, where the camera Z coordinate changes
ZOOM: X.event.uniqueId('zoom')
};
=======
>>>>>>>
<<<<<<<
goog.events.listen(interactor, X.camera.events.PAN, this.onPan.bind(this));
goog.events.listen(interactor, X.camera.events.ROTATE, this.onRotate
=======
goog.events.listen(interactor, X.event.events.PAN, this.onPan.bind(this));
goog.events.listen(interactor, X.event.events.ROTATE, this.onRotate
>>>>>>>
goog.events.listen(interactor, X.event.events.PAN, this.onPan.bind(this));
goog.events.listen(interactor, X.event.events.ROTATE, this.onRotate
<<<<<<<
goog.events.listen(interactor, X.camera.events.ZOOM, this.onZoom.bind(this));
=======
goog.events.listen(interactor, X.event.events.ZOOM, this.onZoom.bind(this));
>>>>>>>
goog.events.listen(interactor, X.event.events.ZOOM, this.onZoom.bind(this));
<<<<<<<
if (!(event instanceof X.camera.ZoomEvent)) {
=======
if (!(event instanceof X.event.ZoomEvent)) {
>>>>>>>
if (!(event instanceof X.event.ZoomEvent)) {
<<<<<<<
if (!(event instanceof X.camera.PanEvent)) {
=======
if (!(event instanceof X.event.PanEvent)) {
>>>>>>>
if (!(event instanceof X.event.PanEvent)) {
<<<<<<<
if (!(event instanceof X.camera.RotateEvent)) {
=======
console.log('rotate received!!!')
if (!(event instanceof X.event.RotateEvent)) {
>>>>>>>
if (!(event instanceof X.event.RotateEvent)) {
<<<<<<<
this.dispatchEvent(new X.renderer.RenderEvent());
=======
this.dispatchEvent(new X.event.RenderEvent());
>>>>>>>
this.dispatchEvent(new X.event.RenderEvent());
<<<<<<<
this.dispatchEvent(new X.renderer.RenderEvent());
=======
this.dispatchEvent(new X.event.RenderEvent());
>>>>>>>
this.dispatchEvent(new X.event.RenderEvent());
<<<<<<<
this.dispatchEvent(new X.renderer.RenderEvent());
=======
this.dispatchEvent(new X.event.RenderEvent());
>>>>>>>
this.dispatchEvent(new X.event.RenderEvent());
<<<<<<<
this.dispatchEvent(new X.renderer.RenderEvent());
=======
this.dispatchEvent(new X.event.RenderEvent());
>>>>>>>
this.dispatchEvent(new X.event.RenderEvent());
<<<<<<<
/**
* The pan event to initiate moving the camera and the focus.
*
* @constructor
* @extends {X.event}
*/
X.camera.PanEvent = function() {
// call the default event constructor
goog.base(this, X.camera.events.PAN);
/**
* The distance to pan in screen space.
*
* @type {?goog.math.Vec2}
* @protected
*/
this._distance = null;
};
// inherit from X.event
goog.inherits(X.camera.PanEvent, X.event);
/**
* The rotate event to initiate moving the camera around the focus.
*
* @constructor
* @extends {X.event}
*/
X.camera.RotateEvent = function() {
// call the default event constructor
goog.base(this, X.camera.events.ROTATE);
/**
* The distance to pan in screen space.
*
* @type {?goog.math.Vec2}
* @protected
*/
this._distance = null;
/**
* The angle in degrees to pan around the last mouse position in screen space.
*
* @type {!number}
* @protected
*/
this._angle = 0;
};
// inherit from X.event
goog.inherits(X.camera.RotateEvent, X.event);
/**
* The zoom event to initiate zoom in or zoom out.
*
* @constructor
* @extends {X.event}
*/
X.camera.ZoomEvent = function() {
// call the default event constructor
goog.base(this, X.camera.events.ZOOM);
/**
* The flag for the zooming direction. If TRUE, the zoom operation will move
* the objects closer to the camera. If FALSE, further away from the camera.
*
* @type {!boolean}
* @protected
*/
this._in = false;
/**
* The flag for the zooming speed. If TRUE, the zoom operation will happen
* fast. If FALSE, there will be a fine zoom operation.
*
* @type {!boolean}
* @protected
*/
this._fast = false;
};
// inherit from X.event
goog.inherits(X.camera.ZoomEvent, X.event);
=======
>>>>>>> |
<<<<<<<
* WebGL context and attach all necessary objects (e.g. camera, shaders..). All
* this will only happen once, no matter how often this method is called.
*
=======
* WebGL context and attach all necessary objects (e.g. camera, shaders..).
* Finally, initialize the event listeners. All this will only happen once, no
* matter how often this method is called.
*
>>>>>>>
* WebGL context and attach all necessary objects (e.g. camera, shaders..).
* Finally, initialize the event listeners. All this will only happen once, no
* matter how often this method is called.
*
<<<<<<<
gl.enable(gl.DEPTH_TEST);
=======
// gl.enable(gl.DEPTH_TEST);
// TODO transparency
gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
gl.disable(gl.DEPTH_TEST);
>>>>>>>
// gl.enable(gl.DEPTH_TEST);
// TODO transparency
gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
gl.disable(gl.DEPTH_TEST);
<<<<<<<
=======
// now since we have a valid gl viewport, we want to configure the interactor
// and camera
//
// create a new interactor
var interactor = new X.interactor(canvas);
interactor.observeMouseWheel();
interactor.observeMouseDown();
interactor.observeMouseUp();
interactor.observeMouseMove();
>>>>>>>
// now since we have a valid gl viewport, we want to configure the interactor
// and camera
//
// create a new interactor
var interactor = new X.interactor(canvas);
interactor.observeMouseWheel();
interactor.observeMouseDown();
interactor.observeMouseUp();
interactor.observeMouseMove();
<<<<<<<
var camera = new X.camera(this);
=======
// width and height are required to calculate the perspective
var camera = new X.camera(this.width(), this.height());
// observe the interactor for user interactions (mouse-movements etc.)
camera.observe(interactor);
// listen to render requests from the camera
// these get fired after user-interaction and camera re-positioning to re-draw
// all objects
goog.events.listen(camera, X.renderer.events.RENDER, this.render.bind(this));
>>>>>>>
// width and height are required to calculate the perspective
var camera = new X.camera(this.width(), this.height());
// observe the interactor for user interactions (mouse-movements etc.)
camera.observe(interactor);
// listen to render requests from the camera
// these get fired after user-interaction and camera re-positioning to re-draw
// all objects
goog.events.listen(camera, X.renderer.events.RENDER, this.render.bind(this));
<<<<<<<
=======
this._interactor = interactor;
>>>>>>>
this._interactor = interactor;
<<<<<<<
// store the index of the position and color attributes
=======
// store the index of the position, color and opacity attributes
>>>>>>>
// store the index of the position, color and opacity attributes
<<<<<<<
=======
this._vertexOpacityAttribute = this._gl.getAttribLocation(shaderProgram,
shaders.opacity());
this._gl.enableVertexAttribArray(this._vertexOpacityAttribute);
>>>>>>>
this._vertexOpacityAttribute = this._gl.getAttribLocation(shaderProgram,
shaders.opacity());
this._gl.enableVertexAttribArray(this._vertexOpacityAttribute);
<<<<<<<
=======
//
>>>>>>>
//
<<<<<<<
var keyIterator = this._objects.getKeyIterator();
try {
while (true) {
var key = keyIterator.next();
var object = this._objects.get(key);
if (object) {
// we have a valid object
var vertexBuffer = this._vertexBuffers.get(key);
var colorBuffer = this._colorBuffers.get(key);
// ..bind the glBuffers
this._gl.bindBuffer(this._gl.ARRAY_BUFFER, vertexBuffer.glBuffer());
this._gl.vertexAttribPointer(this._vertexPositionAttribute,
vertexBuffer.itemSize(), this._gl.FLOAT, false, 0, 0);
this._gl.bindBuffer(this._gl.ARRAY_BUFFER, colorBuffer.glBuffer());
this._gl.vertexAttribPointer(this._vertexColorAttribute, colorBuffer
.itemSize(), this._gl.FLOAT, false, 0, 0);
// .. and draw
this._gl.drawArrays(this._gl.TRIANGLES, 0, vertexBuffer.itemCount());
=======
//
// the rendering order is important in terms of opacity/transparency of
// objects
// thus, the most opaque objects are rendered first, the least opaque (== the
// most transparent) objects are rendered last
var objects = this._objects.getValues();
var numberOfObjects = objects.length;
var i;
for (i = 0; i < numberOfObjects; ++i) {
var object = objects[i];
if (object) {
// we have a valid object
var id = object.id();
var vertexBuffer = this._vertexBuffers.get(id);
var colorBuffer = this._colorBuffers.get(id);
var opacityBuffer = this._opacityBuffers.get(id);
// ..bind the glBuffers
this._gl.bindBuffer(this._gl.ARRAY_BUFFER, vertexBuffer.glBuffer());
this._gl.vertexAttribPointer(this._vertexPositionAttribute, vertexBuffer
.itemSize(), this._gl.FLOAT, false, 0, 0);
this._gl.bindBuffer(this._gl.ARRAY_BUFFER, colorBuffer.glBuffer());
this._gl.vertexAttribPointer(this._vertexColorAttribute, colorBuffer
.itemSize(), this._gl.FLOAT, false, 0, 0);
this._gl.bindBuffer(this._gl.ARRAY_BUFFER, opacityBuffer.glBuffer());
this._gl.vertexAttribPointer(this._vertexOpacityAttribute, opacityBuffer
.itemSize(), this._gl.FLOAT, false, 0, 0);
// .. and draw with the object's draw mode
var drawMode = -1;
if (object.type() == X.object.types.TRIANGLES) {
drawMode = this._gl.TRIANGLES;
} else if (object.type() == X.object.types.LINES) {
drawMode = this._gl.LINES;
>>>>>>>
//
// the rendering order is important in terms of opacity/transparency of
// objects
// thus, the most opaque objects are rendered first, the least opaque (== the
// most transparent) objects are rendered last
var objects = this._objects.getValues();
var numberOfObjects = objects.length;
var i;
for (i = 0; i < numberOfObjects; ++i) {
var object = objects[i];
if (object) {
// we have a valid object
var id = object.id();
var vertexBuffer = this._vertexBuffers.get(id);
var colorBuffer = this._colorBuffers.get(id);
var opacityBuffer = this._opacityBuffers.get(id);
// ..bind the glBuffers
this._gl.bindBuffer(this._gl.ARRAY_BUFFER, vertexBuffer.glBuffer());
this._gl.vertexAttribPointer(this._vertexPositionAttribute, vertexBuffer
.itemSize(), this._gl.FLOAT, false, 0, 0);
this._gl.bindBuffer(this._gl.ARRAY_BUFFER, colorBuffer.glBuffer());
this._gl.vertexAttribPointer(this._vertexColorAttribute, colorBuffer
.itemSize(), this._gl.FLOAT, false, 0, 0);
this._gl.bindBuffer(this._gl.ARRAY_BUFFER, opacityBuffer.glBuffer());
this._gl.vertexAttribPointer(this._vertexOpacityAttribute, opacityBuffer
.itemSize(), this._gl.FLOAT, false, 0, 0);
// .. and draw with the object's draw mode
var drawMode = -1;
if (object.type() == X.object.types.TRIANGLES) {
drawMode = this._gl.TRIANGLES;
} else if (object.type() == X.object.types.LINES) {
drawMode = this._gl.LINES;
<<<<<<<
goog.exportSymbol('X.renderer',X.renderer);
goog.exportSymbol('X.renderer.prototype.dimension',X.renderer.prototype.dimension);
goog.exportSymbol('X.renderer.prototype.width',X.renderer.prototype.width);
goog.exportSymbol('X.renderer.prototype.setWidth', X.renderer.prototype.setWidth);
goog.exportSymbol('X.renderer.prototype.height', X.renderer.prototype.height);
goog.exportSymbol('X.renderer.prototype.setHeight', X.renderer.prototype.setHeight);
goog.exportSymbol('X.renderer.prototype.backgroundColor', X.renderer.prototype.backgroundColor);
goog.exportSymbol('X.renderer.prototype.setBackgroundColor', X.renderer.prototype.setBackgroundColor);
goog.exportSymbol('X.renderer.prototype.container', X.renderer.prototype.container);
goog.exportSymbol('X.renderer.prototype.setContainer', X.renderer.prototype.setContainer);
=======
goog.exportSymbol('X.renderer', X.renderer);
goog.exportSymbol('X.renderer.prototype.getDimension',
X.renderer.prototype.getDimension);
goog.exportSymbol('X.renderer.prototype.getWidth',
X.renderer.prototype.getWidth);
goog.exportSymbol('X.renderer.prototype.setWidth',
X.renderer.prototype.setWidth);
goog.exportSymbol('X.renderer.prototype.getHeight',
X.renderer.prototype.getHeight);
goog.exportSymbol('X.renderer.prototype.setHeight',
X.renderer.prototype.setHeight);
goog.exportSymbol('X.renderer.prototype.getBackgroundColor',
X.renderer.prototype.getBackgroundColor);
goog.exportSymbol('X.renderer.prototype.setBackgroundColor',
X.renderer.prototype.setBackgroundColor);
goog.exportSymbol('X.renderer.prototype.getContainer',
X.renderer.prototype.getContainer);
goog.exportSymbol('X.renderer.prototype.setContainer',
X.renderer.prototype.setContainer);
>>>>>>>
goog.exportSymbol('X.renderer', X.renderer);
goog.exportSymbol('X.renderer.prototype.getDimension',
X.renderer.prototype.getDimension);
goog.exportSymbol('X.renderer.prototype.getWidth',
X.renderer.prototype.getWidth);
goog.exportSymbol('X.renderer.prototype.setWidth',
X.renderer.prototype.setWidth);
goog.exportSymbol('X.renderer.prototype.getHeight',
X.renderer.prototype.getHeight);
goog.exportSymbol('X.renderer.prototype.setHeight',
X.renderer.prototype.setHeight);
goog.exportSymbol('X.renderer.prototype.getBackgroundColor',
X.renderer.prototype.getBackgroundColor);
goog.exportSymbol('X.renderer.prototype.setBackgroundColor',
X.renderer.prototype.setBackgroundColor);
goog.exportSymbol('X.renderer.prototype.getContainer',
X.renderer.prototype.getContainer);
goog.exportSymbol('X.renderer.prototype.setContainer',
X.renderer.prototype.setContainer);
<<<<<<<
goog.exportSymbol('X.renderer.prototype.setContainerById', X.renderer.prototype.setContainerById);
goog.exportSymbol('X.renderer.prototype.addShaders', X.renderer.prototype.addShaders);
goog.exportSymbol('X.renderer.prototype.addObject', X.renderer.prototype.addObject);
goog.exportSymbol('X.renderer.prototype.render', X.renderer.prototype.render);
goog.exportSymbol('X.renderer.prototype.convertWorldToDisplayCoordinates', X.renderer.prototype.convertWorldToDisplayCoordinates);
=======
goog.exportSymbol('X.renderer.prototype.setContainerById',
X.renderer.prototype.setContainerById);
>>>>>>>
goog.exportSymbol('X.renderer.prototype.setContainerById',
X.renderer.prototype.setContainerById); |
<<<<<<<
203: 'Tiliä ei voida muuntaa, koska kaikki allekirjoituskumppanit eivät ole tunnettuja. Heidän täytyy kuulua samaan lompakkoon tai vähintään yksi siirto täytyy olla tehtynä.',
305: 'NIS ei ole käytettävissä. Yritä käynnistää NEM sovellus uudelleen. Mikäli yrität käyttää NIS palvelua etänä, tarkista kirjoitusvirheet (host), tai käytä toista etä NIS palvelua.',
306: 'Esiintyi ongelma, jota kehitystiimi ei ole tavannut aikaisemmin. Pahoittelemme tilannetta, yritä uudelleen. Muussa tapauksessa avaa uusi keskustelu NEM NIS/NCC foorumissa.',
=======
203: 'Tiliä ei voitu muuttaa, koska kaikkia muita allekirjoittajia ei tunneta. Muiden allekirjoittajien täytyy sijaita samassa lompakossa taikka heidän on täytynyt tehdä ainakin yksi tilisiirto.',
305: 'NIS ei ole käytettävissä. Yritä käynnistää NEM-sovellus uudelleen. Mikäli yrität käyttää NIS-palvelua etänä, tarkista kirjoitusvirheet (host), tai käytä toista etä-NIS -palvelua.',
306: 'Esiintyi ongelma, jota kehitystiimi ei ole tavannut aikaisemmin. Pahoittelemme tilannetta, yritä uudelleen. Muussa tapauksessa avaa uusi keskustelu NEM:n keskustelualueella NIS/NCC -kohdassa.',
>>>>>>>
203: 'Tiliä ei voida muuntaa, koska kaikki allekirjoituskumppanit eivät ole tunnettuja. Heidän täytyy kuulua samaan lompakkoon tai vähintään yksi siirto täytyy olla tehtynä.',
305: 'NIS ei ole käytettävissä. Yritä käynnistää NEM-sovellus uudelleen. Mikäli yrität käyttää NIS-palvelua etänä, tarkista kirjoitusvirheet (host), tai käytä toista etä-NIS -palvelua.',
306: 'Esiintyi ongelma, jota kehitystiimi ei ole tavannut aikaisemmin. Pahoittelemme tilannetta, yritä uudelleen. Muussa tapauksessa avaa uusi keskustelu NEM:n keskustelualueella NIS/NCC -kohdassa.',
<<<<<<<
703: 'Tilisi saldo ei ole oikea tälle siirrolle.',
=======
703: 'Tililläsi ei ole oikeaa saldoa tehdäksesi tämän siirron.',
>>>>>>>
703: 'Tilisi saldo ei ole oikea tälle siirrolle.',
<<<<<<<
709: 'Tili on tuntematon. Tilillä on oltava yksi lähetys tai vastaanotto, jotta se voidaan tunnistaa verkossa.',
710: 'Siirtoa ei hyväksytty, koska siirtojen välimuisti on täynnä. Korkeampi palkkio parantaaa siirron hyväksymistä.',
730: 'Importance siirto (valtuutettu louhinta) on ristiriidassa nykyisen siirron kanssa.',
731: 'Tilin saldo, jossa on tarkoitus aloittaa valtuutettu louhinta, ei ole nolla, joten sitä ei voida käyttää.',
=======
709: 'Tili on tuntematon. Tilin täytyy olla tehnyt ainakin yksi siirto (joko lähettäjänä tai vastaanottajana), jotta se voidaan tunnistaa verkossa.',
710: 'Siirtoa ei hyväksytty, koska siirtojen välimuisti on täynnä. Korkeampi palkkio parantaaa mahdollisuutta siirron hyväksymiseen.',
730: 'Merkityksen siirto (delegoitu louhinta) on ristiriidassa olemassa olevan siirron kanssa.',
731: 'Delegoidulla louhimistilillä ei ole saldoa, joten sitä ei voida käyttää.',
>>>>>>>
709: 'Tili on tuntematon. Tilin täytyy olla tehnyt ainakin yksi siirto (joko lähettäjänä tai vastaanottajana), jotta se voidaan tunnistaa verkossa.',
710: 'Siirtoa ei hyväksytty, koska siirtojen välimuisti on täynnä. Korkeampi palkkio parantaaa mahdollisuutta siirron hyväksymiseen.',
730: 'Merkityksen siirto (delegoitu louhinta) on ristiriidassa olemassa olevan siirron kanssa.',
731: 'Delegoidulla louhimistilillä ei ole saldoa, joten sitä ei voida käyttää.',
<<<<<<<
733: 'Valtuutettu louhinta on jo aktiivinen.',
734: 'Valtuutettu louhinta ei ole aktiivinen. Aktivointi ei ole mahdollista.',
740: 'Siirtoa ei ole mahdollinen multisig tilille.',
741: 'Multisig allekirjoitettu siirto hylättiin. Nykyinen tili ei ole allekirjoittaja multisig tilillä.',
742: 'Multisig allekirjoitettu siirto hylättiin. Allekirjoittajakumppania ei tunneta NEM verkossa.',
743: 'Multisig tilin muutos hylätty.Yksi lisätty tili on jo allekirjoittaja.',
901: 'Tapahtui virhe määritettäessä offline node.',
1000: 'Private key ja public key, eivät vastaa toisiaan.',
=======
733: 'Delegoitu louhiminen on jo käytössä.',
734: 'Ei voida deaktivoida, koska delegoitu louhinta ei ole käytössä.',
740: 'Siirtoa ei sallita multisig-tilille.',
741: 'Multisig allekirjoitettu siirto hylättiin. Nykyinen tili ei ole multisig-tilin allekirjoittaja.',
742: 'Multisig allekirjoitettu siirto hylättiin. Allekirjoittajakumppania ei tunneta NEM-verkossa.',
743: 'Multisig-tilin muutos hylätty. Yksi lisätty tili on jo allekirjoittaja.',
901: 'Offline moden käynnistyksessä tapahtui virhe.',
1000: 'Private key ja public key eivät vastaa toisiaan.',
>>>>>>>
733: 'Delegoitu louhiminen on jo käytössä.',
734: 'Ei voida deaktivoida, koska delegoitu louhinta ei ole käytössä.',
740: 'Siirtoa ei sallita multisig-tilille.',
741: 'Multisig allekirjoitettu siirto hylättiin. Nykyinen tili ei ole multisig-tilin allekirjoittaja.',
742: 'Multisig allekirjoitettu siirto hylättiin. Allekirjoittajakumppania ei tunneta NEM verkossa.',
743: 'Multisig-tilin muutos hylätty. Yksi lisätty tili on jo allekirjoittaja.',
901: 'Offline moden käynnistyksessä tapahtui virhe.',
1000: 'Private key ja public key eivät vastaa toisiaan.',
<<<<<<<
unknownMessage: 'Ncc ei saanut vastausta asetetun aikarajan sisällä. Siirto on ehkä kuitenkin lähetetty verkkoon.<br /><br />Tarkista siirrot, ennen kuin yrität uudelleen.',
=======
unknownMessage: 'NCC ei saanut vastausta oikeassa ajassa. Siirto saattoi kuitenkin onnistua.<br /><br />Tarkista siirrot ennen kuin yrität siirtoa uudelleen.',
>>>>>>>
unknownMessage: 'NCC ei saanut vastausta oikeassa ajassa. Siirto saattoi kuitenkin onnistua.<br /><br />Tarkista siirrot ennen kuin yrität siirtoa uudelleen.',
<<<<<<<
hoursDue: 'Maksettavaksi (tunnit)',
hoursDueExplanation: 'Jos siirtoa ei ole tehty asetetun aikarajan sisällä, se hylätään.',
closeButton: 'Sulje'
=======
hoursDue: 'Erääntyy (tunneissa)',
hoursDueExplanation: 'Siirto hylätään, jos sitä ei tehdä ennen erääntymistä.',
closeButton: 'Sulje'
>>>>>>>
hoursDue: 'Erääntyy (tunneissa)',
hoursDueExplanation: 'Siirto hylätään, jos sitä ei tehdä ennen erääntymistä.',
closeButton: 'Sulje'
<<<<<<<
auto: 'Automaattinen uudelleenkäynnistys, kun lompakko on avattu'
=======
auto: 'Auto-boot, kun lompakko on avattu'
>>>>>>>
auto: 'Automaattinen uudelleenkäynnistys, kun lompakko on avattu'
<<<<<<<
title: 'Vahvista multiig tilin muunto',
total: 'Yhteensä'
=======
title: 'Vahvista multisig-tilin muunto',
total: 'Yhteensä',
>>>>>>>
title: 'Vahvista multisig-tilin muunto',
total: 'Yhteensä'
<<<<<<<
warning: 'Boot node varoitus',
warningText: 'Yrität käynnistää uudelleen nodea <u>{{2}}</u><br/><br/>Etä noden käynnistäminen uudelleen on mahdotonta\nNCC:n avulla.',
warningStatement: 'Olet asettanut automaattisen uudelleenkäynnistämisen valintaan totta ja käytät etä nodea {{3}}.<br/><br/>Etä noden uudelleenkäynnistäminen ei ole mahdollista NCC:n avulla.',
warningQuestion: 'Oletko varma, että haluat käynnistää uudelleen noden <u>{{3}}</u> käyttämällä private keytä tlille {{1}} ({{2}} XEM)?<br><br>tämä paljastaa<span class=\"varoitus\">private keyn</span> nodelle: <u>{{3}}</u>.'
=======
warning: 'Boot node -varoitus',
warningText: 'Yrität käynnistää noden uudelleen <u>{{2}}</u><br/><br/>Noden käynnistäminen uudelleen ei ole tällä hetkellä mahdollista etänä NCC:stä.',
warningStatement: 'Sinulla on asetuksissa päällä noden uudelleen käynnistäminen automaattisesti, vaikka olet yhdistänyt nodeen etänä {{3}}.<br/><br/>Noden käynnistäminen uudelleen ei ole tällä hetkellä mahdollista etänä NCC:stä',
warningQuestion: 'Oletko varma, että haluat käynnistää noden uudelleen <u>{{3}}</u> käyttämällä private keytä tilille {{1}} ({{2}} XEM)?<br><br>tämä paljastaa<span class=\"varoitus\">private keyn</span> nodelle: <u>{{3}}</u>.'
>>>>>>>
warning: 'Boot node -varoitus',
warningText: 'Yrität käynnistää noden uudelleen <u>{{2}}</u><br/><br/>Noden käynnistäminen uudelleen ei ole tällä hetkellä mahdollista etänä NCC:stä.',
warningStatement: 'Sinulla on asetuksissa päällä noden uudelleen käynnistäminen automaattisesti, vaikka olet yhdistänyt nodeen etänä {{3}}.<br/><br/>Noden käynnistäminen uudelleen ei ole tällä hetkellä mahdollista etänä NCC:stä',
warningQuestion: 'Oletko varma, että haluat käynnistää noden uudelleen <u>{{3}}</u> käyttämällä private keytä tilille {{1}} ({{2}} XEM)?<br><br>tämä paljastaa<span class=\"varoitus\">private keyn</span> nodelle: <u>{{3}}</u>.'
<<<<<<<
title: 'Näytä tilin PPRIVATE key.',
message: 'Tämä toiminto näyttää private keyn ruudulla tekstinä.Jos tietokoneellasi on haittaohjelma, on tämä toiminta vaarallista. Oletko varma, että haluat toimia näin?',
=======
title: 'Näytä tilin PRIVATE Key',
message: 'Tämä näyttää tilin private keyn tekstinä näytöllä. Tämä voi olla vaarallinen operaation, jos tietokoneellasi on haittaohjelmia. Jatketaanko tästä huolimatta?',
>>>>>>>
title: 'Näytä tilin PRIVATE Key',
message: 'Tämä näyttää tilin private keyn tekstinä näytöllä. Tämä voi olla vaarallinen operaation, jos tietokoneellasi on haittaohjelmia. Jatketaanko tästä huolimatta?',
<<<<<<<
show: 'Näytä key'
=======
show: 'Näytä avain'
>>>>>>>
show: 'Näytä avain'
<<<<<<<
title: 'Näytä etä tilin PRIVATE Key',
message: 'Tämä toiminto näyttää private keyn ruudulla tekstinä.Jos tietokoneellasi on haittaohjelma, on tämä toiminta vaarallista. Oletko varma, että haluat toimia näin?'
=======
title: 'Näytä etätilin PRIVATE Key',
message: 'Tämä näyttää tilin private keyn tekstinä näytöllä. Tämä voi olla vaarallinen operaation, jos tietokoneellasi on haittaohjelmia. Jatketaanko tästä huolimatta?',
>>>>>>>
title: 'Näytä etätilin PRIVATE Key',
message: 'Tämä näyttää tilin private keyn tekstinä näytöllä. Tämä voi olla vaarallinen operaation, jos tietokoneellasi on haittaohjelmia. Jatketaanko tästä huolimatta?',
<<<<<<<
title: 'Aktivoi valtuutettu louhinta.',
=======
title: 'Aktivoi delegoitu louhinta',
>>>>>>>
title: 'Aktivoi delegoitu louhinta',
<<<<<<<
warning: 'Varoitus',
warningText: 'Aktivointi kestää 6 tuntia(360 lohkoa). Aktivointi ei käynnistä louhintaa automaattisesti.'
=======
warning: 'Varoitus',
warningText: 'Aktivointi kestää 6 tuntia (360 lohkoa). Aktivointi EI aloita louhimista automaattisesti.'
>>>>>>>
warning: 'Varoitus',
warningText: 'Aktivointi kestää 6 tuntia (360 lohkoa). Aktivointi EI aloita louhimista automaattisesti.'
<<<<<<<
title: 'Lopeta valtuutettu louhinta',
=======
title: 'Deaktivoi delegoitu louhinta',
>>>>>>>
title: 'Deaktivoi delegoitu louhinta',
<<<<<<<
warning: 'Varoitus',
warningText: 'Lopetus kestää 6 tuntia (360 lohkoa).'
=======
warning: 'Varoitus',
warningText: 'Deaktivointi kestää 6 tuntia (360 lohkoa).'
>>>>>>>
warning: 'Varoitus',
warningText: 'Deaktivointi kestää 6 tuntia (360 lohkoa).'
<<<<<<<
title: 'Aloita valtuutettu louhinta',
=======
title: 'Aloita delegoitu louhinta',
>>>>>>>
title: 'Aloita delegoitu louhinta',
<<<<<<<
title: 'Lopeta valtuutettu louhinta',
=======
title: 'Lopeta delegoitu louhinta',
>>>>>>>
title: 'Lopeta delegoitu louhinta',
<<<<<<<
leavePage: 'Olet poistumassa lompakostasi. Jos poistut näin, saattaa muilla tämän tietokoneen käyttäjillä mahdollisuus päästä lompakkoosi. Käytä \"sulje lompakko\" menua pudotusvalikosta, joka sijaitsee oikeassa yläreunassa, ennen kuin suljet selaimen tai jätä tämä toiminto tekemättä.'
=======
leavePage: "Olet poistumassa lompakostasi. Muista, että muut tämän tietokoneen käyttäjät voivat päästä lompakkoosi, jos poistut lompakostasi tällä tavalla. Jos haluat estää muiden pääsyn lompakkoosi, valitse "Sulje lompakko\" oikean ylänurkan valikosta ennen kuin suljet lompakkosivun."
>>>>>>>
leavePage: "Olet poistumassa lompakostasi. Muista, että muut tämän tietokoneen käyttäjät voivat päästä lompakkoosi, jos poistut lompakostasi tällä tavalla. Jos haluat estää muiden pääsyn lompakkoosi, valitse "Sulje lompakko\" oikean ylänurkan valikosta ennen kuin suljet lompakkosivun."
<<<<<<<
showPrivateKey: 'Näytä tilin PRIVATE key',
showRemotePrivateKey: 'Näytä etätilin PRIVATE key',
viewDetails: 'Näytä tilin tiedot',
=======
showPrivateKey: 'Näytä tilin PRIVATE key',
showRemotePrivateKey: 'Näytä etätilin PRIVATE key',
viewDetails: 'Näytä tilin tarkemmat tiedot',
>>>>>>>
showPrivateKey: 'Näytä tilin PRIVATE key',
showRemotePrivateKey: 'Näytä etätilin PRIVATE key',
viewDetails: 'Näytä tilin tarkemmat tiedot',
<<<<<<<
copyClipboard: 'Kopioi osoite työpöydälle',
copyDisabled: 'Osoitteen kopiointi edellyttää toimintoa, joka ei ole käytössä.',
convertMultisig: 'Muunna toinen tili multisig tiliksi'
=======
copyClipboard: 'Kopioi osoite leikepöydälle',
copyDisabled: 'Osoitteen kopiointi vaatii toimiakseen flashia',
convertMultisig: 'Muunna toinen tili multisig-tiliksi'
>>>>>>>
copyClipboard: 'Kopioi osoite leikepöydälle',
copyDisabled: 'Osoitteen kopiointi vaatii toimiakseen flashia',
convertMultisig: 'Muunna toinen tili multisig-tiliksi'
<<<<<<<
activate: 'Aktivoi valtuutettu louhinta',
activating: 'Aktivoidaan valtuutettu louhinta...',
active: 'Valttuutettu louhinta on aktiivinen',
deactivate: 'Lopeta valtuutettu louhinta',
deactivating: 'lopetetaan valtuutettu louhinta...',
startRemoteHarvesting: 'Aloita valtuutettu louhinta',
remotelyHarvesting: 'Etälouhinta ',
stopRemoteHarvesting: 'Lopeta valtuutettu louhinta'
=======
activate: 'Aktivoi delegoitu louhinta',
activating: 'Aktivoidaan delegoitua louhintaa...',
active: 'Delegoitu louhinta on aktiivinen',
deactivate: 'Deaktivoi delegoitu louhinta',
deactivating: 'Deaktivoidaan delegoitua louhintaa...',
startRemoteHarvesting: 'Aloita delegoitu louhinta',
remotelyHarvesting: 'Etälouhinta',
stopRemoteHarvesting: 'Lopeta delegoitu louhiminen'
>>>>>>>
activate: 'Aktivoi delegoitu louhinta',
activating: 'Aktivoidaan delegoitua louhintaa...',
active: 'Delegoitu louhinta on aktiivinen',
deactivate: 'Deaktivoi delegoitu louhinta',
deactivating: 'Deaktivoidaan delegoitua louhintaa...',
startRemoteHarvesting: 'Aloita delegoitu louhinta',
remotelyHarvesting: 'Etälouhinta',
stopRemoteHarvesting: 'Lopeta delegoitu louhiminen'
<<<<<<<
loading: 'Ladataan saldoa',
accountCosignatories: 'Multisig tili',
accountCosignatoriesView: 'Näytä allekirjoittajakumpanit',
=======
loading: 'Ladataan saldoa',
accountCosignatories: 'Multisig-tili',
accountCosignatoriesView: 'Näytä allekirjoittajakumppanit',
>>>>>>>
loading: 'Ladataan saldoa',
accountCosignatories: 'Multisig-tili',
accountCosignatoriesView: 'Näytä allekirjoittajakumppanit',
<<<<<<<
notSynced: 'Voi olla epätarkka, NIS ei ole vielä synkronoitu',
=======
notSynced: 'Saattaa olla epätarkka, NIS ei ole vielä ajan tasalla',
>>>>>>>
notSynced: 'Saattaa olla epätarkka, NIS ei ole vielä ajan tasalla',
<<<<<<<
startRemoteHarvesting: 'Aloita valtuuttu louhinta',
stopRemoteHarvesting: 'Lopeta valtuutettu louhinta'
=======
startRemoteHarvesting: 'Aloita delegoitu louhinta',
stopRemoteHarvesting: 'Lopeta delegoitu louhinta'
>>>>>>>
startRemoteHarvesting: 'Aloita delegoitu louhinta',
stopRemoteHarvesting: 'Lopeta delegoitu louhinta' |
<<<<<<<
, app = express()
, mongoose = require( 'mongoose' );
=======
, initializeSecurity = require( './security' )
, app = express();
>>>>>>>
, mongoose = require( 'mongoose' )
, initializeSecurity = require( './security' )
, app = express(); |
<<<<<<<
// Setup ODM
// if ( config.odm ) {
var mongoose = require( 'mongoose' );
mongoose.connect(config.mongoose.uri);
// }
=======
GLOBAL.injector = Injector( __dirname + '/src/services', __dirname + '/src/controllers' );
injector.instance( 'sequelize', sequelize );
injector.instance( 'config', config );
>>>>>>>
// Setup ODM
// if ( config.odm ) {
var mongoose = require( 'mongoose' );
mongoose.connect(config.mongoose.uri);
// }
GLOBAL.injector = Injector( __dirname + '/src/services', __dirname + '/src/controllers' );
injector.instance( 'sequelize', sequelize );
injector.instance( 'config', config );
<<<<<<<
// Note from richard: We have to do this for now, otherwise we cannot access other models inside a model
GLOBAL.models = require( './src/model' )( sequelize, mongoose, config );
=======
var models = require( 'models' )
>>>>>>>
var models = require( 'models' ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.